Webhooks make the integration with Fizen Pay easier by allowing you to subscribe to a set of charge events.
You can subscribe to the events by going to your Settings page and adding a new webhook subscription. When you create a new subscription, you can specify what events you would like to receive updates for. Below is the list of all available webhook events:
EVENT
DESCRIPTION
CHARGE STATUS
charge.created
A new charge is created
NEW
charge.canceled
A new charge is canceled
CANCELED
charge.completed
A payment is made for the charge and the conditions are met.
COMPLETED
charge.unresolved
A payment is made for the charge and the conditions are NOT met.
UNRESOLVED
charge.resolved
The UNRESOLVED charge is marked as resolved by the owner
RESOLVED
charge.refunded
The charge is marked as refunded by the owner
REFUNDED
Webhook details
The event topic, signature, and id are included in the headers of the response to the webhook endpoint. The headers are: x-fp-webhook-topic, x-fp-webhook-signature, andx-fp-webhook-id corresponding
You can specify the topics that you want to receive and test the topics for the integration by clicking on Edit button beside the Webhook endpoint in the Setting page.
Securing webhooks
Every webhook request includes an x-fp-webhook-signature header. This header contains the SHA256 HMAC signature of the raw request payload, computed using your webhook shared secret as the key. You can obtain your shared webhook secret from your Settings Page . Always make sure that you verify the webhook signature before acting on it inside your system.