Payfonte Inline
Inline checkout lets customers pay without leaving your page. You load the Payfonte SDK, initialize checkout with your transaction data, and open the payment iframe. CDN SDK URL:https://cdn.payfonte.com/payfonte.min.js
Why Use Inline?
Seamless UX
Customers stay on your site while completing payment.
Fast Integration
Add one script and trigger checkout from your pay button.
Event Hooks
Use callbacks for completion and close events in your app flow.
Before You Start
Get sandbox credentials
Retrieve your
client-id from Settings -> API Keys/Webhooks in sandbox-app.payfonte.com.Quick Integration Example
Parameter Reference
| Field | Type | Required | Description |
|---|---|---|---|
environment | string | Yes | sandbox or production |
reference | string | Recommended | Unique transaction reference |
clientId | string | Yes | Your Payfonte client-id |
amount | integer | Yes | Amount in minor units (no decimals) |
currency | string | Yes | ISO currency code (for example NGN) |
country | string | Yes | ISO country code (for example NG) |
customer | object | Yes | Customer details (name/email/phone) |
metadata | object | No | Custom fields returned in callbacks/webhooks |
callback | function | Yes | Runs after payment event payload is returned |
onClose | function | No | Runs when checkout modal is closed |
Amount Rule (Important)
Payfonte does not support decimal API amounts. Send integer minor-unit values only.1000.00 NGN->100000250.50 NGN->25050
Recommended Production Flow
Create reference on backend
Create reference on backend
Generate the transaction reference from your backend so you can enforce uniqueness and map it to your internal order.
Use callback for UI updates only
Use callback for UI updates only
Treat frontend callback as a user experience signal. Final fulfillment should depend on backend verification or webhook confirmation.
Implement webhook confirmation
Implement webhook confirmation
Always process Webhooks to confirm final transaction state (
success/failed).Handle retries idempotently
Handle retries idempotently
If callback/webhook repeats, ensure your order processing runs once per reference.
Troubleshooting
| Symptom | Likely Cause | Fix |
|---|---|---|
| Checkout does not open | SDK script not loaded | Confirm script URL and browser console errors |
| Authentication/authorization issues | Invalid clientId or wrong environment | Use matching credentials for sandbox/production |
| Amount validation failure | Decimal amount used | Convert to integer minor units |
| Duplicate transaction error | Reused reference | Generate a new unique reference |
Related Docs
Javascript SDK
Full SDK example and configuration reference.
Standard Checkout
Redirect-based alternative integration flow.
Webhooks
Validate final payment status on your backend.