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:
- A verified Atlas account. If you don't have one, you can sign up for free and follow this guide to verify your Atlas account.
- An Atlas API Key. You can fetch your API Key from your Atlas dashboard .
- Configured and setup webhooks on Atlas. See our guide on Configuring and Verifying Atlas webhooks.
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 whentypeis"individual".last_name: The customer's last name. It is required whentypeis"individual".business_name: The customer's business name. It is required whentypeis"business".has_wallet: Set totrueto provision a virtual account for the customer. Defaults tofalse.
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):
{
"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"
}Related guides
How is this guide?
Last updated on
How to Withdraw Money from Atlas
Step-by-step guide to sending a bank transfer payout from Atlas, including fetching bank codes, resolving account names, and initiating the transfer via the API.
Atlas Go-Live Checklist
Pre-launch checklist for going live with Atlas covering account creation, compliance verification, webhook configuration, end-to-end encryption setup, and sandbox testing.