Cloud Wallet API

Projects

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.

Get project details

Call this endpoint to obtain details and a list of assets for the current project.


/project

Parameters

Responses

Status: 200 - Successful operation

{

Information about a project

Required: assets,id,name
id:
string maxLength:30

Project identifier

name:
string maxLength:200

Project name

assets:
[
{
Required: code,fractions,id,name
id:
string maxLength:30

Unique asset identifier

name:
string maxLength:200

Asset name

code:
string maxLength:16

Asset code

fractions:
integer

The number of smallest accountable parts in one asset unit. For 1 USD it is 100 cents, for 1 day it might be 24 hours.

}
]
}

Assets

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 an asset

Create a new asset type.


/assets

Parameters

Body parameters
Name Description
body *
{

Request to create a new asset

Required: code,fractions,name
name:
string

Asset name

code:
string

Asset code

fractions:
integer

The number of smallest accountable parts in one asset unit. For 1 USD it is 100 cents, for 1 day it might be 24 hours.

}

Responses

Status: 201 - Asset created

{
Required: code,fractions,id,name
id:
string maxLength:30

Unique asset identifier

name:
string maxLength:200

Asset name

code:
string maxLength:16

Asset code

fractions:
integer

The number of smallest accountable parts in one asset unit. For 1 USD it is 100 cents, for 1 day it might be 24 hours.

}

Delete an asset

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}

Parameters

Path parameters
Name Description
assetId*
String
Asset ID
Required

Responses

Status: 200 - Successful operation

{
Required: result,status
status:
string
Enum: Ok, Fail
result:
string maxLength:200

Response message.

}

Status: 404 - Project not found

{
Required: error,result,status
status:
string
Enum: Fail
result:
string maxLength:200

Response message

error:
string

Error status

Enum: 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
}

Status: 403 - Asset is used

{
Required: error,result,status
status:
string
Enum: Fail
result:
string maxLength:200

Response message

error:
string

Error status

Enum: 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
}

Get asset details

Obtain the details of an asset with provided ID. May be called with an Access Key or a Customer Key.


/assets/{assetId}

Parameters

Path parameters
Name Description
assetId*
String
Asset ID
Required

Responses

Status: 200 - Successful operation

{
Required: code,fractions,id,name
id:
string maxLength:30

Unique asset identifier

name:
string maxLength:200

Asset name

code:
string maxLength:16

Asset code

fractions:
integer

The number of smallest accountable parts in one asset unit. For 1 USD it is 100 cents, for 1 day it might be 24 hours.

}

Status: 404 - Not found

{
Required: error,result,status
status:
string
Enum: Fail
result:
string maxLength:200

Response message

error:
string

Error status

Enum: 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
}

List project assets

Obtain a list of assets for a project. May be called with an Access Key or a Customer Key.


/assets

Parameters

Responses

Status: 200 - Successful operation

{

List of assets

Required: assets
assets:
[
{
Required: code,fractions,id,name
id:
string maxLength:30

Unique asset identifier

name:
string maxLength:200

Asset name

code:
string maxLength:16

Asset code

fractions:
integer

The number of smallest accountable parts in one asset unit. For 1 USD it is 100 cents, for 1 day it might be 24 hours.

}
]
}

Rename an asset

Updates asset name.


/assets/{assetId}/name

Parameters

Path parameters
Name Description
assetId*
String
Asset ID
Required
Body parameters
Name Description
body *
string maxLength:200

New asset name

Responses

Status: 200 - Successful operation

{
Required: result,status
status:
string
Enum: Ok, Fail
result:
string maxLength:200

Response message.

}

Status: 404 - Not found

{
Required: result,status
status:
string
Enum: Ok, Fail
result:
string maxLength:200

Response message.

}

Customers

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.

Create a customer

Creates a new customer record or updates an existing record if a customer with provided ID already exists.


/customers

Parameters

Body parameters
Name Description
body *
{
Required: customerId
name:
string maxLength:200

Customer name

description:
string maxLength:1024

Customer description

customerId:
string maxLength:30

A unique ID for your customer that matches the information listed in your customer database

}

Responses

Status: 200 - Successful update

{

Customer details

Required: id,status
id:
string maxLength:30

Customer identifier, usually the same as a customer ID in your database. These identifiers must be unique within one project.

name:
string maxLength:200

Customer name or any other information for your convenience

description:
string maxLength:1024

Customer description or any other information for your convenience

status:
string
Enum: Active, Suspended, Deleted
}

