Inline Checkout (widget)
The BirrPay inline widget opens your payment form as a modal inside your own site — no redirect, no leaving your page. It works with every provider configured on your app.
Options
| Option | Type | Required | Description |
|---|---|---|---|
publicKey |
string | yes | Your pk_test_... / pk_live_... |
clientToken |
string | yes | Short-lived token returned by session creation |
theme |
string | no | auto (default) |
onSuccess |
fn | no | Called with { reference, status, amount, currency } |
onError |
fn | no | Called with { code, message } |
onClose |
fn | no | Called when the payer closes the modal |
Security model
- The widget creates/loads the session only with your publishable key — your secret key never touches the browser.
client_tokenis a short-lived signed token bound to a single session; it cannot be reused after expiry.- The checkout iframe accepts framing only from the domains on your app allowlist.
- Always confirm payment server-side (verify API or webhook) before fulfilling orders.
Test cards
In test mode use provider test cards (e.g. Paystack 4084 0840 8408 4081 with OTP 123456). Test mode never moves real money.
Ready to take your first payment?
Create account