Skip to main content
This guide walks one flight booking toward fulfillment.status: "completed" in the sandbox environment, paying agentically: no browser, no card, no human at a checkout page.
Read this before you start: you cannot currently finish this walkthrough with a sandbox key.Step 4 mints a test payment token, and that endpoint lives on Jinko’s control plane, which has no sandbox deployment yet. There is no sandbox address to send that one request to, so steps 4 through 6 cannot be completed with a sandbox key today.Steps 1 to 3 work in sandbox right now, and the request and response shapes documented throughout are accurate. If you need the full path end to end, email dev@gojinko.com and ask for the current status of the test-token mint. Do not build a sandbox test harness around step 4 until it is available.
Every command below is copy-paste ready. Set two variables and work down the page.

What you need

  • A sandbox API key. Sandbox and production use separate keys; a production key will not authenticate here.
  • curl and jq.
  • For steps 4 to 6, access to the test-token mint, which is not yet available in sandbox.
You do not need a Stripe account, a real card, or a browser.
Sandbox is a fully isolated environment. Bookings made here are never ticketed, never charged, and never reach a real airline.

How agentic payment works

The normal flow sends a human to a checkout page. The agentic flow replaces that step with a Shared Payment Token (SPT), a Stripe object that authorizes one specific charge up to one specific amount.
In production your buyer’s platform mints the SPT. In sandbox you are meant to mint a test one yourself, which is what would make this walkthrough self-contained. That mint is the step that is not yet available.
Agentic payment is USD-only. Stripe runs Shared Payment Tokens on a US account, so a cart quoted in any other currency has no agentic path. Concretely: checkout omits agent_spt_params when the cart isn’t USD, and agent_payment/submit answers 400 currency_unsupported. Ask for USD explicitly at search time, as every step below does.

1) Price a flight

Search mode needs a route and a date. Pass currency: "USD" so the cart quotes in USD.
Keep that token:

2) Build the trip

One call creates the trip, adds the item, and attaches the traveler and contact. Both a traveler and a contact with email and phone are required before a trip can be booked.

3) Check out and read agent_spt_params

checkout quotes the cart and returns everything you need to pay for it.
agent_spt_params is the mandate for the token you are about to mint. Note max_amount is 18865, not 188.65: it is in minor units, hundredths of a dollar.
No agent_spt_params in the response? The cart is not in USD. Re-run step 1 with "currency": "USD". Do not proceed; the mint would produce a token that cannot be redeemed.Also check expires_at. It is the quote deadline, 5 minutes out. If you dawdle between steps, re-run checkout before minting. The checkout_url’s own 4-hour lifetime is a different clock and does not help you here.

4) Mint a test Shared Payment Token

This is the step that replaces your buyer’s payment platform: it mints a Stripe test-mode token so you can authorize a booking without a real card.
Not available in sandbox. This is a gap, not a caveat.This endpoint lives on Jinko’s control plane, which is a different service from the booking API you have been calling. The control plane has no sandbox deployment, so there is no sandbox address for this request and no sandbox host is published for it. The route also does not exist in production, by design, since it mints test-mode tokens.The consequence is concrete: with a sandbox key alone you cannot get a Shared Payment Token today, and therefore cannot complete steps 5 and 6. Email dev@gojinko.com to ask where this stands before you plan work around it.The contract below is documented so you can write your integration against it now, and so you can recognize the responses when the endpoint becomes reachable.
The request, once you have a host to send it to:
A 503 here means the environment has no Stripe agent account configured. That is a deployment issue, not a bad request. Nothing else returns 503.

5) Submit the payment

This step needs the $SPT from step 4, so in sandbox it is not reachable today. The contract is documented so you can build against it.
Hand the trip and the token to Jinko. This authorizes the charge and schedules fulfillment in one call.
If the response carries a checkout_url, the agentic path stopped. The card issuer asked for a 3DS step-up, or declined. Send a human to that URL to finish. This is the designed fallback, not an error, so handle it in production code.

6) Poll until it lands

get_trip is a cheap read rather than a live provider call, so polling every few seconds is fine.
At completed you get one entry per item:
That is a full agentic booking, once step 4 is reachable. See the fulfillment table for every state this loop can end on, and remember that partial means some items booked and some did not.
The polling loop itself works in sandbox today against any trip, including one paid through the ordinary hosted checkout. Only the token mint in step 4 is blocked.

When something goes wrong

What’s next?

  • Webhooks so you learn a booking landed without polling.
  • Flight booking guide for the browser-based checkout flow.
  • Errors for the full status-code reference, including what happens when a price moves.