Payment flow
Last updated
Last updated
Integrating with FuratPay’s REST API involves creating an invoice, requesting payment, and handling webhook notifications for status updates.
The first step is to create an invoice (bill) on FuratPay by making a POST request to the invoice creation endpoint. This generates an invoice ID, which is required for all subsequent steps.
Your application does not need to manage financial transactions—FuratPay handles all payment logic. Your system only needs to manage cart logic and store the invoice ID for reference.
Response: Invoice Object
Once the invoice is created, FuratPay returns the invoice object, which contains all necessary details, including the invoice ID required to proceed with payment.
After retrieving the available linked payment services, you initiate a POST request to request a payment, passing:
payment_service_id (the selected payment method)
invoice.id (the generated invoice)
Response: Payment Service Data
FuratPay will return the necessary response for the selected payment service. For example:
A redirect URL for ZainCash
A QR code for First Iraqi Bank (FIB)
FuratPay communicates with the payment service and processes the transaction. Once completed, it returns the payment result from the provider.
When an invoice status changes (e.g., marked as PAID), FuratPay triggers a webhook notification to your predefined endpoint. The webhook payload includes:
Event type (e.g., INVOICE_PAID
)
Invoice data
Any other necessary details related to the transaction
By following this process, your service can efficiently handle billing and payments without managing the financial logic directly.