Raw

API to download receipt with JSON/XML format after making prepaid transaction.

In production environment, you must whitelist your IP here to be able to download receipt.

Path

MethodPath
GETapi/download/:tr_id/:raw

Request Header

The Content-Type header in the request must be set appropriately to JSON or XML, depending on the desired format of the raw response.

JSON
Content-Type: application/json
XML
Content-Type: application/xml

Path Parameters

AttributesTypeDescriptionMandatory
tr_idIntegerTransaction idYes
rawIntegerInput 1 if you want to receive raw receipt formatNo

Path Example

Path to download receipt in JSON or XML format.

BASE_URL/api/download/123/1

Response

Raw receipt response will be in JSON/XML format based on the request Content-Type header.

AttributesTypeDescriptionMandatory
tr_idIntegerTransaction IDNo
dateStringTransaction DateNo
nameStringYour registered name in IAKNo
customer_idStringCustomer destination numberNo
product_codeStringProduct CodeNo
admin_feeStringAdmin FeeNo
priceStringTransaction total that must be paid by customerNo
snStringSerial Number. See here for SN formatNo
ref_idStringYour order number / reference IDNo
rcStringResponse code. See response code listYes
messageStringMessageYes
statusDoubleTransaction Status. List of status:
0:PROCESS 1:SUCCESS 2:FAILED
Yes

Success RAW Receipt Response Example

{
    "data": {
        "tr_id": 123,
        "date": "2024-01-01 00:01:01",
        "name": "indobest",
        "customer_id": "123123123",
        "product_code": "htelkomsel5000",
        "admin_fee": 0,
        "price": 5500,
        "sn": "123456789",
        "ref_id": "order001",
        "rc": "00",
        "message": "SUCCESS",
        "status": 1
    }
}
<?xml version="1.0"?>
<mp>
<tr_id>123</tr_id>
<date>2024-01-01 00:01:01</date>
<name>indobest</name>
<customer_id>123123123</customer_id>
<product_code>htelkomsel5000</product_code>
<admin_fee>0</admin_fee>
<price>5500</price>
<sn>123456789</sn>
<ref_id>order001</ref_id>
<rc>00</rc>
<message>SUCCESS</message>
<status>1</status>
</mp>

Failed Transaction Response Example

These response indicate a failed transaction status.

{
    "data": {
        "rc": "07",
        "message": "FAILED",
        "status": 2
    }
}
<?xml version="1.0"?>
<mp>
    <rc>07</rc>
    <message>FAILED</message>
    <status>2</status>
</mp>

Pending Transaction Response Example

These response indicate a pending transaction status.

{
    "data": {
        "rc": "39",
        "message": "PROCESS",
        "status": 0
    }
}
<?xml version="1.0"?>
<mp>
<rc>39</rc>
<message>PROCESS</message>
<status>0</status>
</mp>