Get project details
Call this endpoint to obtain details and a list of assets for the current project.
/project
Cloud Wallet is an API that cover asset accounting at scale. We encourage you to integrate our APIs with your existing product or build a new one.
Authenticate your calls with an Access Key that can be obtained via our web app at app.walletapi.cloud. Each key is linked to a specific project. The words "current project" in this document refer to the project for which your Access Key was created.
Customer Keys are special tokens that enable read-only access to our API from your customer's devices. With this key, applications can access only the wallets that belong to a specific customer. Read how to create Customer Keys at help.walletapi.cloud.
Our API expects that you already have your customer database integrated with your app or service. There is no need to copy all the information about your customers into our system. All we need is a unique ID for your customer that matches the information listed in your database. You may supply additional information, such as the customer’s name or a description, but that is only for your convenience.
Please ensure that you have obtained permission from your customers before sending us their personal information.
Note on consistency guarantees. Due to the distributed nature of our platform, some parts of it are following the eventual consistency model. Transactions themselves internally are running with a strict consistency model, so there is no need to worry about the issues like double-spends or lost transfers. However, you may experience short (1-3 seconds) delays between the successful transaction call and seeing the result in List Transactions call. These delays apply both to UI and the API.
A project is the first entity you create in our web application at app.walletapi.cloud. Projects store customer records and wallets that are linked to one application or focus on one idea.
Transactions are available only for wallets within one project.
Call this endpoint to obtain details and a list of assets for the current project.
/project
An asset can be anything of value owned by someone, such as virtual or real currencies, bonus points, or metro rides. Inventory items like water bottles, bags of coffee beans, or packets of sugar can also be assets.
Asset amounts are stored in wallets.
Create a new asset type.
/assets
Name | Description |
---|---|
body * |
|
Deletes an unused asset type. Used assets cannot be removed. Asset types are marked as used when the first wallet using this asset is created.
/assets/{assetId}
Name | Description |
---|---|
assetId* |
String
Asset ID
Required
|
Fail
Error status
EXPIRED
, ILLEGAL_SIGNATURE
, ILLEGAL_TOKEN
, ILLEGAL_DATA
, NO_KEY
, ACCESS_DENIED
, UNKNOWN
, VALIDATION_ERROR
, FRACTION_IN_AMOUNT_NOT_VALID
, CUSTOMER_HAS_ACTIVE_WALLETS
, CHANGE_WALLET_STATUS_ERROR
, WRONG_CREDENTIALS
, WRONG_WALLET_STATUS
, USER_ALREADY_EXIST
, CUSTOMER_ALREADY_EXIST
, ACCESS_ERROR
, UNKNOWN_ERROR
, ACCOUNT_NOT_FOUND
, PROJECT_NOT_FOUND
, ASSET_NOT_FOUND
, ASSET_IS_USED
, CUSTOMER_NOT_FOUND
, WALLET_NOT_FOUND
, TRANSACTION_NOT_FOUND
, USER_NOT_FOUND
, API_KEY_PAIR_NOT_FOUND
, OTP_IS_WRONG_OR_EXPIRED
, LIMIT_EXCEEDED
, BILLING_EXCEPTION
, SUBSCRIPTION_NOT_FOUND
, EMAIL_NOT_CONFIRMED
Fail
Error status
EXPIRED
, ILLEGAL_SIGNATURE
, ILLEGAL_TOKEN
, ILLEGAL_DATA
, NO_KEY
, ACCESS_DENIED
, UNKNOWN
, VALIDATION_ERROR
, FRACTION_IN_AMOUNT_NOT_VALID
, CUSTOMER_HAS_ACTIVE_WALLETS
, CHANGE_WALLET_STATUS_ERROR
, WRONG_CREDENTIALS
, WRONG_WALLET_STATUS
, USER_ALREADY_EXIST
, CUSTOMER_ALREADY_EXIST
, ACCESS_ERROR
, UNKNOWN_ERROR
, ACCOUNT_NOT_FOUND
, PROJECT_NOT_FOUND
, ASSET_NOT_FOUND
, ASSET_IS_USED
, CUSTOMER_NOT_FOUND
, WALLET_NOT_FOUND
, TRANSACTION_NOT_FOUND
, USER_NOT_FOUND
, API_KEY_PAIR_NOT_FOUND
, OTP_IS_WRONG_OR_EXPIRED
, LIMIT_EXCEEDED
, BILLING_EXCEPTION
, SUBSCRIPTION_NOT_FOUND
, EMAIL_NOT_CONFIRMED
Obtain the details of an asset with provided ID. May be called with an Access Key or a Customer Key.
/assets/{assetId}
Name | Description |
---|---|
assetId* |
String
Asset ID
Required
|
Fail
Error status
EXPIRED
, ILLEGAL_SIGNATURE
, ILLEGAL_TOKEN
, ILLEGAL_DATA
, NO_KEY
, ACCESS_DENIED
, UNKNOWN
, VALIDATION_ERROR
, FRACTION_IN_AMOUNT_NOT_VALID
, CUSTOMER_HAS_ACTIVE_WALLETS
, CHANGE_WALLET_STATUS_ERROR
, WRONG_CREDENTIALS
, WRONG_WALLET_STATUS
, USER_ALREADY_EXIST
, CUSTOMER_ALREADY_EXIST
, ACCESS_ERROR
, UNKNOWN_ERROR
, ACCOUNT_NOT_FOUND
, PROJECT_NOT_FOUND
, ASSET_NOT_FOUND
, ASSET_IS_USED
, CUSTOMER_NOT_FOUND
, WALLET_NOT_FOUND
, TRANSACTION_NOT_FOUND
, USER_NOT_FOUND
, API_KEY_PAIR_NOT_FOUND
, OTP_IS_WRONG_OR_EXPIRED
, LIMIT_EXCEEDED
, BILLING_EXCEPTION
, SUBSCRIPTION_NOT_FOUND
, EMAIL_NOT_CONFIRMED
Obtain a list of assets for a project. May be called with an Access Key or a Customer Key.
/assets
Updates asset name.
/assets/{assetId}/name
Name | Description |
---|---|
assetId* |
String
Asset ID
Required
|
Name | Description |
---|---|
body * |
A customer is a record that reflects your existing users and enables you to create wallets for them. Basically, customers own wallets. You decide how you map customers into your system. People, devices, vehicles, or appliances that contain value can act as customers.
We respect your users' privacy and only ask you to provide an ID that you can later identify and map back to the user in your system.
Creates a new customer record or updates an existing record if a customer with provided ID already exists.
/customers
Name | Description |
---|---|
body * |
|
Customer details
Active
, Suspended
, Deleted
Customer details
Active
, Suspended
, Deleted
Call this endpoint to obtain a record for a customer with provided ID.
You are only allowed to read a key’s owner record when you call with a Customer Key.
/customers/{customerId}
Name | Description |
---|---|
customerId* |
String
Customer ID
Required
|
Customer details
Active
, Suspended
, Deleted
Fail
Error status
EXPIRED
, ILLEGAL_SIGNATURE
, ILLEGAL_TOKEN
, ILLEGAL_DATA
, NO_KEY
, ACCESS_DENIED
, UNKNOWN
, VALIDATION_ERROR
, FRACTION_IN_AMOUNT_NOT_VALID
, CUSTOMER_HAS_ACTIVE_WALLETS
, CHANGE_WALLET_STATUS_ERROR
, WRONG_CREDENTIALS
, WRONG_WALLET_STATUS
, USER_ALREADY_EXIST
, CUSTOMER_ALREADY_EXIST
, ACCESS_ERROR
, UNKNOWN_ERROR
, ACCOUNT_NOT_FOUND
, PROJECT_NOT_FOUND
, ASSET_NOT_FOUND
, ASSET_IS_USED
, CUSTOMER_NOT_FOUND
, WALLET_NOT_FOUND
, TRANSACTION_NOT_FOUND
, USER_NOT_FOUND
, API_KEY_PAIR_NOT_FOUND
, OTP_IS_WRONG_OR_EXPIRED
, LIMIT_EXCEEDED
, BILLING_EXCEPTION
, SUBSCRIPTION_NOT_FOUND
, EMAIL_NOT_CONFIRMED
Fail
Error status
EXPIRED
, ILLEGAL_SIGNATURE
, ILLEGAL_TOKEN
, ILLEGAL_DATA
, NO_KEY
, ACCESS_DENIED
, UNKNOWN
, VALIDATION_ERROR
, FRACTION_IN_AMOUNT_NOT_VALID
, CUSTOMER_HAS_ACTIVE_WALLETS
, CHANGE_WALLET_STATUS_ERROR
, WRONG_CREDENTIALS
, WRONG_WALLET_STATUS
, USER_ALREADY_EXIST
, CUSTOMER_ALREADY_EXIST
, ACCESS_ERROR
, UNKNOWN_ERROR
, ACCOUNT_NOT_FOUND
, PROJECT_NOT_FOUND
, ASSET_NOT_FOUND
, ASSET_IS_USED
, CUSTOMER_NOT_FOUND
, WALLET_NOT_FOUND
, TRANSACTION_NOT_FOUND
, USER_NOT_FOUND
, API_KEY_PAIR_NOT_FOUND
, OTP_IS_WRONG_OR_EXPIRED
, LIMIT_EXCEEDED
, BILLING_EXCEPTION
, SUBSCRIPTION_NOT_FOUND
, EMAIL_NOT_CONFIRMED
Retrieve a list of your customers with pagination. Specify current page and page size as query parameters.
/customers
Name | Description |
---|---|
page* |
Integer
(int32)
Page number query parameter
Required
|
pageSize |
Integer
(int32)
Page size query parameter
|
Call this endpoint to create or update a record for a customer with provided customer ID.
You are only allowed to update a key’s owner record when you call with a Customer Key.
/customers/{customerId}
Name | Description |
---|---|
customerId* |
String
Customer ID
Required
|
Name | Description |
---|---|
body |
{
}
|
Customer details
Active
, Suspended
, Deleted
Suspend customer and all their wallets.
/customers/{customerId}/suspend
Name | Description |
---|---|
customerId* |
String
Customer ID
Required
|
Customer details
Active
, Suspended
, Deleted
Unsuspend a customer. Please note that customer's wallets will not be reactivated. You must reactivate wallets either via separate calls or by providing wallet IDs in the request body.
/customers/{customerId}/resume
Name | Description |
---|---|
customerId* |
String
Customer ID
Required
|
Name | Description |
---|---|
body * |
Customer details
Active
, Suspended
, Deleted
Fail
Error status
EXPIRED
, ILLEGAL_SIGNATURE
, ILLEGAL_TOKEN
, ILLEGAL_DATA
, NO_KEY
, ACCESS_DENIED
, UNKNOWN
, VALIDATION_ERROR
, FRACTION_IN_AMOUNT_NOT_VALID
, CUSTOMER_HAS_ACTIVE_WALLETS
, CHANGE_WALLET_STATUS_ERROR
, WRONG_CREDENTIALS
, WRONG_WALLET_STATUS
, USER_ALREADY_EXIST
, CUSTOMER_ALREADY_EXIST
, ACCESS_ERROR
, UNKNOWN_ERROR
, ACCOUNT_NOT_FOUND
, PROJECT_NOT_FOUND
, ASSET_NOT_FOUND
, ASSET_IS_USED
, CUSTOMER_NOT_FOUND
, WALLET_NOT_FOUND
, TRANSACTION_NOT_FOUND
, USER_NOT_FOUND
, API_KEY_PAIR_NOT_FOUND
, OTP_IS_WRONG_OR_EXPIRED
, LIMIT_EXCEEDED
, BILLING_EXCEPTION
, SUBSCRIPTION_NOT_FOUND
, EMAIL_NOT_CONFIRMED
Call this endpoint to delete a customer record. All wallets belonging to this customer must be closed before this call. Deleted data cannot be restored. Closed wallets will not be deleted.
/customers/{customerId}
Name | Description |
---|---|
customerId* |
String
Customer ID
Required
|
Fail
Error status
EXPIRED
, ILLEGAL_SIGNATURE
, ILLEGAL_TOKEN
, ILLEGAL_DATA
, NO_KEY
, ACCESS_DENIED
, UNKNOWN
, VALIDATION_ERROR
, FRACTION_IN_AMOUNT_NOT_VALID
, CUSTOMER_HAS_ACTIVE_WALLETS
, CHANGE_WALLET_STATUS_ERROR
, WRONG_CREDENTIALS
, WRONG_WALLET_STATUS
, USER_ALREADY_EXIST
, CUSTOMER_ALREADY_EXIST
, ACCESS_ERROR
, UNKNOWN_ERROR
, ACCOUNT_NOT_FOUND
, PROJECT_NOT_FOUND
, ASSET_NOT_FOUND
, ASSET_IS_USED
, CUSTOMER_NOT_FOUND
, WALLET_NOT_FOUND
, TRANSACTION_NOT_FOUND
, USER_NOT_FOUND
, API_KEY_PAIR_NOT_FOUND
, OTP_IS_WRONG_OR_EXPIRED
, LIMIT_EXCEEDED
, BILLING_EXCEPTION
, SUBSCRIPTION_NOT_FOUND
, EMAIL_NOT_CONFIRMED
A wallet stores value, as well as the user’s balance history. Each wallet belongs either to a customer or to you (then it is called a system wallet). Assign as many wallets to your users or devices as you’d like.
The wallet balance can’t dip below zero.
A wallet entry is a record in a wallet ledger about an event.
There are several types of events:
Create a wallet for a customer with a provided customer ID. Make a call to receive the opened wallet details.
/wallets
Name | Description |
---|---|
body * |
|
Open a new system wallet for the current project.
System wallets belong to you, not to your customers. They are linked to a project and usually are created to collect commissions or accept fees, among other reasons.
/system-wallets
Name | Description |
---|---|
body * |
|
Obtain wallet balance and details. When called with a Customer Key, you will only be permitted to query the wallets that belong to a key owner.
/wallets/{walletId}
Name | Description |
---|---|
walletId* |
String
Wallet ID
Required
|
Fail
Error status
EXPIRED
, ILLEGAL_SIGNATURE
, ILLEGAL_TOKEN
, ILLEGAL_DATA
, NO_KEY
, ACCESS_DENIED
, UNKNOWN
, VALIDATION_ERROR
, FRACTION_IN_AMOUNT_NOT_VALID
, CUSTOMER_HAS_ACTIVE_WALLETS
, CHANGE_WALLET_STATUS_ERROR
, WRONG_CREDENTIALS
, WRONG_WALLET_STATUS
, USER_ALREADY_EXIST
, CUSTOMER_ALREADY_EXIST
, ACCESS_ERROR
, UNKNOWN_ERROR
, ACCOUNT_NOT_FOUND
, PROJECT_NOT_FOUND
, ASSET_NOT_FOUND
, ASSET_IS_USED
, CUSTOMER_NOT_FOUND
, WALLET_NOT_FOUND
, TRANSACTION_NOT_FOUND
, USER_NOT_FOUND
, API_KEY_PAIR_NOT_FOUND
, OTP_IS_WRONG_OR_EXPIRED
, LIMIT_EXCEEDED
, BILLING_EXCEPTION
, SUBSCRIPTION_NOT_FOUND
, EMAIL_NOT_CONFIRMED
Obtain details and balances for wallets belonging to a provided customer. When called with a Customer Key, you will only be permitted to query the wallets that belong to a key owner.
/customers/{customerId}/wallets
Name | Description |
---|---|
customerId* |
String
Customer ID
Required
|
Fail
Error status
EXPIRED
, ILLEGAL_SIGNATURE
, ILLEGAL_TOKEN
, ILLEGAL_DATA
, NO_KEY
, ACCESS_DENIED
, UNKNOWN
, VALIDATION_ERROR
, FRACTION_IN_AMOUNT_NOT_VALID
, CUSTOMER_HAS_ACTIVE_WALLETS
, CHANGE_WALLET_STATUS_ERROR
, WRONG_CREDENTIALS
, WRONG_WALLET_STATUS
, USER_ALREADY_EXIST
, CUSTOMER_ALREADY_EXIST
, ACCESS_ERROR
, UNKNOWN_ERROR
, ACCOUNT_NOT_FOUND
, PROJECT_NOT_FOUND
, ASSET_NOT_FOUND
, ASSET_IS_USED
, CUSTOMER_NOT_FOUND
, WALLET_NOT_FOUND
, TRANSACTION_NOT_FOUND
, USER_NOT_FOUND
, API_KEY_PAIR_NOT_FOUND
, OTP_IS_WRONG_OR_EXPIRED
, LIMIT_EXCEEDED
, BILLING_EXCEPTION
, SUBSCRIPTION_NOT_FOUND
, EMAIL_NOT_CONFIRMED
Fail
Error status
EXPIRED
, ILLEGAL_SIGNATURE
, ILLEGAL_TOKEN
, ILLEGAL_DATA
, NO_KEY
, ACCESS_DENIED
, UNKNOWN
, VALIDATION_ERROR
, FRACTION_IN_AMOUNT_NOT_VALID
, CUSTOMER_HAS_ACTIVE_WALLETS
, CHANGE_WALLET_STATUS_ERROR
, WRONG_CREDENTIALS
, WRONG_WALLET_STATUS
, USER_ALREADY_EXIST
, CUSTOMER_ALREADY_EXIST
, ACCESS_ERROR
, UNKNOWN_ERROR
, ACCOUNT_NOT_FOUND
, PROJECT_NOT_FOUND
, ASSET_NOT_FOUND
, ASSET_IS_USED
, CUSTOMER_NOT_FOUND
, WALLET_NOT_FOUND
, TRANSACTION_NOT_FOUND
, USER_NOT_FOUND
, API_KEY_PAIR_NOT_FOUND
, OTP_IS_WRONG_OR_EXPIRED
, LIMIT_EXCEEDED
, BILLING_EXCEPTION
, SUBSCRIPTION_NOT_FOUND
, EMAIL_NOT_CONFIRMED
When using a Customer Key, this API will list the wallets that the customer owns. This only works with Customer Keys.
/wallets
Fail
Error status
EXPIRED
, ILLEGAL_SIGNATURE
, ILLEGAL_TOKEN
, ILLEGAL_DATA
, NO_KEY
, ACCESS_DENIED
, UNKNOWN
, VALIDATION_ERROR
, FRACTION_IN_AMOUNT_NOT_VALID
, CUSTOMER_HAS_ACTIVE_WALLETS
, CHANGE_WALLET_STATUS_ERROR
, WRONG_CREDENTIALS
, WRONG_WALLET_STATUS
, USER_ALREADY_EXIST
, CUSTOMER_ALREADY_EXIST
, ACCESS_ERROR
, UNKNOWN_ERROR
, ACCOUNT_NOT_FOUND
, PROJECT_NOT_FOUND
, ASSET_NOT_FOUND
, ASSET_IS_USED
, CUSTOMER_NOT_FOUND
, WALLET_NOT_FOUND
, TRANSACTION_NOT_FOUND
, USER_NOT_FOUND
, API_KEY_PAIR_NOT_FOUND
, OTP_IS_WRONG_OR_EXPIRED
, LIMIT_EXCEEDED
, BILLING_EXCEPTION
, SUBSCRIPTION_NOT_FOUND
, EMAIL_NOT_CONFIRMED
Obtain a list of system wallets for this project.
/system-wallets
Updates wallet name.
When called with a Customer Key, you can only update the wallets that belong to a key owner.
/wallets/{walletId}/name
Name | Description |
---|---|
walletId* |
String
Wallet ID
Required
|
Name | Description |
---|---|
body * |
Updates wallet description.
When called with a Customer Key, you can only update the wallets that belong to a key owner.
/wallets/{walletId}/description
Name | Description |
---|---|
walletId* |
String
Wallet ID
Required
|
Name | Description |
---|---|
body * |
Every wallet is created in Open mode. Then it is possible to change the status (mode) to one of the following:
/wallets/{walletId}/status
Name | Description |
---|---|
walletId* |
String
Wallet ID
Required
|
Name | Description |
---|---|
body * |
string
Enum:
Open , Suspended , Closed |
Obtain a pageable list of operations that were posted to a wallet within a specified time period.
/wallets/{walletId}/entries
Name | Description |
---|---|
walletId* |
String
Wallet ID
Required
|
Name | Description |
---|---|
from* |
Long
(int64)
Date from
Required
|
to* |
Long
(int64)
Date to
Required
|
page* |
Integer
(int32)
Page number query parameter
Required
|
pageSize |
Integer
(int32)
Page size query parameter
|
A transaction is a set of operations (one or more) that must be performed together. When a transaction is performed, operations are performed in the order in which they’re listed.
An operation is a basic atomic action which updates one or two wallet balances. Each operation posts an entry to the ledger of each wallet it affects. An operation can be performed only within a transaction.
There are three types of operations:
When all the operations in a set can be performed successfully, the whole transaction will be completed. If any single operation fails, all the other operations will be reverted back and the transaction will fail.
Calling this endpoint will start a new transaction.
/transactions
Name | Description |
---|---|
body * |
{
Request to perform a transaction Required: operations,referenceId
operations:
referenceId:
string
maxLength:30
A reference ID is a string identifier that must be unique for each project. If the connection gets interrupted, it’s safe to repeat the call with the same Reference ID. If the connection broke before it reached our servers, your retry call will get through. Otherwise, you will receive a DuplicateReferenceId error and a current transaction state (including its ID). This will effectively recover the transaction information. |
DuplicateReferenceId
, Waiting
, Completed
, Failed
, UnhandledRequest
, UnknownError
A reference ID is a string identifier that must be unique for each project. If the connection gets interrupted, it’s safe to repeat the call with the same Reference ID. If the connection broke before it reached our servers, your retry call will get through. Otherwise, you will receive a DuplicateReferenceId error and a current transaction state (including its ID). This will effectively recover the transaction information.
Call this endpoint to obtain a transaction's current state.
/transactions/{txId}
Name | Description |
---|---|
txId* |
String
Transaction ID
Required
|
A reference ID is a string identifier that must be unique for each project. If the connection gets interrupted, it’s safe to repeat the call with the same Reference ID. If the connection broke before it reached our servers, your retry call will get through. Otherwise, you will receive a DuplicateReferenceId error and a current transaction state (including its ID). This will effectively recover the transaction information.
Retrieve a pageable list of transactions for a specified time period.
/transactions
Name | Description |
---|---|
from* |
Long
(int64)
Date from
Required
|
to* |
Long
(int64)
Date to
Required
|
page* |
Integer
(int32)
Page number query parameter
Required
|
pageSize |
Integer
(int32)
Page size query parameter
|
Request to list transactions
A reference ID is a string identifier that must be unique for each project. If the connection gets interrupted, it’s safe to repeat the call with the same Reference ID. If the connection broke before it reached our servers, your retry call will get through. Otherwise, you will receive a DuplicateReferenceId error and a current transaction state (including its ID). This will effectively recover the transaction information.