Inquiry Prepaid (Legacy)
curl --request POST \
--url https://sandbox-biller-b2b.singapay.id/api/v1/prepaid/inquiry \
--header 'Accept: <accept>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-PARTNER-ID: <x-partner-id>' \
--data '
{
"command": "plntok",
"data": {
"customer_id": "14012345678",
"product_code": "SPPLNTOK"
}
}
'import requests
url = "https://sandbox-biller-b2b.singapay.id/api/v1/prepaid/inquiry"
payload = {
"command": "plntok",
"data": {
"customer_id": "14012345678",
"product_code": "SPPLNTOK"
}
}
headers = {
"X-PARTNER-ID": "<x-partner-id>",
"Accept": "<accept>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-PARTNER-ID': '<x-partner-id>',
Accept: '<accept>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
command: 'plntok',
data: {customer_id: '14012345678', product_code: 'SPPLNTOK'}
})
};
fetch('https://sandbox-biller-b2b.singapay.id/api/v1/prepaid/inquiry', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox-biller-b2b.singapay.id/api/v1/prepaid/inquiry",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'command' => 'plntok',
'data' => [
'customer_id' => '14012345678',
'product_code' => 'SPPLNTOK'
]
]),
CURLOPT_HTTPHEADER => [
"Accept: <accept>",
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-PARTNER-ID: <x-partner-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox-biller-b2b.singapay.id/api/v1/prepaid/inquiry"
payload := strings.NewReader("{\n \"command\": \"plntok\",\n \"data\": {\n \"customer_id\": \"14012345678\",\n \"product_code\": \"SPPLNTOK\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-PARTNER-ID", "<x-partner-id>")
req.Header.Add("Accept", "<accept>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox-biller-b2b.singapay.id/api/v1/prepaid/inquiry")
.header("X-PARTNER-ID", "<x-partner-id>")
.header("Accept", "<accept>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"command\": \"plntok\",\n \"data\": {\n \"customer_id\": \"14012345678\",\n \"product_code\": \"SPPLNTOK\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-biller-b2b.singapay.id/api/v1/prepaid/inquiry")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-PARTNER-ID"] = '<x-partner-id>'
request["Accept"] = '<accept>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"command\": \"plntok\",\n \"data\": {\n \"customer_id\": \"14012345678\",\n \"product_code\": \"SPPLNTOK\"\n }\n}"
response = http.request(request)
puts response.read_body{
"command": "plntok",
"response_code": "00",
"response_text": "Inquiry success",
"data": {
"amount": "50000",
"customer_name": "JOHN DOE",
"customer_id": "14012345678",
"reference_number": "SPPLNTOKRJBL0012345678901749548209",
"price": "52500",
"created_at": "2025-06-10 16:36:49"
}
}{
"status": 401,
"success": false,
"error": {
"code": 401,
"message": "Unauthorized merchant, please sign in"
}
}{
"command": "detail-bill-transaction",
"response_code": "04",
"response_text": "Rejected Format Error",
"data": {
"data": "The data field is required.",
"data.transaction_id": "The data.transaction id field is required."
}
}{
"command": "plntok",
"response_code": "99",
"response_text": "System error, please try again"
}Prepaid V1
Inquiry Prepaid (Legacy)
Perform a prepaid product inquiry. Currently supports PLN Token (plntok). Returns product details and a reference number for subsequent payment.
POST
/
api
/
v1
/
prepaid
/
inquiry
Inquiry Prepaid (Legacy)
curl --request POST \
--url https://sandbox-biller-b2b.singapay.id/api/v1/prepaid/inquiry \
--header 'Accept: <accept>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-PARTNER-ID: <x-partner-id>' \
--data '
{
"command": "plntok",
"data": {
"customer_id": "14012345678",
"product_code": "SPPLNTOK"
}
}
'import requests
url = "https://sandbox-biller-b2b.singapay.id/api/v1/prepaid/inquiry"
payload = {
"command": "plntok",
"data": {
"customer_id": "14012345678",
"product_code": "SPPLNTOK"
}
}
headers = {
"X-PARTNER-ID": "<x-partner-id>",
"Accept": "<accept>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-PARTNER-ID': '<x-partner-id>',
Accept: '<accept>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
command: 'plntok',
data: {customer_id: '14012345678', product_code: 'SPPLNTOK'}
})
};
fetch('https://sandbox-biller-b2b.singapay.id/api/v1/prepaid/inquiry', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox-biller-b2b.singapay.id/api/v1/prepaid/inquiry",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'command' => 'plntok',
'data' => [
'customer_id' => '14012345678',
'product_code' => 'SPPLNTOK'
]
]),
CURLOPT_HTTPHEADER => [
"Accept: <accept>",
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-PARTNER-ID: <x-partner-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox-biller-b2b.singapay.id/api/v1/prepaid/inquiry"
payload := strings.NewReader("{\n \"command\": \"plntok\",\n \"data\": {\n \"customer_id\": \"14012345678\",\n \"product_code\": \"SPPLNTOK\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-PARTNER-ID", "<x-partner-id>")
req.Header.Add("Accept", "<accept>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox-biller-b2b.singapay.id/api/v1/prepaid/inquiry")
.header("X-PARTNER-ID", "<x-partner-id>")
.header("Accept", "<accept>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"command\": \"plntok\",\n \"data\": {\n \"customer_id\": \"14012345678\",\n \"product_code\": \"SPPLNTOK\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-biller-b2b.singapay.id/api/v1/prepaid/inquiry")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-PARTNER-ID"] = '<x-partner-id>'
request["Accept"] = '<accept>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"command\": \"plntok\",\n \"data\": {\n \"customer_id\": \"14012345678\",\n \"product_code\": \"SPPLNTOK\"\n }\n}"
response = http.request(request)
puts response.read_body{
"command": "plntok",
"response_code": "00",
"response_text": "Inquiry success",
"data": {
"amount": "50000",
"customer_name": "JOHN DOE",
"customer_id": "14012345678",
"reference_number": "SPPLNTOKRJBL0012345678901749548209",
"price": "52500",
"created_at": "2025-06-10 16:36:49"
}
}{
"status": 401,
"success": false,
"error": {
"code": 401,
"message": "Unauthorized merchant, please sign in"
}
}{
"command": "detail-bill-transaction",
"response_code": "04",
"response_text": "Rejected Format Error",
"data": {
"data": "The data field is required.",
"data.transaction_id": "The data.transaction id field is required."
}
}{
"command": "plntok",
"response_code": "99",
"response_text": "System error, please try again"
}Authorizations
JWT Bearer token obtained from /api/v1.0/access-token/b2b
Body
application/json
⌘I
