Purchase product
Changed onCreate a checkout intent and immediately trigger the purchase workflow.
This is a "fire-and-forget" endpoint that combines create + confirm in one step. The workflow handles offer retrieval, payment authorization, and order placement asynchronously. Poll the GET endpoint to check status.
Request
- Base URLhttps://staging.api.rye.com
- URLhttps://staging.api.rye.com/api/v1/checkout-intents/purchase
- AuthAPI key in header Authorization
Request body
Example request
{
"referenceId": "order-1234",
"constraints": {
"maxShippingPrice": 500,
"maxTotalPrice": 100000
},
"promoCodes": [
"SAVE20"
],
"variantSelections": [
{
"label": "Size, Color, etc."
}
],
"buyer": {
"postalCode": "10001",
"country": "US",
"province": "NY",
"city": "New York",
"address2": "Apt 1",
"address1": "123 Main St",
"phone": "1234567890",
"email": "john.doe@example.com",
"lastName": "Doe",
"firstName": "John"
},
"quantity": 1,
"productUrl": "https://www.amazon.com/dp/B0DFC9MT8Q",
"paymentMethod": {
"stripeToken": "tok_1RkrWWHGDlstla3f1Fc7ZrhH",
"type": "stripe_token"
}
}Response
Created
Example response
{
"referenceId": "order-1234",
"constraints": {
"maxShippingPrice": 500,
"maxTotalPrice": 100000
},
"promoCodes": [
"SAVE20"
],
"variantSelections": [
{
"label": "Size, Color, etc."
}
],
"buyer": {
"postalCode": "10001",
"country": "US",
"province": "NY",
"city": "New York",
"address2": "Apt 1",
"address1": "123 Main St",
"phone": "1234567890",
"email": "john.doe@example.com",
"lastName": "Doe",
"firstName": "John"
}
}Changes
- breaking
removed from the
////request propertyanyOflist - info
removed from the
//response propertyanyOflist for the response status - info
removed from the
//response propertyanyOflist for the response status - info
removed from the
//response propertyanyOflist for the response status - info
removed from the
//response propertyanyOflist for the response status - info
removed from the
//response propertyanyOflist for the response status
- breaking
- info
added the new optional request property
//// - info
added the optional property
/////to the response with the status - info
added the optional property
/////to the response with the status - info
added the optional property
/////to the response with the status - info
added the optional property
/////to the response with the status - info
added the optional property
/////to the response with the status - info
added the optional property
/////to the response with the status
- info