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

ParameterTypeMandatoryDescription
partnerIdSTRINGYesPartner API key provided
accountNumberSTRINGYesThe account number for which the inquiry is being made.
productCodeSTRINGYesThe product code provided
amountINTYes / NoIt will be based on the category.
zoneIdSTRINGNoThe zoneId is required for the Games Voucher category.
monthINTNoThe 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

ParameterTypeDescription
responseCodeINTStatus of the payment request. Refer to the Response code section/document for more details.
successBOOLEANStatus of Inquiry
messageJSONMessages in Bahasa and English describing the RC above.
dataJSONThe primary payload with the Bill details.

DATA OBJECT

ParameterTypeDescription
inquiryIdINTInquiry ID generated by OpenAPI, which is used towards payment.
accountNumberSTRINGThe account number / IDPEL / Email address towards the payment.
productCode STRINGThe product code sent by the partner toward the transaction.
customerNameSTRINGThe name of the customer whose bill/payment is done.
productNameSTRINGName of the Brand and Product whose inquiry is being done.
categorySTRINGCategory of the product
amountINTThe final amount to be paid for the product/bill. This amount already includes Total Admin Fee.
totalAdminINTTotal Administrative charges.
processingFeeINTThe additional processing fee that is added on behalf of the partner toward its customers
validitySTRINGValidity of the product, if available.
customerDetailsJSON nested objectKey / Value structure nest.JSON object. This object provides customer-specific details regarding the bill.
billDetailsJSON nested objectKey / Value structure nest.JSON object. This object provides Bill specific details regarding the bill. More details about this section below
productDetailsJSON nested objectKey / Value structure nest.JSON object. This object provides product-specific details regarding the bill.
extraFieldsJSON nested objectKey / 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.

ParameterTypeDescription
billIDSTRINGThe ID of the individual bill item. If 0, Bill item cannot be skipped in payment.
billInfoJSON ObjectKey / 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