> Agent-readable docs index: /llms.txt. Download /docs.zip to grep all markdown files locally.

---
title: 'Payment flows'
description: 'Overview of how payments work with Rye'
---

Rye supports selling Shopify products from the Sell Anything API and the Sync API, as well as selling Amazon products. Each use case has the same payment flow, which is described in detail below.

## Key terms / concepts

This guide assumes you're familiar with the following terms and concepts:

### Sell Anything API - Shopify products

These are products that are specifically [requested](/api-reference/requestproductbyurl) as part of the [Sell Anything API](/sell-anything-api-overview).

### Sync API - Shopify products

These are products that are part of the Rye network via the [Sync API](/sync-api-overview).

### Amazon checkout

This refers to using Rye to place Amazon orders on behalf of end customers. For this use case, Rye would also manage returns and cancellations for those orders.

***

## Payment flows

1. The developer collects payment from the shopper via their own payment flow.

2. Cart is submitted to Rye.

3. Rye debits the developer’s account.

4. The order is submitted to the merchant’s Shopify store.

<Mermaid
  chart="sequenceDiagram
  participant Developer
  participant Payment Processor
  participant Rye
  participant Merchant

  Developer->>Payment Processor: Payment is collected from the shopper
  Payment Processor->>Developer: Payment confirmed
  Developer->>+Rye: Cart submitted for purchase
  Rye-->>Developer: Response
  Rye->>Merchant: Order is submitted to merchant
  Merchant-->>Rye: Response
  Rye-->>Developer: Sends ORDER_PLACED webhook"
/>

<Note>
  If you are using Stripe to charge the shopper's credit card, we recommend performing a two-step two-step [authorize-then-capture](https://docs.stripe.com/payments/place-a-hold-on-a-payment-method) process to give a better end user experience, outlined below:

  <Mermaid
    chart="sequenceDiagram
  participant Developer
  participant Stripe
  participant Rye
  participant Merchant

  Developer->>Stripe: An Authorization is created on the shopper's card
  Stripe->>Developer: The Authorization was successfully created
  Developer->>+Rye: Cart submitted for purchase
  Rye-->>Developer: Response
  Rye->>Merchant: Order is submitted to merchant
  Merchant-->>Rye: Response
  Rye-->>Developer: Sends ORDER_PLACED webhook
  Developer->>Stripe: The previously created Authorization is requested to be captured
  Stripe->>Developer: The Authorization has been captured."
  />
</Note>

## Handling returns

To better understand how payments work with returns, please see the [Returns guide](/returns).

## Additional notes

Rye will handle any processing fees that are part of the flows explained above. As order volume grows, this is subject to change by incorporating a regular invoicing process paid via ACH.


---

*Powered by [holocron.so](https://holocron.so)*
