Create Paywall QR

This endpoint is used to initiate a paywall QR code generation for fiat currency

Method

POST https://api.ninjapay.me/webextension/api/v1/fiat/paywall/qr

Parameters

  • id : (string, required) - Paywall ID

  • contact : (string, required) - contact number of payee

Request Body

Body (application/json)
{
    "id":"PAYWALLpvIWfx3NNCPw4JW", //REQUIRED Paywall ID
    "contact":"9876543210" // REQUIRED contact number
}

Response

{
    "status": true,
    "data": {
        "order_id": "FT_RTPL_SOxhqQxplFGgtuopkzHIBg", // paywall transaction order id
        "payment_uri": "upi://pay?pa=paytm-xxxxx@paytm&pn&tid=PYTM&tr=40805802&am=1&cu=INR", //sample URL
        "qr_base64_img": "", // if any qr code image
        "expiry_date": "2024-08-05 05:28:45", // expiry date of payment
        "link_id": "RTLFr9kpzTjhIalhaTaQl2p", // link id
        "super_order_id": "FT_RTPL_SOkPpS3OZxk4kdEtgIa5B6" // super order id
    },
    "message": "Payment url"
}

Code Example


const options = {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': 'API_KEY' //Invoice key required
  },
  body: {
    "id":"PAYWALLpvIWfx3NNCPw4JW",
    "contact":"9876543210"
}
};

fetch('https://api.ninjapay.me/webextension/api/v1/fiat/paywall/qr', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
  

Last updated