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.

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".

Example Request:
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:

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}"

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.

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

Attributes

NameTypeDescription
amountintegerThe amount (in cents).
directionstringThe direction in which the funds flow (currently, only Credit is supported).
descriptionstringPayment description (maximum of 50 characters).

Relationships

NameTypeDescription
accountJSON:API RelationshipThe Deposit Account receiving the payment.
Example Request:
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.

Example Response:
{
"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.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/ach/transmit
Data TypetransmitAchPayment
Timeout (Seconds)5

Relationships

NameTypeDescription
paymentJSON:API RelationshipThe ACH Payment to transmit.
Example Request:
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"
}
}
}
}
}'
Example Response:
{
"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.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/ach/clear
Data TypeclearAchPayment
Timeout (Seconds)5

Relationships

NameTypeDescription
paymentJSON:API RelationshipThe ACH Payment to be cleared.
Example Request:
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"
}
}
}
}
}'
Example Response:
{
"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.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/ach/return
Data TypereturnAchPayment
Timeout (Seconds)5

Relationships

NameTypeDescription
paymentJSON:API RelationshipThe ACH Payment to be returned.
Example Request:
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"
}
}
}
}
}'
Example Response:
{
"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.

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

Attributes

NameTypeDescription
amountintegerThe amount (in cents).
descriptionstringPayment description (maximum of 50 characters).

Relationships

NameTypeDescription
accountJSON:API RelationshipThe Deposit Account receiving the payment.
Example Request:
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"
}
}
}
}
}'
Example Response:
{
"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.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/wire/transmit
Data TypetransmitWirePayment
Timeout (Seconds)5

Relationships

NameTypeDescription
paymentJSON:API RelationshipThe Wire Payment to transmit.
Example Request:
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"
}
}
}
}
}'
Example Response:
{
"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.

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

Attributes

NameTypeDescription
amountintegerThe amount (in cents).
completionDateRFC3339 Date stringShows the date on which the received ACH will be completed(settled or repaid).
descriptionstringACH description (maximum of 10 characters), also known as Company Entry Description.
companyNamestringThe name by which the originator is known to the receiver. (maximum of 16 characters)
secCodestringOptional. The 3-letter ACH Standard Entry Class (SEC) Code (e.g. WEB, CCD, PPD, etc.). default will be WEB

Relationships

NameTypeDescription
accountJSON:API RelationshipThe Deposit Account receiving the received payment.
Example Request:
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

Example Response:
{
"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.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/received-payments/{receivedPaymentId}/complete
Timeout (Seconds)5
Example Request:
curl -X POST 'https://api.s.unit.sh/sandbox/received-payments/101/complete' \
-H "Authorization: Bearer ${TOKEN}"
Example Response
{
"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.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/authorizations
Required Scopeauthorization
Timeout (Seconds)5

Attributes

NameTypeDescription
amountintegerThe amount (in cents).
cardLast4DigitsstringThe last 4 digits of the debit card involved in the authorization.
merchantNamestringThe name of the merchant.
merchantTypeintegerThe 4-digit ISO 18245 merchant category code (MCC). Use any number (e.g. 1000 for testing).
merchantLocationstringOptional. The location (city, state, etc.) of the merchant.
merchantIdstringOptional. The unique network merchant identifier.
recurringbooleanOptional. Default: false. Indicates whether the authorization is recurring
statusstringOptional. The new authorization status, one of: Authorized, Declined.

Relationships

NameTypeDescription
accountJSON:API RelationshipThe Deposit Account of the customer.
Example Request:
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"
}
}
}
}
}'
Example Response:
{
"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.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/authorizations/{authorizationId}/increase
Required Scopeauthorization
Timeout (Seconds)5

Attributes

NameTypeDescription
amountintegerThe amount (in cents).
cardLast4DigitsstringThe last 4 digits of the debit card involved in the authorization.
recurringbooleanOptional. Default: false. Indicates whether the authorization is recurring

Relationships

NameTypeDescription
accountJSON:API RelationshipThe Deposit Account of the customer.
Example Request:
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"
}
}
}
}
}'
Example Response:
{
"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.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/authorizations/{authorizationId}/cancel
Required Scopeauthorization
Timeout (Seconds)5

Relationships

NameTypeDescription
accountJSON:API RelationshipThe Deposit Account of the customer.
Example Request:
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"
}
}
}
}
}'
Example Response:
{
"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 .

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/authorization-requests/purchase
Data TypepurchaseAuthorizationRequest
Timeout (Seconds)5

Attributes

NameTypeDescription
amountintegerThe amount (in cents).
merchantNamestringThe name of the merchant.
merchantTypeintegerThe 4-digit ISO 18245 merchant category code (MCC). Use any number (e.g. 1000 for testing).
merchantLocationstringOptional. The location (city, state, etc.) of the merchant.
merchantIdstringOptional. The unique network merchant identifier.
recurringbooleanOptional. Default: false. Indicates whether the authorization is recurring
ecommercebooleanOptional. Default: false. Indicates whether the transaction was created over an electronic network (primarily the internet).
cardPresentbooleanOptional. Default: false. Indicates whether the card was present when the transaction was created.

Relationships

NameTypeDescription
cardJSON:API RelationshipThe 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"
}
}
}
}
}'
Example Response:
{
"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 .

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/authorization-requests/card-transaction
Data TypecardTransactionAuthorizationRequest
Timeout (Seconds)5

Attributes

NameTypeDescription
amountintegerThe amount (in cents).
merchantNamestringThe name of the merchant.
merchantTypeintegerThe 4-digit ISO 18245 merchant category code (MCC). Use any number (e.g. 1000 for testing).
merchantLocationstringOptional. The location (city, state, etc.) of the merchant.
recurringbooleanOptional. Default: false. Indicates whether the authorization is recurring

Relationships

NameTypeDescription
cardJSON:API RelationshipThe 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"
}
}
}
}
}'
Example Response:
{
"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 .

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/authorization-requests/atm
Data TypeatmAuthorizationRequest
Timeout (Seconds)5

Attributes

NameTypeDescription
amountintegerThe amount (in cents).
atmNamestringThe name of the ATM.
atmLocationstringOptional. The location (city, state, etc.) of the ATM.

Relationships

NameTypeDescription
cardJSON:API RelationshipThe 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"
}
}
}
}
}'
Example Response:
{
"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.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/purchases
Data TypepurchaseTransaction
Timeout (Seconds)5

Attributes

NameTypeDescription
amountintegerThe amount (in cents).
merchantNamestringThe name of the merchant.
merchantTypeintegerThe 4-digit ISO 18245 merchant category code (MCC). Use any number (e.g. 1000 for testing).
merchantLocationstringOptional. The location (city, state, etc.) of the merchant.
merchantIdstringOptional. The unique network merchant identifier.
last4DigitsstringThe last 4 digits of the debit card involved in the purchase
coordinatesCoordinatesOptional. Coordinates of the purchase transaction.
recurringbooleanOptional. Default: false. Indicates whether the transaction is recurring
directionstringThe direction in which the funds flow - Debit or Credit.
internationalServiceFeeintegerOptional. The international service fee (cents) for the transaction.

Relationships

NameTypeDescription
accountJSON:API RelationshipThe Deposit Account of the customer.
authorizationJSON:API RelationshipOptional. Simulates a card purchase with a prior Authorization (see Authorizations. This will cause the authorization to be removed.
Example Request:
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"
}
}
}
}
}'
Example Response:
{
"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.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/reversals
Data TypecardReversalTransaction
Timeout (Seconds)5

Attributes

NameTypeDescription
amountintegerThe amount (in cents).
last4DigitsstringThe last 4 digits of the debit card involved in the purchase reversal

Relationships

NameTypeDescription
accountJSON:API RelationshipThe Deposit Account of the customer.
relatedTransactionJSON:API RelationshipOptional. The Purchase Transaction which the reversal is related to.
Example Request:
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"
}
}
}
}
}'
Example Response:
{
"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.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/atm-withdrawals
Data TypeatmTransaction
Timeout (Seconds)5

Attributes

NameTypeDescription
amountintegerThe amount (in cents).
atmNamestringThe name of the ATM.
atmLocationstringOptional. The location (city, state, etc.) of the ATM.
last4DigitsstringThe last 4 digits of the debit card involved in the withdrawal.
cardNetworkstringOptional. The card network used, one of: Visa, Interlink, Accel, Allpoint, Other.
surchargeintegerOptional. The surcharge fee (cents) for the transaction.

Relationships

NameTypeDescription
accountJSON:API RelationshipThe Deposit Account of the customer.
Example Request:
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"
}
}
}
}
}'
Example Response:
{
"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.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/atm-deposits
Data TypeatmTransaction
Timeout (Seconds)5

Attributes

NameTypeDescription
amountintegerThe amount (in cents).
atmNamestringThe name of the ATM.
atmLocationstringOptional. The location (city, state, etc.) of the ATM.
last4DigitsstringThe last 4 digits of the debit card involved in the deposit.
cardNetworkstringOptional. The card network used, one of: Visa, Interlink, Accel, Allpoint, Other.
surchargeintegerOptional. The surcharge fee (cents) for the transaction.

Relationships

NameTypeDescription
accountJSON:API RelationshipThe Deposit Account of the customer.
Example Request:
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"
}
}
}
}
}'
Example Response:
{
"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.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/card-transactions
Data TypecardTransaction
Timeout (Seconds)5

Attributes

NameTypeDescription
amountintegerThe total amount (in cents) of the created transaction.
directionstringThe direction in which the funds flow. Common to all transaction types.
summarystringSummary of the transaction. Common to all transaction types.
cardLast4DigitsstringThe last 4 digits of the debit card involved in the transaction.
merchantNamestringThe name of the merchant.
merchantTypeintegerThe 4-digit ISO 18245 merchant category code (MCC). Use any number (e.g. 1000 for testing).
merchantLocationstringOptional. The location (city, state, etc.) of the merchant.
recurringbooleanOptional. Default: false. Indicates whether the authorization is recurring

Relationships

NameTypeDescription
accountJSON:API RelationshipThe Deposit Account of the customer.
authorizationJSON:API RelationshipOptional. Simulates a card purchase with a prior Authorization (see Authorizations. This will cause the authorization to be removed.
Example Request:
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"
}
}
}
}
}'
Example Response:
{
"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.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/cards/{cardId}/activate
Timeout (Seconds)5
Example Request:
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.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/cards/{cardId}/fraud
Timeout (Seconds)5
Example Request:
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.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/transactions/{transactionId}/interchange-enrichment
Timeout (Seconds)5

Attributes

NameTypeDescription
interchangeintegerThe amount (in one hundredth of a cent).

Relationships

NameTypeDescription
accountJSON:API RelationshipThe Deposit Account of the customer.
Example Request:
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"
}
}
}
}
}'
Example Response:
{
"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.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/check-deposits/{checkDepositId}/approve
Timeout (Seconds)120
Example Request:
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.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/check-deposits/{checkDepositId}/transmit
Timeout (Seconds)5
Example Request:
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.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/check-deposits/{checkDepositId}/clear
Timeout (Seconds)5
Example Request:
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.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/check-deposits/{checkDepositId}/return
Timeout (Seconds)5
Example Request:
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.

VerbGET
Urlhttps://api.s.unit.sh/sandbox/generate-check/front
Timeout (Seconds)5

Attributes

NameTypeDescription
payToTheOrderOfstringA specific person or organization that the payer authorizes to receive money.
amountnumberThe amount (in US dollars).
amountStringstringThe amount in text.
forstringA 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}"
Check

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.

