Invoicing
Introduction
In this type of integration, we are providing a simple, straightforward integration. It will allow you to generate an invoice link that can be sent by any channel we support.
This will facilitate your collection if you have non-store platforms and would like to introduce a niche to your business. You can decide how are you going to send the payment link either by SMS, email, redirect the customer to the invoice link, or use all of them.
This is so helpful in many business cases. Let's explain an example of such cases that can utilize this integration. In a rent collection case, all you need is to give your customers an invoice link to pay the due rent at their convenience. This simply can be achieved with this type of integration, based on the due dates of the collection, and within your application, you can call this endpoint and send all information and the amount you need to collect, then MyFatoorah will send this payment link via the provided channel. The thing here is that you are giving time to your customers to pay once they can.
How It Works
Step 1: Create a Payment Request
To generate an invoice, send a POST request to the endpoint: POST /v3/payments (Create Payment)
In this request, set the PaymentMethod to INVOICE and specify how the customer should receive the invoice link using the InvoiceNotificationOption field.
NotificationOption Values
| Value | Behavior | Required Customer Fields |
|---|---|---|
| Sends the invoice link by email only | Customer.Email | |
| SMS | Sends the invoice link by SMS only | Customer.Mobile.CountryCode, Customer.Mobile.Number |
| LINK | Returns only the invoice link in the API response | None |
| ALL | Sends the invoice link by both email and SMS, and also returns it in the response body | Email + Mobile fields |
{
"Order": {
"Amount": 20
},
"Customer": {
"Mobile": {
"CountryCode": "+20",
"Number": "1020304050"
},
"Email": "[email protected]"
},
"IntegrationUrls": {
"Redirection": "https://your-website.com/payment-callback"
},
"NotificationOption": "ALL"
}{
"IsSuccess": true,
"Message": "",
"ValidationErrors": null,
"Data": {
"InvoiceId": "6323179",
"PaymentId": null,
"PaymentURL": "https://demo.MyFatoorah.com/KWT/ie/01072632317941-057d0668",
"PaymentCompleted": false,
"TransactionDetails": null
}
}Step 2: Inquire Payment Status
After the customer completes the payment, MyFatoorah will redirect the user back to your Redirection URL, appending a paymentId query parameter.
Example: https://your-website.com/payment-callback?paymentId=100201923790872553
You need then call: GET /v3/payments/{paymentId} (Get Payment Details) to verify the payment and retrieve the full invoice and transaction details.
GET /v3/payments/07076323179317752773{
"IsSuccess": true,
"Message": "",
"ValidationErrors": null,
"Data": {
"Invoice": {
"Id": "6389491",
"Status": "PAID",
"Reference": "2025060917",
"CreationDate": "2025-12-24T14:48:17.1230000Z",
"ExpirationDate": "2026-06-22T14:48:17.1230000Z",
"ExternalIdentifier": null,
"UserDefinedField": "",
"MetaData": null
},
"Transaction": {
"Id": "102585",
"Status": "SUCCESS",
"PaymentMethod": "VISA/MASTER",
"PaymentId": "07076389491322460173",
"ReferenceId": "535814102585",
"TrackId": "24-12-2025_3224601",
"AuthorizationId": "102585",
"TransactionDate": "2025-12-24T14:51:06.5630000Z",
"ECI": "02",
"IP": {
"Address": "41.35.105.183",
"Country": "Egypt"
},
"Error": {
"Code": "",
"Message": ""
},
"Card": {
"NameOnCard": "das",
"Number": "512345xxxxxx0008",
"Token": "",
"PanHash": "b888aa5f23a817883d4d12c74044bab1ae6ee65dc8d6e11515394aba452b273b",
"ExpiryMonth": "12",
"ExpiryYear": "34",
"Brand": "Mastercard",
"Issuer": "Test Bank",
"IssuerCountry": "KWT",
"FundingMethod": "credit"
}
},
"Customer": {
"Reference": "",
"Name": "Anonymous",
"Mobile": "+201020304050",
"Email": "[email protected]"
},
"Amount": {
"BaseCurrency": "KWD",
"ValueInBaseCurrency": "20",
"ServiceCharge": "0.4",
"ServiceChargeVAT": "0.06",
"ReceivableAmount": "19.54",
"DisplayCurrency": "KWD",
"ValueInDisplayCurrency": "20",
"PayCurrency": "KWD",
"ValueInPayCurrency": "20"
},
"Suppliers": []
}
}
WebhookWe recommended enabling the Webhook feature to automatically notify your system when a transaction status changes in your application.
NoteThe IntegrationUrls.Redirection field is optional. If omitted, customers will remain on the MyFatoorah result page after completing payment.
Old Integration (V2)In case you are using the integration for v2, you can find the documentation here:
Updated about 2 hours ago
