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.
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.
| Verb | POST |
| URL | https://api.s.unit.sh/sandbox/ach/transmit |
| Data Type | transmitAchPayment |
| Timeout (Seconds) | 5 |
Relationships
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"
}
}
}
}
}'
{
"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.
| Verb | POST |
| URL | https://api.s.unit.sh/sandbox/ach/clear |
| Data Type | clearAchPayment |
| Timeout (Seconds) | 5 |
Relationships
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"
}
}
}
}
}'
{
"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"
}
}
}
}
}