Payment
Create Payment
Create a checkout and get a payment URL to send your customer to.
{base_url}/api/checkoutCreates a checkout for the given amount and returns its ID (pp_id) and payment page URL (pp_url). Redirect your customer to pp_url: they pick a payment method and pay, then return to your return_url.
Store pp_id with your order. Don't treat the customer's return to return_url as proof of payment: confirm the payment with Verify Payment or the Webhook sent to your webhook_url.
Authentication
Send your API key in the MHS-PIPRAPAY-API-KEY header: MHS-PIPRAPAY-API-KEY: YOUR_API_KEY. Create keys in System Settings → API Settings.
The key needs the payment:checkout ability, otherwise the request fails with INSUFFICIENT_ABILITY.
Body parameters
full_namestringCustomer's full name, shown on the payment page.
email_addressstringCustomer's email address.
mobile_numberstringCustomer's mobile number.
amountstringAmount to charge, as a decimal string.
currencystringCurrency code, e.g.
bdt.metadataobjectYour own key-value data, such as your order ID, kept with the payment.
return_urlstringWhere the customer is sent after the payment page.
webhook_urlstringWhere Paybob sends payment status updates for this checkout.
Responses
SuccessCheckout created. Redirect the customer topp_url.INVALID_API_KEYThe API key is missing, wrong or revoked.INSUFFICIENT_ABILITYThe API key exists but doesn't have thepayment:checkoutability.