Callback

IAK will send response to your callback URL to inform you about prepaid transaction you did before. There are only two possible response that IAK will send to your callback URL: success/failed response.

See here how to secure your callback

Production

In production environment, IAK will send the response to your callback URL automatically.

Set your production callback URL here

Development

In development environment, IAK don't send response automatically to your callback URL. You can simulate the response to your callback URL through sandbox report.

Set your development callback URL here

Learn more about sandbox report

Path

MethodPath
POSTYour callback URL

Response parameter

IAK will send below response to your callback URL for both version 1 and version 2.

See the different between version 1 and 2 here

FieldTypeDescriptionMandatory
ref_idStringYour order number / reference ID (must unique)Yes
statusStringTransaction status. List of status:
0:PROCESS 1: SUCCESS 2:FAILED
Yes
codeStringProduct CodeYes
hpStringCustomer IDYes
priceStringProduct priceYes
messageStringTopup messageYes
snStringSerial number. See sn formatNo
pinStringPin. Will only appear in several Games VouchersNo
activation_codeStringActivation Code. Will only appear in Esim ProductNo
balanceStringFinal balanceYes
tr_idStringIAK transaction IDYes
rcStringIAK response code. See rc listYes
signStringmd5(username+api_key+ref_id)Yes
FieldTypeDescriptionMandatory
ref_idStringYour order number / reference ID (must unique)Yes
statusStringTransaction status. List of status:
0:PROCESS 1: SUCCESS 2:FAILED
Yes
product_codeStringProduct CodeYes
customer_idStringCustomer IDYes
priceStringProduct priceYes
messageStringTopup messageYes
snStringSerial number. See sn formatNo
pinStringPin. Will only appear in several Games VouchersNo
activation_codeStringActivation Code. Will only appear in Esim ProductNo
balanceStringFinal balanceYes
tr_idStringIAK transaction IDYes
rcStringIAK response code. See rc listYes
signStringmd5(username+api_key+ref_id)Yes

Success Response Example

Below is the example of success response that will sent to your callback URL.

  1. Game

JSON

{
  "data": {
    "ref_id": "order001",
    "status": "1",
    "code": "hsteam12000",
    "hp": "0817777215",
    "price": "16500",
    "message": "SUCCESS",
    "sn": "ABCD-EFGH-IJKL-MNOP",
    "pin": "123456789",
    "balance": "996994749",
    "tr_id": "3487",
    "rc": "00",
    "sign": "96e1028f6beaa817ee3670a39c01c69d"
  }
}

XML

<?xml version="1.0" encoding="UTF-8" ?>
<mp>
  <ref_id>order001</ref_id>
  <status>1</status>
  <code>hsteam12000</code>
  <hp>0817777215</hp>
  <price>16500</price>
  <message>SUCCESS</message>
  <sn>ABCD-EFGH-IJKL-MNOP</sn>
  <pin>123456789</pin>
  <balance>996994749</balance>
  <tr_id>3487</tr_id>
  <rc>00</rc>
  <sign>96e1028f6beaa817ee3670a39c01c69d</sign>
</mp>

JSON

{
  "data": {
    "ref_id": "order001",
    "status": "1",
    "product_code": "hsteam12000",
    "customer_id": "0817777215",
    "price": "16500",
    "message": "SUCCESS",
    "sn": "ABCD-EFGH-IJKL-MNOP",
    "pin": "123456789",
    "balance": "996994749",
    "tr_id": "3487",
    "rc": "00",
    "sign": "96e1028f6beaa817ee3670a39c01c69d"
  }
}

XML

<?xml version="1.0" encoding="UTF-8" ?>
<mp>
  <ref_id>order001</ref_id>
  <status>1</status>
  <product_code>hsteam12000</product_code>
  <customer_id>0817777215</customer_id>
  <price>16500</price>
  <message>SUCCESS</message>
  <sn>ABCD-EFGH-IJKL-MNOP</sn>
  <pin>123456789</pin>
  <balance>996994749</balance>
  <tr_id>3487</tr_id>
  <rc>00</rc>
  <sign>96e1028f6beaa817ee3670a39c01c69d</sign>
</mp>
  1. Esim

JSON

{
  "data": {
    "ref_id": "order001",
    "status": "1",
    "code": "hsteam12000",
    "hp": "0817777215",
    "price": "16500",
    "message": "SUCCESS",
    "sn": "ABCD-EFGH-IJKL-MNOP",
    "activation_code": "LPA:1$v1-aktivasi-esim.com$9876543210123456789ABCDEFGHGFEDC",
    "balance": "996994749",
    "tr_id": "3487",
    "rc": "00",
    "sign": "96e1028f6beaa817ee3670a39c01c69d"
  }
}

XML

<?xml version="1.0" encoding="UTF-8" ?>
<mp>
  <ref_id>order001</ref_id>
  <status>1</status>
  <code>hsteam12000</code>
  <hp>0817777215</hp>
  <price>16500</price>
  <message>SUCCESS</message>
  <sn>ABCD-EFGH-IJKL-MNOP</sn>
  <activation_code>LPA:1$v1-aktivasi-esim.com$9876543210123456789ABCDEFGHGFEDC</activation_code>
  <balance>996994749</balance>
  <tr_id>3487</tr_id>
  <rc>00</rc>
  <sign>96e1028f6beaa817ee3670a39c01c69d</sign>
