API references
Merchant API

Add a topup

Add funds to your test merchant balance. This simulates an incoming bank transfer settling into your account, letting you build up a balance so you can exercise other endpoints such as sending payouts.

Optionally supply a virtual_account_number to simulate the transfer arriving into one of your virtual accounts.

This endpoint is only available to test merchant accounts. Live merchants are funded through real bank transfers and cannot top up their balance through the API.

The topup settles immediately, so the funds are available in your balance as soon as this call returns.

Endpoint signature
This endpoint requires an API key. Read our authentication guide for more information.
POST https://api.reservepay.com/merchants/add-topup HTTP/1.1
Content-Type: application/json
Accept: application/json
Authorization: Bearer <token>
{
amount: string,
virtual_account_number: string?,
transaction_id: string?,
sender_account_name: string?,
sender_account_number: string?,
sender_bank_code: string?,
}
Returns: string
New to Reservepay? Read our guide on how to call endpoints to get started.
Request arguments
amount string

Required. The topup amount in the smallest currency unit (e.g. satang). For example, use 10000 for 100 THB. Must be a positive integer.

virtual_account_number string

Optional. An optional bank-assigned virtual account number belonging to your merchant account. When supplied, the topup is recorded against that virtual account, simulating a transfer arriving into it.

transaction_id string

Optional. An optional bank transaction reference to record against the topup.

sender_account_name string

Optional. An optional name of the sender's bank account.

sender_account_number string

Optional. An optional sender's bank account number.

sender_bank_code string

Optional. An optional sender's 3-digit bank code.

Errors specific to this endpoint
NOT_ALLOWED

Topups can only be added to test merchant accounts. This error occurs when the authenticated merchant is a live account.

NOT_FOUND

This error occurs when a virtual_account_number is supplied but no virtual account with that number exists in your merchant account.

Errors common to all endpoints
UNHANDLED_ERROR

This error occurs when the server encounters an unexpected internal error that it cannot handle gracefully. This typically happens due to bugs, infrastructure issues, or edge cases that weren't anticipated during development.

INVALID_ARGUMENTS

This error occurs when the request contains invalid or missing parameters. Common cases include missing required fields, or values that don't match the expected format or type.

BAD_VERSION

This error occurs when making requests to an API version that does not exist. This commonly happens when using an outdated SDK or when the API version specified in the request URL is incorrect.

CODE SAMPLES
curl
curl "https://api.reservepay.com/merchants/add-topup" \
  -X POST
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $(RESERVEPAY_API_KEY)" \
  -d '{
        "amount": "10000"
      }'
Learn how to run these code samples in your terminal by reading our guide.