> ## Documentation Index
> Fetch the complete documentation index at: https://docs.inflowafrica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Virtual accounts

> Assign a virtual bank account to a customer and retrieve their account details.

# Virtual accounts

Virtual accounts give a customer bank-transfer details that are tied to their Inflow customer profile. Create the customer first, then assign the account once and store the returned account details in your system. This is only available for NGN

## Assign an account

Pass the customer ID in the URL. If you omit `provider`, Inflow uses the default configured rail. Set `provider` only when your integration needs a specific supported rail.

```bash theme={null}
curl --request POST "$INFLOW_BASE_URL/v1/customers/4b2a49b2-526c-4c08-b342-f8b1f409c091/virtual-account" \
  --header "Authorization: Bearer $INFLOW_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "provider": "<configured-provider>"
  }'
```

```json theme={null}
{
  "data": {
    "id": "0e2d390c-3dbd-4a6a-b7d1-aceab435d3ef",
    "provider": "<configured-provider>",
    "accounts": [
      {
        "bankCode": "058",
        "bankName": "Guaranty Trust Bank",
        "accountNumber": "0123456789",
        "accountName": "Ada Okafor"
      }
    ]
  }
}
```

<Note>
  The assignment endpoint can return an existing account when one has already been assigned. Make the request part of your customer-onboarding workflow, rather than repeatedly creating accounts at checkout.
</Note>

## Retrieve account details

When you need to display the details again, query the customer's virtual accounts:

```bash theme={null}
curl "$INFLOW_BASE_URL/v1/customers/4b2a49b2-526c-4c08-b342-f8b1f409c091/virtual-accounts" \
  --header "Authorization: Bearer $INFLOW_API_KEY"
```

The response includes each assignment, its provider, and whether it is active. Display the exact `accountName`, `accountNumber`, and `bankName` returned by the API to reduce failed bank transfers.

## Recommended customer experience

Show bank details in a copyable format, and include the account name beside the account number so the customer can confirm the beneficiary before making a transfer. If your application supports multiple bank accounts, label the bank name clearly and avoid asking the customer to type the account number manually.

For the full request and response schema, see [Assign a virtual account](/api-reference/external-api--customers/assign-virtual-account).
