Skip to main content

Transfers

This module contains endpoints for sending cryptocurrencies and fiat currencies between partner -> user and user -> partner.


Create a Transfer

Method: POST
Endpoint: /v1/transfer

Request

Request body - required

NameTypeRequiredDescription
sourceExternalUserIdstringNoExternal user id (from your system). Required if 'destinationExternalUserId' is null
destinationExternalUserIdstringNoExternal user id (from your system). Required if 'sourceExternalUserId' is null
amountstringYesAmount to transfer
currencystringYesCurrency of the transfer (e.g., btc, eth)

Example body request

{
"sourceExternalUserId": "bca65c48-df49-4831-a7b2-de7903321581",
"amount": 100,
"currency": "btc"
}

Response

Code: 201
Description: Transfer created successfully

Example response

{
"transferId": "7fb02323-969a-4936-94ea-86b8773ff1a2"
}

 

Code: 400
Description: Source or destination must be provided.

{
"errorCode": "P424",
"errorName": "source-or-destination-required",
"errorMessage": "Source or destination must be provided."
}

 

Code: 400
Description: Invalid request or insufficient funds

 

Code: 400
Description: Insufficient funds

Example response

{
"errorCode": "P433",
"errorName": "insufficient-funds"
}

 

Code: 400
Description: Source or destination must be provided

Example response

{
"errorCode": "P424",
"errorName": "source-or-destination-required"
}

Get Transfer Details

Method: GET
Endpoint: /v1/transfer/details/:transferId

Request

Parameters - required

NameTypeRequiredExampleDescription
transferIdstringYes7fb02323-969a-4936-94ea-86b8773ff1a2Unique ID of the transfer

Response

Code: 200
Description: Returns details of the transfer, including source and destination emails

Example response

{
"id": "7fb02323-969a-4936-94ea-86b8773ff1a2",
"sourceEmail": "sender@example.com",
"destinationEmail": "receiver@example.com",
"status": "SUCCESSFUL",
"amount": 100,
"currency": "BTC",
"createdAt": "2024-01-01T12:34:56Z"
}

 

Code: 404
Description: Transfer not found

Example response

{
"errorCode": "P423",
"errorName": "transfer-not-found"
}