Sandbox Simulations
Unit exposes the following sandbox-specific endpoints, in addition to all other endpoints. They allow you to easily test and simulate real-world events - external activity, or internal activity that may normally take a long time to occur.
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
| Name | Type | Description |
|---|---|---|
| payment | JSON:API Relationship | The ACH Payment to transmit. |
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
| Name | Type | Description |
|---|---|---|
| payment | JSON:API Relationship | The ACH Payment to be cleared. |
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"
}
}
}
}
}