POST
/
checkout
/
sessions

This endpoint requires the checkout-sessions.write scope.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

A request to create a checkout session.

airline
object

The airline addendum data which describes the airline booking associated with this transaction.

buyer
object

Provide buyer details for the transaction. No buyer resource will be created on Gr4vy when used.

cart_items
object[] | null

An array of cart items that represents the line items of a transaction.

metadata
object | null

Any additional information about the transaction that you would like to store as key-value pairs. This data is passed to payment service providers that support it.

Response

201 - application/json

A short-lived checkout session.

airline
object

Contains information about an airline travel, if applicable.

cart_items
object[] | null

An array of cart items that represents the line items of a transaction.

expires_at
string

The date and time when the Checkout Session will expire. By default this will be set to 1 hour from the date of creation.

id
string

The ID of the Checkout Session.

metadata
object | null

Any additional information about the transaction that you would like to store as key-value pairs. This data is passed to payment service providers that support it.

payment_method
object | null

Details about the payment method for card type only.

type
enum<string>

checkout-session.

Available options:
checkout-session