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.

Application Statuses

By default, most applications in our sandbox will be approved immediately. Applications may be sent to manual review based on applicant information provided. Below are ways to simulate other statuses:

StatusDescription
PendingReviewIndividual application: set the SSN on the application to 000000004. Business application: set the SSN of the Officer or any Beneficial Owner on the application to 000000004.
AwaitingDocumentsIndividual application: set the SSN on the application to 000000002 to simulate AwaitingDocuments for Address Verification, or 000000003 to simulate AwaitingDocuments for Id Document, or 000000006 to simulate AwaitingDocuments for Social Security Card. Business application: set the SSN of the Officer on the application to 000000005.
DeniedIndividual application: set the SSN on the application to 000000001.

Application Form 2FA

When simulating an application via an application form on Sandbox, use 000001 as your phone verification code to complete the two factor authentication challenge. Note that a verification SMS will not be sent to the phone number provided, to avoid accidental breaching of the consent to electronic communications requirements.

Approve Application

Approves an Application under PendingReview or AwaitingDocuments status. The Customer Created webhook event will be fired.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/applications/{applicationId}/approve
Data TypeapplicationApprove
Timeout (Seconds)5
Example Request:
curl -X POST 'https://api.s.unit.sh/sandbox/applications/10001/approve'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "applicationApprove",
"attributes": {
"reason": "sandbox"
}
}
}'

Deny Application

Denies an Application under PendingReview or AwaitingDocuments status. The Application Denied webhook event will be fired.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/applications/{applicationId}/deny
Data TypeapplicationDeny
Timeout (Seconds)5
Example Request:
curl -X POST 'https://api.s.unit.sh/sandbox/applications/10001/deny'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "applicationDeny",
"attributes": {
"reason": "sandbox"
}
}
}'

Approve Document

Approves an Application Document. The Document Approved webhook event will be fired.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/applications/{applicationId}/documents/{documentId}/approve
Timeout (Seconds)5
Example Request:
curl -X POST 'https://api.s.unit.sh/sandbox/applications/10001/documents/1/approve'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{}'

Reject Document

Rejects an Application Document. The Document Rejected webhook event will be fired.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/applications/{applicationId}/documents/{documentId}/reject
Data TypedocumentReject
Timeout (Seconds)5
Example Request:
curl -X POST 'https://api.s.unit.sh/sandbox/applications/10001/documents/1/reject'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "documentReject",
"attributes": {
"reason": "blurry image",
"reasonCode": "PoorQuality"
}
}
}'

Download Document

Download the application document file, in order to test if the upload was successful and the file is valid.

VerbGET
Urlhttps://api.s.unit.sh/sandbox/applications/{applicationId}/documents/{documentId}/download
Timeout (Seconds)5
Example Request:
curl -X GET 'https://api.s.unit.sh/sandbox/applications/10001/documents/1/download' \
-H "Authorization: Bearer ${TOKEN}"

Download Document Back-Side

Download the application document back-side file, in order to test if the upload was successful and the file is valid.

VerbGET
Urlhttps://api.s.unit.sh/sandbox/applications/{applicationId}/documents/{documentId}/download/back
Timeout (Seconds)5
Example Request:
curl -X GET 'https://api.s.unit.sh/sandbox/applications/10001/documents/1/download/back' \
-H "Authorization: Bearer ${TOKEN}"