For the complete documentation index, see llms.txt. This page is also available as Markdown.

Cancel Bill

Cancel an active bill

API Endpoint

POST /client/bills/cancel


Request Headers:

Authorization: Bearer <access_token>

Content-Type: application/json Request Body:

{
    "reference":"<billRef>" // bill unique reference
}

curl 'https://apis.xpay.stream/client/wallets/save'    \
  -H 'Content-Type: application/json'                  \
  -H 'Authorization: Bearer <access_token>'            \
  --data-raw '{"reference":"<billRef>"}'              
// npm i cross-fetch
const fetch = require("cross-fetch");

const API_URL = "https://apis.xpay.stream/client/wallets/save";

const method = "POST";

const headers = { 
    "Content-Type": "application/json",
    "Authorization": "Bearer <access_token>"
};

const body = JSON.stringify({
    "reference":"<billRef>"
});

fetch(API_URL, { headers, body, method })
.then(async res =>  await res.json())
.then(result => {
    if(result.error)
        console.log("Bill Cancel Error", result);
    if(result.success)
        console.log("Bill Canceled", result);
})
.catch((err) => {
    console.error("Bill Cancel API Exception", err);
});

Last updated