Skip to main content

Customer Accounts

Purpose​

Customer accounts represent the financial products and services linked to each user. These accounts are essential for processing financial transactions and managing customer funds.

When to use​

Create an account after successfully onboarding a user and completing KYC verification. Update or close accounts as needed throughout the customer lifecycle.

Character Support

Only Latin characters are supported for account creation. Ensure all user data uses Latin alphabet characters to avoid creation failures.

Testing Endpoints​

You can test these endpoints directly in our API Sandbox.

Account Lifecycle​

The typical lifecycle of a customer account follows these stages:

  1. List Products: Retrieve available product types to determine which accounts to create
  2. Create Account: Open an account of a specific product type
  3. Manage Account: View account details, retrieve balances, etc.
  4. Close Account: When the customer no longer needs the account

Available Product Types​

Before creating a customer account, you need to determine which product types are available for your integration.

Endpoint​

GEThttps://sandbox.revsto.com/api/distributor/v1/products
Required Scopes: account_view
curl -X GET "https://sandbox.revsto.com/api/distributor/v1/products" \
-H "Authorization: Bearer your_api_token"

Sample Response​

List Products Response
{
"items": [
{
"id": "235",
"type": "CURRENT",
"currency": "EUR",
"name": "REVSTO_TESTING EUR",
"profiles": [
306,
309
]
},
{
"id": "242",
"type": "CURRENT",
"currency": "EUR",
"name": "REVSTO TEST C2B",
"profiles": [
306,
309
]
},
{
"id": "251",
"type": "CURRENT",
"currency": "EUR",
"name": "REVSTO TEST C2B 1.7_0.25",
"profiles": [
306,
309
]
}
],
"count": 3,
"limit": 20,
"offset": 0,
"sort": "+id"
}

Create an Account​

Create financial accounts for users who have completed the KYC process.

Endpoint​

POSThttps://sandbox.revsto.com/api/distributor/v1/users/{userId}/accounts
Required Scopes: account_creation

Code Examples​

curl -X POST "https://sandbox.revsto.com/api/distributor/v1/users/{userId}/accounts" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your_api_token" \
-d '{"productId": 235}'

Request Body​

Create Account Request
{
"productId": 235
}

Sample Response​

Create Account Response
{
"id": "10000097583",
"externalId": null,
"userId": 3633,
"productId": 235,
"status": "OPENED",
"label": "REVSTO_TESTING EUR #10000097583",
"balance": {
"value": 0,
"currency": "EUR"
},
"availableBalance": {
"value": 0,
"currency": "EUR"
},
"createdAt": "2025-05-08T14:45:37+03:00",
"lastUsedAt": "2025-05-08T14:45:37+03:00"
}

Account Creation Parameters​

ParameterRequiredDescription
productIdYesThe ID of the product to create (from the List Products endpoint)

Get Account Details​

Retrieve detailed information about a specific account.

Endpoint​

GEThttps://sandbox.revsto.com/api/distributor/v1/accounts/{accountId}
Required Scopes: account_view
curl -X GET "https://sandbox.revsto.com/api/distributor/v1/accounts/{accountId}" \
-H "Authorization: Bearer your_api_token"

Sample Response​

Account Details Response
{
"id": "10000096916",
"externalId": null,
"userId": 3630,
"productId": 235,
"status": "OPENED",
"label": "REVSTO_TESTING EUR #10000096916",
"balance": {
"value": 997480,
"currency": "EUR"
},
"availableBalance": {
"value": 997480,
"currency": "EUR"
},
"createdAt": "2025-05-05T16:39:51+03:00",
"lastUsedAt": "2025-05-08T14:37:51+03:00",
"iban": "DK6189000021685625",
"bic": "SXPYDKKKXXX"
}

Account Status Values​

StatusDescription
PENDINGAccount created but not yet active
OPENEDAccount is active and can be used for transactions
SUSPENDEDAccount temporarily suspended
CLOSEDAccount permanently closed

List All Accounts​

Retrieve all accounts managed by the distributor.

Endpoint​

GEThttps://sandbox.revsto.com/api/distributor/v1/accounts
Required Scopes: account_view
curl -X GET "https://sandbox.revsto.com/api/distributor/v1/accounts" \
-H "Authorization: Bearer your_api_token"

Sample Response​

List Accounts Response
{
"items": [
{
"id": "10000008325",
"externalId": null,
"userId": 1016,
"productId": 8,
"status": "OPENED",
"label": "Distributor Current account Revsto (EUR) #10000008325",
"balance": {
"value": 0,
"currency": "EUR"
},
"availableBalance": {
"value": 0,
"currency": "EUR"
},
"createdAt": "2024-06-21T15:20:46+03:00",
"lastUsedAt": "2024-06-21T15:20:46+03:00",
"iban": "DK7289000020669352",
"bic": "SXPYDKKKXXX"
},
{
"id": "10000096916",
"externalId": null,
"userId": 3630,
"productId": 235,
"status": "OPENED",
"label": "REVSTO_TESTING EUR #10000096916",
"balance": {
"value": 997480,
"currency": "EUR"
},
"availableBalance": {
"value": 997480,
"currency": "EUR"
},
"createdAt": "2025-05-05T16:39:51+03:00",
"lastUsedAt": "2025-05-08T14:37:51+03:00",
"iban": "DK6189000021685625",
"bic": "SXPYDKKKXXX"
}
],
"count": 2,
"limit": 20,
"offset": 0,
"sort": "+ids"
}

Close an Account​

Close an account when it's no longer needed. This operation is irreversible.

Endpoint​

DELETEhttps://sandbox.revsto.com/api/distributor/v1/accounts/{accountId}
caution

Before closing an account, ensure that:

  1. The account has a zero balance or has been emptied
  2. There are no pending transactions
  3. Any recurring payments or direct debits have been canceled
Required Scopes: account_close
curl -X DELETE "https://sandbox.revsto.com/api/distributor/v1/accounts/{accountId}" \
-H "Authorization: Bearer your_api_token"

Sample Response​

Returns 200 OK on successful account closure.

Close User Account​

Close a user account, which automatically closes all associated product accounts. The balance of all accounts should be 0 before closure.

Endpoint​

DELETEhttps://sandbox.revsto.com/api/distributor/v1/users/{userId}
caution

This operation will close the user account and all associated product accounts. Ensure all account balances are zero before proceeding.

Required Scopes: user_deactivate
curl -X DELETE "https://sandbox.revsto.com/api/distributor/v1/users/{userId}" \
-H "Authorization: Bearer your_api_token"

Response​

Returns 200 OK on successful user closure.

Account Balances​

When retrieving account details, you may notice two different balance fields:

FieldDescription
balanceThe total amount of money in the account, including any pending transactions
availableBalanceThe amount available for immediate use, excluding holds, pending transactions, etc.

Best Practices​

  1. Create Multiple Accounts: Consider creating multiple accounts for different purposes (e.g., one for savings, one for daily transactions).

  2. Handle Currency Correctly: Be aware of currency-specific restrictions for each product type.

  3. Monitor Account Status: Subscribe to account status change events via webhooks to stay informed about account changes.

  4. Implement Proper Error Handling: Be prepared to handle rejection scenarios, such as when an account cannot be created due to KYC issues.

  5. Store Reference IDs: Always store both the userId and accountId for future reference and transaction processing.

Next Steps​

After creating accounts, you can proceed to:

  1. Fund the accounts (see Money Payment Flows)
  2. Set up recurring transactions
  3. Process financial transactions

See the Money Payment Flows section for details on processing transactions.