Skip to main content

APIs

Create Wallet​

Creates a wallet account for a BusinessCustomer (created via Create Business Application), a BusinessWalletCustomer (created via Create Business Wallet Customer), or an IndividualCustomer created from a Sole Proprietor Application with the soleProprietorship attribute set to true. A successful call triggers an account.created event.

Each wallet is created using a specific wallet terms. Wallet terms are a predefined set of terms associated with this wallet (e.g. Fees, Limits, Card settings).

Use walletDefault as the default value for the wallet terms field while building your solution in sandbox . Contact Unit to create other wallet terms under your organization.

Wallet creation request supports Idempotency, ensuring that performing multiple identical requests will have the same effect as performing a single request.

A successful wallet creation will result in an wallet in Open status. Later on, wallets can be either frozen, closed and in some cases reopened.

VerbPOST
URLhttps://api.s.unit.sh/accounts
Required Scopeaccounts-write
Data TypewalletAccount
Timeout (Seconds)5

Attributes​

NameTypeDescription
walletTerms RequiredstringThe name of the wallet terms.
tags OptionalobjectSee Tags.
idempotencyKey OptionalstringSee Idempotency.

Relationships​

NameTypeDescription
customer RequiredJSON:API RelationshipThe customer the wallet belongs to. The customer is either a BusinessCustomer, BusinessWalletCustomer or an IndividualCustomer (with a soleProprietorship attribute set to true).
Example Request:
curl -X POST 'https://api.s.unit.sh/accounts'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "walletAccount",
"attributes": {
"walletTerms": "walletDefault",
"tags": {
"purpose": "Healthcare"
},
"idempotencyKey": "3a1a33be-4e12-4603-9ed0-820922389fb8"
},
"relationships": {
"customer": {
"data": {
"type": "customer",
"id": "45555"
}
}
}
}
}'

Response​

Response is a JSON:API document.

201 Created​

NameTypeDescription
dataWalletAccountThe requested resource after the operation was completed.
Example Response:
{
"data": {
"type": "walletAccount",
"id": "42",
"attributes": {
"createdAt": "2000-05-11T10:19:30.409Z",
"name": "Peter Parker",
"status": "Open",
"walletTerms": "walletDefault",
"routingNumber": "812345678",
"accountNumber": "1000000002",
"currency": "USD",
"balance": 10000,
"hold": 0,
"available": 10000,
"tags": {
"purpose": "Healthcare"
}
},
"relationships": {
"customer": {
"data": {
"type": "customer",
"id": "45555"
}
}
}
}
}

Update Wallet​

Update a wallet account.

VerbPATCH
URLhttps://api.s.unit.sh/accounts/:accountId
Required Scopeaccounts-write
Data TypewalletAccount
Timeout (Seconds)5

Attributes​

NameTypeDescription
name OptionalstringThe name of the wallet.
tags OptionalobjectSee Tags.
walletTerms OptionalstringThe name of the selected wallet terms.

Response​

Response is a JSON:API document.

200 OK​

NameTypeDescription
dataWalletAccountWallet resource.
curl -X PATCH 'https://api.s.unit.sh/accounts/10000'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "walletAccount",
"attributes": {
"tags": {
"purpose": "checking"
}
}
}
}'

Close Wallet​

Closes a wallet. Closing a wallet is irreversible and can only be done by an Org user. An account.closed event is raised when the call was successful.

Note

Closing a wallet will also close the cards associated with the wallet.

VerbPOST
URLhttps://api.s.unit.sh/accounts/:accountId/close
Required Scopeaccounts-write
Data TypewalletAccountClose
Timeout (Seconds)5

Attributes​

NameTypeDescription
reason RequiredstringThe reason for closing the wallet. Either ByCustomer, Fraud, ByBank, or NegativeBalance.
fraudReason OptionalstringThe expanded fraud reason for closing the wallet when Fraud is specified as the reason. Can be one of: (ACHActivity, CardActivity, CheckActivity, ApplicationHistory, AccountActivity, ClientIdentified, IdentityTheft, LinkedToFraudulentCustomer).
bankReason OptionalstringThe expanded bank reason for closing the wallet when ByBank is specified as the reason. Can be one of: (ProhibitedBusiness, MissingCddEdd, NonUsOperations, SuspectedFraud). This list is subject to change.

Response​

Response is a JSON:API document.

200 OK​

NameTypeDescription
dataWalletAccountWallet resource.
curl -X POST 'https://api.s.unit.sh/accounts/10000/close'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "walletAccountClose",
"attributes": {
"reason": "ByCustomer"
}
}
}'

Reopen Wallet​

Reopens a wallet.

Important Info

Reopening a wallet will not reopen cards associated with the wallet. Closed cards cannot be reactivated.

Note

This API can only be used to reopen wallets which were closed by customers. In order to reopen a wallet that was closed due to fraud, please contact Unit.

VerbPOST
URLhttps://api.s.unit.sh/accounts/:accountId/reopen
Required Scopeaccounts-write
Timeout (Seconds)5

Response​

Response is a JSON:API document.

200 OK​

