The Elevate APIs can be used to make autonomous purchases on behalf of your customers.
Please see our detailed integration guides for common flows and how to get started.
Need help? Reach out in your slack channel or email us at support@useelevate.dev
.
https://api-agent.useelevate.dev
Returns a list of your PurchaseIntents. The PurchaseIntents are returned sorted by creation date, with the most recently created PurchaseIntent appearing first.
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
limit
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
page
The page to request for the list. The default is 1.
customer_id
Only return purchases for this customer_id.
1
Creates a PurchaseIntent.
A PurchaseIntent guides you through the process of making a purchase for your customer. We recommend that you create exactly one PurchaseIntent for each purchase in your system.
Once a PurchaseIntent has been created, it will move to one of the following states:
ineligible_for_automatic_checkout
: The PurchaseIntent is ineligible for autonomous checkout. No further action can be taken on it.requires_confirmation
: The PurchaseIntent is eligible for autonomous checkout, and there are no choices to be made (e.g. no product variants to choose and only one possible option for shipping). In this case, the next step is confirming the PurchaseIntent (you should still confirm this information with the user before confirming).
You can create a PurchaseIntent in either livemode (livemode = true
) or testmode (livemode = false
). A PurchaseIntent created in testmode will not attempt to initiate a real purchase. You must set livemode
to true
to execute a real purchase. You can only create a livemode PurchaseIntent with a livemode Customer, and vice versa.Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
customer_id
The unique ID of the customer making this PurchaseIntent.
product_url
The URL of the product to purchase.
livemode
Whether to create this PurchaseIntent in livemode or not. When livemode
is set to true
, a real purchase will be initiated. This defaults to false
.
PurchaseIntents in livemode can only be created for a Customer in livemode. Similarly, PurchaseIntents in testmode can only be created for a Customer in testmode.
1
{
"customer_id": "cus_my-test-customer",
"product_url": "https://www.test-useelevate.dev/p=success",
"livemode": true
}
Retrieves a PurchaseIntent.
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
id
Unique ID of the PurchaseIntent to retrieve.
1
Cancels a PurchaseIntent.
You can cancel a PurchaseIntent prior to its confirmation. After it is canceled, no additional operations can be made on the PurchaseIntent.
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
id
Unique ID of the PurchaseIntent to cancel.
1
Confirms a PurchaseIntent.
Upon confirming, the purchase will be executed and customer's payment method charged. We highly suggest confirming with your customer explicitly to confirm they want to make the purchase before executing this step.
Upon confirmation, the PurchaseIntent will attempt to initiate a purchase. If the request to purchase has been successfully kicked off, the state will transition to initated
. The purchase then happens asynchronously.
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
id
Unique ID of the PurchaseIntent to confirm.
expected_estimated_amount_total
The expected estimated total amount, in smallest units of the currency (e.g. cents for USD) of the product. For example $23.32 would be 2332.
This value must be equal to the estimated total price we identified for the item, or confirmation will not proceed.
1
{
"expected_estimated_amount_total": 2332
}
Retrieves a Customer.
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
id
Unique ID of the Customer to retrieve.
1
Creates a client token (e.g. for customer onboarding flow).
The client token will expire 1 hour from creation.
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
1
Retrieve product data for a unique product variant URL.
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
product_url
The URL of the product for which to retrieve product data. This accepts a maximum of 10 product URLs.
1
Retrieve variant data for a product URL.
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
product_url
The URL of the product for which to retrieve variant data.
1