Stablecoin to Stablecoin
The example below shows a user wanting to transfer USDC on the Ethereum chain to USDC on Polygon. We will handle all the necessary conversions but require the user to initiate the transfer to our deposit address first.
Request
curl --location --request POST '<https://api.bridge.xyz/v0/transfers>' \
--header 'Api-Key: <API Key>' \
--header 'Idempotency-Key: <Unique Idempotency Key>' \
--data-raw '
{
"amount": "10.0",
"developer_fee": "0.5",
"on_behalf_of": "cust_alice",
"source": {
"payment_rail": "ethereum",
"currency": "usdc",
"from_address": "0xdeadbeef"
},
"destination": {
"payment_rail": "polygon",
"currency": "usdc",
"to_address": "0xdeadbeef"
}
}'
Response
{
"id": "transfer_123",
"state": "awaiting_funds",
"on_behalf_of": "cust_alice",
"amount": "10.0",
"developer_fee": "0.5",
"source_deposit_instructions": {
"payment_rail": "ethereum",
"amount": "10.0",
"currency": "usdc",
"from_address": "0xdeadbeef",
"to_address": "0xc0ffee"
},
"source": {
"payment_rail": "ethereum",
"currency": "usdc",
"from_address": "0xdeadbeef"
},
"destination": {
"payment_rail": "polygon",
"currency": "usdc",
"to_address": "0xdeadbeef"
},
"receipt": {
"initial_amount": "10.0",
"developer_fee": "0.5",
"exchange_fee": "0.0",
"final_amount": "9.5",
"source_tx_hash": "0xcafeboba", // A source tx hash will appear after the deposit is complete
"destination_tx_hash": "0xcafeboba", // A destination tx hash will appear after the transfer is complete
},
"created_at": "2023-05-05T19:39:14.316Z",
"updated_at": "2023-05-05T19:39:15.231Z"
}
For memo-based blockchains, such as Stellar and Tron, a
blockchain_memo
will be provided as part of thesource_deposit_instructions
in the response. This must be included in the crypto deposit memo. When you forget to include the memo, your off-ramp will experience signficant delays.
{
// ...
"source_deposit_instructions": {
"payment_rail": "stellar",
"amount": "10.0",
"currency": "usdc",
"from_address": "GDUY7JALICESTELLARADDRESS",
"to_address": "GDUY7JSBRIDGESTELLARDEPOSITADDRESS",
"blockchain_memo": "123456",
},
// ...
}
Updated about 1 month ago