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

# Off-ramp (Withdrawal)

Off-ramping is converting `stablecoins` into `fiat currencies` such as USD or BRL. This conversion is facilitated by the PFIs on the Borderless network and can be part of either a payin or payout flow simply depending on if you are sending or receiving the payments. In this scenario you are ultimately sending or receiving local fiat currencies, after the stablecoins are converted at the PFI.

<Note>
  An important note on payment instructions below.
</Note>

Withdrawals are very similar to deposits as we've already accomplished above. The key difference to highlight, is around payment instructions.

With deposits, the local fiat leg is to the PFI's bank, and they provide the payment instructions in the api response when you open an order to deposit with them.

For a withdrawal, the local fiat leg is ultimately received by you or your clients in the respective banks. This means, we need to instruct the partner financial institution (PFI) where to send the fiat leg, and you must provide these payment instructions.

With this additional step in mind, withdrawals are a simple 4 step process.

Optionally, you can also request a quote before initiating the withdrawal to have a transparent view of the estimated fees and exchange rates.

<Warning>
  Quotes are returned directly from the PFIs, and are regularly changing. Quotes are not firm, and they do not guarantee any final received amount. They are estimates only, and Borderless is not responsible for incorrect quotes provided to us by PFIs.
</Warning>

<Tip>
  Endpoint: [`GET /withdrawals/quotes`](/api-reference/transaction-withdrawals/get-withdrawal-quote)
</Tip>

<CodeGroup>
  ```bash request expandable theme={null}
  curl -X GET 'https://sandbox-api.borderless.xyz/v1/withdrawals/quotes' \
       -H 'Authorization: Bearer your-access-token' \
       -H 'Content-Type: application/json' \
       -d '{  
              "country": "US",
              "fiat": "USD",
              "asset": "USDC_POLYGON",
              "paymentMethod": "ACH",
              "fromAmount": "10"
          }'
  ```

  ```json response expandable theme={null}
  {
    "limits": {
      "transaction": {
        "minAmount": "1",
        "maxAmount": "100",
        "fiat": "USD"
      }
    },
    "fiat": "USD",
    "country": "US",
    "asset": "USDC_POLYGON",
    "paymentMethod": "ACH",
    "fromAmount": "10",
    "toAmount": "8.99",
    "exchangeRate": "0.999",
    "totalFee": "1",
    "orchestrationFee": "1"
  }
  ```
</CodeGroup>

## Create payment instruction

First, create payment instructions to share with the partner financial institution (PFI) who is off-ramping or processing your withdrawal. This step is critical to ensure the local fiat currency arrives in the correct account at the end.

<Note>
  Please use account `id` in the deposit creation request from an account created above in the Accounts section.
</Note>

<Note>
  Please capture payment instructions `id` from the response to use it for the withdrawal request after.
</Note>

<Warning>
  The PFI will be initiating the off-ramp directly to the payment instructions you create in this step. Borderless cannot be held responsible for transfers that originate outside the Borderless network to incorrect addresses. It is your responsibility to review the payment instructions and ensure they are correct.
</Warning>

<Tip>
  Endpoint: [`POST /identities/{id}/payment-instructions`](/api-reference/payment-instructions/get-payment-instructions)
</Tip>

<CodeGroup>
  ```bash request expandable theme={null}
  curl -X POST 'https://sandbox-api.borderless.xyz/v1/identities/{id}/payment-instructions' \
        -H 'Authorization: Bearer your-access-token' \
        -H 'Content-Type: application/json' \
      -H "idempotency-key: 8f14e45f-e6c3-4f7e-bd56-1b9a2e46f1d6"\
        -d '{
          "country": "US",
          "currency": "USD",
          "name": "Primary Bank Account",
          "paymentMethod": "ACH",
            "details": {
              "bankName": "Example Bank",
              "accountHolderName": "John Doe",
              "bankAccountNumber": "123456789012",
              "bankRoutingNumber": "123456789",
              "bankAccountType": "Checking",
              "address": {
                  "street1": "123 Main St",
                  "street2": "Apt 4B",
                  "city": "New York",
                  "state": "NY",
                  "country": "US",
                  "postalCode": "10001"
                }
              }
      }'
  ```

  ```json response expandable theme={null}
  {
    "id": "cmi7sfuf04729pg23a00yntya",
    "name": "Primary Bank Account",
    "paymentMethod": "ACH",
    "currency": "USD",
    "country": "US",
    "deleted": false,
    "details": {
      "bankName": "Example Bank",
      "bankSlug": null,
      "bankAccountNumberLast4": "9012",
      "bankRoutingNumber": "123456789",
      "bankCode": null,
      "phone": null,
      "taxId": null,
      "accountHolderName": "John Doe",
      "bankAccountType": "Checking",
      "recipientRelationship": null,
      "address": {
        "id": "cmi7sfueh4727pg23ga5lqhi2",
        "street1": "123 Main St",
        "street2": "Apt 4B",
        "city": "New York",
        "state": "NY",
        "country": "US",
        "postalCode": "10001"
      }
    }
  }
  ```
</CodeGroup>

## Create a withdrawal order

