> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gojinko.com/llms.txt
> Use this file to discover all available pages before exploring further.

# trip payment-attempts

> Read a payment attempt outcome

Read a payment attempt outcome


## OpenAPI

````yaml api-reference/public-api.yaml GET /v1/trip/{trip_id}/payment_attempts/{payment_attempt_id}
openapi: 3.0.0
info:
  title: Jinko Public API
  version: 0.18.1
  description: >-
    Curated public REST surface for Jinko. Authenticated with jnk_ API keys. See
    https://docs.gojinko.com for guides.


    ### Per-end-user attribution


    On booking calls you may send an optional `X-End-User-Id` request header to
    attribute the booking to one of your own end users (for per-end-user
    attribution and rate-limiting). The value is an **opaque, tenant-scoped**
    identifier that you choose — not a Jinko account id. Omit it to book as the
    tenant. WorkOS-shaped values (prefixed `user_` or `org_`) are rejected.
servers:
  - url: https://api.gojinko.com
    description: Production
  - url: https://api.sandbox.gojinko.com
    description: Sandbox
security: []
paths:
  /v1/trip/{trip_id}/payment_attempts/{payment_attempt_id}:
    get:
      tags:
        - Pricing & booking
      summary: Read a payment attempt outcome
      parameters:
        - schema:
            type: string
          required: true
          name: trip_id
          in: path
        - schema:
            type: string
          required: true
          name: payment_attempt_id
          in: path
      responses:
        '200':
          description: Payment attempt outcome
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentAttemptOutcome'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: BAD_REQUEST
                  message: Malformed JSON in request body.
                  doc_url: https://docs.gojinko.com/concepts/errors
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: AUTH_REQUIRED
                  message: Invalid or expired API key.
                  doc_url: https://docs.gojinko.com/api-reference/authentication
        '402':
          description: Payment required — organization balance exhausted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: PAYMENT_REQUIRED
                  message: >-
                    Insufficient balance — this call costs $0.0150 and your
                    organization has $0.0000 available. Top up at
                    https://dashboard.gojinko.com/developers/billing/topup
                  doc_url: https://docs.gojinko.com/concepts/errors
        '403':
          description: >-
            Payment attempt access forbidden. **`FORBIDDEN`** — The credential
            is valid, and this request is refused anyway. Do not rotate the key
            — it is working. Check that it is entitled to this operation, and on
            this environment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: NOT_FOUND
                  message: Resource not found.
                  doc_url: https://docs.gojinko.com/concepts/errors
        '409':
          description: The operation conflicts with the current state of the resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: CONFLICT
                  message: an exchange is already in progress for this booking
                  doc_url: https://docs.gojinko.com/concepts/errors
        '410':
          description: The resource this request names no longer exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: GONE
                  message: The resource no longer exists.
                  doc_url: https://docs.gojinko.com/concepts/errors
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: BAD_REQUEST
                  message: >-
                    origins: origins is required; trip_type: trip_type is
                    required
                  doc_url: https://docs.gojinko.com/concepts/errors
        '429':
          description: Rate limit or quota exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: RATE_LIMITED
                  message: Rate limit or quota exceeded.
                  doc_url: https://docs.gojinko.com/concepts/errors
        '502':
          description: The travel provider rejected the request, or an upstream call failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: UPSTREAM_REJECTED
                  message: >-
                    sabre-rest BargainFinderMaxRQ failed with status 400: 27131
                    - Number of connection locations exceeds maximum allowed
                  doc_url: https://docs.gojinko.com/concepts/errors
        '503':
          description: No travel provider can serve the request right now
          headers:
            Retry-After:
              description: >-
                Seconds to wait before retrying, forwarded verbatim from the
                upstream service. Absent when the upstream named no interval.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: UPSTREAM_UNAVAILABLE
                  message: >-
                    All flight providers are temporarily unable to serve this
                    search. Please retry later. Provider reasons: sabre-rest:
                    provider temporarily closed; travelfusion: quota exhausted
                  doc_url: https://docs.gojinko.com/concepts/errors
        '504':
          description: The travel provider did not answer in time
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: UPSTREAM_TIMEOUT
                  message: sabre-rest BargainFinderMaxRQ timed out after 30s
                  doc_url: https://docs.gojinko.com/concepts/errors
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  schemas:
    PaymentAttemptOutcome:
      type: object
      properties:
        payment_attempt_id:
          type: string
        trip_id:
          type: string
        quoted_cart_id:
          type: integer
        fulfillment_cart_id:
          type: integer
        payment_status:
          type: string
          enum:
            - not_started
            - pending
            - requires_authentication
            - authorized
            - captured
            - declined
            - cancelling
            - cancelled
            - expired
            - failed
        booking_status:
          type: string
        booking_ref:
          type: string
        payment_error:
          type: object
          nullable: true
          properties:
            code:
              type: string
              enum:
                - credential_format_invalid
                - payment_type_not_enabled
                - payment_credential_invalid
                - trip_owned_by_other_payment
                - idempotency_key_reused
                - attempt_in_progress
                - card_declined
                - payment_credential_rejected
                - authentication_required
                - authentication_failed
                - authentication_abandoned
                - quote_expired
                - attempt_terminal
                - payment_outcome_unknown
                - fulfillment_dispatch_delayed
                - reconciliation_required
                - temporarily_unavailable
            message:
              type: string
          required:
            - code
            - message
        recovery:
          type: object
          properties:
            action:
              type: string
              enum:
                - poll
                - authenticate
                - retry_same_key
                - retry_new_key
                - recheckout
                - contact_support
                - stop
            replacement_credential_required:
              type: boolean
          required:
            - action
            - replacement_credential_required
        recovery_status:
          type: string
          enum:
            - automatic
            - manual_review
        quote_expires_at:
          type: string
          format: date-time
        retry_after_seconds:
          type: integer
        authentication:
          type: object
          properties:
            url:
              type: string
            expires_at:
              type: string
              format: date-time
          required:
            - url
            - expires_at
        money:
          type: object
          properties:
            authorized:
              $ref: '#/components/schemas/Money'
            captured:
              $ref: '#/components/schemas/Money'
            released:
              $ref: '#/components/schemas/Money'
            refunded:
              $ref: '#/components/schemas/Money'
            externally_reimbursed:
              $ref: '#/components/schemas/Money'
            resolution_status:
              type: string
              enum:
                - pending
                - resolved
                - manual_review
                - external_reimbursement_pending
                - externally_reimbursed
            refund_reference:
              type: string
      required:
        - payment_attempt_id
        - trip_id
        - quoted_cart_id
        - payment_status
        - booking_status
        - payment_error
        - recovery
        - recovery_status
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - credential_format_invalid
                - payment_type_not_enabled
                - payment_credential_invalid
                - trip_owned_by_other_payment
                - idempotency_key_reused
                - attempt_in_progress
                - quote_expired
                - attempt_terminal
                - temporarily_unavailable
                - AUTH_REQUIRED
                - PAYMENT_REQUIRED
                - RATE_LIMITED
                - BAD_REQUEST
                - FORBIDDEN
                - NOT_FOUND
                - CONFLICT
                - GONE
                - QUOTE_EXPIRED
                - TRIP_EXPIRED
                - TRIP_STATE_CONFLICT
                - OFFER_EXPIRED
                - OFFER_UNAVAILABLE
                - MISSING_CUSTOMER_DETAILS
                - CURRENCY_UNSUPPORTED
                - HOTEL_NAME_LOW_CONFIDENCE
                - DESTINATION_LOW_CONFIDENCE
                - UPSTREAM_REJECTED
                - UPSTREAM_UNAVAILABLE
                - UPSTREAM_TIMEOUT
                - UPSTREAM_ERROR
                - INTERNAL
              description: >-
                What went wrong, as a stable machine-readable code. This is a
                closed set — branch on it rather than on `message`, which is
                prose and may change. New codes arrive in a minor version, so
                treat an unknown one as its HTTP status. A code can also stop
                being emitted: it leaves this set in a minor version, named in
                the changelog, and a branch you wrote for it goes unreached
                rather than wrong.
              example: BAD_REQUEST
            message:
              type: string
            doc_url:
              type: string
          required:
            - code
            - message
      required:
        - error
    Money:
      type: object
      properties:
        amount:
          type: number
          description: >-
            Alternative to `value` on some endpoints (the two never appear
            together); its scale depends on decimal_places. When this object
            carries decimal_places, amount is an INTEGER in minor units — divide
            by 10 ** decimal_places (e.g. select_ancillaries
            total_with_ancillaries). When there is no decimal_places field,
            amount is a decimal in MAJOR units, safe to display as-is (e.g. trip
            and checkout totals).
        value:
          type: integer
          description: >-
            Integer amount in MINOR units, always paired with decimal_places —
            divide by 10 ** decimal_places to display. Example: value 15977 with
            decimal_places 2 is 159.77 USD. Rendering this field directly shows
            prices 100x too high for 2-decimal currencies.
          example: 41250
        currency:
          type: string
          description: ISO 4217 currency code.
          example: USD
        decimal_places:
          type: integer
          description: >-
            Scale of the integer value/amount: display = integer / 10 **
            decimal_places. Always sent alongside minor-unit amounts. Usually
            the ISO 4217 digits of the currency (2 for USD/EUR/GBP, 0 for
            JPY/KRW, 3 for BHD/JOD/KWD) but currency-converted prices can carry
            a different scale — ALWAYS use the decimal_places sent with the
            amount, never a hardcoded 2. Only if the field is genuinely absent
            on a value-shaped object, fall back to the ISO digits for the
            currency.
          example: 2
        display:
          type: string
          description: >-
            The same figure as a string ready to show: the ISO 4217 code, a
            space, then the amount, e.g. "USD 159.77". With decimal_places it is
            written at exactly that scale (value 1561500, JPY, decimal_places 2
            is "JPY 15615.00"); without, at the ISO digits of the currency. Show
            this; compute with the number. Absent when the figure is not money
            (a cancellation step expressed as a percent or a number of nights)
            or could not be read unambiguously.
          example: USD 412.50
      description: >-
        A money figure in one of two scales, told apart by one rule. When
        `decimal_places` is present, `value` (or `amount`) is an INTEGER in
        minor units: divide by 10 ** decimal_places. When it is absent, `amount`
        is already in MAJOR units. Branch on whether decimal_places is present
        in the response you received, never on the currency code or the field
        name. `display` is the same figure as a string to show.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer

````