Update Billpay Order
curl --request POST \
--url https://pesahub.co/v1/billpay/{transaction_id}/update \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '{
"amount": 123
}'import requests
url = "https://pesahub.co/v1/billpay/{transaction_id}/update"
payload = { "amount": 123 }
headers = {
"Authorization": "<authorization>",
"Idempotency-Key": "<idempotency-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<authorization>',
'Idempotency-Key': '<idempotency-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({amount: 123})
};
fetch('https://pesahub.co/v1/billpay/{transaction_id}/update', 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}/update",
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([
'amount' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://pesahub.co/v1/billpay/{transaction_id}/update"
payload := strings.NewReader("{\n \"amount\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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://pesahub.co/v1/billpay/{transaction_id}/update")
.header("Authorization", "<authorization>")
.header("Idempotency-Key", "<idempotency-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pesahub.co/v1/billpay/{transaction_id}/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Idempotency-Key"] = '<idempotency-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 123\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"bill": {
"amount": "<string>",
"reference": "<string>",
"mode": "<string>"
},
"transaction_id": "<string>"
}Billpay Collection
Update Billpay Order
Update the amount of a generated billpay reference. The order must be pending and must not have received any payments for flexible orders.
POST
/
v1
/
billpay
/
{transaction_id}
/
update
Update Billpay Order
curl --request POST \
--url https://pesahub.co/v1/billpay/{transaction_id}/update \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '{
"amount": 123
}'import requests
url = "https://pesahub.co/v1/billpay/{transaction_id}/update"
payload = { "amount": 123 }
headers = {
"Authorization": "<authorization>",
"Idempotency-Key": "<idempotency-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<authorization>',
'Idempotency-Key': '<idempotency-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({amount: 123})
};
fetch('https://pesahub.co/v1/billpay/{transaction_id}/update', 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}/update",
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([
'amount' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://pesahub.co/v1/billpay/{transaction_id}/update"
payload := strings.NewReader("{\n \"amount\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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://pesahub.co/v1/billpay/{transaction_id}/update")
.header("Authorization", "<authorization>")
.header("Idempotency-Key", "<idempotency-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pesahub.co/v1/billpay/{transaction_id}/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Idempotency-Key"] = '<idempotency-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 123\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"bill": {
"amount": "<string>",
"reference": "<string>",
"mode": "<string>"
},
"transaction_id": "<string>"
}Request Headers
string
required
Bearer token for authentication. Format:
Bearer <token>string
default:"application/json"
Expected response format. Use
application/json.string
default:"application/json"
Format of the request body. Use
application/json.string
required
A unique key to ensure idempotent requests.
Path Parameters
string
required
The unique UUID of the bill transaction to update (e.g.
5f8b789f-e6e6-4506-91be-cb344009c680).Body Parameters
number
required
The new amount to set for the bill order.
Response
boolean
required
Indicates whether the update was successful.
string
required
A human-readable status message.
object
string
The UUID of the updated transaction. Present on success.
Error Response
The update will fail if:
- The order is not in
pendingstatus. - The
flexibleorder has already received partial payments. - Network failure caused by third party aggregator
boolean
Returns
false on failure.string
A description of why the update failed.