Requirements to start the flow.

API key

Have an API key (Tutorial here).

Order flow

Some customers, especially those with smaller transaction sizes, may need to settle multiple orders at once in order to mitigate the operational overhead of paying for each transaction independently. To support this use case, we have created a suite of endpoints that allow users to pay for more than one buy order with a single bank transfer and more than one sell order with a single blockchain transaction. This guide will walk you though how to use the bulk crypto payments system for off ramps.

1

Create bulk payment

Before you can start creating orders, you need to create a bulk payment that you will use to pay for multiple orders at once. This needs to be done each time you want to create a new set of orders that a single payment will cover.

Assuming you want to sell USDC (Polygon) in Mexico, then you would pass the following fields in the request body:

"crypto"="SOL_USDC_PTHX"

"country"="MX"

Create bulk crypto payment

2

Create a quote

Create a quote for the order. Assuming you would like to sell USDC (Solana) for MXN, you would provide the following fields in the body:

"side"="sell"

"crypto"="SOL_USDC_PTHX"

"fiat"="MXN

"country"="MX"

Additionally, you need to specify the order size. You can either specify how much USDC (Solana) you would like to sell, like this (selling $150,000 USDC (Solana)):

"amountCrypto"=150000

Or you can alternatively specify the amount of MXN you would like to receive, like this (receiving $1,000,000 MXN):

"amountFiat"=1000000

Go to create quote endpoint

3

Create order

Once you are satisfied with a quote, you can create an order to book the trade. Assuming you would like to continue with the quote you created in the previous step to sell USDC (Solana) for MXN, then you would provide the following body:

"quoteId"={{QUOTE_ID_FROM_PREVIOUS_RESPONSE}}

"payoutBankAccountId"={{ID_OF_MXN_BANK_ACCOUNT}}

"bulkCryptoPaymentId"={{ID_FROM_RESPONSE_OF_SETP_1}} “usePreSettlement”=true

Go to create order

4

Create more orders (optional)

Before settling this order, you can create other orders with the same bulkCryptoPaymentId. By doing so, you will add them to the bulk crypto payment and thus will only need to make one payment to settle multiple orders.

5

Wait for the order to be ready to accept payment

After creating an order, it will update its status field as it goes through its lifecycle. One the status field is equal to awaitingPayment, then the order is ready to receive payment. When all of the orders you added to the bulk crypto payment are in this status, then you can get ready to send the payment.

Go to check order status

6

Get payment instructions

Retrieve payment amount and the deposit address specified by the bulk payment you created earlier.

Get crypto bulk payment

7

Complete payment

Send the USDC (Solana) specified by the amount field of the bulk crypto payment ti the address specified by the depositAddress field of the bulk crypto payment. Make sure to send the exact amount to avoid delays.

8

Order is complete

Since the funds have been pre-settled, the order is now complete. You will be able to view the details of the payout by inspecting the payoutsSent field of the order.

Poll order status or subscribe to webhooks

Go to check order status