Get started with Juicyway API in minutes.
Sign Up
Get API Keys
Set Up Webhooks
curl -X POST "https://api-sandbox.spendjuice.com/payment-sessions" \ -H "Authorization: YOUR_TEST_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "customer": { "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com", "phone_number": "+2348118873422", "billing_address": { "line1": "123 Test Lane", "city": "Test City", "state": "Test State", "country": "NG", "zip_code": "12345" }, "ip_address": "127.0.0.1" }, "description": "Test Payment", "currency": "NGN", "amount": 100000, "payment_method": { "type": "card" }, "reference": "test-payment-123" }'
Successful Payment
Failed Payment
3DS Authentication
app.post('/webhooks', (req, res) => { const payload = req.body; const checksum = payload.checksum; const businessId = process.env.BUSINESS_ID; // Validate webhook signature if (!validateSignature(payload, checksum, businessId)) { return res.status(401).send('Invalid signature'); } // Handle different event types switch(payload.event) { case 'payment.session.succeeded': // Handle successful payment break; case 'payment.session.failed': // Handle failed payment break; } res.status(200).send('Webhook received'); });