Status: 201 - Successful create

{

Customer details

Required: id,status
id:
string maxLength:30

Customer identifier, usually the same as a customer ID in your database. These identifiers must be unique within one project.

name:
string maxLength:200

Customer name or any other information for your convenience

description:
string maxLength:1024

Customer description or any other information for your convenience

status:
string
Enum: Active, Suspended, Deleted
}

Get customer details

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}

Parameters

Path parameters
Name Description
customerId*
String
Customer ID
Required

Responses

Status: 200 - Successful operation

{

Customer details

Required: id,status
id:
string maxLength:30

Customer identifier, usually the same as a customer ID in your database. These identifiers must be unique within one project.

name:
string maxLength:200

Customer name or any other information for your convenience

description:
string maxLength:1024

Customer description or any other information for your convenience

status:
string
Enum: Active, Suspended, Deleted
}

Status: 403 - Not allowed

{
Required: error,result,status
status:
string
Enum: Fail
result:
string maxLength:200

Response message

error:
string

Error status

Enum: 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
}

Status: 404 - Customer not found

{
Required: error,result,status
status:
string
Enum: Fail
result:
string maxLength:200

Response message

error:
string

Error status

Enum: 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
}

List customers

Retrieve a list of your customers with pagination. Specify current page and page size as query parameters.


/customers

Parameters

Query parameters
Name Description
page*
Integer (int32)
Page number query parameter
Required
pageSize
Integer (int32)
Page size query parameter

Responses

Status: 200 - Successful operation

{

Response to a request to list customers

Required: customers
customers:
[
{

Customer details

Required: id,status
id:
string maxLength:30

Customer identifier, usually the same as a customer ID in your database. These identifiers must be unique within one project.

name:
string maxLength:200

Customer name or any other information for your convenience

description:
string maxLength:1024

Customer description or any other information for your convenience

status:
string
Enum: Active, Suspended, Deleted
}
]
}

Update customer details

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}

Parameters

Path parameters
Name Description
customerId*
String
Customer ID
Required
Body parameters
Name Description
body
{
name:
string maxLength:200

Customer name

description:
string maxLength:1024

Customer description

}

Responses

Status: 200 - Successful operation

{

Customer details

Required: id,status
id:
string maxLength:30

Customer identifier, usually the same as a customer ID in your database. These identifiers must be unique within one project.

name:
string maxLength:200

Customer name or any other information for your convenience

description:
string maxLength:1024

Customer description or any other information for your convenience

status:
string
Enum: Active, Suspended, Deleted
}

Suspend a customer

Suspend customer and all their wallets.


/customers/{customerId}/suspend

Parameters

Path parameters
Name Description
customerId*
String
Customer ID
Required

Responses

Status: 200 - Successful operation

{

Customer details

Required: id,status
id:
string maxLength:30

Customer identifier, usually the same as a customer ID in your database. These identifiers must be unique within one project.

name:
string maxLength:200

Customer name or any other information for your convenience

description:
string maxLength:1024

Customer description or any other information for your convenience

status:
string
Enum: Active, Suspended, Deleted
}

Status: 404 - Customer not found

{
Required: result,status
status:
string
Enum: Ok, Fail
result:
string maxLength:200

Response message.

}

Unsuspend a customer

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

Parameters

Path parameters
Name Description
customerId*
String
Customer ID
Required
Body parameters
Name Description
body *
{

List of wallets to activate

wallets:
[
string
]
}

Responses

Status: 200 - Successful operation

{

Customer details

Required: id,status
id:
string maxLength:30

Customer identifier, usually the same as a customer ID in your database. These identifiers must be unique within one project.

name:
string maxLength:200

Customer name or any other information for your convenience

description:
string maxLength:1024

Customer description or any other information for your convenience

status:
string
Enum: Active, Suspended, Deleted
}

Status: 404 - Customer not found

{
Required: error,result,status
status:
string
Enum: Fail
result:
string maxLength:200

Response message

error:
string

Error status

Enum: 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
}

Delete a customer

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}

Parameters

Path parameters
Name Description
customerId*
String
Customer ID
Required

Responses

Status: 200 - Successful operation

