Updating a Payment
Most payment methods have statuses that are updated asynchronously. As a result, the payment status may not be immediately updated after a payment is initiated. To ensure payment statuses are accurate, the following steps are followed:
Initial Payment State
- A payment is created and transitions to the pending state.
Processing by Partner
- The payment undergoes processing (e.g., funds collection at the point of sale), during which it is updated on the partner’s system to either completed or failed.
Status Update from Partner
- The updated status is communicated to our system via webhooks (implemented) or polling (not implemented).
Methods for Updating Payment Status
The payment system supports the following methods for asynchronous status updates:
- Webhooks (implemented): Partners send payment updates directly to our system.
- Polling (not implemented): Regular intervals of data retrieval from partners to check payment status.
Webhooks
Webhooks provide asynchronous updates to the payment status by sending status change notifications directly from the partner’s system to our backend. This method ensures prompt updates and reduces manual status checks.
Webhook Process
-
Secure Delivery:
Partners send webhooks to the FNZ backend, often through a secure VPN (e.g., WireGuard) or a secure tunnel. Webhooks may include a nonce and signature to verify integrity. -
Validation:
The payment system validates the webhook to ensure the payment is in a valid state and has not been tampered with. If any validation fails, the webhook is rejected. -
Status Update:
Once validated, the payment status is updated according to the information provided in the webhook.
Implementation Details
Please refer to the files below for webhook integration details:
For each partner, a unique webhook route must be created by the engineering team. Additional details are available in the Partner Webhooks API documentation [here](Partner Webhooks API documentation link).