Quick Start
Accept your first payment in under 5 minutes.
Prerequisites
- A ZevPay Checkout account (sign up here)
- An API key pair (secret + public) from the dashboard
Step 1: Get your API keys
- Log in to the ZevPay Checkout dashboard
- Go to Developers > API Keys
- Create a new key pair. You'll get:
- Secret key (
sk_test_...): used on your server, never expose to the client - Public key (
pk_test_...): used in the frontend SDK (and for inline checkout initialization)
- Secret key (
Step 2: Collect payment
Choose your integration method:
Option A: Inline Checkout (recommended, no backend required)
The inline SDK handles everything client-side using your public key. No server is needed to initialize the session.
<script src="https://js.zevpaycheckout.com/v1/inline.js"></script>
<button id="pay-btn">Pay ₦5,000</button>
<script>
document.getElementById('pay-btn').addEventListener('click', function() {
var checkout = new ZevPay.ZevPayCheckout();
checkout.checkout({
apiKey: 'pk_test_your_public_key',
email: 'customer@example.com',
amount: 500000, // ₦5,000 in kobo
currency: 'NGN',
reference: 'ORDER-12345',
firstName: 'John',
lastName: 'Doe',
onSuccess: function(reference) {
// Payment successful: verify on your server
alert('Payment complete! Ref: ' + reference);
},
onClose: function() {
console.log('Payment modal closed');
},
});
});
</script>How it works
The inline SDK uses your public key to create a checkout session directly from the browser. If you've configured allowedDomains on your API key, the request origin is validated automatically. See Domain Whitelisting for details.
Option B: Standard Checkout (redirect, requires backend)
Initialize a session from your server using your secret key, then redirect the customer to the hosted checkout page.
Step 2a: Create a session (server-side)
curl -X POST https://api.zevpaycheckout.com/v1/checkout/session/initialize \
-H "Content-Type: application/json" \
-H "x-api-key: sk_test_your_secret_key" \
-d '{
"amount": 500000,
"email": "customer@example.com",
"customer_name": "John Doe",
"currency": "NGN",
"reference": "ORDER-12345",
"callback_url": "https://yoursite.com/payment/callback",
"metadata": {
"order_id": "12345",
"plan": "premium"
}
}'const response = await fetch(
"https://api.zevpaycheckout.com/v1/checkout/session/initialize",
{
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": "sk_test_your_secret_key",
},
body: JSON.stringify({
amount: 500000, // 5,000 NGN in kobo
email: "customer@example.com",
customer_name: "John Doe",
currency: "NGN",
reference: "ORDER-12345",
callback_url: "https://yoursite.com/payment/callback",
}),
}
);
const { data } = await response.json();
console.log(data.session_id); // "abc-123-def"
console.log(data.checkout_url); // "https://secure.zevpaycheckout.com/abc-123-def"import requests
response = requests.post(
"https://api.zevpaycheckout.com/v1/checkout/session/initialize",
headers={
"Content-Type": "application/json",
"x-api-key": "sk_test_your_secret_key",
},
json={
"amount": 500000, # 5,000 NGN in kobo
"email": "customer@example.com",
"customer_name": "John Doe",
"currency": "NGN",
"reference": "ORDER-12345",
"callback_url": "https://yoursite.com/payment/callback",
},
)
data = response.json()["data"]
print(data["session_id"])
print(data["checkout_url"])Amount is in kobo
All amounts are in kobo (minor currency units). NGN 5,000 = 500,000 kobo.
Step 2b: Redirect the customer
// After creating the session on your server
window.location.href = data.checkout_url;
// e.g. "https://secure.zevpaycheckout.com/abc-123-def"After payment, the customer is redirected to your callback_url with query parameters:
https://yoursite.com/payment/callback?status=success&reference=ZVP-CKO-S-123456Step 4: Verify payment (server-side)
Always verify the payment on your server before fulfilling the order. Verify accepts the session ID, our transaction reference, or your own reference from initialize, so you can verify with the ID you already store against the order:
curl https://api.zevpaycheckout.com/v1/checkout/session/ORDER-12345/verify \
-H "x-api-key: sk_test_your_secret_key"Response:
{
"success": true,
"data": {
"session_id": "abc-123-def",
"reference": "ZVP-CKO-S-123456",
"status": "completed",
"amount": 500000,
"currency": "NGN",
"customer_email": "customer@example.com",
"payment_method": "bank_transfer",
"paid_at": "2026-03-07T14:30:00.000Z"
}
}Always verify server-side
Never rely solely on client-side callbacks. Always call the verify endpoint from your server to confirm the payment status before delivering goods or services.
Step 5: Handle webhooks (recommended)
For the most reliable integration, fulfil from the charge.success webhook: it arrives even if the customer closes the tab before the redirect. Verify its x-zevpay-signature over the raw request body, check livemode, and make fulfilment idempotent on reference. See Webhooks and Verifying Signatures.
Building with an AI coding agent?
Point it at https://docs.zevpaycheckout.com/llms.txt and see Building with AI agents for a ready-to-paste brief.
Next steps
- Authentication: API key types and security
- Checkout Sessions: Detailed session lifecycle
- Inline Checkout for the full configuration options
- Webhook Setup: Real-time payment notifications