Transfer funds between wallets
Changed onThis POST endpoint transfers funds immediately from a source wallet to a destination wallet. <br> The source_token must refer to a wallet owned by the authenticated client (either a client wallet token or a user wallet token belonging to the client). <br> The destination_token can refer to any user wallet in the system, or to another client wallet that is linked to this client (e.g. a subclient or sister-client relationship — transfers to unrelated client wallets are not permitted). <br> Transfers between wallets of different currencies are supported; an FX exchange rate will be applied automatically. <br> Transfers are executed immediately upon request and are not reversible.
Request
- Base URLhttps://api.masspay.io/v1.0.0
- Auth
- API key in header Authorization
- or API key in header x-api-key
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
When true, validates the transfer and returns a quote (including FX rate and fee) without actually moving any funds.
Headers
Unique key to prevent duplicate processing
Request body
Example request
{
"source_token": "clnt_wlt_ba4275f2-bae1-488d-9d6f-20af1cd83574",
"destination_token": "usr_wlt_123e4567-e89b-12d3-a456-426614174000",
"amount": 100.5,
"client_transfer_id": "aEjn345",
"notes": "Bonus payment for Q2",
"metadata": {
"group_id": 541
}
}Response
Successfully created.
Example response
{
"transfer_token": "ld_ba4275f2-bae1-488d-9d6f-20af1cd83574",
"source_token": "clnt_wlt_ba4275f2-bae1-488d-9d6f-20af1cd83574",
"destination_token": "usr_wlt_123e4567-e89b-12d3-a456-426614174000",
"source_amount": 100.5,
"destination_amount": 1865.28,
"source_currency_code": "USD",
"destination_currency_code": "MXN",
"exchange_rate": 18.56,
"status": "COMPLETED",
"client_transfer_id": "aEjn345",
"notes": "Bonus payment for Q2",
"metadata": {
"group_id": 541
},
"created_at": "2024-07-21T17:32:28Z"
}Changes
- info
endpoint added
- info