Fetching Transfers
Fetch all transfers
Optional query parameters:
limit
- maximum number of transfers to be returnedstarting_after
- this is atransfer_id
- If this parameter is specified, the response will contain the next page that
starts
with a transfer rightAFTER
the specifiedtransfer_id
on the timeline, which is always ordered from the newest to the oldest based on the creation time. This also implies that transfers older than the specifiedtransfer_id
will be returned.
- If this parameter is specified, the response will contain the next page that
ending_before
- this is atransfer_id
- If this parameter is specified, the response will contain the previous page that
ends
with a transfer rightBEFORE
the specifiedtransfer_id
on the timeline, which is always ordered from the newest to the oldest based on the creation time. This also implies that transfers newer than the specifiedtransfer_id
will be returned.
- If this parameter is specified, the response will contain the previous page that
updated_before_ms
- this is atimestamp
inmilliseconds
- If this parameter is specified, it must be an integer value. The response will contain transfers that were updated BEFORE the specified timestamp.
updated_after_ms
- this is atimestamp
inmilliseconds
- If this parameter is specified, it must be an integer value. The response will contain transfers that were updated AFTER the specified timestamp.
Please note that starting_after
, ending_before
, updated_before_ms
, and updated_after_ms
are mutually exclusive. You can specify at most one of them.
Request
curl --request GET \
--url 'https://api.bridge.xyz/v0/customers/cust_123/transfers?limit=<limit number>&starting_after=<transfer_id>' \
--header 'Api-Key: <API Key>' \
--header 'accept: application/json'
Response
[
{
"id": "transfer_id",
"state": "awaiting_funds",
"on_behalf_of": "customer_id",
"amount": "5.0",
"developer_fee": "0.0",
"source_deposit_instructions": {
"payment_rail": "wire",
"amount": "5.0",
"currency": "usd",
"deposit_message": "BVI7depositmessage",
"bank_name": "name",
"bank_address": "address",
"bank_routing_number": "routing",
"bank_account_number": "account",
"bank_beneficiary_name": "beneficiary"
},
"source": {
"payment_rail": "wire",
"currency": "usd",
"external_account_id": null
},
"destination": {
"payment_rail": "polygon",
"currency": "usdc",
"to_address": "0xdeadbeef"
},
"receipt": {
"initial_amount": "5.0",
"developer_fee": "0.0",
"exchange_fee": "0.0",
"final_amount": "5",
},
"created_at": "2023-06-23T00:12:01.384Z",
"updated_at": "2023-06-23T00:12:01.467Z"
}
]
Fetch a specific transfer
Request
curl --request GET \
--url 'https://api.bridge.xyz/v0/transfers/<transfer_id>' \
--header 'Api-Key: <API Key>' \
--header 'accept: application/json'
Response
{
"id": "transfer_id",
"state": "awaiting_funds",
"on_behalf_of": "customer_id",
"amount": "5.0",
"developer_fee": "0.0",
"source_deposit_instructions": {
"payment_rail": "wire",
"amount": "5.0",
"currency": "usd",
"deposit_message": "BVI7depositmessage",
"bank_name": "name",
"bank_address": "address",
"bank_routing_number": "routing",
"bank_account_number": "account",
"bank_beneficiary_name": "beneficiary"
},
"source": {
"payment_rail": "wire",
"currency": "usd",
"external_account_id": null
},
"destination": {
"payment_rail": "polygon",
"currency": "usdc",
"to_address": "0xdeadbeef"
},
"receipt": {
"initial_amount": "5.0",
"developer_fee": "0.0",
"exchange_fee": "0.0",
"final_amount": "5",
},
"created_at": "2023-06-23T00:12:01.384Z",
"updated_at": "2023-06-23T00:12:01.467Z"
}
Additional Fields
Source
The source
key can return additional information if available. Specifically, if the transfer is an onramp and the funds have already arrived, we will return information about the fiat deposit.
For wires:
{
"source": {
"payment_rail": "wire",
"currency": "usd",
"external_account_id": null,
"bank_beneficiary_name": "name of person sending money",
"bank_routing_number": "routing number of the sending bank",
"bank_name": "name of the sending bank",
"imad": "imad of incoming wire",
"omad": "omad of incoming wire (deprecated)"
}
}
For ACH push:
{
"source": {
"payment_rail": "ach_push",
"currency": "usd",
"external_account_id": null,
"description": "ach description"
}
}
Note that the source payment rail is ach_push
, but in the destination it needs to be ach
. You'll get a 4xx level error when specifying a destination payment rail of ach_push
. Note that in both cases, this corresponds to an ACH push rail.
Destination
The destination
field will also return additional information when available. Specifically, if the transfer is an offramp and the payment has been fully processed, we will return information about the outgoing fiat transaction.
For wires:
{
"destination": {
"payment_rail": "wire",
"currency": "usd",
"external_account_id": "310f23a7-9d15-4a67-b96f-bfe2acf26b00",
"imad": "20240701MMASDFO9000528"
}
}
For ACH push:
{
"destination": {
"payment_rail": "ach",
"currency": "usd",
"external_account_id": "310f23a7-9d15-4a67-b96f-bfe2acf26b00",
"trace_number": "718268532664263"
}
}
Updated 2 months ago