Create Batch Transactions
post
https://api.synapsefi.com
/v3.1/users/:user_id/nodes/:node_id/batch-trans
Batch Transactions

Node Balance Race Conditions

When creating batch transactions, multiple transactions are processed simultaneously. Please make sure the withdrawal node has sufficient funds to process all of the transactions or the node may be depleted to a negative balance.

Support for Idempotency

To enable idempotency controls per transaction, add extra.idempotency_keyinside each transaction object. Example:
1
{
2
"transactions": [
3
{
4
"to": {
5
"type": "DEPOSIT-US",
6
"id": "5f69275098021636016189ad"
7
},
8
"amount": {
9
"amount": 34,
10
"currency": "USD"
11
},
12
"extra": {
13
"ip": "127.0.0.1",
14
"note": "Banking Fees",
15
"idempotency_key": "testidp1"
16
}
17
}
18
]
19
}
Copied!

Example Request

HTTP
cURL
Python
JS
PHP
GO
1
POST /v3.1/users/5fe50a777562960078d3a5c6/nodes/5fe50b2dab6ce7004340c43a/batch-trans HTTP/1.1
2
Host: uat-api.synapsefi.com
3
X-SP-USER-IP: 255.127.79.76
4
X-SP-USER: oauth_ohpVj1iwMQgqHR0ATzbGEU4fBuXOJ0FWZk28y7cD|e83cf6ddcf778e37bfe3d48fc78a6502062fc
5
Content-Type: application/json
6
7
{
8
"transactions": [
9
{
10
"to": {
11
"type": "DEPOSIT-US",
12
"id": "5f69275098021636016189ad"
13
},
14
"amount": {
15
"amount": 34,
16
"currency": "USD"
17
},
18
"extra": {
19
"ip": "127.0.0.1",
20
"note": "Banking Fees"
21
}
22
},
23
{
24
"to": {
25
"type": "DEPOSIT-US",
26
"id": "5f69275098021636016189ad"
27
},
28
"amount": {
29
"amount": 34,
30
"currency": "USD"
31
},
32
"extra": {
33
"ip": "127.0.0.1",
34
"note": "Banking Fees"
35
}
36
},
37
{
38
"to": {
39
"type": "DEPOSIT-US",
40
"id": "5f69275098021636016189ad"
41
},
42
"amount": {
43
"amount": 34,
44
"currency": "USD"
45
},
46
"extra": {
47
"ip": "127.0.0.1",
48
"note": "Banking Fees"
49
}
50
}
51
]
52
}
Copied!
1
curl --location --request POST 'https://uat-api.synapsefi.com/v3.1/users/5fe50a777562960078d3a5c6/nodes/5fe50b2dab6ce7004340c43a/batch-trans' \
2
--header 'X-SP-USER-IP: 255.127.79.76' \
3
--header 'X-SP-USER: oauth_ohpVj1iwMQgqHR0ATzbGEU4fBuXOJ0FWZk28y7cD|e83cf6ddcf778e37bfe3d48fc78a6502062fc' \
4
--header 'Content-Type: application/json'
5
--data-raw '{
6
"transactions": [
7
{
8
"to": {
9
"type": "DEPOSIT-US",
10
"id": "5f69275098021636016189ad"
11
},
12
"amount": {
13
"amount": 34,
14
"currency": "USD"
15
},
16
"extra": {
17
"ip": "127.0.0.1",
18
"note": "Banking Fees"
19
}
20
},
21
{
22
"to": {
23
"type": "DEPOSIT-US",
24
"id": "5f69275098021636016189ad"
25
},
26
"amount": {
27
"amount": 34,
28
"currency": "USD"
29
},
30
"extra": {
31
"ip": "127.0.0.1",
32
"note": "Banking Fees"
33
}
34
},
35
{
36
"to": {
37
"type": "DEPOSIT-US",
38
"id": "5f69275098021636016189ad"
39
},
40
"amount": {
41
"amount": 34,
42
"currency": "USD"
43
},
44
"extra": {
45
"ip": "127.0.0.1",
46
"note": "Banking Fees"
47
}
48
}
49
]
50
}'
Copied!
1
//
Copied!
1
//
Copied!
1
//
Copied!
1
//
Copied!
Last modified 1mo ago