Pricing & booking

Read a payment attempt outcome

get/v1/trip/{trip_id}/payment_attempts/{payment_attempt_id}

Request

  • Base URL
    https://api.gojinko.com
  • URL
    https://api.gojinko.com/v1/trip/{trip_id}/payment_attempts/{payment_attempt_id}
  • Auth
    • API key in header X-API-Key
    • or HTTP bearer

Path parameters

trip_idstring required
payment_attempt_idstring required

Response

Payment attempt outcome

payment_attempt_idstring required
trip_idstring required

The trip this attempt pays, written with a trip_ prefix (trip_1048576); the trip answers carry the same id without it (1048576). Strip the prefix to compare the two.

quote_idstring required

The quote this payment is taken against.

quoted_cart_idinteger required

Deprecated: use quote_id instead. The same quote as an integer.

fulfillment_cart_idinteger

Deprecated: use booking_ref instead. An internal number for the booking this payment funds.

payment_status'not_started' | 'pending' | 'requires_authentication' | 'authorized' | 'captured' | 'declined' | 'cancelling' | 'cancelled' | 'expired' | 'failed' required
booking_statusstring required

The detailed status of the booking this payment started, not_scheduled until booking begins. booking_state on GET /v1/trip/{trip_id} is its summary.

failure_reasonstring nullable

Why the booking failed, when it failed after payment and the cause is known: offer_unavailable, price_changed, booking_not_created (the supplier holds no booking; nothing was booked and no money was taken), booking_cancelled_at_provider, ticketing_refused. Null otherwise. For offer_unavailable, the supplier no longer sells the priced offer. Nothing was booked and the card authorisation was released. Search again and book a new offer. The booking.failed webhook carries the same reason with a sentence to show the traveller (failure_message).

booking_refstring

The booking reference. Absent until the booking has one; never null.

recovery_status'automatic' | 'manual_review' required
quote_expires_atstring date-time

Deadline for completing this payment (RFC 3339): the quote deadline the checkout response and the trip's quote call expires_at.

retry_after_secondsinteger

Seconds to wait before reading the payment attempt again. Present only while recovery.action is poll; absent otherwise, never null.

Example response

{
  "trip_id": "trip_1048576",
  "quote_id": "2097152",
  "failure_reason": "booking_not_created",
  "items": [
    {
      "booked_item_id": "itm_aaaaaaaaaaaaafhuxsdxpbzrbfz5hm3a",
      "failure_reason": "booking_not_created"
    }
  ],
  "money": {
    "authorized": {
      "value": 41250,
      "currency": "USD",
      "decimal_places": 2,
      "display": "USD 412.50"
    },
    "captured": {
      "value": 41250,
      "currency": "USD",
      "decimal_places": 2,
      "display": "USD 412.50"
    },
    "released": {
      "value": 41250,
      "currency": "USD",
      "decimal_places": 2,
      "display": "USD 412.50"
    },
    "refunded": {
      "value": 41250,
      "currency": "USD",
      "decimal_places": 2,
      "display": "USD 412.50"
    },
    "externally_reimbursed": {
      "value": 41250,
      "currency": "USD",
      "decimal_places": 2,
      "display": "USD 412.50"
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.