Overview
The Payaza Web Checkout SDK gives you a hosted, secure payment modal that handles card charges, virtual account bank transfers, and mobile money collections — without you building the payment UI yourself. Add it to any website in minutes.Via CDN (HTML)
Include the Payaza bundle script in your HTML and call
PayazaCheckout.setup().Via npm / yarn
Install the
payaza-web-sdk package and import it into your JavaScript or TypeScript project.Prerequisites
Before integrating, make sure you have:- An active Payaza business account — sign up here
- Your Public API Key from the dashboard — see the Authentication guide
- A Collection Webhook URL configured on the dashboard — see the Webhooks guide
Your raw API key goes directly into the SDK as
merchant_key. You do not need to Base64-encode it for the Checkout SDK — Base64 encoding is only required for direct REST API calls.Integration
Option 1 — HTML (CDN)
Include the Payaza bundle script in your<head> and call PayazaCheckout.setup() when the user initiates checkout.
Option 2 — npm / yarn
Install the package:Handling the callback response
Thecallback function fires when the payment flow completes. It receives a response object with the outcome:
SDK parameters
SDK errors
Testing
Use Test Mode test cards to simulate different payment outcomes before going live. Setconnection_mode: "Test" and use your test API key.
Payments made in Test Mode are not processed or settled. Switch
connection_mode to "Live" and use your live API key only when you are ready to accept real payments.What’s next
Webhooks
Set up server-side event notifications to confirm payments and update order state.
Test Cards
Simulate card approvals, declines, and 3DS flows during development.
Card Collections API
Build a fully custom card checkout without the hosted SDK.
Virtual Accounts
Collect payments via bank transfer using dynamic or reserved account numbers.