On-ramp (Fiat to Stablecoin)

This guide provides an overview of how to facilitate on-ramp transactions (fiat to stablecoin) using the Harbor API, including customer registration, payment processing, required headers, and API request examples.

The Harbor on-ramp API allows you to securely facilitate fiat-to-stablecoin conversions, enabling you to manage the deposit and conversion process independently. Before initiating an on-ramp transaction, you must first create a customer using the Customers API. Once the customer is successfully registered, you can proceed with processing their fiat deposit and converting it to stablecoins. This API provides flexibility in handling on-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 (Fiat to Stablecoin)

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": "{{YOUR_CUSTOMER_UUID}}",
        "asset": "USD",
        "amount": "100.00"
    },
    "destination": {
        "asset": "USDC",
        "chain": "ethereum",
        "address": "0x4B20993Bc481177ec7E8f571ceCaE8A9e22C02db",
        "transfer_purpose": "Salary",
        "is_self_transfer": false,
        "supporting_document": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAOaCLP8AAAAASUVORK5CYII="
    },
    "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 crypto 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 crypto address, include the customer_crypto_address_id field, and omit asset, chain, and address. Otherwise, you can specify the asset, blockchain network, and recipient address directly in the destination field.

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": "{{YOUR_CUSTOMER_UUID}}",
        "asset": "USD",
        "amount": "100.00"
    },
    "destination": {
        "asset": "USDC",
        "customer_crypto_address_id": "{{CUSTOMER_CRYPTO_ADDRESS_ID}}",
        "transfer_purpose": "Salary",
        "is_self_transfer": false,
        "supporting_document": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAOaCLP8AAAAASUVORK5CYII="
    },
    "application_transfer_uuid": "{{YOUR_APPLICATION_TRANSFER_UUID}}"
}'

The endpoint will return a response as shown below.

{
    "data": {
        "uuid": "transfer_ewm6g1e0u6wRycKd7xeHqW0HaqLCV0CLj04xbn8d",
        "status": "pending_customer_transfer_start",
        "source": {
            "on_behalf_of": "{{customer_uuid}}",
            "asset": "USD",
            "amount": "100.00"
        },
        "destination": {
            "asset": "USDC",
            "chain": "ethereum",
            "address": "0x4B20993Bc481177ec7E8f571ceCaE8A9e22C02db",
            "address_memo": null,
            "is_self_transfer": false,
            "beneficiary_name": null,
            "amount": "98",
            "transfer_purpose": "Salary"
        },
        "application_transfer_uuid": "{{YOUR_APPLICATION_TRANSFER_UUID}}",
        "transfer_instructions": {
            "account_number": "123456789012",
            "routing_number": "987654321",
            "bank_name": "FV Bank",
            "bank_address": "1234 Maple Lane, Springfield, IL 62704, USA",
            "account_holder_name": "OwlTing USA",
            "narrative": "0297197683"
        },
        "commission": {
            "percentage": "0.01",
            "amount": "1.00"
        },
        "receipt": {
            "initial_asset": "USD",
            "initial_amount": "100.00",
            "commission_fee": "2",
            "harbor_fee": "0",
            "final_asset": "USDC",
            "final_amount": "98",
            "exchange_rate": "1",
            "transaction_hash": null
        },
        "created_at": "2025-05-22T07:59:57+00:00",
        "updated_at": "2025-05-22T07:59:57+00:00"
    }
}