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

# Payments

> How checkout lists the ways to pay for a trip, and which one to use.

Every payment starts from checkout. The `trip` tool builds the trip and returns a `trip_id`. The agent passes that ID to `checkout`, which prices the full trip, returns the priced quote's `quote_id` and `expires_at`, and lists the ways this trip can be paid.

```mermaid theme={null}
flowchart LR
  T["trip<br/>returns trip_id"] --> C["checkout<br/>prices the trip"]
  C --> P["Pay with one method<br/>checkout offers"]
  P --> F["Booking starts"]

  classDef jinko fill:#FFF4F4,stroke:#FF6363,color:#1A1A1A,stroke-width:2px;
  class T,C,P,F jinko;
```

Checkout books nothing and charges nothing. The booking starts only once the trip is paid.

## Choose a payment method

* **[Checkout link](https://docs.dev.gojinko.com/guides/checkout-link.md):** use it when a person should review the trip and pay on a page Jinko hosts. Every checkout returns it as `checkout_url`.
* **[Shared Payment Token](https://docs.dev.gojinko.com/guides/shared-payment-token.md):** use it when your agent platform pays programmatically, without sending the traveler to a payment page. Checkout returns `agent_spt_params` to mint the token.
* **[Card](https://docs.dev.gojinko.com/guides/partner-card-payments.md):** use it when your secure backend holds a customer card or a virtual credit card (VCC) and submits it through the REST API.

- **[Prepaid balance](https://docs.dev.gojinko.com/guides/partner-balance.md):** use it when your partner account pays from its prepaid balance through the REST API.

## What checkout offers for this trip

On the REST API, checkout's `accepted_payment_types` lists the payment types you can submit for this trip, with the headers and fields each one requires. Submit only a type it lists.

Pay with the `quote_id` from the checkout whose total the traveler approved, so the traveler is charged the amount they saw. Running checkout again returns the same `quote_id` while that quote is still valid and the trip has not changed; otherwise it prices the trip again and returns a new `quote_id`. [Payment outcomes and retries](https://docs.dev.gojinko.com/guides/payment-outcomes.md) explains what happens when that quote has expired.

## After payment

Read the trip (`get_trip`, or `GET /v1/trip/{trip_id}`) for `booking_state` and the Jinko booking reference `booking_ref`. A submitted payment answers with a payment outcome and a recovery action; [Payment outcomes and retries](https://docs.dev.gojinko.com/guides/payment-outcomes.md) explains how to read it and how to retry without paying twice.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.