Second, you will create an order for a withdrawal. This will send the payment instructions to the PFI, who will send the local fiat currency upon receipt of the matching amount of stablecoins. This alerts the PFI to expect the payment, and allows them to attribute the funds to your account when they arrive.

It's important to note that in the response to this withdrawal order, the PFI will return the onchain stablecoin payment instructions (generally a deposit address) that will handle the stablecoins which are being off-ramped.

<Note>
  Please capture the onchain instructions from the PFI in the response field `onchainInstructionTransaction` to use it to send stablecoins in the next step.
</Note>

<Note>
  Please use both the account `id` from an account created above in the Accounts section, and the payment instructions `id` in the withdrawal creation request from the step above where you created the payment instructions.
</Note>

<Tip>
  Endpoint: [`POST /withdrawals `](/api-reference/transaction-withdrawals/create-a-new-withdrawal-transaction)
</Tip>

<CodeGroup>
  ```bash request expandable theme={null}
  curl -X POST 'https://sandbox-api.borderless.xyz/v1/withdrawals' \
        -H 'Authorization: Bearer your-access-token' \
        -H 'Content-Type: application/json' \
      -H "idempotency-key: 8f14e45f-e6c3-4f7e-bd56-1b9a2e46f1d6"\
        -d '
  {
    "fiat": "USD",
    "country": "US",
    "asset": "USDC_POLYGON",
    "amount": "100.00",
    "accountId": "cm2c4x3cc000019stwv7um4zl",
    "developerFee": "5.00",
    "paymentInstructionId": "cm2c4x3cc000019stwv7um4zl",
    "paymentPurpose": "delivery fees",
    "purposeDescription": "Monthly delivery service payment",
    "reference": "INV-2025-001"
  }
  '
  ```

  ```json response expandable theme={null}
  {
    "id": "cmi7sihwi472bpg2301ptz9gv",
    "type": "Withdrawal",
    "status": "Submitted",
    "pfiName": "Bridge",
    "source": {
      "asset": "USDC_POLYGON",
      "amount": "100",
      "fiatCurrency": null,
      "paymentMethod": null,
      "accountId": "cm2c4x3cc000019stwv7um4zl",
      "accountName": "Main Account",
      "sender": null
    },
    "destination": {
      "asset": null,
      "amount": null,
      "fiatCurrency": "USD",
      "imad": null,
      "reference": null,
      "omad": null,
      "traceNumber": null,
      "externalAddress": null,
      "accountId": null,
      "accountName": null,
      "paymentInstructionId": "cmi7sfuf04729pg23a00yntya"
    },
    "instructions": null,
    "createdAt": "2025-11-19T19:49:46.918Z",
    "updatedAt": "2025-11-19T19:49:46.918Z",
    "txHash": [],
    "feeAmount": "0",
    "failureReason": null,
    "depositInstruction": null,
    "destinationPaymentInstruction": null,
    "withdrawalOnchainInstruction": null,
    "counterPartyIdentityId": "cmhlu3zlt002qpf246wd6vwrr",
    "virtualAccountId": null
  }
  ```
</CodeGroup>

## Send stablecoins direct to PFI

Once the local fiat payment instructions are sent to the PFI, and the withdrawal request is made, this order will remain open until the PFI receives the stablecoins as outlined in the instructions they shared via response to the withdrawal request. At the time the stablecoins arrive, the PFI will send the local fiat transfer as defined in the payment instructions.

<Warning>
  It is important to note that most PFIs match withdrawal orders with a combination of `amount`, `from_account` (stablecoin wallet), and `deposit_address` .

  Please ensure you are sending the stablecoins to the correct deposit address, on the correct blockchain, with the correct assets (i.e. USDC, USDT, etc.).

  It is also important that the stablecoins come from the same `from_address` that you shared with the PFI. If the PFI is told that stablecoins will come from and addres 0x...456 and then they arrive from 0x...987, this can result in potentially lost funds. Borderless will not provide refunds for stablecoins sent incorrectly.
</Warning>

## Release local fiat to beneficiary

Finally, when the partner financial institution (PFI) receives the stablecoins, they will then issue the local fiat payment to the bank defined in the payment instructions. Once the local fiat currency is received, this completes the off-ramp or withdrawal flow.

You can easily track the status of transactions, request cancellation of transactions, and export transactions with the following endpoints.

<Note>
  Please ensure you are using the transaction `id `value which you will receive from the request to create a transaction such as the first step in this sequence on the `/withdrawals` endpoint.
</Note>

To track the status of your withdrawal transactions and other types of transactions:

<Note>
  We recommend listening to the statuses via Webhook.
</Note>

<Tip>
  Endpoint: [`GET /transactions/{id}`](/api-reference/transactions/get-a-transaction-by-id)
</Tip>

To request a cancellation of your withdrawal transaction and other types of transactions:

<Tip>
  Endpoint: [`POST /transactions/{id}/cancel`](/api-reference/transactions/request-cancellation-of-a-transaction)
</Tip>

To export your transactions:

<Tip>
  Endpoint: [`GET /transactions/export`](/api-reference/transactions/export-transactions)
</Tip>

**Congratulations! You've now completed your first stablecoin withdrawal!**

<Info>
  If you have any questions, please don't hesitate to reach out to us via [email](mailto:support@borderless.xyz) or slack.
</Info>
