> For the complete documentation index, see [llms.txt](https://docs.vpay.africa/vpay-api-specification-basic-gude/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vpay.africa/vpay-api-specification-basic-gude/methods/update-virtual-account-customer.md).

# update virtual account/customer

{% hint style="info" %}
Each customer you create is provisioned with a VFD MFB virtual account by default. In order to link other bank accounts to your customer, you must pass an array of desired bank codes to this endpoint. Available banks are:

\
1\) Providus Bank (Code: 000023)
{% endhint %}

{% hint style="warning" %}
This endpoint will asynchronously process your request bank by bank and send a response payload to your custom web hook once each requested bank is successfully added to your customer. Presently, you may request to add this custom web hook to your account in any of the developer support groups. NOTE: This custom webhook is different from your primary webhook that is configured from your dashboard profile settings.
{% endhint %}

{% hint style="danger" %}
This endpoint is throttled to 1 request every 500 milliseconds.
{% endhint %}

Request

<table><thead><tr><th width="196.5">Method</th><th>URL</th></tr></thead><tbody><tr><td><mark style="color:yellow;"><strong>POST</strong></mark></td><td><mark style="color:blue;"><strong>{{baseUrl}}</strong>/api/service/v1/query/customer/otherbanks/virtualaccount/update</mark></td></tr></tbody></table>

<table><thead><tr><th width="195.5">Header</th><th width="348">Value</th><th></th></tr></thead><tbody><tr><td>Content-Type</td><td>application/json</td><td></td></tr><tr><td>publicKey</td><td>{{publicKey}}</td><td></td></tr><tr><td>b-access-token</td><td>{{accessToken}}</td><td>Use the accessToken that was given in response to /api/service/v1/query/merchant/login</td></tr></tbody></table>

<table><thead><tr><th width="182">Request Body</th><th width="122">Type</th><th width="246.66666666666663">Description</th><th></th></tr></thead><tbody><tr><td>vfdvirtualaccount</td><td>string</td><td>VFD account for the customer</td><td>Mandatory</td></tr><tr><td>banks</td><td>array</td><td>Array of bankcodes of the banks you want to update the customer with</td><td>Mandatory</td></tr></tbody></table>

Request Payload Sample

```
{
  "vfdvirtualaccount": "4600020122",
  "banks": [
    "000023"
  ]
}
```

Response Payload Sample

```
{
    "status": true,
    "message": "Processing virtual account update to this customer."
}
```

Webhook <mark style="color:green;">Success</mark> Notification: Payload Sample

```
{
  "status": "successful",
  "message": "Providus virtualaccount successfully added for this customer.",
  "data": {
    "_id": "6214f2c3764d690016021e10",
    "email": "yourcustomer@xyz.com",
    "contactfirstname": "A",
    "contactlastname": "Customer",
    "phone": "0000000000",
    "nuban": "4600019908",
    "virtualaccounts": [
      {
        "bank": "Providus Bank",
        "nuban": "9977578909"
      },
      {
        "bank": "VFD MICROFINANCE BANK",
        "nuban": "4620019908"
      }
    ],
    "timestamp": "2023-05-05T09:23:04.064Z"
  }
}
```

Webhook <mark style="color:red;">Failure</mark> Notification: Payload Sample

```
{
  "status": "failed",
  "message": "Bank is already assigned to this customer.",
  "data": {
    "timestamp": "2023-05-05T09:49:43.130Z"
  }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.vpay.africa/vpay-api-specification-basic-gude/methods/update-virtual-account-customer.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
