See Rye in Action
Watch a complete order flow — from product URL to purchase confirmation — all without leaving your app.
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 Accounts tab in your Rye staging account, and copy the Staging API Key. Set it as an environment variable:Step 3: Create a Checkout Intent
Send aPOST
request to /api/v1/checkout-intents
with the product URL and buyer identity.
You can send orders to Amazon, Shopify, or other merchants by simply changing the product URL.
Example test URLs:
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 awaiting_confirmation
After creating the intent, poll the /api/v1/checkout-intents/{id}
endpoint with a GET
request until the state is awaiting_confirmation
. Use the id
from the previous step.
GET
endpoint for the latest state of the intent.
Use the
failureReason
field to display helpful error messages to users.Step 5: Confirm Final Pricing
Before proceeding to payment, inspect the latest checkout intent response to confirm:- Shipping options and costs
- Taxes
- Total cost
- Offer availability
Step 6: Generate a Card Token
In staging, you can use the test tokentok_visa
to place an order.
Alternatively, follow these steps to build a simple React app that generates tokens with Stripe Elements.
Currently, Rye uses Stripe to tokenize users’ credit cards, with Rye as the merchant of record for orders. Later this year, we’ll launch a new payment flow, where the merchant the order is placed with will be the merchant of record.
Step 7: Confirm with Payment
Once the user approves the final cost, confirm the intent with their payment method:GET
endpoint after confirming to check the state of the intent.
Once in a terminal state (completed
or failed
), the intent is finished.
Checkout intents cannot be updated once created.
If buyer details (e.g. shipping address) change, create a new checkout intent.
Step 8: Poll for Final State
After confirming, poll theGET
endpoint again until the intent reaches a terminal state:
completed
: order placed successfullyfailed
: something went wrong (e.g. out of stock, expired)
Check the Rye console to view test orders.
Rye does not provide post-purchase tracking or webhooks (except for Amazon). Tracking and order updates are sent directly to the buyer’s email address.