Skip to main content
POST
Checkout a trip — returns a checkout URL the user opens to pay, plus the Shared Payment Token params an agent can use to pay programmatically
Checkout a trip, returns a checkout URL the user opens to pay, plus the Shared Payment Token params an agent can use to pay programmatically

Authorizations

X-API-Key
string
header
required

Body

application/json
trip_id
string
required
Example:

"trip_1048576"

fail_on_price_change
boolean

Refuse checkout if any item was re-priced since the quote. When true and at least one item moved, the call answers 409 PRICE_CHANGED listing those items and does nothing else — the trip stays quoted, so you can re-read it and check out again without the flag to accept the new price. Default false: checkout proceeds at the new price and the moved items carry price_changed / original_price.

Example:

false

intent
object

Response

Checkout session

session_id
string
Example:

"cs_1048576"

checkout_url
string
Example:

"https://book.gojinko.com/checkout?sid=1048576"

status
string

Checkout session state — "ready", "pending" or "failed".

Example:

"ready"

expires_at
string

When the locked quote behind this checkout expires (RFC 3339). Roughly five minutes from the call — pay before it passes. This is NOT the lifetime of checkout_url, which the platform keeps openable for longer. After this instant the platform REFUSES to take payment rather than charging a stale price: POST /v1/agent_payment/submit answers 410 QUOTE_EXPIRED and no payment object is created. To recover, call POST /v1/checkout again on the same trip — it re-quotes — and pay against the new expires_at. The hosted page offers the same refresh in one click.

Example:

"2026-06-01T12:39:56Z"

payment_type
enum<string>

How this checkout will be paid. checkout — send the user to checkout_url. agent — pay programmatically: mint a Shared Payment Token against agent_spt_params and call POST /v1/agent_payment/submit. intent — a payment intent is already authorized against the cart and no further action is needed from you.

Available options:
intent,
checkout,
agent
Example:

"checkout"

total_amount
object
items
object[]
agent_spt_params
object

Parameters to scope a Shared Payment Token to, so an agent can pay programmatically instead of opening checkout_url: mint the token against these, then call POST /v1/agent_payment/submit with trip_id and the token. Absent from the checkout response whenever the cart is quoted in a currency other than USD — Shared Payment Tokens are US-only — and that absence means agent-pay is unavailable for this cart, not that the field was dropped by accident. Such a cart is paid through checkout_url. The human checkout path ignores this object.