Move money to one balance from two or more balances.
curl --request POST \
--url http://localhost:5001/balances \
--header 'X-blnk-key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"amount": 19050.34,
"currency": "USD",
"precision": 100,
"reference": "ref_2ye281ewiu-1e17-dh17-eh18728hd245",
"sources": [
{
"identifier": "bln_f2073f6b-905a-4e3e-b5a2-8d1b3dc2fb7f",
"distribution": "10%"
},
{
"identifier": "bln_64c50fb5-32d5-4f78-9f4a-e8b01aaf025d",
"distribution": "5000"
},
{
"identifier": "bln_7d98dfe9-5c3e-4c9b-b96a-65f6d9f7b89b",
"distribution": "left"
}
],
"destination": "@WorldUSD",
"meta_data": {}
}'
{
"amount": 19050.34,
"rate": 0,
"precision": 100,
"precise_amount": 1905034,
"transaction_id": "txn_c4e70eb8-e4d6-4e04-a2e2-92a43b969e0c",
"parent_transaction": "",
"sources": [
{
"identifier": "bln_f2073f6b-905a-4e3e-b5a2-8d1b3dc2fb7f",
"distribution": "10%"
},
{
"identifier": "bln_64c50fb5-32d5-4f78-9f4a-e8b01aaf025d",
"distribution": "5000"
},
{
"identifier": "bln_7d98dfe9-5c3e-4c9b-b96a-65f6d9f7b89b",
"distribution": "left"
}
],
"destination": "@WorldUSD",
"reference": "ref_2ye281ewiu-1e17-dh17-eh18728hd245",
"currency": "USD",
"description": "Card payment on Stripe",
"status": "QUEUED",
"hash": "0b9c25fb5b00d6c71cb4ca87026bf6dc316e63353d3330deb588bd0b3d74dcc0",
"allow_overdraft": false,
"inflight": false,
"created_at": "2024-11-26T09:33:35.265582042Z",
"scheduled_for": "0001-01-01T00:00:00Z",
"inflight_expiry_date": "0001-01-01T00:00:00Z"
}
X-blnk-key: <api-key>.
Replace <api-key> with your secret API key. Ensure the key is kept secure and not exposed in public repositories or client-side code.
See also: Secure your Blnk server
sources array instead of the conventional source parameter in Record transaction.amount when working with values that have more than 15 digits to avoid rounding errors. You must provide the corresponding precision value. See Transaction precision for more details.amount or precise_amount should be provided, not both.Show child attributes
"240.23"),"20%") or"left").precise_amount, use precise_distribution in place of distribution only for sources that specify an exact value. (e.g., "37841507139655800").@ prefix indicates that the balance is an internal balance."2024-02-20 05:28:03".amount x precision. Learn why this is important: Why use precisionSHA-256 hash of the transaction details. Learn more: Transaction hashingcurl --request POST \
--url http://localhost:5001/balances \
--header 'X-blnk-key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"amount": 19050.34,
"currency": "USD",
"precision": 100,
"reference": "ref_2ye281ewiu-1e17-dh17-eh18728hd245",
"sources": [
{
"identifier": "bln_f2073f6b-905a-4e3e-b5a2-8d1b3dc2fb7f",
"distribution": "10%"
},
{
"identifier": "bln_64c50fb5-32d5-4f78-9f4a-e8b01aaf025d",
"distribution": "5000"
},
{
"identifier": "bln_7d98dfe9-5c3e-4c9b-b96a-65f6d9f7b89b",
"distribution": "left"
}
],
"destination": "@WorldUSD",
"meta_data": {}
}'
{
"amount": 19050.34,
"rate": 0,
"precision": 100,
"precise_amount": 1905034,
"transaction_id": "txn_c4e70eb8-e4d6-4e04-a2e2-92a43b969e0c",
"parent_transaction": "",
"sources": [
{
"identifier": "bln_f2073f6b-905a-4e3e-b5a2-8d1b3dc2fb7f",
"distribution": "10%"
},
{
"identifier": "bln_64c50fb5-32d5-4f78-9f4a-e8b01aaf025d",
"distribution": "5000"
},
{
"identifier": "bln_7d98dfe9-5c3e-4c9b-b96a-65f6d9f7b89b",
"distribution": "left"
}
],
"destination": "@WorldUSD",
"reference": "ref_2ye281ewiu-1e17-dh17-eh18728hd245",
"currency": "USD",
"description": "Card payment on Stripe",
"status": "QUEUED",
"hash": "0b9c25fb5b00d6c71cb4ca87026bf6dc316e63353d3330deb588bd0b3d74dcc0",
"allow_overdraft": false,
"inflight": false,
"created_at": "2024-11-26T09:33:35.265582042Z",
"scheduled_for": "0001-01-01T00:00:00Z",
"inflight_expiry_date": "0001-01-01T00:00:00Z"
}
Was this page helpful?
curl --request POST \
--url http://localhost:5001/balances \
--header 'X-blnk-key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"amount": 19050.34,
"currency": "USD",
"precision": 100,
"reference": "ref_2ye281ewiu-1e17-dh17-eh18728hd245",
"sources": [
{
"identifier": "bln_f2073f6b-905a-4e3e-b5a2-8d1b3dc2fb7f",
"distribution": "10%"
},
{
"identifier": "bln_64c50fb5-32d5-4f78-9f4a-e8b01aaf025d",
"distribution": "5000"
},
{
"identifier": "bln_7d98dfe9-5c3e-4c9b-b96a-65f6d9f7b89b",
"distribution": "left"
}
],
"destination": "@WorldUSD",
"meta_data": {}
}'
{
"amount": 19050.34,
"rate": 0,
"precision": 100,
"precise_amount": 1905034,
"transaction_id": "txn_c4e70eb8-e4d6-4e04-a2e2-92a43b969e0c",
"parent_transaction": "",
"sources": [
{
"identifier": "bln_f2073f6b-905a-4e3e-b5a2-8d1b3dc2fb7f",
"distribution": "10%"
},
{
"identifier": "bln_64c50fb5-32d5-4f78-9f4a-e8b01aaf025d",
"distribution": "5000"
},
{
"identifier": "bln_7d98dfe9-5c3e-4c9b-b96a-65f6d9f7b89b",
"distribution": "left"
}
],
"destination": "@WorldUSD",
"reference": "ref_2ye281ewiu-1e17-dh17-eh18728hd245",
"currency": "USD",
"description": "Card payment on Stripe",
"status": "QUEUED",
"hash": "0b9c25fb5b00d6c71cb4ca87026bf6dc316e63353d3330deb588bd0b3d74dcc0",
"allow_overdraft": false,
"inflight": false,
"created_at": "2024-11-26T09:33:35.265582042Z",
"scheduled_for": "0001-01-01T00:00:00Z",
"inflight_expiry_date": "0001-01-01T00:00:00Z"
}