{
Required: result,status
status:
string
Enum: Ok, Fail
result:
string maxLength:200

Response message.

}

Status: 400 - At least one customer's wallet is not closed.

{
Required: error,result,status
status:
string
Enum: Fail
result:
string maxLength:200

Response message

error:
string

Error status

Enum: 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
}

Wallets

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:

  • Issue records the effect of an issue operation
  • Redeem records redeem operations
  • Debit is posted to the wallet that is on the debit side of a transfer
  • Credit will appear on the credit side of the transfer

Open a wallet for a customer

Create a wallet for a customer with a provided customer ID. Make a call to receive the opened wallet details.


/wallets

Parameters

Body parameters
Name Description
body *
{

Request to create a wallet for a customer

Required: assetId,customerId,name
customerId:
string maxLength:30

Customer identifier

assetId:
string maxLength:30

Wallet asset identifier

name:
string maxLength:200

Wallet name

description:
string maxLength:1024

Optional description or any other information that will be stored with wallet

}

Responses

Status: 201 - Successful operation

{
Required: assetId,balance,id,projectId,status
id:
string maxLength:30

Wallet ID

projectId:
string maxLength:30

Project ID

customerId:
string maxLength:30

Customer ID

assetId:
string maxLength:30

Asset ID

balance:
string

Wallet balance

status:
string
Enum: Open, Suspended, Closed
name:
string maxLength:200

Wallet name

description:
string maxLength:1024

Wallet description

}

Status: 400 - Bad request. Asset ID or customer ID refer to a non-existent entity.

{
Required: result,status
status:
string
Enum: Ok, Fail
result:
string maxLength:200

Response message.

}

Open a system wallet

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

Parameters

Body parameters
Name Description
body *
{

Request to create a system wallet

Required: assetId,name
assetId:
string maxLength:30

Wallet asset identifier

name:
string maxLength:200

Wallet name

description:
string maxLength:1024

Optional description or any other information that will be stored with wallet

}

Responses

Status: 201 - Successful operation

{
Required: assetId,balance,id,projectId,status
id:
string maxLength:30

Wallet ID

projectId:
string maxLength:30

Project ID

customerId:
string maxLength:30

Customer ID

assetId:
string maxLength:30

Asset ID

balance:
string

Wallet balance

status:
string
Enum: Open, Suspended, Closed
name:
string maxLength:200

Wallet name

description:
string maxLength:1024

Wallet description

}

Status: 400 - Asset not found

{
Required: result,status
status:
string
Enum: Ok, Fail
result:
string maxLength:200

Response message.

}

Get wallet details

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}

Parameters

Path parameters
Name Description
walletId*
String
Wallet ID
Required

Responses

Status: 200 - Successful operation

{
Required: assetId,balance,id,projectId,status
id:
string maxLength:30

Wallet ID

projectId:
string maxLength:30

Project ID

customerId:
string maxLength:30

Customer ID

assetId:
string maxLength:30

Asset ID

balance:
string

Wallet balance

status:
string
Enum: Open, Suspended, Closed
name:
string maxLength:200

Wallet name

description:
string maxLength:1024

Wallet description

}

Status: 404 - Not found

{
Required: error,result,status
status:
string
Enum: Fail
result:
string maxLength:200

Response message

error:
string

Error status

Enum: 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
}

List customer's wallets

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

Parameters

Path parameters
Name Description
customerId*
String
Customer ID
Required

Responses

Status: 200 - Successful operation

{

List of customer wallets

Required: wallets
wallets:
[
{
Required: assetId,balance,id,projectId,status
id:
string maxLength:30

Wallet ID

projectId:
string maxLength:30

Project ID

customerId:
string maxLength:30

Customer ID

assetId:
string maxLength:30

Asset ID

balance:
string

Wallet balance

status:
string
Enum: Open, Suspended, Closed
name:
string maxLength:200

Wallet name

description:
string maxLength:1024

Wallet description

}
]
}

Status: 204 - No content

Status: 403 - Not allowed

{
Required: error,result,status
status:
string
Enum: Fail
result:
string maxLength:200

Response message

error:
string

Error status

Enum: 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
}

Status: 404 - Customer not found

{
Required: error,result,status
status:
string
Enum: Fail
result:
string maxLength:200

Response message

error:
string

Error status

Enum: 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
}

List current customer's own wallets

