Payments
- Transactions
- Buyers
- Checkout Sessions
- Payment options
- Payouts
- Refunds
- Sessions
- Settlement records
Instruments
- Card schemes
- Digital wallets
- Gift cards
- Payment methods
- Payment method definitions
Vault
- Account updater
- Network tokens
- Payment service tokens
- Vault Forward
- Vault Forward endpoints
- Vault Forward authentication
Connections
- All services
- Payment services
- Digital wallets
- Anti-fraud services
Dashboard
- Flow
- Reports
- Report executions
New checkout session
Creates a new Checkout Session.
This endpoint requires the checkout-sessions.write
scope.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
A request to create a checkout session.
The airline addendum data which describes the airline booking associated with this transaction.
The unique identifier of the reservation in the global distribution system.
1 - 50
The address of the place/agency that issued the ticket.
1 - 255
The date that the ticket was last issued in the airline reservation system.
For airline aggregators, two-character IATA code of the airline issuing the ticket.
2
An array of separate trip segments. Each leg contains detailed itinerary information.
Arrival airport code of leg. 3-letter ISO code according to IATA official directory.
3
The date and time of travel in local time at the arrival airport.
Arrival city name.
1 - 100
Arrival country code in ISO 3166 format.
2
2 character airline code as set by IATA.
2
Coupon number associated with the leg.
1 - 50
Departure airport code of leg. 3-letter ISO code according to IATA official directory.
3
The date and time of travel in local time at the departure airport.
Departure city name.
1 - 100
Departure country code in ISO 3166 format.
2
Departure tax amount charged by a country when a person is leaving the country.
0 < x < 99999999
Amount of the ticket, for current leg of the trip, excluding taxes and fees.
0 < x < 99999999
The alphanumeric code for the "booking class" of a ticket.
1 - 8
Fee amount for current leg of the trip.
0 < x < 99999999
Indicates service class (first class, business class, etc.).
1 - 5
Unique identifier of the flight number.
3 - 6
The route type of the flight.
round_trip
, one_way
Indicates whether a stopover is allowed on this ticket.
Amount of the taxes for current leg of the trip.
0 < x < 99999999
The Passenger Name Record (PNR) in the airline reservation system.
1 - 50
An array of the travelling passengers.
adult
, infant
The passenger's date of birth.
The email address of the passenger.
1 - 320
The first name(s) or given name of the passenger.
1 - 255
The passenger's frequent flyer number.
5 - 50
The last name, or family name, of the passenger.
1 - 255
The passenger's unique passport number.
1 - 50
The phone number of the passenger. This number is formatted according to the E164 number standard.
1 - 50
The ticket number for a flight.
1 - 50
Title of the passenger.
1 - 50
The name of the reservation system.
1 - 200
Indicates whether the ticket is restricted (refundable).
The delivery method of the ticket.
electronic
, other
The airline's unique ticket number.
1 - 50
The IATA travel agency code.
1 - 50
The reference number of the invoice that was issued by the travel agency.
1 - 50
The name of the travel agency.
1 - 200
The name of the travel agency plan.
1 - 200
Provide buyer details for the transaction. No buyer resource will be created on Gr4vy when used.
The optional billing details for the a buyer.
The billing address for the buyer.
The city for the address.
1 - 100
The country for the address in ISO 3166 format.
2
The first line of the address.
1 - 255
The postal code or zip code for the address.
1 - 50
The state, county, or province for the address.
1 - 255
The house number or name for the address. Not all payment services use this field but some do.
1 - 255
The second line of the address.
1 - 255
The optional name of the company or organisation to add to the address.
1 - 255
The code of state, county, or province for the address in ISO 3166-2 format.
4 - 6
The email address for the buyer.
1 - 320
The first name(s) or given name for the buyer.
1 - 255
The last name, or family name, of the buyer.
1 - 255
The phone number for the buyer which should be formatted according to the E164 number standard.
1 - 50
The tax ID information associated with the billing details.
The kind of tax ID.
ae.trn
, au.abn
, ar.dni
, ar.cuil
, ar.cuit
, br.cnpj
, br.cpf
, ca.bn
, ca.gst_hst
, ca.pst_bc
, ca.pst_mb
, ca.pst_sk
, ca.qst
, ch.vat
, cl.tin
, es.cif
, eu.vat
, gb.vat
, hk.br
, id.nik
, id.npwp
, in.gst
, jp.cn
, jp.rn
, kr.brn
, li.uid
, mx.curp
, my.frp
, my.itn
, my.nric
, my.sst
, no.vat
, nz.gst
, ph.tin
, ru.inn
, ru.kpp
, sa.vat
, sg.gst
, sg.uen
, th.id
, th.vat
, tw.vat
, us.ein
, za.vat
The tax ID for the buyer.
1 - 50
A unique name for this buyer which is used in the Gr4vy admin panel to give a buyer a human readable name.
1 - 200
An external identifier that can be used to match the buyer against your own records. This value needs to be unique for all buyers.
1 - 200
The optional shipping details for the buyer.
The physical shipping address associated to this buyer.
The city for the address.
1 - 100
The country for the address in ISO 3166 format.
2
The house number or name for the address. Not all payment services use this field but some do.
1 - 255
The first line of the address.
1 - 255
The second line of the address.
1 - 255
The optional name of the company or organisation to add to the address.
1 - 255
The postal code or zip code for the address.
1 - 50
The state, county, or province for the address.
1 - 255
The code of state, county, or province for the address in ISO 3166-2 format.
4 - 6
The unique ID for a buyer.
The email address of the buyer.
1 - 320
The first name(s) or given name of the buyer.
1 - 255
The unique ID for a buyer's shipping detail.
The last name, or family name, of the buyer.
1 - 255
The phone number of the buyer. This number is formatted according to the E164 number standard.
1 - 50
The type of this resource. Is always shipping-details
.
shipping-details
An array of cart items that represents the line items of a transaction.
The name of the cart item. The value you set for this property may be truncated if the maximum length accepted by a payment service provider is less than 255 characters.
255
The quantity of this item in the cart. This value cannot be negative or zero.
1 < x < 99999999
The amount for an individual item represented as a monetary amount
in the smallest currency unit for the given currency, for example
1299
USD cents represents $12.99
.
The amount sent through to the payment processor as unitary amount
will be calculated to include the discount and tax values sent
as part of this cart item.
0 < x < 99999999
A list of strings containing product categories for the item. Max length per item: 50.
The amount discounted for this item represented as a monetary amount
in the smallest currency unit for the given currency, for example 1299
USD cents represents $12.99
.
Please note that this amount is for the total of the cart item and not for an individual item. For example, if the quantity is 5, this value should be the total discount amount for 5 of the cart item.
You might see unexpected failed transactions if the discount_amount
can
not be equally divided by the quantity
value. This is due to the fact
that some payment services require this amount to be specified per unit.
In this situation we recommend splitting this item into separate items, each with their own specific discount.
0 < x < 99999999
An external identifier for the cart item. This can be set to any value and is not sent to the payment service.
200
The URL for the image of the item.
2083
The product type of the cart item.
physical
, discount
, shipping_fee
, sales_tax
, digital
, gift_card
, store_credit
, surcharge
The product URL for the item.
2083
The SKU for the item.
200
The tax amount for this item represented as a monetary amount
in the smallest currency unit for the given currency, for example 1299
USD cents represents $12.99
.
Please not that this amount is for the total of the cart item and not for an individual item. For example, if the quantity is 5, this value should be the total tax amount for 5 of the cart item.
You might see unexpected failed transactions if the tax_amount
can
not be equally divided by the quantity
value. This is due to the fact
that some payment services require this amount to be specified per unit.
In this situation we recommend splitting this item into separate items, each with their own specific tax amount.
0 < x < 99999999
Response
A short-lived checkout session.
Contains information about an airline travel, if applicable.
The unique identifier of the reservation in the global distribution system.
1 - 50
The address of the place/agency that issued the ticket.
1 - 255
The date that the ticket was last issued in the airline reservation system.
For airline aggregators, two-character IATA code of the airline issuing the ticket.
2
An array of separate trip segments. Each leg contains detailed itinerary information.
Arrival airport code of leg. 3-letter ISO code according to IATA official directory.
3
The date and time of travel in local time at the arrival airport.
Arrival city name.
1 - 100
Arrival country code in ISO 3166 format.
2
2 character airline code as set by IATA.
2
Coupon number associated with the leg.
1 - 50
Departure airport code of leg. 3-letter ISO code according to IATA official directory.
3
The date and time of travel in local time at the departure airport.
Departure city name.
1 - 100
Departure country code in ISO 3166 format.
2
Departure tax amount charged by a country when a person is leaving the country.
0 < x < 99999999
Amount of the ticket, for current leg of the trip, excluding taxes and fees.
0 < x < 99999999
The alphanumeric code for the "booking class" of a ticket.
1 - 8
Fee amount for current leg of the trip.
0 < x < 99999999
Indicates service class (first class, business class, etc.).
1 - 5
Unique identifier of the flight number.
3 - 6
The route type of the flight.
round_trip
, one_way
Indicates whether a stopover is allowed on this ticket.
Amount of the taxes for current leg of the trip.
0 < x < 99999999
The Passenger Name Record (PNR) in the airline reservation system.
1 - 50
An array of the travelling passengers.
adult
, infant
The passenger's date of birth.
The email address of the passenger.
1 - 320
The first name(s) or given name of the passenger.
1 - 255
The passenger's frequent flyer number.
5 - 50
The last name, or family name, of the passenger.
1 - 255
The passenger's unique passport number.
1 - 50
The phone number of the passenger. This number is formatted according to the E164 number standard.
1 - 50
The ticket number for a flight.
1 - 50
Title of the passenger.
1 - 50
The name of the reservation system.
1 - 200
Indicates whether the ticket is restricted (refundable).
The delivery method of the ticket.
electronic
, other
The airline's unique ticket number.
1 - 50
The IATA travel agency code.
1 - 50
The reference number of the invoice that was issued by the travel agency.
1 - 50
The name of the travel agency.
1 - 200
The name of the travel agency plan.
1 - 200
An array of cart items that represents the line items of a transaction.
The name of the cart item. The value you set for this property may be truncated if the maximum length accepted by a payment service provider is less than 255 characters.
255
The quantity of this item in the cart. This value cannot be negative or zero.
1 < x < 99999999
The amount for an individual item represented as a monetary amount
in the smallest currency unit for the given currency, for example
1299
USD cents represents $12.99
.
The amount sent through to the payment processor as unitary amount
will be calculated to include the discount and tax values sent
as part of this cart item.
0 < x < 99999999
A list of strings containing product categories for the item. Max length per item: 50.
The amount discounted for this item represented as a monetary amount
in the smallest currency unit for the given currency, for example 1299
USD cents represents $12.99
.
Please note that this amount is for the total of the cart item and not for an individual item. For example, if the quantity is 5, this value should be the total discount amount for 5 of the cart item.
You might see unexpected failed transactions if the discount_amount
can
not be equally divided by the quantity
value. This is due to the fact
that some payment services require this amount to be specified per unit.
In this situation we recommend splitting this item into separate items, each with their own specific discount.
0 < x < 99999999
An external identifier for the cart item. This can be set to any value and is not sent to the payment service.
200
The URL for the image of the item.
2083
The product type of the cart item.
physical
, discount
, shipping_fee
, sales_tax
, digital
, gift_card
, store_credit
, surcharge
The product URL for the item.
2083
The SKU for the item.
200
The tax amount for this item represented as a monetary amount
in the smallest currency unit for the given currency, for example 1299
USD cents represents $12.99
.
Please not that this amount is for the total of the cart item and not for an individual item. For example, if the quantity is 5, this value should be the total tax amount for 5 of the cart item.
You might see unexpected failed transactions if the tax_amount
can
not be equally divided by the quantity
value. This is due to the fact
that some payment services require this amount to be specified per unit.
In this situation we recommend splitting this item into separate items, each with their own specific tax amount.
0 < x < 99999999
The date and time when the Checkout Session will expire. By default this will be set to 1 hour from the date of creation.
The ID of the Checkout Session.
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.
Details about the payment method for card type only.
The unique hash derived from the payment method identifier (e.g. card number).
Unique ID for the payment method.
Last four digits of PAN.
Payment method type.
card
The scheme/brand of the card.
accel
, amex
, bancontact
, carte-bancaire
, cirrus
, culiance
, dankort
, diners-club
, discover
, eftpos-australia
, elo
, hipercard
, jcb
, maestro
, mastercard
, mir
, nyce
, other
, pulse
, rupay
, star
, uatp
, unionpay
, visa
checkout-session
.
checkout-session
Was this page helpful?