TheDocumentation Index
Fetch the complete documentation index at: https://docs.payx.company/llms.txt
Use this file to discover all available pages before exploring further.
payx-js SDK allows you to accept payments directly on your website without redirecting your customers. It opens a secure, high-conversion checkout modal as an overlay.
Installation
Via NPM
Via CDN
For simple HTML sites, you can include the script via our CDN:Basic Usage
To start a payment, initialize thePayX object and call the setup method.
Configuration Options
Your PayX Public Key (starts with
pk_).The customer’s email address.
The amount to charge in GHS.
The currency code. Currently only
GHS is supported.Customer’s first name.
Customer’s last name.
Customer’s mobile money number.
A JSON object containing custom data you want to associate with the transaction.
Callbacks
Called when the payment is completed successfully. Returns a response object with the
transactionId.Called if the customer closes the modal without completing the payment.
Called if an error occurs during the checkout process.