When using a Customer Key, this API will list the wallets that the customer owns. This only works with Customer Keys.


/wallets

Parameters

Responses

Status: 200 - Successful operation

{

List of customer wallets

Required: wallets
wallets:
[
{
Required: assetId,balance,id,projectId,status
id:
string maxLength:30

Wallet ID

projectId:
string maxLength:30

Project ID

customerId:
string maxLength:30

Customer ID

assetId:
string maxLength:30

Asset ID

balance:
string

Wallet balance

status:
string
Enum: Open, Suspended, Closed
name:
string maxLength:200

Wallet name

description:
string maxLength:1024

Wallet description

}
]
}

Status: 204 - No content

Status: 403 - Access denied

{
Required: error,result,status
status:
string
Enum: Fail
result:
string maxLength:200

Response message

error:
string

Error status

Enum: 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
}

List system wallets

Obtain a list of system wallets for this project.


/system-wallets

Parameters

Responses

Status: 200 - Successful operation

{

List of system wallets

Required: wallets
wallets:
[
{
Required: assetId,balance,id,projectId,status
id:
string maxLength:30

Wallet ID

projectId:
string maxLength:30

Project ID

customerId:
string maxLength:30

Customer ID

assetId:
string maxLength:30

Asset ID

balance:
string

Wallet balance

status:
string
Enum: Open, Suspended, Closed
name:
string maxLength:200

Wallet name

description:
string maxLength:1024

Wallet description

}
]
}

Change wallet name

Updates wallet name.

When called with a Customer Key, you can only update the wallets that belong to a key owner.


/wallets/{walletId}/name

Parameters

Path parameters
Name Description
walletId*
String
Wallet ID
Required
Body parameters
Name Description
body *
string maxLength:200

New wallet name

Responses

Status: 200 - Successful operation

{
Required: result,status
status:
string
Enum: Ok, Fail
result:
string maxLength:200

Response message.

}

Status: 404 - Not found

{
Required: result,status
status:
string
Enum: Ok, Fail
result:
string maxLength:200

Response message.

}

Change wallet description

Updates wallet description.

When called with a Customer Key, you can only update the wallets that belong to a key owner.


/wallets/{walletId}/description

Parameters

Path parameters
Name Description
walletId*
String
Wallet ID
Required
Body parameters
Name Description
body *
string maxLength:200

New wallet description

Responses

Status: 200 - Successful operation

{
Required: result,status
status:
string
Enum: Ok, Fail
result:
string maxLength:200

Response message.

}

Status: 404 - Not found

{
Required: result,status
status:
string
Enum: Ok, Fail
result:
string maxLength:200

Response message.

}

Change wallet status

Every wallet is created in Open mode. Then it is possible to change the status (mode) to one of the following:

  • Open wallets can hold a balance and participate in transactions.They can be switched to Suspended or Closed.
  • Suspended wallets keep their balance, but you’re unable to perform transactions with them. They can be changed back to Open or to Closed.
  • Closed permanently stops transactions with a wallet. Only empty wallets can be closed, and you can't reopen wallets once you’ve closed them.


/wallets/{walletId}/status

Parameters

Path parameters
Name Description
walletId*
String
Wallet ID
Required
Body parameters
Name Description
body *
string
Enum: Open, Suspended, Closed

Responses

Status: 200 - Successful operation

{
Required: result,status
status:
string
Enum: Ok, Fail
result:
string maxLength:200

Response message.

}

Status: 400 - Wrong status

{
Required: result,status
status:
string
Enum: Ok, Fail
result:
string maxLength:200

Response message.

}

Status: 404 - Wallet not found

{
Required: result,status
status:
string
Enum: Ok, Fail
result:
string maxLength:200

Response message.

}

List operations in wallet's ledger

Obtain a pageable list of operations that were posted to a wallet within a specified time period.


/wallets/{walletId}/entries

Parameters

Path parameters
Name Description
walletId*
String
Wallet ID
Required
Query parameters
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

Responses

Status: 200 - Successful operation

