> For the complete documentation index, see [llms.txt](https://chamsswitch.gitbook.io/pelpay-payment-gateway-v1-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chamsswitch.gitbook.io/pelpay-payment-gateway-v1-documentation/virtual-account-payment.md).

# Virtual Account Payment

## Virtual Bank transfer

### Initiate Dynamic Virtual Account Transaction

This API allows you to generate a Dynamic Virtual Account to be assigned to a customer. This is used to initiate a transaction.

#### Request Endpoint

{% embed url="<https://api.pelpay.ng/Payment/process/banktransfer/:adviceReference>" %}

#### Request Body

```json
{
  "bankCode": "035"
}
```

#### Response

**Response Codes**

* **200:** Success
* **400:** Bad Request

**Response Body Example**

```json
{
  "requestSuccessful": true,
  "responseData": {
    "bankName": "Pelpay | Chams ltd",
    "bankCode": "035",
    "bankAccount": "8388485453",
    "paymentReference": "0866ac2d-dadc-40b0-a56f-a2eb7a1cc878",
    "status": "Processing",
    "message": "Processing",
    "amount": 6000,
    "amountPaid": 0,
    "callBackUrl": "https://your_callback_url.com/?adviceReference=ffe1a559-5d9e-47fe-85t7-042316478040&paymentReference=0866ac2d-dadc-40b0-a56f-a2rt7a1cc869",
    "customerName": "Chams Switch"
  },
  "message": "Successful",
  "responseCode": "00"
}
```

### Simulate Payment Endpoint

To Simulate payment, ensure you pass the bearer token retrieved from the authentication login endpoint as the Authorization header to authenticate and authorize the request.

#### **Request Headers:**

* **`Authorization: Bearer {token}`**

This API allows you to push test transactions. Please note that this API is to be used only on the sandbox environment.

**Endpoint:**

{% embed url="<https://api.pelpay.ng/Payment/process/banktransfer/simulate/payment>" %}

#### **Request Body:**

```json
{
    "virtualAccountNumber": "8388485453",
    "amount": "6000"
}
```

#### **Response:**

```json
{
    "requestSuccessful": true,
    "responseData": {
        "bankName": "Pelpay | Chams ltd",
        "bankCode": "035",
        "bankAccount": "8388485453",
        "paymentReference": "c2ea27cbd3cf46f0af99395e0f25wtrs",
        "status": "Successful",
        "message": "Successful",
        "amount": 6000.00,
        "amountPaid": 6000,
        "callBackUrl": "https://your_callback_url.com?adviceReference=fe7b2373-e3c8-488b-a45b-94511a3e2120&paymentReference=c2ea27cbd3cf46f0af99395e0f25caed",
        "customerName": "Chams Switch"
    },
    "message": "Successful",
    "responseCode": "00"
}
```


---

# 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://chamsswitch.gitbook.io/pelpay-payment-gateway-v1-documentation/virtual-account-payment.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.
