Skip to main content
GET
/
api
/
v1
/
checkout-intents
/
{id}
JavaScript
import CheckoutIntents from 'checkout-intents';

const client = new CheckoutIntents({
  apiKey: process.env['CHECKOUT_INTENTS_API_KEY'], // This is the default and can be omitted
});

const checkoutIntent = await client.checkoutIntents.retrieve('id');

console.log(checkoutIntent);
{
  "buyer": {
    "postalCode": "10001",
    "country": "US",
    "province": "NY",
    "city": "New York",
    "address1": "123 Main St",
    "phone": "1234567890",
    "email": "[email protected]",
    "lastName": "Doe",
    "firstName": "John",
    "address2": "Apt 1"
  },
  "quantity": 123,
  "productUrl": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "id": "<string>",
  "state": "retrieving_offer",
  "promoCodes": [
    "<string>"
  ],
  "variantSelections": [
    {
      "value": "Small, Red, XS, L, etc.",
      "label": "Size, Color, etc."
    }
  ]
}

Authorizations

Authorization
string
header
required

Rye API key

Path Parameters

id
string
required

The id of the checkout intent to look up

Response

Checkout intent information

buyer
object
required
quantity
number<double>
required
productUrl
string
required
createdAt
string<date-time>
required
id
string
required
state
enum<string>
required
Available options:
retrieving_offer
promoCodes
string[]
variantSelections
object[]