Documentation Index
Fetch the complete documentation index at: https://docs.juicyway.com/llms.txt
Use this file to discover all available pages before exploring further.
Before integrating webhooks, make sure you’ve completed the
Quickstart guide and have your authentication set up.
Overview
When you make a request to our API, you’ll typically get an immediate response. However, some operations like payments can take time to process. Instead of timing out, we return a pending status and use webhooks to notify you of the final result. You have two options for handling these async operations:- Poll the API endpoints periodically (not recommended for production)
- Use webhooks to receive real-time event updates (recommended)
Webhooks vs Polling
Polling Approach
Polling Approach
- Make repeated GET requests to check transaction status - Higher latency and more resource intensive - May miss state changes between polls - Better suited for testing/debugging
Webhook Approach
Webhook Approach
- Receive instant notifications when state changes - More efficient and scalable - No missed events - Recommended for production use
Setting Up Webhooks
1. Create Your Webhook URL
Create a POST endpoint on your server to receive webhook events. The endpoint should:- Accept JSON payloads
- Return a 200 OK response
- Process events idempotently (handle duplicates safely)
2. Register Your Webhook URL
Add your webhook URL to your account settings:Request
Response
Security
Security Notice
Important Security Considerations:
- Never expose sensitive credentials in client-side code or VCS
- Always validate request signatures and origins
- Use HTTPS for all API communications
- Implement proper access control and authentication
- Follow secure key management practices
Detailed Security Guidelines
Detailed Security Guidelines
Key Security Measures:
- Store sensitive data in secure environment variables or dedicated key management systems
- Implement IP whitelisting where possible
- Validate all incoming webhook signatures
- Use strong TLS/SSL for all connections
- Rotate credentials regularly
- Log and monitor access attempts
- Follow the principle of least privilege
For additional security best practices, refer to our Security Guidelines in the documentation.
Verifying Webhook Origins
Secure your webhook endpoint using either or both:1. Checksum Validation
Each webhook includes a checksum for verification:- Concatenate:
event|json_encoded_data - Create HMAC SHA-256 hash using your business ID as the key
- Compare with the received checksum
2. IP Whitelisting
Whitelist these Juicyway IPs:Go-Live Checklist
Supported Events
In sandbox, successful transactions remain pending. Only failure events are
sent.
Payment Events
payment.session.failed|succeeded
payment.session.failed|succeeded
Next Steps
- Learn about API Request Authentication - Review common Error Handling - Explore the full API Reference