On-Chain (Stablecoin to Stablecoin)

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

Harbor on-chain API allows you to securely facilitate stablecoin-to-stablecoin conversions between different chains, empowering fintech platforms and wallets to offer reliable cross-chain liquidity, compliance-friendly operations, and real-time settlement visibility.

🛑

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-chain with stablecoin to stablecoin (Stellar USDC -> Ethereum USDC)

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 '{
    "destination": {
        "asset": "USDC",
        "chain": "ethereum",
        "address": "0x8C883c6cc8521Fa7D752035854624667985081ed",
        "is_self_transfer": false
    },
    "source": {
        "on_behalf_of": "{{YOUR_CUSTOMER_UUID}}",
        "chain": "stellar",
        "asset": "USDC",
        "amount": 100
    },
    "commission": {
        "percentage": 0.01,
        "amount": 1
    },
    "application_transfer_uuid": "{{YOUR_APPLICATION_TRANSFER_UUID}}"
}'

The endpoint will return a response as shown below.

{
    "data": {
        "uuid": "transfer_eYgn1uHtG4NKktaXWVrzyKQpYVftb0Xfe4rqqFHW",
        "status": "pending_customer_transfer_start",
        "source": {
            "on_behalf_of": "{{YOUR_CUSTOMER_UUID}}",
            "asset": "USDC",
            "amount": 100
        },
        "destination": {
            "asset": "USDC",
            "chain": "ethereum",
            "address": "0x8C883c6cc8521Fa7D752035854624667985081ed",
            "address_memo": null,
            "is_self_transfer": false,
            "beneficiary_name": null,
            "amount": "98",
            "transfer_purpose": null
        },
        "application_transfer_uuid": "SWAP_0001",
        "transfer_instructions": {
            "instruction_chain": "stellar",
            "instruction_address": "GDMJHEWKY7DFQXUQGPDX2JP7JGTX4KGQZ6KON44TAENXBXJ3T467B3YG",
            "instruction_memo": "26360593508073"
        },
        "commission": {
            "percentage": 0.01,
            "amount": 1
        },
        "receipt": {
            "initial_asset": "USDC",
            "initial_amount": 100,
            "commission_fee": "2",
            "harbor_fee": "0",
            "final_asset": "USDC",
            "final_amount": "98",
            "exchange_rate": "1",
            "transaction_hash": null
        },
        "created_at": "2025-03-22T12:53:02+00:00",
        "updated_at": "2025-03-22T12:53:03+00:00"
    }
}