Inquiry
Endpoint
https://XXXX.XXXX.XXXX.id/api/v2/bill/check
Request
Here is an example of how to send an inquiry request to the OpenAPI system.
The body for the token is defined below
Parameter | Type | Mandatory | Description |
---|---|---|---|
partnerId | STRING | Yes | Partner API key provided |
accountNumber | STRING | Yes | The account number for which the inquiry is being made. |
productCode | STRING | Yes | The product code provided |
amount | INT | Yes / No | It will be based on the category. |
zoneId | STRING | No | The zoneId is required for the Games Voucher category. |
month | INT | No | The month is required for the BPJS category. Specify the number of months for which the inquiry is to be done. |
Sample Inquiry request
curl --location --request POST 'https://XXX.XXXXXXX.XXXXXXX.id/api/v2/bill/check' \
--header 'KEY: UP0t6fB4qZ7j' \
--header 'VERSION: 2.0' \
--header 'Content-Type: application/json' \
--header 'Token: eyzI1NiJ9.eyJwYXJ0bmVySWQiOiJVUDB0NmZCNHFaN2oiLCJwcm9kdWN0Q29kZSI6IlBQTFNUSzEwIiwiYWNjb3VudE51bWJlciI6IjA4MTI2NTUyNjUyIn0.Gz1t5H0M_MeewnOGNKQQAoEEHPsIemL36jBGQs7leQE'
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://dev.openapi.ayopop.id/api/v1/bill/check"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("accept", "application/json")
req.Header.Add("KEY", "API Key")
req.Header.Add("TOKEN", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVySWQiOiI3MGE4YjE3Zi02ZDkwLTRlMjYtYjZmMC02OTJkOWI1ODFhZDgiLCJhY2NvdW50TnVtYmVyIjoiNTQ3MTAyOTAxNTAwIiwicHJvZHVjdENvZGUiOiJUTFBQIn0.dHvS0btF4dZlFDlydYR8-KyHxQWPUcIVWOwY97B3s5U")
req.Header.Add("VERSION", "1.0")
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Cache-Control", "no-cache")
req.Header.Add("Host", "dev.openapi.ayopop.id")
req.Header.Add("Accept-Encoding", "gzip, deflate")
req.Header.Add("Content-Length", "2")
req.Header.Add("Connection", "keep-alive")
req.Header.Add("cache-control", "no-cache")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://dev.openapi.ayopop.id/api/v1/bill/check",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{}",
CURLOPT_HTTPHEADER => array(
"Accept-Encoding: gzip, deflate",
"Cache-Control: no-cache",
"Connection: keep-alive",
"Content-Length: 2",
"Content-Type: application/json",
"Host: dev.openapi.ayopop.id",
"KEY: API Key",
"TOKEN: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVySWQiOiI3MGE4YjE3Zi02ZDkwLTRlMjYtYjZmMC02OTJkOWI1ODFhZDgiLCJhY2NvdW50TnVtYmVyIjoiNTQ3MTAyOTAxNTAwIiwicHJvZHVjdENvZGUiOiJUTFBQIn0.dHvS0btF4dZlFDlydYR8-KyHxQWPUcIVWOwY97B3s5U",
"VERSION: 1.0",
"accept: application/json",
"cache-control: no-cache"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
var settings = {
async: true,
crossDomain: true,
url: "https://dev.openapi.ayopop.id/api/v1/bill/check",
method: "POST",
headers: {
accept: "application/json",
KEY: "API Key",
TOKEN:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVySWQiOiI3MGE4YjE3Zi02ZDkwLTRlMjYtYjZmMC02OTJkOWI1ODFhZDgiLCJhY2NvdW50TnVtYmVyIjoiNTQ3MTAyOTAxNTAwIiwicHJvZHVjdENvZGUiOiJUTFBQIn0.dHvS0btF4dZlFDlydYR8-KyHxQWPUcIVWOwY97B3s5U",
VERSION: "1.0",
"Content-Type": "application/json",
"Cache-Control": "no-cache",
Host: "dev.openapi.ayopop.id",
"Accept-Encoding": "gzip, deflate",
"Content-Length": "2",
Connection: "keep-alive",
"cache-control": "no-cache"
},
processData: false,
data: "{}"
};
$.ajax(settings).done(function(response) {
console.log(response);
});
Sample Inquiry body payload
{
"partnerId": "UP0t6fB4qZ7j",
"productCode": "PPLSTK10",
"accountNumber": "811081215474224"
}
Sample Inquiry Response (Prepaid) - Success
{
"responseCode": 300,
"success": true,
"message": {
"ID": "Inkuiri berhasil",
"EN": "Inquiry is successful"
},
"data": {
"inquiryId": 626479,
"accountNumber": "0814111111200",
"customerName": "",
"productName": "Indosat Pulsa 25.000 -AR",
"productCode": "PLSPRIDA25K",
"category": "Pulsa",
"amount": 25100,
"totalAdmin": 0,
"processingFee": 0,
"denom": "",
"validity": "",
"customerDetail": [],
"billDetails": [],
"productDetails": [],
"extraFields": []
}
}
Sample Inquiry Response (Prepaid) - Failed
{
"responseCode": 313,
"success": false,
"message": {
"ID": "The inquiry amount must be greater than the minimum plus admin fees",
"EN": "The inquiry amount must be greater than the minimum plus admin fees"
},
"data": {
"inquiryId": 1919706,
"accountNumber": "06285714208600",
"customerName": "",
"productName": "LinkAja Linkaja",
"productCode": "LAEM",
"category": "eMoney",
"amount": 200,
"totalAdmin": 0,
"processingFee": 0,
"denom": "",
"validity": "",
"customerDetail": [],
"billDetails": [],
"productDetails": [],
"extraFields": []
}
}
TOP LEVEL
Parameter | Type | Description |
---|---|---|
responseCode | INT | Status of the payment request. Refer to the Response code section/document for more details. |
success | BOOLEAN | Status of Inquiry |
message | JSON | Messages in Bahasa and English describing the RC above. |
data | JSON | The primary payload with the Bill details. |
DATA OBJECT
Parameter | Type | Description |
---|---|---|
inquiryId | INT | Inquiry ID generated by OpenAPI, which is used towards payment. |
accountNumber | STRING | The account number / IDPEL / Email address towards the payment. |
productCode | STRING | The product code sent by the partner toward the transaction. |
customerName | STRING | The name of the customer whose bill/payment is done. |
productName | STRING | Name of the Brand and Product whose inquiry is being done. |
category | STRING | Category of the product |
amount | INT | The final amount to be paid for the product/bill. This amount already includes Total Admin Fee. |
totalAdmin | INT | Total Administrative charges. |
processingFee | INT | The additional processing fee that is added on behalf of the partner toward its customers |
validity | STRING | Validity of the product, if available. |
customerDetails | JSON nested object | Key / Value structure nest.JSON object. This object provides customer-specific details regarding the bill. |
billDetails | JSON nested object | Key / Value structure nest.JSON object. This object provides Bill specific details regarding the bill. More details about this section below |
productDetails | JSON nested object | Key / Value structure nest.JSON object. This object provides product-specific details regarding the bill. |
extraFields | JSON nested object | Key / Value structure nest.JSON object. This object provides additional details regarding the bill. |
BILL DETAILS OBJECT
Each billDetails
object has a structure like the one defined below. Each object will have abillId
parameter, which, if applicable, will be the bill Item ID corresponding to an individual bill.
Parameter | Type | Description |
---|---|---|
billID | STRING | The ID of the individual bill item. If 0 , Bill item cannot be skipped in payment. |
billInfo | JSON Object | Key / Value pair of the item details with name and amount. |
**Note: All the above responses are for a specific category, and Responses may vary based on the categories.
For the category-specific response, please refer to Categorised Response
Updated 9 months ago