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.
Simulation operations are subject to the same authentication scheme as the Live APIs, and therefore require a valid Authentication token.
Tokens
Create Customer Token Without 2FA
Usually in order to obtain a customer token with write permission we need to perform the following actions:
For simulation purposes we can skip the 2FA requirement by calling only Create Customer Token passing "verificationCode": "000001"
.
curl -X POST 'https://api.s.unit.sh/customers/<CUSTOMER_ID>/token'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "customerToken",
"attributes": {
"scope": "customers accounts payments payments-create counterparties counterparties-create cards-create",
"verificationCode": "000001"
}
}
}'
Applications
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:
Status | Description |
---|---|
PendingReview | Individual 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. |
AwaitingDocuments | Individual 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. |
Denied | Individual 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.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/applications/{applicationId}/approve |
Data Type | applicationApprove |
Timeout (Seconds) | 5 |
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.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/applications/{applicationId}/deny |
Data Type | applicationDeny |
Timeout (Seconds) | 5 |
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.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/applications/{applicationId}/documents/{documentId}/approve |
Timeout (Seconds) | 5 |
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.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/applications/{applicationId}/documents/{documentId}/reject |
Data Type | documentReject |
Timeout (Seconds) | 5 |
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.
Verb | GET |
Url | https://api.s.unit.sh/sandbox/applications/{applicationId}/documents/{documentId}/download |
Timeout (Seconds) | 5 |
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.
Verb | GET |
Url | https://api.s.unit.sh/sandbox/applications/{applicationId}/documents/{documentId}/download/back |
Timeout (Seconds) | 5 |
curl -X GET 'https://api.s.unit.sh/sandbox/applications/10001/documents/1/download/back' \
-H "Authorization: Bearer ${TOKEN}"
Payments
Receive ACH payment
This API allows you to simulate an incoming ACH payment with the specified amount (in cents) for testing purposes. The Transaction Created webhook event will be fired.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/payments |
Data Type | achPayment |
Timeout (Seconds) | 5 |
Attributes
Name | Type | Description |
---|---|---|
amount | integer | The amount (in cents). |
direction | string | The direction in which the funds flow (currently, only Credit is supported). |
description | string | Payment description (maximum of 50 characters). |
Relationships
Name | Type | Description |
---|---|---|
account | JSON:API Relationship | The Deposit Account receiving the payment. |
curl -X POST 'https://api.s.unit.sh/sandbox/payments'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "achPayment",
"attributes": {
"amount": 10000,
"direction": "Credit",
"description": "Payment from Sandbox"
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "1000"
}
}
}
}
}'
Note: the status for the sandbox payment requests is always Sent
. Please refer to ACH Status for more information about the status codes.
{
"data": {
"type": "achPayment",
"id": "3",
"attributes": {
"createdAt": "2020-06-29T13:17:59.816Z",
"amount": 10000,
"direction": "Credit",
"description": "Payment from Sandbox",
"status": "Sent",
"reason": null
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "1000"
}
},
"customer": {
"data": {
"type": "individualCustomer",
"id": "1"
}
}
}
}
}
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"
}
}
}
}
}
Return ACH payment
This API allows you to return an existing ACH payment for testing purposes, the status of payment can either be Clearing
or Sent
.
The Payment Returned and Transaction Created webhook events will be fired.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/ach/return |
Data Type | returnAchPayment |
Timeout (Seconds) | 5 |
Relationships
Name | Type | Description |
---|---|---|
payment | JSON:API Relationship | The ACH Payment to be returned. |
curl -X POST 'https://api.s.unit.sh/sandbox/ach/return'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "returnAchPayment",
"relationships": {
"payment": {
"data": {
"type": "achPayment",
"id": "10"
}
}
}
}
}'
{
"data": {
"type": "achPayment",
"id": "10",
"attributes": {
"createdAt": "2021-03-09T13:51:51.100Z",
"amount": 10000,
"direction": "Debit",
"description": "Payment from Sandbox",
"status": "Returned",
"reason": "R01"
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "10001"
}
},
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
}
}
}
}
Receive Wire payment
This API allows you to simulate an incoming wire payment with the specified amount (in cents) for testing purposes. The Transaction Created webhook event will be fired.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/wire-payments |
Data Type | wirePayment |
Timeout (Seconds) | 5 |
Attributes
Name | Type | Description |
---|---|---|
amount | integer | The amount (in cents). |
description | string | Payment description (maximum of 50 characters). |
Relationships
Name | Type | Description |
---|---|---|
account | JSON:API Relationship | The Deposit Account receiving the payment. |
curl -X POST 'https://api.s.unit.sh/sandbox/wire-payments'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "wirePayment",
"attributes": {
"amount": 10000,
"description": "Wire Payment from Sandbox"
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "10001"
}
}
}
}
}'
{
"data": {
"type": "wirePayment",
"id": "108",
"attributes": {
"createdAt": "2021-02-24T11:31:10.009Z",
"amount": 10000,
"description": "Wire Payment from Sandbox"
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "10001"
}
},
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
}
}
}
}
Transmit Wire payment
This API allows you to simulate a Wire payment transmission to the network for an existing Wire payment with Pending
status.
After transmission, the status of the payment would change to Sent
.
The Payment Sent webhook event will be fired.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/wire/transmit |
Data Type | transmitWirePayment |
Timeout (Seconds) | 5 |
Relationships
Name | Type | Description |
---|---|---|
payment | JSON:API Relationship | The Wire Payment to transmit. |
curl -X POST 'https://api.s.unit.sh/sandbox/wire/transmit'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "transmitWirePayment",
"relationships": {
"payment": {
"data": {
"type": "wirePayment",
"id": "2"
}
}
}
}
}'
{
"data": {
"type": "wirePayment",
"id": "2",
"attributes": {
"createdAt": "2021-09-15T10:23:56.716Z",
"amount": 200,
"description": "Wire payment"
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "10000"
}
},
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
}
}
}
}
Create ACH Received Payment Transaction
This API allows you to simulate the creation of an ACH received payment for testing purposes. The receivedPayment.created webhook event will be fired.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/received-payments |
Data Type | achReceivedPayment |
Timeout (Seconds) | 5 |
Attributes
Name | Type | Description |
---|---|---|
amount | integer | The amount (in cents). |
completionDate | RFC3339 Date string | Shows the date on which the received ACH will be completed(settled or repaid). |
description | string | ACH description (maximum of 10 characters), also known as Company Entry Description. |
companyName | string | The name by which the originator is known to the receiver. (maximum of 16 characters) |
secCode | string | Optional. The 3-letter ACH Standard Entry Class (SEC) Code (e.g. WEB , CCD , PPD , etc.). default will be WEB |
Relationships
Name | Type | Description |
---|---|---|
account | JSON:API Relationship | The Deposit Account receiving the received payment. |
curl -X POST 'https://api.s.unit.sh/sandbox/received-payments'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "achReceivedPayment",
"attributes": {
"amount": 10000,
"description": "paycheck simulation Sandbox",
"companyName": "UBER LTD",
"completionDate": "2020-07-30",
"secCode": "PPD"
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "1000"
}
}
}
}
}'
Note: the status for the created sandbox received payment will bePending
. you may advance and/or complete it. Unlike in production, the received payment will never be completed unless the simulate completion is used
{
"data": {
"type": "achReceivedPayment",
"id": "1337",
"attributes": {
"createdAt": "2022-02-01T12:03:14.406Z",
"status": "Pending",
"wasAdvanced": false,
"amount": 500000,
"completionDate": "2020-07-30",
"companyName": "UBER LTD",
"counterpartyRoutingNumber": "051402372",
"description": "Sandbox",
"traceNumber": "123456789123456",
"secCode": "PPD"
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "163555"
}
},
"customer": {
"data": {
"type": "customer",
"id": "129522"
}
}
}
}
}
Complete Received Payment
This API allows you to complete a Received Payment with Pending
or Advanced
status.
The receivedPayment.completed and the Transaction Created for the received payment transaction (and repay advance transaction if the received payment was advances webhook events will be fired.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/received-payments/{receivedPaymentId}/complete |
Timeout (Seconds) | 5 |
curl -X POST 'https://api.s.unit.sh/sandbox/received-payments/101/complete' \
-H "Authorization: Bearer ${TOKEN}"
{
"data": {
"type": "achReceivedPayment",
"id": "1337",
"attributes": {
"createdAt": "2022-02-01T12:03:14.406Z",
"status": "Completed",
"wasAdvanced": true,
"amount": 500000,
"completionDate": "2020-07-30",
"companyName": "UBER LTD",
"counterpartyRoutingNumber": "051402372",
"description": "Sandbox",
"traceNumber": "123456789123456",
"secCode": "PPD"
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "163555"
}
},
"customer": {
"data": {
"type": "customer",
"id": "129522"
}
},
"receivePaymentTransaction": {
"data": {
"type": "transaction",
"id": "101"
}
},
"paymentAdvanceTransaction": {
"data": {
"type": "transaction",
"id": "202"
}
},
"repayPaymentAdvanceTransaction": {
"data": {
"type": "transaction",
"id": "890"
}
}
}
}
}
Cards
Create Card Authorization
This API allows you to simulate a card purchase authorization with the specified amount (in cents) for testing purposes. The Authorization Created webhook event will be fired.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/authorizations |
Required Scope | authorization |
Timeout (Seconds) | 5 |
Attributes
Name | Type | Description |
---|---|---|
amount | integer | The amount (in cents). |
cardLast4Digits | string | The last 4 digits of the debit card involved in the authorization. |
merchantName | string | The name of the merchant. |
merchantType | integer | The 4-digit ISO 18245 merchant category code (MCC). Use any number (e.g. 1000 for testing). |
merchantLocation | string | Optional. The location (city, state, etc.) of the merchant. |
merchantId | string | Optional. The unique network merchant identifier. |
recurring | boolean | Optional. Default: false. Indicates whether the authorization is recurring |
status | string | Optional. The new authorization status, one of: Authorized , Declined . |
Relationships
Name | Type | Description |
---|---|---|
account | JSON:API Relationship | The Deposit Account of the customer. |
curl -X POST 'https://api.s.unit.sh/sandbox/authorizations'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "authorization",
"attributes": {
"amount": 2500,
"cardLast4Digits": "0019",
"merchantName": "Apple Inc.",
"merchantType": 1000,
"merchantLocation": "Cupertino, CA",
"recurring": false,
"status": "Authorized"
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "10001"
}
}
}
}
}'
{
"data": {
"type": "authorization",
"id": "125",
"attributes": {
"createdAt": "2021-03-01T12:41:15.063Z",
"amount": 2500,
"cardLast4Digits": "0019",
"merchant": {
"name": "Apple Inc.",
"type": 1000,
"category": "",
"location": "Cupertino, CA",
"id": "311204598883"
}
},
"relationships": {
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
},
"account": {
"data": {
"type": "account",
"id": "10001"
}
}
}
}
}
Increase Card Authorization
This API allows you to simulate a card purchase increase authorization with the specified amount (in cents) for testing purposes. The Authorization AmountChanged webhook event will be fired.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/authorizations/{authorizationId}/increase |
Required Scope | authorization |
Timeout (Seconds) | 5 |
Attributes
Name | Type | Description |
---|---|---|
amount | integer | The amount (in cents). |
cardLast4Digits | string | The last 4 digits of the debit card involved in the authorization. |
recurring | boolean | Optional. Default: false. Indicates whether the authorization is recurring |
Relationships
Name | Type | Description |
---|---|---|
account | JSON:API Relationship | The Deposit Account of the customer. |
curl -X POST 'https://api.s.unit.sh/sandbox/authorizations/{authorizationId}/increase'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "authorization",
"attributes": {
"amount": 2500,
"cardLast4Digits": "0019",
"recurring": false
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "10001"
}
}
}
}
}'
{
"data": {
"type": "authorization",
"id": "125",
"attributes": {
"createdAt": "2021-03-01T12:41:15.063Z",
"amount": 2500,
"cardLast4Digits": "0019",
"merchant": {
"name": "Apple Inc.",
"type": 1000,
"category": "",
"location": "Cupertino, CA",
"id": "311204598883"
}
},
"relationships": {
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
},
"account": {
"data": {
"type": "account",
"id": "10001"
}
}
}
}
}
Cancel Card Authorization
This API allows you to simulate cancellation of card purchase authorization. The Authorization Canceled webhook event will be fired.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/authorizations/{authorizationId}/cancel |
Required Scope | authorization |
Timeout (Seconds) | 5 |
Relationships
Name | Type | Description |
---|---|---|
account | JSON:API Relationship | The Deposit Account of the customer. |
curl -X POST 'https://api.s.unit.sh/sandbox/authorizations/{authorizationId}/cancel'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "10001"
}
}
}
}
}'
{
"data": {
"type": "authorization",
"id": "125",
"attributes": {
"createdAt": "2021-03-01T12:41:15.063Z",
"amount": 2500,
"cardLast4Digits": "0019",
"merchant": {
"name": "Apple Inc.",
"type": 1000,
"category": "",
"location": "Cupertino, CA",
"id": "311204598883"
}
},
"relationships": {
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
},
"account": {
"data": {
"type": "account",
"id": "10001"
}
}
}
}
}
Create Card Purchase Authorization Request
This API allows you to simulate a card purchase authorization request with the specified amount (in cents) for testing purposes. It can be used to test the Programmatic Authorization of Card Use functionality, as the Pending Authorization Request webhook event will be fired .
Verb | POST |
Url | https://api.s.unit.sh/sandbox/authorization-requests/purchase |
Data Type | purchaseAuthorizationRequest |
Timeout (Seconds) | 5 |
Attributes
Name | Type | Description |
---|---|---|
amount | integer | The amount (in cents). |
merchantName | string | The name of the merchant. |
merchantType | integer | The 4-digit ISO 18245 merchant category code (MCC). Use any number (e.g. 1000 for testing). |
merchantLocation | string | Optional. The location (city, state, etc.) of the merchant. |
merchantId | string | Optional. The unique network merchant identifier. |
recurring | boolean | Optional. Default: false. Indicates whether the authorization is recurring |
ecommerce | boolean | Optional. Default: false. Indicates whether the transaction was created over an electronic network (primarily the internet). |
cardPresent | boolean | Optional. Default: false. Indicates whether the card was present when the transaction was created. |
Relationships
Name | Type | Description |
---|---|---|
card | JSON:API Relationship | The debit card used in the purchase. |
curl -X POST 'https://api.s.unit.sh/sandbox/authorization-requests/purchase'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "purchaseAuthorizationRequest",
"attributes": {
"amount": 2500,
"merchantName": "Apple Inc.",
"merchantType": 1000,
"merchantLocation": "Cupertino, CA",
"recurring": false,
"ecommerce": true,
"cardPresent": false
},
"relationships": {
"card": {
"data": {
"type": "card",
"id": "7"
}
}
}
}
}'
{
"data": {
"type": "purchaseAuthorizationRequest",
"id": "5",
"attributes": {
"createdAt": "2021-06-24T08:07:22.520Z",
"amount": 2500,
"status": "Pending",
"partialApprovalAllowed": false,
"merchant": {
"name": "Apple Inc.",
"type": 1000,
"category": "",
"location": "Cupertino, CA",
"id": "311204598883"
},
"recurring": false
},
"relationships": {
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
},
"account": {
"data": {
"type": "account",
"id": "10001"
}
},
"card": {
"data": {
"type": "card",
"id": "7"
}
}
}
}
}
Create Card Transaction Authorization Request
This API allows you to simulate a card transaction authorization request with the specified amount (in cents) for testing purposes. It can be used to test the Programmatic Authorization of Card Transaction functionality, as the Pending Authorization Request webhook event will be fired .
Verb | POST |
Url | https://api.s.unit.sh/sandbox/authorization-requests/card-transaction |
Data Type | cardTransactionAuthorizationRequest |
Timeout (Seconds) | 5 |
Attributes
Name | Type | Description |
---|---|---|
amount | integer | The amount (in cents). |
merchantName | string | The name of the merchant. |
merchantType | integer | The 4-digit ISO 18245 merchant category code (MCC). Use any number (e.g. 1000 for testing). |
merchantLocation | string | Optional. The location (city, state, etc.) of the merchant. |
recurring | boolean | Optional. Default: false. Indicates whether the authorization is recurring |
Relationships
Name | Type | Description |
---|---|---|
card | JSON:API Relationship | The debit card used in the purchase. |
curl -X POST 'https://api.s.unit.sh/sandbox/authorization-requests/card-transaction'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "cardTransactionAuthorizationRequest",
"attributes": {
"amount": 2500,
"merchantName": "Apple Inc.",
"merchantType": 1000,
"merchantLocation": "Cupertino, CA",
"recurring": false
},
"relationships": {
"card": {
"data": {
"type": "card",
"id": "7"
}
}
}
}
}'
{
"data": {
"type": "cardTransactionAuthorizationRequest",
"id": "5",
"attributes": {
"createdAt": "2021-06-24T08:07:22.520Z",
"amount": 2500,
"status": "Pending",
"partialApprovalAllowed": false,
"merchant": {
"name": "Apple Inc.",
"type": 1000,
"category": "",
"location": "Cupertino, CA",
"id": "311204598883"
},
"recurring": false
},
"relationships": {
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
},
"account": {
"data": {
"type": "account",
"id": "10001"
}
},
"card": {
"data": {
"type": "card",
"id": "7"
}
}
}
}
}
Create ATM Authorization Request
This API allows you to simulate an ATM withdrawal authorization request with the specified amount (in cents) for testing purposes. It can be used to test the Programmatic Authorization of Card Use functionality, as the Pending Authorization Request webhook event will be fired .
Verb | POST |
Url | https://api.s.unit.sh/sandbox/authorization-requests/atm |
Data Type | atmAuthorizationRequest |
Timeout (Seconds) | 5 |
Attributes
Name | Type | Description |
---|---|---|
amount | integer | The amount (in cents). |
atmName | string | The name of the ATM. |
atmLocation | string | Optional. The location (city, state, etc.) of the ATM. |
Relationships
Name | Type | Description |
---|---|---|
card | JSON:API Relationship | The debit card used. |
curl -X POST 'https://api.s.unit.sh/sandbox/authorization-requests/atm'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "atmAuthorizationRequest",
"attributes": {
"amount": 2500,
"atmName": "HOME FED SAV BK",
"atmLocation": "Cupertino, CA, US"
},
"relationships": {
"card": {
"data": {
"type": "card",
"id": "7"
}
}
}
}
}'
{
"data": {
"type": "atmAuthorizationRequest",
"id": "5",
"attributes": {
"createdAt": "2021-06-24T08:07:22.520Z",
"amount": 2500,
"status": "Pending",
"partialApprovalAllowed": false,
"direction": "Debit",
"atmName": "HOME FED SAV BK",
"atmLocation": "Cupertino, CA, US",
"surcharge": 0
},
"relationships": {
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
},
"account": {
"data": {
"type": "account",
"id": "10001"
}
},
"card": {
"data": {
"type": "card",
"id": "7"
}
}
}
}
}
Create Card Purchase
This API allows you to simulate a card purchase (or a refund) with the specified amount (in cents) for testing purposes. The Transaction Created webhook event will be fired.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/purchases |
Data Type | purchaseTransaction |
Timeout (Seconds) | 5 |
Attributes
Name | Type | Description |
---|---|---|
amount | integer | The amount (in cents). |
merchantName | string | The name of the merchant. |
merchantType | integer | The 4-digit ISO 18245 merchant category code (MCC). Use any number (e.g. 1000 for testing). |
merchantLocation | string | Optional. The location (city, state, etc.) of the merchant. |
merchantId | string | Optional. The unique network merchant identifier. |
last4Digits | string | The last 4 digits of the debit card involved in the purchase |
coordinates | Coordinates | Optional. Coordinates of the purchase transaction. |
recurring | boolean | Optional. Default: false. Indicates whether the transaction is recurring |
direction | string | The direction in which the funds flow - Debit or Credit. |
internationalServiceFee | integer | Optional. The international service fee (cents) for the transaction. |
Relationships
Name | Type | Description |
---|---|---|
account | JSON:API Relationship | The Deposit Account of the customer. |
authorization | JSON:API Relationship | Optional. Simulates a card purchase with a prior Authorization (see Authorizations. This will cause the authorization to be removed. |
curl -X POST 'https://api.s.unit.sh/sandbox/purchases'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "purchaseTransaction",
"attributes": {
"amount": 1000,
"direction": "Debit",
"merchantName": "Apple Inc.",
"merchantType": 1000,
"merchantLocation": "Cupertino, CA",
"coordinates": {
"longitude": -77.0364,
"latitude": 38.8951
},
"last4Digits": "1234",
"recurring": false
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "10000"
}
}
}
}
}'
{
"data": {
"type": "purchaseTransaction",
"id": "12",
"attributes": {
"createdAt": "2020-10-12T21:22:09.528Z",
"amount": 2500,
"direction": "Debit",
"balance": 148490,
"merchantName": "Apple Inc.",
"merchantType": 1000,
"merchantLocation": "Cupertino, CA",
"coordinates": {
"longitude": -77.0364,
"latitude": 38.8951
},
"last4Digits": "1234",
"recurring": false
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "10001"
}
},
"customer": {
"data": {
"type": "customer",
"id": "2"
}
},
"card": {
"data": {
"type": "card",
"id": "2"
}
}
}
}
}
Create Card Purchase Reversal
This API allows you to simulate a Purchase Reversal with the specified amount (in cents) for testing purposes. The Transaction Created webhook event will be fired.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/reversals |
Data Type | cardReversalTransaction |
Timeout (Seconds) | 5 |
Attributes
Name | Type | Description |
---|---|---|
amount | integer | The amount (in cents). |
last4Digits | string | The last 4 digits of the debit card involved in the purchase reversal |
Relationships
Name | Type | Description |
---|---|---|
account | JSON:API Relationship | The Deposit Account of the customer. |
relatedTransaction | JSON:API Relationship | Optional. The Purchase Transaction which the reversal is related to. |
curl -X POST 'https://api.s.unit.sh/sandbox/reversals'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "cardReversalTransaction",
"attributes": {
"amount": 2500,
"last4Digits": "1234"
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "10001"
}
},
"relatedTransaction": {
"data": {
"type": "transaction",
"id": "150"
}
}
}
}
}'
{
"data": {
"type": "cardReversalTransaction",
"id": "165",
"attributes": {
"createdAt": "2021-03-08T13:05:45.924Z",
"amount": 2500,
"balance": 855500
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "10001"
}
},
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
},
"relatedTransaction": {
"data": {
"type": "transaction",
"id": "150"
}
}
}
}
}
Create ATM Withdrawal
This API allows you to simulate an ATM Withdrawal with the specified amount (in cents) for testing purposes. The Transaction Created webhook event will be fired.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/atm-withdrawals |
Data Type | atmTransaction |
Timeout (Seconds) | 5 |
Attributes
Name | Type | Description |
---|---|---|
amount | integer | The amount (in cents). |
atmName | string | The name of the ATM. |
atmLocation | string | Optional. The location (city, state, etc.) of the ATM. |
last4Digits | string | The last 4 digits of the debit card involved in the withdrawal. |
cardNetwork | string | Optional. The card network used, one of: Visa , Interlink , Accel , Allpoint , Other . |
surcharge | integer | Optional. The surcharge fee (cents) for the transaction. |
Relationships
Name | Type | Description |
---|---|---|
account | JSON:API Relationship | The Deposit Account of the customer. |
curl -X POST 'https://api.s.unit.sh/sandbox/atm-withdrawals'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "atmTransaction",
"attributes": {
"amount": 2500,
"atmName": "HOME FED SAV BK",
"atmLocation": "Cupertino, CA, US",
"last4Digits": "1234"
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "10001"
}
}
}
}
}'
{
"data": {
"type": "atmTransaction",
"id": "166",
"attributes": {
"createdAt": "2021-03-08T13:18:27.365Z",
"amount": 2500,
"balance": 855000,
"atmName": "HOME FED SAV BK",
"atmLocation": "Cupertino, CA, US",
"last4Digits": "1234"
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "10001"
}
},
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
},
"card": {
"data": {
"type": "card",
"id": "2"
}
}
}
}
}
Create ATM Deposit
This API allows you to simulate an ATM Deposit with the specified amount (in cents) for testing purposes. The Transaction Created webhook event will be fired.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/atm-deposits |
Data Type | atmTransaction |
Timeout (Seconds) | 5 |
Attributes
Name | Type | Description |
---|---|---|
amount | integer | The amount (in cents). |
atmName | string | The name of the ATM. |
atmLocation | string | Optional. The location (city, state, etc.) of the ATM. |
last4Digits | string | The last 4 digits of the debit card involved in the deposit. |
cardNetwork | string | Optional. The card network used, one of: Visa , Interlink , Accel , Allpoint , Other . |
surcharge | integer | Optional. The surcharge fee (cents) for the transaction. |
Relationships
Name | Type | Description |
---|---|---|
account | JSON:API Relationship | The Deposit Account of the customer. |
curl -X POST 'https://api.s.unit.sh/sandbox/atm-deposits'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "atmTransaction",
"attributes": {
"amount": 2500,
"atmName": "HOME FED SAV BK",
"atmLocation": "Cupertino, CA, US",
"last4Digits": "1234"
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "10001"
}
}
}
}
}'
{
"data": {
"type": "atmTransaction",
"id": "166",
"attributes": {
"createdAt": "2021-03-08T13:18:27.365Z",
"amount": 2500,
"balance": 855000,
"atmName": "HOME FED SAV BK",
"atmLocation": "Cupertino, CA, US",
"last4Digits": "1234"
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "10001"
}
},
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
},
"card": {
"data": {
"type": "card",
"id": "2"
}
}
}
}
}
Create Card Transaction
This API allows you to simulate a Card Transaction with the specified amount (in cents) for testing purposes. The Transaction Created webhook event will be fired.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/card-transactions |
Data Type | cardTransaction |
Timeout (Seconds) | 5 |
Attributes
Name | Type | Description |
---|---|---|
amount | integer | The total amount (in cents) of the created transaction. |
direction | string | The direction in which the funds flow. Common to all transaction types. |
summary | string | Summary of the transaction. Common to all transaction types. |
cardLast4Digits | string | The last 4 digits of the debit card involved in the transaction. |
merchantName | string | The name of the merchant. |
merchantType | integer | The 4-digit ISO 18245 merchant category code (MCC). Use any number (e.g. 1000 for testing). |
merchantLocation | string | Optional. The location (city, state, etc.) of the merchant. |
recurring | boolean | Optional. Default: false. Indicates whether the authorization is recurring |
Relationships
Name | Type | Description |
---|---|---|
account | JSON:API Relationship | The Deposit Account of the customer. |
authorization | JSON:API Relationship | Optional. Simulates a card purchase with a prior Authorization (see Authorizations. This will cause the authorization to be removed. |
curl -X POST 'https://api.s.unit.sh/sandbox/card-transactions'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "cardTransaction",
"attributes": {
"amount": 20,
"direction": "Debit",
"cardLast4Digits": "0048",
"summary": "summary text",
"merchantName": "Apple Inc.",
"merchantType": 1000,
"merchantLocation": "Cupertino, CA",
"coordinates": {
"longitude": 121.323,
"latitude": -33.33323
}
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "10012"
}
}
}
}
}'
{
"data": {
"type": "cardTransaction",
"id": "17",
"attributes": {
"createdAt": "2021-12-30T22:08:53.059Z",
"amount": 20,
"direction": "Debit",
"balance": 1922,
"summary": "summary text",
"cardLast4Digits": "0048"
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "10012"
}
},
"card": {
"data": {
"type": "card",
"id": "10003"
}
},
"customer": {
"data": {
"type": "customer",
"id": "5"
}
}
}
}
}
Activate Card
Activate a card. The Card Activated webhook event will be fired.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/cards/{cardId}/activate |
Timeout (Seconds) | 5 |
curl -X POST 'https://api.s.unit.sh/sandbox/cards/9/activate' \
-H "Authorization: Bearer ${TOKEN}"
Mark Card as Suspected fraud
Mark a card as suspected fraud. The Card Status Changed webhook event will be fired.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/cards/{cardId}/fraud |
Timeout (Seconds) | 5 |
curl -X POST 'https://api.s.unit.sh/sandbox/cards/9/fraud' \
-H "Authorization: Bearer ${TOKEN}"
Interchange Enrichment
This API allows you to simulate interchange enrichment for PurchaseTransaction, AtmTransaction, or CardTransaction. The Transaction updated webhook event will be fired.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/transactions/{transactionId}/interchange-enrichment |
Timeout (Seconds) | 5 |
Attributes
Name | Type | Description |
---|---|---|
interchange | integer | The amount (in one hundredth of a cent). |
Relationships
Name | Type | Description |
---|---|---|
account | JSON:API Relationship | The Deposit Account of the customer. |
curl -X POST 'https://api.s.unit.sh/sandbox/transactions/11/interchange-enrichment'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "interchangeEnrichment",
"attributes": {
"interchange": 121
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "10002"
}
}
}
}
}'
{
"data": {
"type": "atmTransaction",
"id": "11",
"attributes": {
"createdAt": "2022-05-17T10:01:36.314Z",
"amount": 2500,
"direction": "Credit",
"balance": 1097500,
"summary": "Deposit at HOME FED SAV BK | Address: Cupertino, CA, US | **0008",
"cardLast4Digits": "0008",
"atmName": "HOME FED SAV BK",
"atmLocation": "Cupertino, CA, US",
"surcharge": 0,
"interchange": "1.21",
"internationalServiceFee": null,
"cardNetwork": "Other"
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "10002"
}
},
"customer": {
"data": {
"type": "customer",
"id": "10004"
}
},
"customers": {
"data": [
{
"type": "customer",
"id": "10004"
}
]
},
"org": {
"data": {
"type": "org",
"id": "1"
}
},
"card": {
"data": {
"type": "card",
"id": "1"
}
}
}
}
}
Check Deposits
Approve Check Deposit
This API allows you to simulate an approval of an existing Check Deposit with PendingReview
status.
After approval, the status would change to Pending
.
The Check Deposit Pending webhook event will be fired.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/check-deposits/{checkDepositId}/approve |
Timeout (Seconds) | 120 |
curl -X POST 'https://api.s.unit.sh/sandbox/check-deposits/122/approve' \
-H "Authorization: Bearer ${TOKEN}"
Transmit Check Deposit
This API allows you to simulate a file transmission to the network for an existing Check Deposit with Pending
status.
After transmission, the status would change to Clearing
.
The Check Deposit Clearing webhook event will be fired.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/check-deposits/{checkDepositId}/transmit |
Timeout (Seconds) | 5 |
curl -X POST 'https://api.s.unit.sh/sandbox/check-deposits/122/transmit' \
-H "Authorization: Bearer ${TOKEN}"
Clear Check Deposit
This API allows you to immediately clear an existing Check Deposit with Clearing
status without waiting for the end of the clearing period.
The Check Deposit Sent and the Transaction Created webhook events will be fired.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/check-deposits/{checkDepositId}/clear |
Timeout (Seconds) | 5 |
curl -X POST 'https://api.s.unit.sh/sandbox/check-deposits/122/clear' \
-H "Authorization: Bearer ${TOKEN}"
Return Check Deposit
This API allows you to return an existing Check Deposit with Sent
status, for testing purposes.
The Check Deposit Returned and the Transaction Created webhook events will be fired.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/check-deposits/{checkDepositId}/return |
Timeout (Seconds) | 5 |
curl -X POST 'https://api.s.unit.sh/sandbox/check-deposits/122/return' \
-H "Authorization: Bearer ${TOKEN}"
Generate Check Front-Side
This API allows you to generate a check front-side image for testing purposes. It can be used to test the Check Deposits Upload Front-Side Image functionality.
Verb | GET |
Url | https://api.s.unit.sh/sandbox/generate-check/front |
Timeout (Seconds) | 5 |
Attributes
Name | Type | Description |
---|---|---|
payToTheOrderOf | string | A specific person or organization that the payer authorizes to receive money. |
amount | number | The amount (in US dollars). |
amountString | string | The amount in text. |
for | string | A memo / purpose for the check. |
curl -X GET 'https://api.s.unit.sh/sandbox/generate-check/front?payToTheOrderOf=Pied Piper&amount=50000&amountString=Fifty thousand&for=Winning startup competition' \
-H "Authorization: Bearer ${TOKEN}"
Generate Check Back-Side
This API allows you to generate a check back-side image for testing purposes. It can be used to test the Check Deposits Upload Back-Side Image functionality.
Verb | GET |
Url | https://api.s.unit.sh/sandbox/generate-check/back |
Timeout (Seconds) | 5 |
curl -X GET 'https://api.s.unit.sh/sandbox/generate-check/back' \
-H "Authorization: Bearer ${TOKEN}"
Check Payments
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.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/check-payments |
Data Type | checkPayment |
Timeout (Seconds) | 5 |
Attributes
Name | Type | Description |
---|---|---|
amount | integer | The amount (in cents). |
checkNumber | string | Optional. The serial number printed at the bottom of the check |
Relationships
Name | Type | Description |
---|---|---|
account | JSON:API Relationship | The Deposit Account receiving the check payment. |
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"
}
}
}
}
}'
{
"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.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/check-payments/1001/mail |
Timeout (Seconds) | 5 |
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.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/check-payments/1001/InLocalArea |
Timeout (Seconds) | 5 |
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.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/check-payments/1001/InProduction |
Timeout (Seconds) | 5 |
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.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/check-payments/1001/ReRouted |
Timeout (Seconds) | 5 |
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.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/check-payments/1001/deliver |
Timeout (Seconds) | 5 |
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.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/check-payments/1001/returnToSender |
Timeout (Seconds) | 5 |
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 '{}'
Disputes
Create Dispute
This API allows you to create a new dispute for an existing purchase transaction. The Dispute Created webhook event will be fired.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/disputes |
Timeout (Seconds) | 5 |
Attributes
Name | Type | Description |
---|---|---|
amount | integer | Optional. The amount (in cents). If this field is not populated, the dispute amount will equal the amount of the disputed transaction. |
Relationships
Name | Type | Description |
---|---|---|
account | JSON:API Relationship | The Deposit Account related to the transaction. |
transaction | JSON:API Relationship | The disputed purchase transaction. |
curl -X POST 'https://api.s.unit.sh/sandbox/disputes'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "dispute",
"attributes": {
"amount": 123
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "10002"
}
},
"transaction": {
"data": {
"type": "transaction",
"id": "5"
}
}
}
}
}'
{
"data": {
"type": "dispute",
"id": "1",
"attributes": {
"source": "DebitCard",
"link": "https://sandbox-dispute.com",
"statusHistory": [
{
"type": "InvestigationStarted",
"updatedAt": "2022-05-19T12:21:34.156Z"
}
],
"status": "InvestigationStarted",
"description": "sandbox dispute",
"createdAt": "2022-05-19T12:21:34.156Z",
"amount": 305
},
"relationships": {
"customer": {
"data": {
"type": "customer",
"id": "10004"
}
},
"account": {
"data": {
"type": "account",
"id": "10002"
}
},
"transaction": {
"data": {
"type": "transaction",
"id": "5"
}
}
}
}
}
Provisional Credit Dispute
This API allows you to grant the customer Provisional Credit for an existing dispute. The Dispute Status Changed webhook event will be fired.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/disputes/{disputeId}/credit-provisionally |
Timeout (Seconds) | 5 |
curl -X POST 'https://api.s.unit.sh/sandbox/disputes/12/credit-provisionally' \
-H "Authorization: Bearer ${TOKEN}"
{
"data": {
"type": "dispute",
"id": "12",
"attributes": {
"source": "DebitCard",
"link": "https://sandbox-dispute.com",
"statusHistory": [
{
"type": "InvestigationStarted",
"updatedAt": "2022-06-06T12:25:15.577Z"
},
{
"type": "ProvisionallyCredited",
"updatedAt": "2022-06-06T12:25:24.047Z"
}
],
"status": "ProvisionallyCredited",
"description": "sandbox dispute",
"createdAt": "2022-06-06T12:25:15.577Z",
"amount": 1,
"updatedAt": "2022-06-06T12:25:24.047Z"
},
"relationships": {
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
},
"account": {
"data": {
"type": "account",
"id": "10002"
}
},
"transaction": {
"data": {
"type": "transaction",
"id": "5"
}
}
}
}
}
Resolve Won Dispute
This API allows you to mark an existing dispute as resolved won. The Dispute Status Changed webhook event will be fired.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/disputes/{disputeId}/resolve-won |
Timeout (Seconds) | 5 |
curl -X POST 'https://api.s.unit.sh/sandbox/disputes/12/resolve-won' \
-H "Authorization: Bearer ${TOKEN}"
{
"data": {
"type": "dispute",
"id": "12",
"attributes": {
"source": "DebitCard",
"link": "https://sandbox-dispute.com",
"statusHistory": [
{
"type": "InvestigationStarted",
"updatedAt": "2022-06-06T12:14:21.795Z"
},
{
"type": "ResolvedWon",
"updatedAt": "2022-06-06T12:14:32.735Z"
}
],
"status": "ResolvedWon",
"description": "sandbox dispute",
"createdAt": "2022-06-06T12:14:21.795Z",
"amount": 1,
"updatedAt": "2022-06-06T12:14:32.735Z"
},
"relationships": {
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
},
"account": {
"data": {
"type": "account",
"id": "10002"
}
},
"transaction": {
"data": {
"type": "transaction",
"id": "8"
}
}
}
}
}
Resolve Lost Dispute
This API allows you to mark an existing dispute as resolved lost. The Dispute Status Changed webhook event will be fired.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/disputes/{disputeId}/resolve-lost |
Timeout (Seconds) | 5 |
curl -X POST 'https://api.s.unit.sh/sandbox/disputes/12/resolve-lost' \
-H "Authorization: Bearer ${TOKEN}"
{
"data": {
"type": "dispute",
"id": "12",
"attributes": {
"source": "DebitCard",
"link": "https://sandbox-dispute.com",
"statusHistory": [
{
"type": "InvestigationStarted",
"updatedAt": "2022-06-06T12:31:49.214Z"
},
{
"type": "ResolvedLost",
"updatedAt": "2022-06-06T12:31:56.297Z"
}
],
"status": "ResolvedLost",
"description": "sandbox dispute",
"createdAt": "2022-06-06T12:31:49.214Z",
"amount": 1,
"updatedAt": "2022-06-06T12:31:56.297Z"
},
"relationships": {
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
},
"account": {
"data": {
"type": "account",
"id": "10002"
}
},
"transaction": {
"data": {
"type": "transaction",
"id": "11"
}
}
}
}
}
Deny Dispute
This API allows you to mark an existing dispute as denied. The Dispute Status Changed webhook event will be fired.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/disputes/{disputeId}/deny |
Timeout (Seconds) | 5 |
curl -X POST 'https://api.s.unit.sh/sandbox/disputes/12/deny' \
-H "Authorization: Bearer ${TOKEN}"
{
"data": {
"type": "dispute",
"id": "12",
"attributes": {
"source": "DebitCard",
"link": "https://sandbox-dispute.com",
"statusHistory": [
{
"type": "InvestigationStarted",
"updatedAt": "2022-06-06T12:25:15.577Z"
},
{
"type": "ProvisionallyCredited",
"updatedAt": "2022-06-06T12:25:24.047Z"
},
{
"type": "Denied",
"updatedAt": "2022-06-06T12:27:09.281Z"
}
],
"status": "Denied",
"description": "sandbox dispute",
"createdAt": "2022-06-06T12:25:15.577Z",
"amount": 1,
"updatedAt": "2022-06-06T12:27:09.281Z"
},
"relationships": {
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
},
"account": {
"data": {
"type": "account",
"id": "10002"
}
},
"transaction": {
"data": {
"type": "transaction",
"id": "5"
}
}
}
}
}
Statements
Generate Account Statement
Generate an account statement. The statement includes any transactions performed between the beginning of the current month and up until EOD yesterday. The Statements Created webhook event will be fired.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/accounts/{accountId}/generate-statement |
Timeout (Seconds) | 5 |
curl -X POST 'https://api.s.unit.sh/sandbox/accounts/10001/generate-statement' \
-H "Authorization: Bearer ${TOKEN}"
Generate Customer Account Statement
Unlike the Generate Account Statement endpoint, this endpoint supports cases where one account has multiple account owners (customers) and therefore compatible with cases of Joint Accounts.
By declaring a customerId
you will be able to choose for which account owner to generate a statement. that provides the ability to generate one statement per account.
The statement includes any transactions performed between the beginning
of the current month and up until EOD yesterday. The Statements Created webhook event will be fired.
Verb | POST |
Url | https://api.s.unit.sh/sandbox/customers/{customerId}/accounts/{accountId}/generate-statement |
Timeout (Seconds) | 5 |
curl -X POST 'https://api.s.unit.sh/sandbox/customers/10000/accounts/10001/generate-statement' \
-H "Authorization: Bearer ${TOKEN}"