Skip to main content

APIs

Create Batch Releases

Release is the act of splitting a single batch payment between multiple customer accounts in your organization. When creating releases, you are required to provide compliance information for the original senders of the funds.

Note

In contrast to other Create operations, Create Batch Releases creates multiple releases in a single API call by taking a data array.

VerbPOST
URLhttps://api.s.unit.sh/batch-releases
Required Scopebatch-releases-write
Data TypebatchRelease
Timeout (Seconds)5

Attributes

NameTypeDescription
amountintegerThe amount (in cents) to move from the batch account to the receiver account.
descriptionstringDescription of the payment (maximum of 50 characters).
senderNamestringSender name for the payment (maximum of 255 characters).
senderAddressAddressSender address for the payment.
senderAccountNumberstringA unique identifier for the sender of the payment (maximum of 17 characters). As an example, when the payment comes from a card processor, this identifier may be set to the BIN followed by the last four digits of the card used.
tags OptionalobjectOptional. See Tags will be passed to the related Release Transaction.
idempotencyKey OptionalstringOptional, but strongly recommended. See Idempotency.

Relationships

NameTypeDescription
batchAccountJSON:API RelationshipThe batch account to release the funds from.
receiverJSON:API RelationshipThe receiver account to release the funds to.
Example Request:
curl -X POST 'https://api.s.unit.sh/batch-releases'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": [
{
"type": "batchRelease",
"attributes": {
"amount": 3000,
"description": "Gift",
"senderName": "Sherlock Holmes",
"senderAccountNumber": "4581133972",
"senderAddress": {
"street": "221B Baker Street",
"city": "London",
"postalCode": "NW1 6XE",
"country": "GB"
}
},
"relationships": {
"batchAccount": {
"data": {
"type": "batchAccount",
"id": "10104"
}
},
"receiver": {
"data": {
"type": "depositAccount",
"id": "10097"
}
}
}
},
{
"type": "batchRelease",
"attributes": {
"amount": 2000,
"description": "Purchase",
"senderName": "Peter Parker",
"senderAccountNumber": "5324131257",
"senderAddress": {
"street": "5230 Newell Rd",
"city": "Palo Alto",
"state": "CA",
"postalCode": "94303",
"country": "US"
}
},
"relationships": {
"batchAccount": {
"data": {
"type": "batchAccount",
"id": "10104"
}
},
"receiver": {
"data": {
"type": "depositAccount",
"id": "10017"
}
}
}
}
]
}'

Response

Response is a JSON:API document.

201 Created

NameTypeDescription
dataArray of BatchReleaseArray of batch release resources.
Example Response:
{
"data": [
{
"type": "batchRelease",
"id": "100123",
"attributes": {
"amount": 3000,
"description": "Gift",
"senderName": "Sherlock Holmes",
"senderAccountNumber": "4581133972",
"senderAddress": {
"street": "221B Baker Street",
"city": "London",
"postalCode": "NW1 6XE",
"country": "GB"
}
},
"relationships": {
"batchAccount": {
"data": {
"type": "batchAccount",
"id": "10104"
}
},
"receiver": {
"data": {
"type": "depositAccount",
"id": "10097"
}
}
}
},
{
"type": "batchRelease",
"id": "100125",
"attributes": {
"amount": 2000,
"description": "Purchase",
"senderName": "Peter Parker",
"senderAccountNumber": "5324131257",
"senderAddress": {
"street": "5230 Newell Rd",
"city": "Palo Alto",
"state": "CA",
"postalCode": "94303",
"country": "US"
}
},
"relationships": {
"batchAccount": {
"data": {
"type": "batchAccount",
"id": "10104"
}
},
"receiver": {
"data": {
"type": "depositAccount",
"id": "10017"
}
}
}
}
]
}