Status
Endpoint
https://XXXX.XXXX.XXXX.id/api/v2/bill/status
Request
Here are examples of how to send a status request to the OpenAPI system.
Sample Status request
curl --location --request POST 'https://XXXX.XXXXXX.id/api/v2/bill/status' \
--header 'accept: application/json' \
--header 'KEY: UP0t6fB4qZ7j' \
--header 'TOKEN: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJwYXJ0bmVySWQiOiJVUDB0NmZCNHFaN2oiLCJyZWZOdW1iZXIiOiJwcmR0ZXN0dGQxMTM0NSJ9.FLoYjMchcJkZmPDLn8OqEVL_1ud--q7yDNXaal_TZDY' \
--header 'VERSION: 2.0' \
--header 'Content-Type: application/json'
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://dev.openapi.ayopop.id/api/v1/bill/status"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("accept", "application/json")
req.Header.Add("KEY", "API Key")
req.Header.Add("TOKEN", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVySWQiOiI3MGE4YjE3Zi02ZDkwLTRlMjYtYjZmMC02OTJkOWI1ODFhZDgiLCJhY2NvdW50TnVtYmVyIjoiNTQ3MTAyOTAxNTAwIiwiYW1vdW50IjoxOTU4OTYsInByb2R1Y3RDb2RlIjoiVExQUCIsInJlZk51bWJlciI6IjY1NDkiLCJpbnF1aXJ5SWQiOjMwNTd9.sPbm__SsSFhD3dkTybTY8o19RMopgG5vYYfsac7a2m8")
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", "")
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/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => array(
"Accept-Encoding: gzip, deflate",
"Cache-Control: no-cache",
"Connection: keep-alive",
"Content-Length: ",
"Content-Type: application/json",
"Host: dev.openapi.ayopop.id",
"KEY: API Key",
"TOKEN: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVySWQiOiI3MGE4YjE3Zi02ZDkwLTRlMjYtYjZmMC02OTJkOWI1ODFhZDgiLCJhY2NvdW50TnVtYmVyIjoiNTQ3MTAyOTAxNTAwIiwiYW1vdW50IjoxOTU4OTYsInByb2R1Y3RDb2RlIjoiVExQUCIsInJlZk51bWJlciI6IjY1NDkiLCJpbnF1aXJ5SWQiOjMwNTd9.sPbm__SsSFhD3dkTybTY8o19RMopgG5vYYfsac7a2m8",
"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/status",
method: "POST",
headers: {
accept: "application/json",
KEY: "API Key",
TOKEN:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVySWQiOiI3MGE4YjE3Zi02ZDkwLTRlMjYtYjZmMC02OTJkOWI1ODFhZDgiLCJhY2NvdW50TnVtYmVyIjoiNTQ3MTAyOTAxNTAwIiwiYW1vdW50IjoxOTU4OTYsInByb2R1Y3RDb2RlIjoiVExQUCIsInJlZk51bWJlciI6IjY1NDkiLCJpbnF1aXJ5SWQiOjMwNTd9.sPbm__SsSFhD3dkTybTY8o19RMopgG5vYYfsac7a2m8",
VERSION: "1.0",
"Content-Type": "application/json",
"Cache-Control": "no-cache",
Host: "dev.openapi.ayopop.id",
"Accept-Encoding": "gzip, deflate",
"Content-Length": "",
Connection: "keep-alive",
"cache-control": "no-cache"
}
};
$.ajax(settings).done(function(response) {
console.log(response);
});
Sample body payload
{
"partnerId": "partner_api_key",
"refNumber": "1122FS64443478"
}
Status API follows the same response structure which Payment API does. Click Here
Updated 9 months ago