API Reference

Integration guide for the Topup Voucher API.

Endpoint

POST http://panel.rmtopup.com/api/topup

Request Parameters

Parameter Type Description
api_key
Required
String Your secret API key starting with API-
category_id
Required
Integer The ID of the voucher category you want to purchase.
order_id
Optional
String Your custom unique order ID. If not provided, the system will auto-generate one.

cURL Request

curl -X POST http://panel.rmtopup.com/api/topup \
  -H "Accept: application/json" \
  -d "api_key=API_KEY" \
  -d "order_id=205" \
  -d "category_id=2"

Success Response (200 OK)

{
    "status": "success",
    "message": "Order completed successfully",
    "data": {
        "order_id": "MY-ORD-001",
        "voucher_code": "UPBD-Q-S-02372707 2332-1233-9256-5162",
        "price_deducted": 18.00,
        "current_balance": 482.00
    }
}

Error Response (400 Bad Request)

{
    "status": "error",
    "message": "Insufficient Balance"
}