Learn how to integrate the Rye API, from setting up your account to submitting your first order. The example uses Shopify, but the same process works with Amazon, non-Shopify stores, and other merchants.
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.
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.
Fetching an offer from the merchant is asynchronous. Always poll the GET endpoint for the latest state of the intent.
Use the failureReason field to display helpful error messages to users.Use the SDK’s createAndPoll() helper method to complete steps 3 and 4 in a single call.
In staging, you can use the test token tok_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.
Placing an order is asynchronous. Always poll the 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.
Congrats — you just submitted your first Rye order!Next, check out the API Comparison guide to learn about the differences between the Universal Checkout API and the Sync API.