Get Bill Status
curl --request GET \
--url https://pesahub.co/v1/billpay/{transaction_id} \
--header 'Authorization: <authorization>'import requests
url = "https://pesahub.co/v1/billpay/{transaction_id}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://pesahub.co/v1/billpay/{transaction_id}', 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://pesahub.co/v1/billpay/{transaction_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://pesahub.co/v1/billpay/{transaction_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pesahub.co/v1/billpay/{transaction_id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pesahub.co/v1/billpay/{transaction_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"transaction_id": "<string>",
"transaction_status": "<string>",
"bill": {
"amount": "<string>",
"reference": "<string>",
"mode": {}
},
"amount": {
"value": "<string>",
"settled": "<string>",
"fee": "<string>"
},
"metadata": {},
"settled_at": {},
"created_at": "<string>",
"timestamp": "<string>"
}Billpay Collection
Get Bill Status
Retrieve the Bills current status
GET
/
v1
/
billpay
/
{transaction_id}
Get Bill Status
curl --request GET \
--url https://pesahub.co/v1/billpay/{transaction_id} \
--header 'Authorization: <authorization>'import requests
url = "https://pesahub.co/v1/billpay/{transaction_id}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://pesahub.co/v1/billpay/{transaction_id}', 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://pesahub.co/v1/billpay/{transaction_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://pesahub.co/v1/billpay/{transaction_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pesahub.co/v1/billpay/{transaction_id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pesahub.co/v1/billpay/{transaction_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"transaction_id": "<string>",
"transaction_status": "<string>",
"bill": {
"amount": "<string>",
"reference": "<string>",
"mode": {}
},
"amount": {
"value": "<string>",
"settled": "<string>",
"fee": "<string>"
},
"metadata": {},
"settled_at": {},
"created_at": "<string>",
"timestamp": "<string>"
}Request Headers
string
required
Bearer token for authentication. Format:
Bearer <token>string
default:"application/json"
Expected response format. Use
application/json.Path Parameters
string
required
The unique UUID of the bill transaction (e.g.
5f8b789f-e6e6-4506-91be-cb344009c680).Response
boolean
Indicates whether the request was successful.
string
A human-readable status message.
string
The unique UUID of the transaction.
string
Current status of the bill. Possible values:
pending,partial,settled,cancelledpending: no records of any payment activitypartial: the bill has started receiving payments (only applicable to flexible bills)settled: the bill has received the full amountcancelled: the bill has been cancelled (only bills with no payment activity can be cancelled)
object
object
object
Additional key-value pairs associated with the bill.
string | null
ISO 8601 timestamp of when the bill was settled.
null if not yet settled.string
ISO 8601 timestamp of when the bill was created.
string
ISO 8601 timestamp of when this response was generated.