POST
/
v1
/
virtual-account
/
simulate
/
transfer
Simulate an Inbound Transfer
const url = 'https://sandboxapi.me-cash.com/v1/virtual-account/simulate/transfer';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
  body: '{"amount":10000,"reference":"TXN_SIM_12345"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
{
  "status": "success",
  "message": "Virtual account credited successfully."
}

Simulate Virtual Account Funding

This endpoint is a crucial tool for testing your integration in our sandbox environment 🧪. It allows you to simulate an incoming bank transfer to a specific virtual account, triggering any associated webhooks and updating the account’s balance.
This endpoint is available only in the sandbox environment and will not work in production. It is designed exclusively for testing purposes.

Endpoint

Use this endpoint to simulate a credit transaction to one of your virtual accounts. POST /v1/virtual-account/simulate/transfer

Request Body

The request body must include the amount and the unique reference of the virtual account you wish to fund.
FieldTypeDescriptionRequired
amountNumberThe amount to be credited, specified in the lowest denomination (e.g., kobo, cents).✅ Yes
referenceStringThe unique reference number for the virtual account you are funding.✅ Yes

Request Example

Here is an example of how to call the endpoint using cURL.
copy
curl --location '{{baseurl}}/v1/virtual-account/simulate/transfer' \
--header 'Content-Type: application/json' \
--header 'x-api-key: YOUR_SANDBOX_API_KEY' \
--data '{
    "amount": 10000,
    "reference": "your_virtual_account_reference"
}'
curl --location '{{baseurl}}/v1/virtual-account/simulate/transfer' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {{apikey}}' \
--data '{
    "amount": 10000,
    "reference": "{{refNumber}}"
}'

Authorizations

x-api-key
string
header
required

Body

application/json

Details of the simulated transfer.

amount
integer
required

The amount to transfer in the lowest currency unit (e.g., cents for USD).

Example:

10000

reference
string
required

A unique reference for the transaction.

Example:

"TXN_SIM_12345"

Response

Transfer simulation successful.

status
string
Example:

"success"

message
string
Example:

"Virtual account credited successfully."