Off-ramp (Stablecoin to Fiat)
This guide provides an overview of how to facilitate off-ramp transactions (stablecoin to fiat) using the Harbor API, including customer registration, bank account linking, withdrawal processing, required headers, and API request examples.
The Harbor off-ramp API allows you to securely facilitate stablecoin-to-fiat conversions, enabling you to manage the withdrawal and conversion process independently. Before initiating an off-ramp transaction, you must first create a customer using the Customers API and link their bank account. Once the customer is successfully registered and their bank account is verified, you can proceed with processing their stablecoin withdrawal and converting it to fiat. This API provides flexibility in handling off-ramp transactions, whether for individuals or businesses.
Requirements
The customer must agree to Harbor’s Terms of Service.
An Idempotency Key (X-Idempotency-Key) is required to prevent duplicate submissions.
API Request: On-Ramp with stablecoin to fiat
curl --location --request POST 'https://harbor-sandbox.owlpay.com/api/v1/transfer' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'X-API-KEY: {{API_KEY}}' \
--header 'Idempotency-Key: {{Idempotency-Key}}' \
--data-raw '{
"commission": {
"percentage": "0.01",
"amount": "1.00",
},
"source": {
"on_behalf_of": "cus_XWfaqP16RpcNtExvF14K49SYVeBqDQGOgjbw6CEE",
"chain": "ethereum",
"asset": "USDC",
"amount": "1000.00",
},
"destination": {
"asset": "USD",
"account_number": "123456789012",
"routing_number": "021000021",
"bank_name": "Test Bank USA",
"bank_address": "123 Test Street, New York, NY 10001, USA",
"account_holder_name": "John Doe"
"account_holder_name" => "John Doe",
"residential_country_code" => "US",
"residential_state" => "DE",
"residential_city" => "Wilmington",
"residential_address_1" => "100 Market Street",
"residential_address_2" => "Suite 200",
},
"application_transfer_uuid": "{{YOUR_APPLICATION_TRANSFER_UUID}}"
}'
What is the difference between submitting a customer pre-registration and non-pre-registration in destination?
If you submit the Transfer information directly instead of submitting the customer's pre-registered bank account or blockchain address, Harbor may ask you to provide more information for this transaction.
customer pre-register is used to register the customer's own bank account / crypto address, while Transfer is used to transfer to other people on behalf of the customer.
If Transfer requires you to provide more information, the Transfer status will be changed to on_hold
Warning
If you want to use a specific customer bank account, include the customer_bank_account_id field, and omit bank information (account_number/routing_number/bank_name/bank_address/account_holder_name).
curl --location --request POST 'https://harbor-sandbox.owlpay.com/api/v1/transfer' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'X-API-KEY: {{API_KEY}}' \
--header 'Idempotency-Key: {{Idempotency-Key}}' \
--data-raw '{
"commission": {
"percentage": "0.01",
"amount": "1.00",
},
"source": {
"chain": "ethereum",
"asset": "USDC",
"amount": "1000.00",
},
"destination": {
"asset": "USD",
"customer_bank_account_id": "{{CUSTOMER_BANK_ACCOUNT_ID}}", // Optional, if you want to use a specific customer bank account, you can provide the id here (If you input both, customer_bank_account_id will be used first)
},
"application_transfer_uuid": "{{YOUR_APPLICATION_TRANSFER_UUID}}"
}'
The endpoint will return a response as shown below.
{
"data": {
"status": "pending_customer_transfer_start",
"source": {
"chain": "ethereum",
"on_behalf_of": "cus_XWfaqP16RpcNtExvF14K49SYVeBqDQGOgjbw6CEE",
"asset": "USDC",
"amount": "1000.00"
},
"destination": {
"asset": "USD",
"account_number": "123456789012",
"routing_number": "987654321",
"bank_name": "FV Bank",
"bank_address": "1234 Maple Lane, Springfield, IL 62704, USA",
"account_holder_name": "OwlTing USA",
"residential_country_code": "US",
"residential_state": "DE",
"residential_city": "Wilmington",
"residential_address_1": "100 Market Street",
"residential_address_2": "Suite 200",
"amount": "888.00"
},
"application_transfer_uuid": "MOCK_TEST_UUID",
"transfer_instructions": {
"instruction_chain": "ethereum",
"instruction_address": "0xC4b66C6F85B7e103488952E87FEF5501D372bA0B",
"instruction_memo": "47089926335422"
},
"commission": {
"percentage": "0.01",
"amount": "1.00"
},
"receipt": {
"initial_amount": "1000.00",
"commission_fee": "11.00",
"harbor_fee": "101.00",
"final_amount": "888.00",
"tracking_number": null
},
"created_at": "2025-02-18T12:30:05+00:00",
"updated_at": "2025-02-18T12:30:05+00:00"
}
}
Updated 10 days ago