> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rio.trade/llms.txt
> Use this file to discover all available pages before exploring further.

# Sell stablecoins

### Requirements to start the flow.

<CardGroup cols={2}>
  <Card title="API key" icon="shield-keyhole">
    Have an API key ([Tutorial here](/quickstart#api-key-generation)).
  </Card>
</CardGroup>

### <Icon icon="arrow-progress" iconType="solid" /> Order flow

The process of selling stablecoins is done through the following steps:

<Steps>
  <Step title="Register the receiving bank account">
    Before creating an order, you need to register the bank account that will receive the funds. This only needs to be done once per bank account-currency pair.

    <Card title="Go to create a new bank account" icon="square-code" href="/api-reference/bank-accounts/create-a-bank-account" />
  </Step>

  <Step title="Create a quote">
    You can create as many quotes as necessary before creating an order.

    <Card title="Go to create quote endpoint" icon="square-code" href="/api-reference/quotes/create-quote" />
  </Step>

  <Step title="Create order">
    Once you are satisfied with a quote, you can create an order for the quoted amount. Make sure to pass the ID for the bank account to which you would like to receive the funds through the `payoutBankAccountId` field.

    <Card title="Go to create order" icon="square-code" href="/api-reference/orders/create-order" />
  </Step>

  <Step title="Wait for the order to be ready to accept your payment">
    Poll the order or subscribe to our webhooks. Wait for the order to have a status of `awaitingPayment`.
    Remember to add the `payoutBankAccountId` field when creating the order in the previous step. Otherwise, the resulting status will be `awaitingBankPayoutDetails`.

    <Card title="Go to check order status" icon="square-code" href="/api-reference/orders/get-order" />
  </Step>

  <Step title="Pay for the order  (skip if placing the order in our sandbox environment)">
    Please send the amount specified in the `amountCrypto` field of the order object to the address specified in the `blockchainAddress` field of the `paymentInstructions` field of the order. If you are selling USDC (Stellar), you must include the memo specified in the `blockchainMemo` field of the `paymentInstructions` field of the order. Failure to include the memo will result in the payment not being credited to your order and your funds may be permanently lost.

    <Card title="Go to confirm payment" icon="square-code" href="/api-reference/crypto-payments/check-crypto-payment" />
  </Step>

  <Step title="Confirm payment (optional)">
    This final step is only necessary to simulate a successful payment in our sandbox environment.

    <Card title="Go to confirm payment" icon="square-code" href="/api-reference/crypto-payments/check-crypto-payment" />
  </Step>

  <Step title="Wait for funds">
    Rio will send the funds to your bank account in the next few minutes.
  </Step>
</Steps>

#### <Icon icon="check-to-slot" iconType="solid" /> Poll order status or subscribe to webhooks

<Card title="Go to check order status" icon="square-code" href="/api-reference/orders/get-order" />

<Note>
  **Disclaimer**: All technical documentation is subject to the terms and
  conditions, which apply supplementarily and take precedence over the
  documentation.
</Note>