NameTypeDescription
dataWalletAccountWallet resource.
curl -X POST 'https://api.s.unit.sh/accounts/10000/reopen'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'

Freeze Wallet​

Freezes a wallet. An account.frozen event is raised when the call was successful. A frozen wallet behaves like a closed wallet, with the primary difference being that a frozen state should be temporary, and after evaluation should either be un-frozen, or closed.

Note

Freezing a wallet will also freeze the cards associated with the account.

VerbPOST
URLhttps://api.s.unit.sh/accounts/:accountId/freeze
Required Scopeaccounts-write
Timeout (Seconds)5

Attributes​

NameTypeDescription
reason RequiredstringThe reason for closing the wallet. Either Fraud or Other, with a specified reasonText.
reasonText OptionalstringThe free-text reason for freezing the wallet (up to 255 characters) when Other is specified.

Response​

Response is a JSON:API document.

200 OK​

NameTypeDescription
dataWalletAccountWallet resource.
curl -X POST 'https://api.s.unit.sh/accounts/10000/freeze'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "walletAccountFreeze",
"attributes": {
"reason": "Other",
"reasonText": "Per request from customer"
}
}
}'

Unfreeze Wallet​

Unfreezes a wallet.

Note

Unfreezing a wallet will also unfreeze the cards associated with the wallet.

VerbPOST
URLhttps://api.s.unit.sh/accounts/:accountId/unfreeze
Required Scopeaccounts-write
Timeout (Seconds)5

Response​

Response is a JSON:API document.

200 OK​

NameTypeDescription
dataWalletAccountWallet resource.
curl -X POST 'https://api.s.unit.sh/accounts/10000/unfreeze'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'

Get by Id​

Get a wallet resource by id.

VerbGET
URLhttps://api.s.unit.sh/accounts/{id}
Required Scopeaccounts
Timeout (Seconds)5

Query Parameters​

NameTypeDefaultDescription
includestring(empty)Optional. Related resource available to include: customer. See Getting Related Resources

Response​

Response is a JSON:API document.

200 OK​

NameTypeDescription
dataWalletAccountThe requested resource after the operation was completed.
includedArray of CustomerArray of resources requested by the include query parameter.
curl -X GET 'https://api.s.unit.sh/accounts/42' \
-H "Authorization: Bearer ${TOKEN}"

List​

Listing wallets is similar to listing deposit accounts, with a specific account type filter (see below)

VerbGET
URLhttps://api.s.unit.sh/accounts
Required Scopeaccounts
Timeout (Seconds)5

Query Parameters​

NameTypeDefaultDescription
page[limit]integer100Optional. Maximum number of resources that will be returned. Maximum is 10000 resources. See Pagination.
page[offset]integer0Optional. Number of resources to skip. See Pagination.
filter[customerId]string(empty)Optional. Filters the results by the specified customer id.
filter[tags]Tags (JSON)(empty)Optional. Filter Accounts by Tags.
filter[status]stringAuthorizedOptional. Filter Account by its status (Open, Frozen, or Closed). Usage example: filter[status][0]=Closed
filter[fromBalance]Integer(empty)Optional. Filters Accounts that have balance higher or equal to the specified amount (in cents). e.g. 5000
filter[toBalance]Integer(empty)Optional. Filters Accounts that have balance lower or equal to the specified amount (in cents). e.g. 7000
filter[type]string(empty)Optional. Filters Accounts by type. Valid values are deposit, credit or wallet.
includestring(empty)Optional. Related resource available to include: customer. See Getting Related Resources
curl -X GET 'https://api.s.unit.sh/accounts?page[limit]=20&page[offset]=10&filter[type]=wallet' \
-H "Authorization: Bearer ${TOKEN}"

Response​

Response is a JSON:API document.

200 OK​

NameTypeDescription
dataArray of DepositAccount or CreditAccount or WalletAccountArray of account resources.
includedArray of CustomerArray of resources requested by the include query parameter.
Example Response:
{
"data": [
{
"type": "walletAccount",
"id": "42",
"attributes": {
"createdAt": "2000-05-11T10:19:30.409Z",
"name": "Peter Parker",
"status": "Open",
"walletTerms": "walletDefault",
"routingNumber": "812345678",
"accountNumber": "1000000002",
"currency": "USD",
"balance": 10000,
"hold": 0,
"available": 10000,
"tags": {
"purpose": "Healthcare"
}
},
"relationships": {
"customer": {
"data": {
"type": "customer",
"id": "45555"
}
}
}
}
]
}

Limits​

VerbGET
URLhttps://api.s.unit.sh/accounts/:accountId/limits
Timeout (Seconds)5
curl -X GET 'https://api.s.unit.sh/accounts/10104/limits' \
-H "Authorization: Bearer ${TOKEN}"

Some monetary transactions (such as originating ACH payments, ATM withdrawals or deposits) are subject to daily and/or monthly amount limits that are defined on the wallet account level. You can read more about wallet account limits on our limits guide.

The response to this API call includes the defined limits, as well as the current total amounts on each transaction type (under the totalsDaily and totalsMonthly fields), in cents.

