Sandbox Simulations
Unit exposes the following sandbox-specific endpoints, in addition to all other endpoints. They allow you to easily test and simulate real-world events - external activity, or internal activity that may normally take a long time to occur.
Simulation operations are subject to the same authentication scheme as the Live APIs, and therefore require a valid Authentication token.
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 Optional | string | Optional. The location (city, state, etc.) of the merchant. |
| merchantId Optional | string | Optional. The unique network merchant identifier. |
| recurring Optional | boolean | Optional. Default: false. Indicates whether the authorization is recurring |
| status Optional | 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 Optional | 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 Optional | string | Optional. The location (city, state, etc.) of the merchant. |
| merchantId Optional | string | Optional. The unique network merchant identifier. |
| recurring Optional | boolean | Optional. Default: false. Indicates whether the authorization is recurring |
| ecommerce Optional | boolean | Optional. Default: false. Indicates whether the transaction was created over an electronic network (primarily the internet). |
| cardPresent Optional | 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 Optional | string | Optional. The location (city, state, etc.) of the merchant. |
| recurring Optional | 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 Optional | 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 Optional | string | Optional. The location (city, state, etc.) of the merchant. |
| merchantId Optional | string | Optional. The unique network merchant identifier. |
| last4Digits | string | The last 4 digits of the debit card involved in the purchase |
| coordinates Optional | Coordinates | Optional. Coordinates of the purchase transaction. |
| recurring Optional | boolean | Optional. Default: false. Indicates whether the transaction is recurring |
| direction | string | The direction in which the funds flow - Debit or Credit. |
| internationalServiceFee Optional | 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 Optional | 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 Optional | 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 Optional | 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 Optional | string | Optional. The card network used, one of: Visa, Interlink, Accel, Allpoint, Other. |
| surcharge Optional | 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 Optional | 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 Optional | string | Optional. The card network used, one of: Visa, Interlink, Accel, Allpoint, Other. |
| surcharge Optional | 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 Optional | string | Optional. The location (city, state, etc.) of the merchant. |
| recurring Optional | 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 Optional | 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}"
Reissue Card
This API allows you to simulate a card being reissued. The Card Reissuing webhook event will be fired.
| Verb | POST |
| URL | https://api.s.unit.sh/sandbox/cards/{cardId}/reissue |
| Timeout (Seconds) | 5 |
Attributes
| Name | Type | Description |
|---|---|---|
| nextExpirationDate | string | Card's designated expiration date, formatted YYYY-MM, e.g "2020-05". |
curl -X POST 'https://api.s.unit.sh/sandbox/cards/{cardId}/reissue'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"attributes": {
"nextExpirationDate": "2024-03"
}
}
}'
{
"data": {
"type": "individualDebitCard",
"id": "8",
"attributes": {
"createdAt": "2020-05-13T09:07:47.645Z",
"last4Digits": "1234",
"expirationDate": "2022-05",
"bin": "123456789",
"shippingAddress": {
"street": "5230 Newell Rd",
"street2": null,
"city": "Palo Alto",
"state": "CA",
"postalCode": "94303",
"country": "US"
},
"status": "Inactive"
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "2"
}
},
"customer": {
"data": {
"type": "individualCustomer",
"id": "2"
}
}
}
}
}
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"
}
}
}
}
}