Top Up

Top Up

API to top up prepaid products.

A thing to know

  1. For the first time, top up will always response PROCESSING. IAK will send callback once the transaction become > success / failed. Learn more about callback here
  2. If you top up again with the same ref_id, then it we will not proceed the transaction but it will become check status. Learn more about check status here

Path

MethodPath
POSTapi/top-up

Request Body

AttributesTypeDescriptionMandatory
usernameStringYour registered phone numberYes
ref_idStringYour order number / reference ID ( must unique )Yes
customer_idStringCustomer ID. Supports test case numbers in the last 8 digits for sandboxYes
product_codeStringProduct Code. You can get list of product code in pricelist api or from pricelist hereYes
signStringSignature. Value: md5(username+api_key+ref_id)Yes

A thing to know Here is the customer_id for each product type:

  1. pulsa: Phone Number / MSISDN
  2. data: Phone Number / MSISDN
  3. pln: Meter Number (11 digits)
  4. voucher: Random Number with format 08xxx (12 digits)
  5. esim-international: Random Number with format 08xxx (12 digits)
  6. games: Phone Number for games voucher (we don't send SMS) / Game ID for direct topup. See here for direct topup Game ID.
    Notes: for Steam Sea products, the customer_id format is 081xxx.
  7. international: For international products, especially Alipay, the phone number format is CountryCode_PhoneNumber|Name example 62|62812345678_IAK.


{
  "username"      : "123123123",
  "ref_id"        : "order001",
  "customer_id"   : "0817777215",
  "product_code"  : "xld25000",
  "sign"          : "96e1028f6beaa817ee3670a39c01c69d"
}

Response

AttributesTypeDescriptionMandatory
ref_idStringYour order number / reference ID ( must unique )Yes
statusDoubleTransaction Status. List of status:
0:PROCESS 1:SUCCESS 2:FAILED
Yes
product_codeStringProduct CodeYes
customer_idStringCustomer IDYes
priceDoubleProduct priceYes
messageStringMessageYes
balanceDoubleFinal BalanceYes
tr_idIntegerTransaction IDYes
rcStringResponse code. See response code listYes
{
  "data": {
    "ref_id": "order001",
    "status": 0,
    "product_code": "xld25000",
    "customer_id": "0817777215",
    "price": 25000,
    "message": "PROCESS",
    "balance": 997061249,
    "tr_id": 3482,
    "rc": "39"
  }
}

Live Testing

Request URL
https://prepaid.iak.dev/api/top-up
Request Method
Request Header
Content-Type: application/json
Body
Result

Tutorial Video

You can see this video for top up code explanation using Laravel.

Video thumbnail

Or you can see this video for top up code explanation using PHP.

Video thumbnail