Create Batch Transactions

Batch Transactions

POST https://api.synapsefi.com/v3.1/users/:user_id/nodes/:node_id/batch-trans

This endpoint allows you to create up-to 500 transactions (100 in sandbox) from one node at once.

Path Parameters

Name
Type
Description

node_id

string

ID of the node.

user_id

string

ID of the user.

Headers

Name
Type
Description

X-SP-USER

string

User's OAuth key and device fingerprint, separated by a pipe.

X-SP-USER-IP

string

IP address of user's device.

X-SP-GATEWAY

string

Your Client ID and Secret, separated by a pipe.

Request Body

Name
Type
Description

transactions

array

Go to Transaction Object Details to see all the required and optional body parameters allowed during transaction creation

{
    "error_code": "0",
    "http_code": "200",
    "page_count": 1,
    "success": true,
    "trans": [
        {
            "_id": "5f6b96672ecd0aa63709d21e",
            "_links": {
                "self": {
                    "href": "https://uat-api.synapsefi.com/v3.1/users/5f6b8ae599c8e5007852a2ed/nodes/5f6b965de079bc5b16ac0d65/trans/5f6b96672ecd0aa63709d21e"
                }
            },
            "_v": 2,
            "amount": {
                "amount": 34.0,
                "currency": "USD"
            },
            "client": {
                "id": "5da6466cf49fd1019aa1f828",
                "name": "* Stella Liang"
            },
            "extra": {
                "asset": null,
                "created_on": 1600886375194,
                "group_id": null,
                "ip": "127.0.0.1",
                "latlon": "unknown,unknown",
                "location": {
                    "address_city": null,
                    "address_country_code": null,
                    "address_postal_code": null,
                    "address_subdivision": null,
                    "lat": 0,
                    "lon": 0
                },
                "note": "Banking Fees",
                "other": {
                    "affect_limits": true,
                    "attachments": [],
                    "chargeback_disputed": false,
                    "dispute_form": null,
                    "disputed": false,
                    "is_provisional_credit": false
                },
                "process_on": 1600886375194,
                "rate": null,
                "rate_limit": null,
                "same_day": false,
                "settlement_delay": 0,
                "supp_id": "",
                "tracking_number": null
            },
            "fees": [
                {
                    "fee": 0.0,
                    "note": "Facilitator Fee",
                    "to": {
                        "id": "None"
                    }
                }
            ],
            "from": {
                "id": "5f6b965de079bc5b16ac0d65",
                "nickname": "SynapsePay Test Checking Account - 8901",
                "type": "ACH-US",
                "user": {
                    "_id": "5f6b8ae599c8e5007852a2ed",
                    "legal_names": [
                        "Ja To"
                    ]
                }
            },
            "recent_status": {
                "date": 1600886375194,
                "note": "Transaction Created.",
                "status": "CREATED",
                "status_id": "1"
            },
            "timeline": [
                {
                    "date": 1600886375194,
                    "note": "Transaction Created.",
                    "status": "CREATED",
                    "status_id": "1"
                }
            ],
            "to": {
                "id": "5f69275098021636016189ad",
                "nickname": "Pos balance with doc ID",
                "type": "DEPOSIT-US",
                "user": {
                    "_id": "5f63dada04707a00550464ba",
                    "legal_names": [
                        "Ja To"
                    ]
                }
            }
        },
        {
            "_id": "5f6b96676fb4a2d20665f479",
            "_links": {
                "self": {
                    "href": "https://uat-api.synapsefi.com/v3.1/users/5f6b8ae599c8e5007852a2ed/nodes/5f6b965de079bc5b16ac0d65/trans/5f6b96676fb4a2d20665f479"
                }
            },
            "_v": 2,
            "amount": {
                "amount": 34.0,
                "currency": "USD"
            },
            "client": {
                "id": "5da6466cf49fd1019aa1f828",
                "name": "* Stella Liang"
            },
            "extra": {
                "asset": null,
                "created_on": 1600886375805,
                "group_id": null,
                "ip": "127.0.0.1",
                "latlon": "unknown,unknown",
                "location": {
                    "address_city": null,
                    "address_country_code": null,
                    "address_postal_code": null,
                    "address_subdivision": null,
                    "lat": 0,
                    "lon": 0
                },
                "note": "Banking Fees",
                "other": {
                    "affect_limits": true,
                    "attachments": [],
                    "chargeback_disputed": false,
                    "dispute_form": null,
                    "disputed": false,
                    "is_provisional_credit": false
                },
                "process_on": 1600886375805,
                "rate": null,
                "rate_limit": null,
                "same_day": false,
                "settlement_delay": 0,
                "supp_id": "",
                "tracking_number": null
            },
            "fees": [
                {
                    "fee": 0.0,
                    "note": "Facilitator Fee",
                    "to": {
                        "id": "None"
                    }
                }
            ],
            "from": {
                "id": "5f6b965de079bc5b16ac0d65",
                "nickname": "SynapsePay Test Checking Account - 8901",
                "type": "ACH-US",
                "user": {
                    "_id": "5f6b8ae599c8e5007852a2ed",
                    "legal_names": [
                        "Ja To"
                    ]
                }
            },
            "recent_status": {
                "date": 1600886375805,
                "note": "Transaction Created.",
                "status": "CREATED",
                "status_id": "1"
            },
            "timeline": [
                {
                    "date": 1600886375805,
                    "note": "Transaction Created.",
                    "status": "CREATED",
                    "status_id": "1"
                }
            ],
            "to": {
                "id": "5f69275098021636016189ad",
                "nickname": "Pos balance with doc ID",
                "type": "DEPOSIT-US",
                "user": {
                    "_id": "5f63dada04707a00550464ba",
                    "legal_names": [
                        "Ja To"
                    ]
                }
            }
        },
        {
            "_id": "5f6b96673b5ef95d4a66a0a6",
            "_links": {
                "self": {
                    "href": "https://uat-api.synapsefi.com/v3.1/users/5f6b8ae599c8e5007852a2ed/nodes/5f6b965de079bc5b16ac0d65/trans/5f6b96673b5ef95d4a66a0a6"
                }
            },
            "_v": 2,
            "amount": {
                "amount": 34.0,
                "currency": "USD"
            },
            "client": {
                "id": "5da6466cf49fd1019aa1f828",
                "name": "* Stella Liang"
            },
            "extra": {
                "asset": null,
                "created_on": 1600886375811,
                "group_id": null,
                "ip": "127.0.0.1",
                "latlon": "unknown,unknown",
                "location": {
                    "address_city": null,
                    "address_country_code": null,
                    "address_postal_code": null,
                    "address_subdivision": null,
                    "lat": 0,
                    "lon": 0
                },
                "note": "Banking Fees",
                "other": {
                    "affect_limits": true,
                    "attachments": [],
                    "chargeback_disputed": false,
                    "dispute_form": null,
                    "disputed": false,
                    "is_provisional_credit": false
                },
                "process_on": 1600886375811,
                "rate": null,
                "rate_limit": null,
                "same_day": false,
                "settlement_delay": 0,
                "supp_id": "",
                "tracking_number": null
            },
            "fees": [
                {
                    "fee": 0.0,
                    "note": "Facilitator Fee",
                    "to": {
                        "id": "None"
                    }
                }
            ],
            "from": {
                "id": "5f6b965de079bc5b16ac0d65",
                "nickname": "SynapsePay Test Checking Account - 8901",
                "type": "ACH-US",
                "user": {
                    "_id": "5f6b8ae599c8e5007852a2ed",
                    "legal_names": [
                        "Ja To"
                    ]
                }
            },
            "recent_status": {
                "date": 1600886375811,
                "note": "Transaction Created.",
                "status": "CREATED",
                "status_id": "1"
            },
            "timeline": [
                {
                    "date": 1600886375811,
                    "note": "Transaction Created.",
                    "status": "CREATED",
                    "status_id": "1"
                }
            ],
            "to": {
                "id": "5f69275098021636016189ad",
                "nickname": "Pos balance with doc ID",
                "type": "DEPOSIT-US",
                "user": {
                    "_id": "5f63dada04707a00550464ba",
                    "legal_names": [
                        "Ja To"
                    ]
                }
            }
        }
    ],
    "trans_count": 3
}

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:

{
  "transactions": [
    {
      "to": {
        "type": "DEPOSIT-US",
        "id": "5f69275098021636016189ad"
      },
      "amount": {
        "amount": 34,
        "currency": "USD"
      },
      "extra": {
        "ip": "127.0.0.1",
        "note": "Banking Fees",
        "idempotency_key": "testidp1"
      }
    }
  ]
}

Example Request

POST /v3.1/users/5fe50a777562960078d3a5c6/nodes/5fe50b2dab6ce7004340c43a/batch-trans HTTP/1.1
Host: uat-api.synapsefi.com
X-SP-USER-IP: 255.127.79.76
X-SP-USER: oauth_ohpVj1iwMQgqHR0ATzbGEU4fBuXOJ0FWZk28y7cD|e83cf6ddcf778e37bfe3d48fc78a6502062fc
Content-Type: application/json

{
  "transactions": [
    {
      "to": {
        "type": "DEPOSIT-US",
        "id": "5f69275098021636016189ad"
      },
      "amount": {
        "amount": 34,
        "currency": "USD"
      },
      "extra": {
        "ip": "127.0.0.1",
        "note": "Banking Fees"
      }
    },
    {
      "to": {
        "type": "DEPOSIT-US",
        "id": "5f69275098021636016189ad"
      },
      "amount": {
        "amount": 34,
        "currency": "USD"
      },
      "extra": {
        "ip": "127.0.0.1",
        "note": "Banking Fees"
      }
    },
    {
      "to": {
        "type": "DEPOSIT-US",
        "id": "5f69275098021636016189ad"
      },
      "amount": {
        "amount": 34,
        "currency": "USD"
      },
      "extra": {
        "ip": "127.0.0.1",
        "note": "Banking Fees"
      }
    }
  ]
}

Last updated