{
Required: entries
entries:
[
{
Required: amount,assetId,creditWalletId,debitWalletId,description,event,operationId,timestamp,transactionId,walletId
walletId:
string maxLength:30

Wallet identifier

transactionId:
string maxLength:30

Transaction identifier

operationId:
string maxLength:30

Operation identifier

timestamp:
string (date-time)

Operation date and time

description:
string maxLength:1024

Operation description

debitWalletId:
string maxLength:30

Identifier of a debited wallet

creditWalletId:
string maxLength:30

Identifier of a credited wallet

assetId:
string maxLength:30

Asset identifier

amount:
string

Operation amount

event:
string

Wallet entry event

Enum: Issue, Redeem, Credit, Debit, Hold
}
]
}

Status: 400 - Specified end date is earlier than begin date

{
Required: result,status
status:
string
Enum: Ok, Fail
result:
string maxLength:200

Response message.

}

Status: 404 - Wallet not found

{
Required: result,status
status:
string
Enum: Ok, Fail
result:
string maxLength:200

Response message.

}

Transactions

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:

  • A Transfer moves some value from one wallet to another within the same project.
  • An Issue operation increases a user’s wallet balance by creating value.
  • Redeem decreases one wallet's balance by eliminating some amount of value.

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.

Initiate a new transaction

Calling this endpoint will start a new transaction.


/transactions

Parameters

Body parameters
Name Description
body *
{

Request to perform a transaction

Required: operations,referenceId
operations:
[

Textual description or any other information that will accompany the transaction

{
Required: amount,assetId,type
type:
string

Operation type.

Enum: Transfer, Issue, Redeem
debitWalletId:
string maxLength:30

Identifier of the debited wallet. Required for Transfer and Redeem operations.

creditWalletId:
string maxLength:30

Identifier of the credited wallet. Required for Transfer and Issue operations.

assetId:
string maxLength:30

Asset identifier

amount:
string

Operation amount. Must follod the pattern for Locale en_US: ###,###.### GroupingSeparator: ',' DecimalSeparator: '.'

description:
string maxLength:1024

Operation description

}
]
description:
string maxLength:1024

Transaction description

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.

}

Responses

Status: 201 - Successful operation

{
Required: message,result,transaction
result:
string
Enum: DuplicateReferenceId, Waiting, Completed, Failed, UnhandledRequest, UnknownError
transaction:
{
Required: id,operations,referenceId,status,timeFinalized,timeInitiated
id:
string maxLength:30

Transaction ID

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.

status:
string

Transaction status

Enum: Initialized, Negotiating, Negotiated, Completing, Completed, Failing, Failed
operations:
[

Operations details

{
Required: amount,assetId,creditReason,creditResult,creditWalletId,debitReason,debitResult,debitWalletId,id,status,type
id:
string maxLength:30

Operation identifier

type:
string

Operation type.

Enum: Transfer, Issue, Redeem
status:
string

Operation status

Enum: NotStarted, Negotiating, Negotiated, Completing, Completed, Failed, Canceled
debitWalletId:
string maxLength:30

Identifier of the debited wallet

creditWalletId:
string maxLength:30

Identifier of the credited wallet

assetId:
string maxLength:30

Operation asset identifier

amount:
string

Operation amount

description:
string maxLength:1024

Operation description

debitResult:
string

An overall wallet operation's result. It's binary: Success or Failure.

Enum: Success, Failure
creditResult:
string

An overall wallet operation's result. It's binary: Success or Failure.

Enum: Success, Failure
debitReason:
string

A detailed reason for a wallet operation's result. Provides a context for failures.

Enum: Done, WrongAmount, WrongAsset, IllegalBalance, RequiredHoldFailed, AnotherEntryExists, WalletNotExist, WalletSuspended, WalletClosed
creditReason:
string

A detailed reason for a wallet operation's result. Provides a context for failures.

Enum: Done, WrongAmount, WrongAsset, IllegalBalance, RequiredHoldFailed, AnotherEntryExists, WalletNotExist, WalletSuspended, WalletClosed
}
]
description:
string maxLength:1024

Transaction description

timeInitiated:
string (date-time)

Date and time when transaction initiated

timeFinalized:
string (date-time)

Date and time when transaction finalized

}
message:
string maxLength:200

Field size: 200

}

Status: 400 - Bad request. Wallet was not found, wrong asset in the operation, etc.

{
Required: result,status
status:
string
Enum: Ok, Fail
result:
string maxLength:200

Response message.

}

Get transaction details

Call this endpoint to obtain a transaction's current state.


/transactions/{txId}

Parameters

Path parameters
Name Description
txId*
String
Transaction ID
Required

