Documentation Index
Fetch the complete documentation index at: https://docs.fype.dev/llms.txt
Use this file to discover all available pages before exploring further.
Webhook Overview
Webhooks allow Fype to notify your application when an event occurs in your account. Webhooks are particularly useful for asynchronous events like successful payment captures or processed refunds.Why Use Webhooks?
While you can poll the Fype API for the status of a payment, webhooks are more efficient and reliable. They allow you to:- Fulfill orders immediately after payment.
- Sync your database with the payment status.
- Send confirmation emails to customers.
- Handle edge cases like payments that are completed after a customer closes the browser.
Webhook Lifecycle
- Event Occurs: A payment succeeds on the gateway.
- Normalization: Fype receives the gateway’s notification and normalizes it into a standard Fype Event.
- Delivery: Fype’s webhook worker sends a
POSTrequest to your configured URL. - Acknowledgement: Your server should respond with a
200 OKstatus code. - Retries: If your server is down or returns an error, Fype will retry the delivery with exponential backoff.
Configurable Endpoints
You can configure up to 5 webhook endpoints per environment (Test/Live) in the Developers > Webhooks section of the dashboard.Payload Structure
Fype sends a JSON payload for every event.Retry Policy
If delivery fails, Fype retries according to the following schedule:- 1st Retry: 1 minute
- 2nd Retry: 5 minutes
- 3rd Retry: 30 minutes
- 4th Retry: 2 hours
- 5th Retry: 6 hours
failed and no further attempts are made. You can view the failure details in the dashboard.