</mp>

JSON

{
  "data": {
    "ref_id": "order001",
    "status": "1",
    "product_code": "hsteam12000",
    "customer_id": "0817777215",
    "price": "16500",
    "message": "SUCCESS",
    "sn": "ABCD-EFGH-IJKL-MNOP",
    "activation_code": "LPA:1$v1-aktivasi-esim.com$9876543210123456789ABCDEFGHGFEDC",
    "balance": "996994749",
    "tr_id": "3487",
    "rc": "00",
    "sign": "96e1028f6beaa817ee3670a39c01c69d"
  }
}

XML

<?xml version="1.0" encoding="UTF-8" ?>
<mp>
  <ref_id>order001</ref_id>
  <status>1</status>
  <product_code>hsteam12000</product_code>
  <customer_id>0817777215</customer_id>
  <price>16500</price>
  <message>SUCCESS</message>
  <sn>ABCD-EFGH-IJKL-MNOP</sn>
  <activation_code>LPA:1$v1-aktivasi-esim.com$9876543210123456789ABCDEFGHGFEDC</activation_code>
  <balance>996994749</balance>
  <tr_id>3487</tr_id>
  <rc>00</rc>
  <sign>96e1028f6beaa817ee3670a39c01c69d</sign>
</mp>
  1. Other Products

JSON

{
  "data": {
    "ref_id": "order002",
    "status": "1",
    "code": "xld25000",
    "hp": "0817777215",
    "price": "25000",
    "message": "SUCCESS",
    "sn": "123456789",
    "balance": "997061249",
    "tr_id": "3482",
    "rc": "00",
    "sign": "96e1028f6beaa817ee3670a39c01c69d"
  }
}

XML

<?xml version="1.0" encoding="UTF-8" ?>
<mp>
  <ref_id>order002</ref_id>
  <status>1</status>
  <code>xld25000</code>
  <hp>0817777215</hp>
  <price>25000</price>
  <message>SUCCESS</message>
  <sn>123456789</sn>
  <balance>997061249</balance>
  <tr_id>3482</tr_id>
  <rc>00</rc>
  <sign>96e1028f6beaa817ee3670a39c01c69d</sign>
</mp>

JSON

{
  "data": {
    "ref_id": "order002",
    "status": "1",
    "product_code": "xld25000",
    "customer_id": "0817777215",
    "price": "25000",
    "message": "SUCCESS",
    "sn": "123456789",
    "balance": "997061249",
    "tr_id": "3482",
    "rc": "00",
    "sign": "96e1028f6beaa817ee3670a39c01c69d"
  }
}

XML

<?xml version="1.0" encoding="UTF-8" ?>
<mp>
  <ref_id>order002</ref_id>
  <status>1</status>
  <product_code>xld25000</product_code>
  <customer_id>0817777215</customer_id>
  <price>25000</price>
  <message>SUCCESS</message>
  <sn>123456789</sn>
  <balance>997061249</balance>
  <tr_id>3482</tr_id>
  <rc>00</rc>
  <sign>96e1028f6beaa817ee3670a39c01c69d</sign>
</mp>

Failed Response Example

Below is the example of failed response that will sent to your callback URL.

JSON

{
  "data": {
    "ref_id": "order003",
    "status": "2",
    "code": "xld50000",
    "hp": "0817777215",
    "price": "50000",
    "message": "FAILED",
    "balance": "997011249",
    "tr_id": "3486",
    "rc": "07",
    "sign": "96e1028f6beaa817ee3670a39c01c69d"
  }
}

XML

<?xml version="1.0" encoding="UTF-8" ?>
<mp>
  <ref_id>order003</ref_id>
  <status>2</status>
  <code>xld50000</code>
  <hp>0817777215</hp>
  <price>50000</price>
  <message>FAILED</message>
  <balance>997011249</balance>
  <tr_id>3486</tr_id>
  <rc>07</rc>
  <sign>96e1028f6beaa817ee3670a39c01c69d</sign>
</mp>

JSON

{
  "data": {
    "ref_id": "order003",
    "status": "2",
    "product_code": "xld50000",
    "customer_id": "0817777215",
    "price": "50000",
    "message": "FAILED",
    "balance": "997011249",
    "tr_id": "3486",
    "rc": "07",
    "sign": "96e1028f6beaa817ee3670a39c01c69d"
  }
}

XML

<?xml version="1.0" encoding="UTF-8" ?>
<mp>
  <ref_id>order003</ref_id>
  <status>2</status>
  <product_code>xld50000</product_code>
  <customer_id>0817777215</customer_id>
  <price>50000</price>
  <message>FAILED</message>
  <balance>997011249</balance>
  <tr_id>3486</tr_id>
  <rc>07</rc>
  <sign>96e1028f6beaa817ee3670a39c01c69d</sign>
</mp>

Tutorial Video

You can see this video for callback code explanation using Laravel.

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