Webhook Structure
Every webhook payload shares the same top-level structure:The event name indicating what happened
Unique event identifier (UUID v4 format)
Event-specific fields containing relevant information
UNIX timestamp in seconds when the event was generated
Payment Status Webhooks
Paywint sends webhook events to notify your application about payment status changes. This allows you to keep your system synchronized with payment updates in real-time.Payment Events
Payment Opened
Sent when a payment link has been opened by as user to initiate payment.Payment Processing
Sent when a payment requires additional processing time or manual review.Payment Succeeded
Sent when a payment is successfully processed and completed.Payment Failed
Sent when a payment attempt fails due to various reasons such as insufficient funds or gateway rejections.Payment Retried
Sent when a payment attempt fails and the user initiates a retry. Note that retrying creates a new payment transaction, which is why aretry_payment_id
is provided for reference.
Payment Rejected
Sent when a payment is rejected due to policy violations.Payment Expired
Sent when a payment link can no longer be used because it has passed its expiry. No further payment attempts can be initiated against this link; users must request a new link (which will create a new payment).Data Fields Reference
Common Fields
Unique identifier for the payment transaction
Current status of the payment
Payment amount in the smallest currency unit (cents for USD)
Event-Specific Fields
Detailed explanation when a payment fails (payment.failed events only)
Unique identifier for retry transactions (payment.retried events only)
Handling Webhooks
Best Practices
- Acknowledge quickly: Return a 200 HTTP status code as soon as possible
- Process asynchronously: Handle the actual business logic in background jobs
- Implement idempotency: Use the event
id
to prevent duplicate processing
Webhook endpoints must respond with a 2xx HTTP status code within 30 seconds. Failed deliveries will be retried with exponential backoff.