FuratPay Docs
  • Welcome
  • Overview
  • Payment flow
  • API Reference
Powered by GitBook
On this page
  • Invoice & Payment Flow via REST API
  • 1. Creating an Invoice
  • 2. Requesting Payment for an Invoice
  • 3. Payment Processing & Result
  • 4. Webhook Notification

Payment flow

PreviousOverviewNextAPI Reference

Last updated 2 months ago

Invoice & Payment Flow via REST API

Integrating with FuratPay’s REST API involves creating an invoice, requesting payment, and handling webhook notifications for status updates.

1. Creating an Invoice

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.

2. Requesting Payment for an Invoice

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)

3. Payment Processing & Result

FuratPay communicates with the payment service and processes the transaction. Once completed, it returns the payment result from the provider.

4. Webhook Notification

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.

Payment Flow