▶ Checkout Init
Initialize Checkout
Use your public key to initialize a payment and redirect your customer to the hosted checkout page.
Checkout Form
Fill in payment details. Your public key authorizes the request as Bearer token.
From your integration setup. Never use a secret key here.
₦
Must be unique per transaction. Auto-generated if empty.
SDK Usage
Embed Wavy checkout on any website in a few lines of code.
1. Load the SDK
<!-- In your HTML -->
<script src="https://wavy.ng/sdk.js"></script>
2. Initialize Checkout
WavyCheckout({
publicKey: 'pk_live_your_key',
amount: 5000,
email: 'customer@example.com',
reference: 'ORDER-' + Date.now(),
metadata: { orderId: '123' },
onSuccess: (data) => {
console.log('Paid!', data.txRef);
},
onError: (err) => {
console.error('Failed:', err.message);
},
onClose: () => {
console.log('Closed by user');
}
});
3. Config Reference
// Required fields
publicKey string // from integration setup
amount number // amount > 0
email string // valid email
reference string // unique per tx
// Optional
metadata object // custom data
endpoint string // defaults to /gateway/initialize
onSuccess function // (data) => void
onError function // (err) => void
onClose function // () => void
Endpoints
POST /gateway/initialize
POST /api/gateway/initialize
Authorization: Bearer <publicKey>
POST /api/gateway/initialize
Authorization: Bearer <publicKey>
POST /integrations/create
POST /api/integrations/create
→ returns vendorId, publicKey
POST /api/integrations/create
→ returns vendorId, publicKey