The limits and totals fields reflect the wallet terms configuration and usage. Override amounts are not merged into limits; when Unit has applied an account limit override for a rail, that rail’s object (for example ach, wire, checkDeposit, checkPayment, or bookTransfer) may also include an override field. override contains status, optional expiredAt, and values with the override limit amounts in cents (the shape of values depends on the rail). Only active overrides are surfaced here; cancelled overrides are omitted. Card limits do not support overrides.

When an override has an expiredAt date, it stops applying at 17:00 Eastern Time on that calendar date.

Credit accounts: limit responses for credit accounts are not enriched with override blocks (overrides apply to deposit and wallet accounts).

Note

The daily limits reset at 12:00 a.m. on the timezone of relevant bank. The monthly limits are reset at the same time on the first of each month.

{
"data": {
"type": "walletLimits",
"id": "10104",
"attributes": {
"ach": {
"limits": {
"dailyDebit": 50000,
"dailyCredit": 50000,
"monthlyDebit": 2000000,
"monthlyCredit": 2000000,
"dailyDebitSoft": 50000,
"monthlyDebitSoft": 2000000
},
"totalsDaily": {
"debits": 25000,
"credits": 10000
},
"totalsMonthly": {
"debits": 800300,
"credits": 250000
},
"override": {
"status": "Active",
"expiredAt": "2025-12-31",
"values": {
"dailyDebit": 100000,
"dailyCredit": 100000,
"monthlyDebit": 500000,
"monthlyCredit": 500000
}
}
},
"card": {
"limits": {
"dailyWithdrawal": 2000000,
"dailyDeposit": 2000000,
"dailyPurchase": 2000000,
"dailyCardTransaction": 2000000
},
"totalsDaily": {
"withdrawals": 0,
"deposits": 0,
"purchases": 0,
"cardTransactions": 0
}
},
"checkDeposit": {
"limits": {
"daily": 100000,
"monthly": 2000000,
"dailySoft": 50000,
"monthlySoft": 1000000
},
"totalsDaily": 0,
"totalsMonthly": 0
},
"wire": {
"limits": {
"dailyTransfer": 20000,
"monthlyTransfer": 20000000,
"dailyTransferSoft": 0,
"monthlyTransferSoft": 0
},
"totalsDaily": {
"transfers": 5000
},
"totalsMonthly": {
"transfers": 5000
},
"override": {
"status": "Active",
"expiredAt": null,
"values": {
"daily": 5000000,
"monthly": 20000000
}
}
},
"checkPayment": {
"limits": {
"dailySent": 20000000,
"monthlySent": 20000000,
"dailySentSoft": 10000000,
"monthlySentSoft": 10000000
},
"totalsDaily": {
"sent": 5000
},
"totalsMonthly": {
"sent": 5000
}
}
}
}
}

Get Wallet Balance History​

List account end-of-day balances history (filtering and paging can be applied).

The account balance history can be used to provide the customer with an overview of their balance across wallet(s) over time in a visually engaging way, providing insights and creating custom product features around it.

Note

The typical cutoff time (end-of-day) is 7PM, but may vary between banks. The exact time and timezone are determined by the partner bank you work with.

VerbGET
URLhttps://api.s.unit.sh/account-end-of-day
Required Scopeaccount-end-of-day
Timeout (Seconds)5

Query Parameters​

NameTypeDefaultDescription
page[limit]integer100Optional. Maximum number of resources that will be returned. Maximum is 1000 resources.
page[offset]integer0Optional. Number of resources to skip.
filter[accountId]string(empty)Optional. Filters the results by the specified account id. At least one of accountId and customerId is required.
filter[customerId]string(empty)Optional. Filters the results by the specified customer id. At least one of accountId and customerId is required.
filter[since]ISO Local Date string(empty)Optional. Filters the account end-of-day balances after the specified date. e.g. 2021-06-01
filter[until]ISO Local Date string(empty)Optional. Filters the account end-of-day balances before the specified date. e.g. 2021-07-01
curl -X GET 'https://api.s.unit.sh/account-end-of-day?page[limit]=10&page[offset]=0&filter[customerId]=10000&filter[accountId]=30317&filter[since]=2020-10-11&filter[until]=2021-10-13' \
-H "Authorization: Bearer ${TOKEN}"

Response​

Response is a JSON:API document.

200 OK​

NameTypeDescription
dataArray of Account End-Of-DayArray of account end-of-day resources.
metaJSON object that contains pagination dataPagination data includes offset, limit and total (estimated total items).
Example Response:
{
"data": [
{
"type": "accountEndOfDay",
"id": "4925158",
"attributes": {
"date": "2021-07-10",
"balance": 1000,
"available": 500,
"hold": 500
},
"relationships": {
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
},
"account": {
"data": {
"type": "account",
"id": "30317"
}
}
}
},
{
"type": "accountEndOfDay",
"id": "4925158",
"attributes": {
"date": "2021-07-11",
"balance": 1000,
"available": 500,
"hold": 500
},
"relationships": {
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
},
"account": {
"data": {
"type": "account",
"id": "30317"
}
}
}
}
],
"meta": {
"pagination": {
"total": 12,
"limit": 2,
"offset": 0
}
}
}