Cloud Wallet API RapidApi

RapidApi Projects

A *project* is the first entity you create. 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.*

Create a project

Create a new project.


/projects

Parameters

Body parameters
Name Description
body *

Responses

Status: 201 - Project created


Get project details

Obtain a name and a list of assets for a project.


/projects/{projectId}

Parameters

Path parameters
Name Description
projectId*
String
Project ID
Required

Responses

Status: 200 - Successful operation


List projects

Obtain a list of your projects.


/projects

Parameters

Responses

Status: 200 - Successful operation


Rename a project

Updates the name of a project.


/projects/{projectId}/name

Parameters

Path parameters
Name Description
projectId*
String
Project ID
Required
Body parameters
Name Description
body

Responses

Status: 200 - Project name updated.


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


/projects/{projectId}/assets

Parameters

Path parameters
Name Description
projectId*
String
Project ID
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Successful operation


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.


/projects/{projectId}/assets/{assetId}

Parameters

Path parameters
Name Description
projectId*
String
Project ID
Required
assetId*
String
Asset ID
Required

Responses

Status: 200 - successful operation

Status: 404 - Project not found

Status: 403 - Asset is used


List project's assets

Obtain a list of assets for a project.


/projects/{projectId}/assets

Parameters

Path parameters
Name Description
projectId*
String
Project ID
Required

Responses

Status: 200 - Successful operation


Get asset details

Obtain the details of an asset with provided id.


/projects/{projectId}/assets/{assetId}

Parameters

Path parameters
Name Description
projectId*
String
Project ID
Required
assetId*
String
Asset ID
Required

Responses

Status: 200 - Successful operation

Status: 404 - Asset or project not found


Rename an asset

Update asset's name.


/projects/{projectId}/assets/{assetId}/name

Parameters

Path parameters
Name Description
projectId*
String
Project ID
Required
assetId*
String
Asset ID
Required
Body parameters
Name Description
body *

Responses

Status: 200 - successful operation


RapidApi 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 existing record if a customer with provided id already exists.


/projects/{projectId}/customers

Parameters

Path parameters
Name Description
projectId*
String
Project ID
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Update

Status: 201 - Successful operation


Get customer details

Call this endpoint to obtain a record for a customer with provided ID.


/projects/{projectId}/customers/{customerId}

Parameters

Path parameters
Name Description
projectId*
String
Project ID
Required
customerId*
String
Customer ID
Required

Responses

Status: 200 - Successful operation

Status: 403 - Not allowed

Status: 404 - Customer not found


List customers

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


/projects/{projectId}/customers

Parameters

Path parameters
Name Description
projectId*
String
Project ID
Required
Query parameters
Name Description
page*
Integer (int32)
Page number query parameter
Required
pageSize
Integer (int32)
Page size query parameter

Responses

Status: 200 - Successful operation


Update customer details

Call this endpoint to create or update a record for a customer with provided customer ID.


/projects/{projectId}/customers/{customerId}

Parameters

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

Responses

Status: 200 - successful operation


Suspend a customer

Suspend customer and all their wallets.


/projects/{projectId}/customers/{customerId}/suspend

Parameters

Path parameters
Name Description
projectId*
String
Project ID
Required
customerId*
String
Customer ID
Required

Responses

Status: 200 - Successful operation

Status: 404 - Customer not found


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.


/projects/{projectId}/customers/{customerId}/resume

Parameters

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

Responses

Status: 200 - Successful operation

Status: 404 - Customer not found


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


/projects/{projectId}/customers/{customerId}

Parameters

Path parameters
Name Description
projectId*
String
Project ID
Required
customerId*
String
Customer ID
Required

Responses

Status: 200 - Successful operation

Status: 400 - Not CLOSED wallet exists for customer with specified identifier


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


/projects/{projectId}/wallets

Parameters

Path parameters
Name Description
projectId*
String
Project ID
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Successful operation

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


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.


/projects/{projectId}/system-wallets

Parameters

Path parameters
Name Description
projectId*
String
Project ID
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Successful operation

Status: 400 - Asset not found


Get wallet details

Obtain wallet balance and details.


/projects/{projectId}/wallets/{walletId}

Parameters

Path parameters
Name Description
projectId*
String
Project ID
Required
walletId*
String
Wallet ID
Required

Responses

Status: 200 - Successful operation

Status: 404 - Not found


List customer's wallets

List customer's wallets


/projects/{projectId}/customers/{customerId}/wallets

Parameters

Path parameters
Name Description
projectId*
String
Project ID
Required
customerId*
String
Customer ID
Required

Responses

Status: 200 - Successful operation

Status: 204 - No content

Status: 403 - Not allowed

Status: 404 - Customer not found


List system wallets

Obtain a list of system wallets for this project.


/projects/{projectId}/system-wallets

Parameters

Path parameters
Name Description
projectId*
String
Project ID
Required

Responses

Status: 200 - Successful operation


Change wallet name

Updates wallet name.


/projects/{projectId}/wallets/{walletId}/name

Parameters

Path parameters
Name Description
projectId*
String
Project ID
Required
walletId*
String
Wallet ID
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Successful operation

Status: 404 - Not found


Change wallet description

Updates wallet description.


/projects/{projectId}/wallets/{walletId}/description

Parameters

Path parameters
Name Description
projectId*
String
Project ID
Required
walletId*
String
Wallet ID
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Successful operation

Status: 404 - Not found


Change wallet status

Every wallet is created as Open. Then it is possible to change the status (mode) to one of the following: - *Open* wallets can hold a balance and participate in transactions. May switch to Suspended or Closed. - *Suspended* wallets keep holding their balance, but you’re unable to perform transactions with them. May change back to Active or to Closed. - *Closed* permanently stop transactions with a wallet. Only empty wallets can be closed, and you can't reopen wallets once you’ve closed them.


/projects/{projectId}/wallets/{walletId}/status

Parameters

Path parameters
Name Description
projectId*
String
Project ID
Required
walletId*
String
Wallet ID
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Successful operation

Status: 400 - Wallet status cannot be changed in this direction

Status: 404 - Wallet not found


List operations in wallet's ledger

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


/projects/{projectId}/wallets/{walletId}/entries

Parameters

Path parameters
Name Description
projectId*
String
Project ID
Required
walletId*
String
Wallet ID
Required
Query parameters
Name Description
page*
Integer (int32)
Page number query parameter
Required
pageSize
Integer (int32)
Page size query parameter
from*
Long (int64)
Date from
Required
to*
Long (int64)
Date to
Required

Responses

Status: 200 - Successful operation

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

Status: 404 - Wallet not found


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

Run a new transaction

This call initiates a new transaction. A transaction is a set of operations (one or more) that must be performed together. When a transaction is performed, operations are applied in the order in which they’re listed.   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.


/projects/{projectId}/transactions

Parameters

Path parameters
Name Description
projectId*
String
Project ID
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Successful operation

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


Get transaction details

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


/projects/{projectId}/transactions/{txId}

Parameters

Path parameters
Name Description
projectId*
String
Project ID
Required
txId*
String
Transaction ID
Required

Responses

Status: 200 - Successful operation

Status: 404 - Not found


List transactions

Retrieve a pageable list of transactions for a time period.


/projects/{projectId}/transactions

Parameters

Path parameters
Name Description
projectId*
String
Project ID
Required
Query parameters
Name Description
page*
Integer (int32)
Page number query parameter
Required
pageSize
Integer (int32)
Page size query parameter
from*
Long (int64)
Date from
Required
to*
Long (int64)
Date to
Required

Responses

Status: 200 - successful operation

Status: 400 - Bad request

Status: 404 - Project not found