APIs
Create Bulk Payment
Creates multiple payments in a single asynchronous request. Each element of data is a payment creation payload — ACH, Book, and Wire types may be mixed in the same bulk.
See Bulk Payments Overview for when to use this endpoint, idempotency guidance, and the async webhook flow (bulkPayments.finished / bulkPayments.failed).
| Verb | POST |
| URL | https://api.s.unit.sh/payments/bulk |
| Required Scope | payments-write |
| Timeout (Seconds) | 5 |
Example Request:
curl -X POST 'https://api.s.unit.sh/payments/bulk'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": [
{
"type": "wirePayment",
"attributes": {
"amount": 200,
"direction": "Credit",
"description": "Wire payment",
"counterparty": {
"name": "April Oniel",
"routingNumber": "812345678",
"accountNumber": "1000000001",
"address": {
"street": "20 Ingram St",
"city": "Forest Hills",
"state": "CA",
"postalCode": "11375",
"country": "US"
}
},
"idempotencyKey": "3a1a33be-4e12-4603-9ed0-820922389fb9"
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "10000"
}
}
}
},
{
"type": "bookPayment",
"attributes": {
"amount": 10000,
"description": "Funding",
"idempotencyKey": "3a1a33be-4e12-4603-9ed0-820922389fb8"
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "10001"
}
},
"counterpartyAccount": {
"data": {
"type": "depositAccount",
"id": "10000"
}
}
}
}
]
}'
Response
Response is a JSON:API document. The immediate response includes a bulkId generated by Unit. See Bulk Payments resource.
Example Response:
{
"data": {
"type": "bulkPayments",
"attributes": {
"bulkId": "18"
}
}
}