Responses

Status: 200 - Successful operation

{
Required: id,operations,referenceId,status,timeFinalized,timeInitiated
id:
string maxLength:30

Transaction ID

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.

status:
string

Transaction status

Enum: Initialized, Negotiating, Negotiated, Completing, Completed, Failing, Failed
operations:
[

Operations details

{
Required: amount,assetId,creditReason,creditResult,creditWalletId,debitReason,debitResult,debitWalletId,id,status,type
id:
string maxLength:30

Operation identifier

type:
string

Operation type.

Enum: Transfer, Issue, Redeem
status:
string

Operation status

Enum: NotStarted, Negotiating, Negotiated, Completing, Completed, Failed, Canceled
debitWalletId:
string maxLength:30

Identifier of the debited wallet

creditWalletId:
string maxLength:30

Identifier of the credited wallet

assetId:
string maxLength:30

Operation asset identifier

amount:
string

Operation amount

description:
string maxLength:1024

Operation description

debitResult:
string

An overall wallet operation's result. It's binary: Success or Failure.

Enum: Success, Failure
creditResult:
string

An overall wallet operation's result. It's binary: Success or Failure.

Enum: Success, Failure
debitReason:
string

A detailed reason for a wallet operation's result. Provides a context for failures.

Enum: Done, WrongAmount, WrongAsset, IllegalBalance, RequiredHoldFailed, AnotherEntryExists, WalletNotExist, WalletSuspended, WalletClosed
creditReason:
string

A detailed reason for a wallet operation's result. Provides a context for failures.

Enum: Done, WrongAmount, WrongAsset, IllegalBalance, RequiredHoldFailed, AnotherEntryExists, WalletNotExist, WalletSuspended, WalletClosed
}
]
description:
string maxLength:1024

Transaction description

timeInitiated:
string (date-time)

Date and time when transaction initiated

timeFinalized:
string (date-time)

Date and time when transaction finalized

}

Status: 404 - Not found

{
Required: result,status
status:
string
Enum: Ok, Fail
result:
string maxLength:200

Response message.

}

List transactions

Retrieve a pageable list of transactions for a specified time period.


/transactions

Parameters

Query parameters
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

Responses

Status: 200 - Successful operation

{

Request to list transactions

Required: transactions
transactions:
[
{
Required: id,operations,referenceId,status,timeFinalized,timeInitiated
id:
string maxLength:30

Transaction ID

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.

status:
string

Transaction status

Enum: Initialized, Negotiating, Negotiated, Completing, Completed, Failing, Failed
operations:
[

Operations details

{
Required: amount,assetId,creditReason,creditResult,creditWalletId,debitReason,debitResult,debitWalletId,id,status,type
id:
string maxLength:30

Operation identifier

type:
string

Operation type.

Enum: Transfer, Issue, Redeem
status:
string

Operation status

Enum: NotStarted, Negotiating, Negotiated, Completing, Completed, Failed, Canceled
debitWalletId:
string maxLength:30

Identifier of the debited wallet

creditWalletId:
string maxLength:30

Identifier of the credited wallet

assetId:
string maxLength:30

Operation asset identifier

amount:
string

Operation amount

description:
string maxLength:1024

Operation description

debitResult:
string

An overall wallet operation's result. It's binary: Success or Failure.

Enum: Success, Failure
creditResult:
string

An overall wallet operation's result. It's binary: Success or Failure.

Enum: Success, Failure
debitReason:
string

A detailed reason for a wallet operation's result. Provides a context for failures.

Enum: Done, WrongAmount, WrongAsset, IllegalBalance, RequiredHoldFailed, AnotherEntryExists, WalletNotExist, WalletSuspended, WalletClosed
creditReason:
string

A detailed reason for a wallet operation's result. Provides a context for failures.

Enum: Done, WrongAmount, WrongAsset, IllegalBalance, RequiredHoldFailed, AnotherEntryExists, WalletNotExist, WalletSuspended, WalletClosed
}
]
description:
string maxLength:1024

Transaction description

timeInitiated:
string (date-time)

Date and time when transaction initiated

timeFinalized:
string (date-time)

Date and time when transaction finalized

}
]
}

Status: 400 - Bad request

{
Required: result,status
status:
string
Enum: Ok, Fail
result:
string maxLength:200

Response message.

}