Skip to main content
POST
JavaScript

Authorizations

Authorization
string
header
required

Rye API key

Body

application/json

The request body containing the checkout session parameters

productUrl
string
required
Example:

"https://www.amazon.com/dp/B0DFC9MT8Q"

quantity
integer<int32>
required
Required range: x >= 0
Example:

1

variantSelections
object[]
promoCodes
string[]
Maximum array length: 16
constraints
object
discoverPromoCodes
boolean
referenceId
string
Maximum string length: 255
Example:

"order-1234"

layout
enum<string>

Optional layout for the checkout UI (e.g. "wizard"). Defaults to the standard layout.

Available options:
default,
wizard
buyer
object

Optional buyer information, used to pre-fill the checkout form with the buyer's information.

Response

Checkout session

A checkout session represents a hosted checkout form that shoppers can use to complete their purchases.

Checkout sessions provide a pre-built UI for collecting payment and shipping information, allowing you to quickly integrate checkout functionality without building your own forms.

url
string
required

URL to send your user to for checkout. This URL is valid for 4 hours.