Create Virtual Accounts with Atlas

Step-by-step guide to creating a customer with a dedicated virtual account.

This guide walks you through creating a customer on Atlas and automatically provisioning a virtual bank account for that customer. Once created, the virtual account can be used to receive transfers and track customer-specific payments.

Prerequisites

To follow this guide, you need the following:

Creating a virtual account

To create a virtual account, you first need to create a customer. Atlas provisions a wallet and virtual account for the customer when has_wallet is set to true in the request. To create a customer, make a POST request to the Create Customer endpoint with the following fields.

  • email: The customer's email address. This field is required.
  • phone: The customer's phone number in international format (e.g. +2347012345678). This field is required.
  • type: This can be either "individual" or "business". It controls whose name appears on the virtual account. Individual accounts resolve to the customer's name and business accounts resolve to your business name.
  • first_name: The customer's first name. It is required when type is "individual".
  • last_name: The customer's last name. It is required when type is "individual".
  • business_name: The customer's business name. It is required when type is "business".
  • has_wallet: Set to true to provision a virtual account for the customer. Defaults to false.

The request payload differs slightly depending on the customer type:

{
  "first_name": "John",
  "last_name": "Doe",
  "email": "john.doe@example.com",
  "phone": "+2347012345678",
  "type": "individual",
  "has_wallet": true
}

We recommend encrypting the payload before sending it.

curl -X POST "https://atlas.tryduplo.com/api/v1/customer" \
  -H "Authorization: Bearer your_api_key" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "first_name": "John",
    "last_name": "Doe",
    "email": "john.doe@example.com",
    "phone": "+2347012345678",
    "type": "individual",
    "has_wallet": true
  }'

You should get a response similar to the one below (wallet is extracted from the actual response):

JSON
{
  "id": "469e02df-43ae-46e7-8ebc-0b0ab5e19303",
  "walletId": "469e02df-43ae-46e7-8ebc-0b0ab5e19304",
  "businessId": "469e02df-43ae-46e7-8ebc-0b0ab5e19305",
  "currency": "NGN",
  "category": "customer",
  "type": "multi_use",
  "status": "active",
  "accountNumber": "6754358291",
  "accountName": "dp_pay/john doe/john doe",
  "provider": "Zenith Bank"
}

How is this guide?

Last updated on

On this page