> For the complete documentation index, see [llms.txt](https://devs-organization-21.gitbook.io/fonpayedge-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devs-organization-21.gitbook.io/fonpayedge-api/endpoints/virtualaccounts.md).

# Virtual Accounts

Generate a virtual account for each of your customer using this endpoint

### Code Sample

```php
curl --location 'https://fonpayedge.ng/api/createVirtualAccount/' \
--header 'Token: YOUR_FONPAYEDGE_SECRET_KEY' \
--header 'businessid: YOUR_FONPAYEDGE_BUSINESS_ID' \
--header 'Content-Type: application/json' \
--data-raw '{ 
      "accountName": "John Doe",
      "firstname": "John",
      "lastname": "Doe",
      "phone": "081234XXXXX",
      "email": "johndoe@gmail.com",
      "ref":"1234567890"
    }'


```

### RESPONSE BODY

```
{
    "status": "success",
    "data": {
        "id": "3",
        "businessid": "232333",
        "userid": "5",
        "firstName": "John",
        "lastName": "Doe",
        "phoneNumber": "081234XXXXX",
        "emailAddress": "johndoe@gmail.com",
        "dateCreated": "2025-02-26 14:46:58",
        "dateAdded": "2025-02-26",
        "accountName": "FonPayEdge/Business Name -John Doe",
        "walletBank": "Nomba MFB",
        "bankAccountNumber": "1234",
        "bankAccountName": null,
        "bankName": null,
        "reference": "1234567890"
    }
}

```
