Skip to main content

Wallets

Wallets are a way for banks to send and/or store money on behalf of third parties in certain instances. They can offer simplicity and ease of use for programs that involve lower balances and limited payment options. They can offer an on-ramp to more standard deposit accounts, offering companies a way to pilot, or offer narrowly-defined financial features to their customer bases to enhance loyalty and trust.

Create Wallet

Creates a wallet account for a BusinessCustomer or BusinessWalletCustomer. An account.created event is raised when the call was successful.

Each wallet is created using a specific wallet terms. Wallet terms are a predefined set of terms associated with this wallet (e.g. fees, 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
walletTermsstringThe name of the wallet terms.
tagsobjectOptional. See Tags.
idempotencyKeystringOptional. See Idempotency.

Relationships

NameTypeDescription
customerJSON:API RelationshipThe customer the wallet belongs to. The customer is either a BusinessCustomer or BusinessWalletCustomer.
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

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

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
reasonstringThe reason for closing the wallet. Either ByCustomer, Fraud, ByBank, or NegativeBalance.
fraudReasonstringOptional. The 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).
bankReasonstringOptional. The 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

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

caution

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

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

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
reasonstringThe reason for closing the wallet. Either Fraud or Other, with a specified reasonText.
reasonTextstringOptional. The free-text reason for freezing the wallet (up to 255 characters) when Other is specified.

Response

Response is a JSON:API document.

200 OK

FieldTypeDescription
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

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

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

FieldTypeDescription
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

FieldTypeDescription
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 level. You can read more about the account/wallet 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.

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

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