Create a virtual account

Create a single-use virtual account to accept one-time payment.

The single-use account is only valid for one-time use only

Depending on the partner bank you choose, we may require more information. These requirements are at the request of our partnering banks.

URI

POST

https://api.tryduplo.com/v1/virtual-accounts

Parameters

Authorization string

set value to Bearer SECRET_KEY

Body Param

business_id string required

Buisness ID

first_name string required

Customer's first name

last_name string required

Customer's last name

phone_number string required

Customer's phone number

email string required

Customer's email address

bvn string

Customer's bank verification number

metadata string

Customer's specific data - Stringified JSON

is_permanent boolean required

Flags a virtual account as temporary

preferred_banks array

List of Customer's preferred banks

purpose string required

Customer's purpose for creating a virtual account

amount number

Specifies the exact amount a virtual account should receive

If the amount is specified, the customer will only be allowed to pay the exact amount. Any other amount will be rejected

Sample request

curl --location --request POST 'https://api.tryduplo.com/v1/virtual-accounts' \
--header 'Authorization: Bearer SECRET_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
   "first_name": "Pat",
   "last_name": "Daniel",
   "phone_number": "08085279945",
   "email": "patwiksingle@yopmail.com",
   "bvn": "39372746283",
   "is_permanent": false,
   "purpose": "Testing purpose",
   "preferred_banks": [
       {
           "bank_code": "111",
           "bank_name": "Wema Bank",
           "id": "wema"
       }
   ],
   "single_use": true,
   "metadata": "{'invocie': '10093743'}"
}'

Duplo Response

{
    "data": {
        "account_ref": "act_jR8TvmZgiIHV",
        "account_number": "9190000023",
        "is_permanent": true,
        "email": "alindavdsin@gmail.com",
        "status": "active",
        "provider": {
            "bank_code": "111",
            "bank_name": "Wema Bank",
            "id": "wema",
            "credentials": {}
        },
        "created_at": "2022-02-01T18:20:19.000Z",
        "account_name": "David Daniel"
    },
    "errors": {},
    "message": "Account created successfully"
}

Last updated