Skip to main content

Simulations (Sandbox only)

Unit's Sandbox environment provides additional operations on top of the regular APIs. Those operations allow you to easily test and simulate activities that would normally take a long time or require interaction with the external world.

A common example for testing would be Simulating a Received ACH Payment to create funds in an account, followed by Simulating a Card Purchase to spend those funds.

note

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

Create Check Payment

This API allows you to simulate the creation of a Check Payment for testing purposes. The checkPayment.created webhook event will be fired.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/check-payments
Data TypecheckPayment
Timeout (Seconds)5

Attributes

NameTypeDescription
amountintegerThe amount (in cents).
checkNumberstringOptional. The serial number printed at the bottom of the check

Relationships

NameTypeDescription
accountJSON:API RelationshipThe Deposit Account receiving the check payment.
Example Request:
curl -X POST 'https://api.s.unit.sh/sandbox/check-payments'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "checkPayment",
"attributes": {
"amount": 10000,
"checkNumber": "12345"
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "10002"
}
}
}
}
}'
Example Response:
{
"data": {
"type": "checkPayment",
"id": "3",
"attributes": {
"createdAt": "2023-02-21T11:31:03.704Z",
"updatedAt": "2023-02-21T11:31:03.704Z",
"amount": 10000,
"description": "Check Payment | 0322",
"status": "Processed",
"checkNumber": "0322",
"onUsAuxiliary": "0322",
"onUs": "864800000002/",
"counterpartyRoutingNumber": "051402372",
"returnCutoff": "2023-03-23T15:50:00.000Z",
"additionalVerificationStatus": "NotRequired"
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "75002"
}
},
"customer": {
"data": {
"type": "customer",
"id": "100425"
}
},
"customers": {
"data": [
{
"type": "customer",
"id": "10001"
}
]
},
"transaction": {
"data": {
"type": "transaction",
"id": "123423"
}
}
}
}
}

Check Payment Status: Mailed

Simulates transmission of a check payment. The checkPayment.inDelivery webhook event will be fired.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/check-payments/1001/mail
Timeout (Seconds)5
Example Request:
curl -X POST 'https://api.s.unit.sh/sandbox/check-payments/1001/mail'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{}'

Check Payment Delivery Status: In Local Area

Simulates a delivery status update of a check payment. The checkPayment.deliverySatusChanged webhook event will be fired.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/check-payments/1001/InLocalArea
Timeout (Seconds)5
Example Request:
curl -X POST 'https://api.s.unit.sh/sandbox/check-payments/1001/InLocalArea'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{}'

Check Payment Status: In Production

Simulates a status update of a check payment. The checkPayment.inProduction webhook event will be fired.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/check-payments/1001/InProduction
Timeout (Seconds)5
Example Request:
curl -X POST 'https://api.s.unit.sh/sandbox/check-payments/1001/InProduction'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{}'

Check Payment Status: ReRouted

Simulates a delivery status update of a check payment. The checkPayment.reRouted webhook event will be fired.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/check-payments/1001/ReRouted
Timeout (Seconds)5
Example Request:
curl -X POST 'https://api.s.unit.sh/sandbox/check-payments/1001/ReRouted'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{}'

Check Payment Delivery Status: Delivered

Simulates a status update of a check payment. The checkPayment.deliverySatusChanged webhook event will be fired.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/check-payments/1001/deliver
Timeout (Seconds)5
Example Request:
curl -X POST 'https://api.s.unit.sh/sandbox/check-payments/1001/deliver'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{}'

Check Payment Delivery Status: Returned to Sender

Simulates a status update of a check payment. The checkPayment.returnToSender webhook event will be fired.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/check-payments/1001/returnToSender
Timeout (Seconds)5
Example Request:
curl -X POST 'https://api.s.unit.sh/sandbox/check-payments/1001/returnToSender'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{}'