Gyvar docs

Create a customer's account

Creates a naira account for one of your customers, or returns the one they already have: 201 when created, 200 when it already existed. An individual customer needs `bvn` and `date_of_birth`; their name, email and phone come from the customer. A business customer needs `registration_number` and its representative's `first_name`, `last_name`, `bvn` and `date_of_birth`. Needs the `virtual_accounts` capability.

POST
/virtual-accounts

Authorization

KeyID Timestamp Nonce Signature
X-Gyvar-Key<token>

Your key id, gyv_k_live_... or gyv_k_sandbox_....

In: header

X-Gyvar-Timestamp<token>

Unix seconds. Must be within 5 minutes of our clock.

In: header

X-Gyvar-Nonce<token>

A unique value per request. Replays are rejected.

In: header

X-Gyvar-Signature<token>

Ed25519 signature over the canonical string. See the Signing guide.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

customer_id*string
Formatuuid
currency?string
Default"NGN"
bvn*string

11 digits. A business customer's representative's BVN.

date_of_birth*string

The person's, or the representative's.

Formatdate
reference?string

Your own id for the account.

registration_number?string

Business customers only, with its register prefix, e.g. RC1234567.

representative?

Business customers only.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/virtual-accounts" \  -H "Content-Type: application/json" \  -d '{    "customer_id": "3f6c2b1e-8a4d-4c1e-9b7a-2d5e6f708192",    "bvn": "22345678901",    "date_of_birth": "1990-01-15"  }'
{  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "currency": "NGN",    "account_number": "string",    "account_name": "string",    "bank_name": "string",    "status": "active",    "standing": true,    "holder_type": "individual",    "on_hold": true,    "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",    "reference": "string",    "created_at": "2019-08-24T14:15:22Z"  }}