VerbGET
Urlhttps://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.

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 '{}'

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.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/disputes
Timeout (Seconds)5

Attributes

NameTypeDescription
amountintegerOptional. The amount (in cents). If this field is not populated, the dispute amount will equal the amount of the disputed transaction.

Relationships

NameTypeDescription
accountJSON:API RelationshipThe Deposit Account related to the transaction.
transactionJSON:API RelationshipThe disputed purchase transaction.
Example Request:
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"
}
}
}
}
}'
Example Response:
{
"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.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/disputes/{disputeId}/credit-provisionally
Timeout (Seconds)5
Example Request:
curl -X POST 'https://api.s.unit.sh/sandbox/disputes/12/credit-provisionally' \
-H "Authorization: Bearer ${TOKEN}"
Example Response:
{
"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.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/disputes/{disputeId}/resolve-won
Timeout (Seconds)5
Example Request:
curl -X POST 'https://api.s.unit.sh/sandbox/disputes/12/resolve-won' \
-H "Authorization: Bearer ${TOKEN}"
Example Response:
{
"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.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/disputes/{disputeId}/resolve-lost
Timeout (Seconds)5
Example Request:
curl -X POST 'https://api.s.unit.sh/sandbox/disputes/12/resolve-lost' \
-H "Authorization: Bearer ${TOKEN}"
Example Response:
{
"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.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/disputes/{disputeId}/deny
Timeout (Seconds)5
Example Request:
curl -X POST 'https://api.s.unit.sh/sandbox/disputes/12/deny' \
-H "Authorization: Bearer ${TOKEN}"
Example Response:
{
"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.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/accounts/{accountId}/generate-statement
Timeout (Seconds)5
Example Request:
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.

VerbPOST
Urlhttps://api.s.unit.sh/sandbox/customers/{customerId}/accounts/{accountId}/generate-statement
Timeout (Seconds)5
Example Request:
curl -X POST 'https://api.s.unit.sh/sandbox/customers/10000/accounts/10001/generate-statement' \
-H "Authorization: Bearer ${TOKEN}"