This quickstart shows you how to submit an order in a single API call through our Purchase endpoint.
It’s a fire-and-forget endpoint that combines creating and confirming an order in a single API call, letting our system handle offer retrieval, payment authorization, and order placement asynchronously. This simplifies your workflow and reduces integration complexity.
It’s ideal for automating routine purchases, processing high-volume asynchronous orders, or integrating into workflows that don’t require synchronous user approval.
Step 1: Create a Rye Account
Create a Rye staging account to get an API key and submit a test order.
Step 2: Get Your API Key
Go to the Account tab in your Rye staging account, and copy the Staging API Key.
Set it as an environment variable:
Step 3: Submit an Order
Send a POST request to /api/v1/checkout-intents/purchase with the product URL, buyer identity, and payment method.
This guide uses Stripe, but Rye supports other payment providers too. See
Payment Providers for all options.
You can send orders to Amazon, Shopify, or other merchants by simply changing the product URL. Example test URLs:
The optional fields constraints.maxShippingPrice and constraints.maxTotalPrice let you set the maximum shipping cost and total amount the shopper is willing to pay. If either exceeds the specified values, the order won’t be processed. More details are available here.
Orders can only be shipped to U.S. addresses. International shipping is not yet supported. Using a non-US address will cause the checkout intent to fail.
Step 4: Poll for Final State
Poll the GET endpoint until the checkout intent reaches a terminal state:
completed: order placed successfully
failed: something went wrong (e.g. out of stock, expired)
Example responses:
Rye does not provide post-purchase tracking or webhooks. Tracking and order updates are sent directly to the buyer’s email address.
Next Steps
Congrats — you just submitted your first Rye order!
If you want to check shipping options, taxes, total cost, and product availability before submitting an order, please review this guide for the steps.
Next, check out the API Comparison guide to learn about the differences between the Universal Checkout API and the Sync API.