Skip to main content

Simulations (Sandbox only)

Unit's Sandbox environment provides additional operations for testing originated ACH payment flows. These operations allow you to easily test and simulate activities that would normally take time or require interaction with the ACH network.

For simulations related to receiving ACH payments, see Receiving ACH.

Note

Simulation operations are subject to the same authentication scheme as the Live APIs, and therefore require a valid Authentication token.


Transmit ACH payment

This API allows you to simulate a file transmission to the network for an existing ACH payment with Pending status. After transmission, the status would change to Sent for ACH Credit payment and Clearing for ACH Debit payment. The Payment Sent or Payment Clearing webhook event will be fired.

VerbPOST
URLhttps://api.s.unit.sh/sandbox/ach/transmit
Data TypetransmitAchPayment
Timeout (Seconds)5

Relationships

payment
JSON:API Relationship
The ACH Payment to transmit.
Example Request:
curl -X POST 'https://api.s.unit.sh/sandbox/ach/transmit'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "transmitAchPayment",
"relationships": {
"payment": {
"data": {
"type": "achPayment",
"id": "10"
}
}
}
}
}'
Example Response:
{
"data": {
"type": "achPayment",
"id": "10",
"attributes": {
"createdAt": "2021-03-09T15:02:01.543Z",
"amount": 10000,
"direction": "Debit",
"description": "Payment from Sandbox",
"status": "Clearing"
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "10001"
}
},
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
}
}
}
}

Clear ACH payment

This API allows you to immediately clear an existing ACH payment with Clearing status without waiting for the end of the clearing period. The Payment Sent and Transaction Created webhook events will be fired.

VerbPOST
URLhttps://api.s.unit.sh/sandbox/ach/clear
Data TypeclearAchPayment
Timeout (Seconds)5

Relationships

payment
JSON:API Relationship
The ACH Payment to be cleared.
Example Request:
curl -X POST 'https://api.s.unit.sh/sandbox/ach/clear'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "clearAchPayment",
"relationships": {
"payment": {
"data": {
"type": "achPayment",
"id": "10"
}
}
}
}
}'
Example Response:
{
"data": {
"type": "achPayment",
"id": "10",
"attributes": {
"createdAt": "2021-03-09T15:02:01.543Z",
"amount": 10000,
"direction": "Debit",
"description": "Payment from Sandbox",
"status": "Sent"
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "10001"
}
},
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
}
}
}
}