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
Method | Path |
---|---|
GET | api/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
Path Parameters
Attributes | Type | Description | Mandatory |
---|---|---|---|
tr_id | Integer | Transaction id | Yes |
raw | Integer | Input 1 if you want to receive raw receipt format | No |
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.
Attributes | Type | Description | Mandatory |
---|---|---|---|
tr_id | Integer | Transaction ID | No |
date | String | Transaction Date | No |
name | String | Your registered name in IAK | No |
customer_id | String | Customer destination number | No |
product_code | String | Product Code | No |
admin_fee | String | Admin Fee | No |
price | String | Transaction total that must be paid by customer | No |
sn | String | Serial Number. See here for SN format | No |
ref_id | String | Your order number / reference ID | No |
rc | String | Response code. See response code list | Yes |
message | String | Message | Yes |
status | Double | Transaction 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
}
}
Failed Transaction Response Example
These response indicate a failed transaction status.
{
"data": {
"rc": "07",
"message": "FAILED",
"status": 2
}
}
Pending Transaction Response Example
These response indicate a pending transaction status.
{
"data": {
"rc": "39",
"message": "PROCESS",
"status": 0
}
}