Create HeStallMent invoice
POST/api/v1/invoice/emi
To create invoices instantly and deliver them via link or SMS
🔋 Sample Request Payload
{
"merchantCode":"842217", // Merchant code
"invoices": [
{
"amount": "100.000",
"expiresAt": "YYYY-MM-DD",
"referenceNumber": "8849404"
"merchantCode" :"842217",
"invoiceType": "1" , // Invoice type "1" for SMS invoice and "0" for URL sharing
"invoiceSubType": "0", // "0" - SMS , "1" - WhatsApp, "2" - Email, "3" - URL
"language" : "en", // "en" for english , "ar" for arabic
"description": "test",
"customerName": "Mohammed",
"mobileNumber": "66666666",
"countryCode": "+965",
"customerEmail": "test@gmail.com",
"allocatePayType":[] // (Eg - "1" KNET, "2" - MPGS etc)
},
{
"amount": "150.000",
"expiresAt": "YYYY-MM-DD",
"referenceNumber": "88445604"
"merchantCode" :"842217",
"invoiceType": "1" , // Invoice type "1" for SMS invoice and "0" for URL sharing
"invoiceSubType": "0", // "0" - SMS , "1" - WhatsApp, "2" - Email, "3" - URL
"language" : "en", // "en" for english , "ar" for arabic
"description": "test",
"customerName": "Mohammed",
"mobileNumber": "66666666",
"countryCode": "+965",
"customerEmail": "test@gmail.com",
"allocatePayType":[] // (Eg - "1" KNET, "2" - MPGS etc)
}
]
}
🎯 Note: Payload must be encrypted before being sent to the server. To access the response data, decrypt it upon receiving the response from the server
⚡️ Payload Details
Field Name | Description | Required |
---|---|---|
merchantCode | Pass the merchant code | ✅ Yes |
mobileNumber | Pass the customer mobile number | ✅ Yes |
customerName | Pass the customer name | ✅ Yes |
amount | Pass the invoice amount | ✅ Yes |
countryCode | Pass the mobile number country code | ✅ Yes |
invoiceType |
| ✅ Yes |
referenceNumber | Pass invoice number | ✅ Yes |
invoiceSubType |
| ✅ Yes |
allocatePayType | ✅ Yes | |
expiresAt | Pass invoice expiry date "YYYY-MM-DD" | ✅ Yes |
language |
| ⚠️ Optional |
description | Pass invoice description details | ⚠️ Optional |
customerEmail | Pass customer email address if "invoiceSubType" is "2" | ⚠️ Optional |
📌 List of invoice sub types
Types | Description | Value |
---|---|---|
SMS | Send an invoice link to the customer via SMS | "0" |
Share the invoice link with the customer via WhatsApp | "1" | |
Send the invoice link to the customer via email | "2" | |
URL | Copy and share the invoice link through any platform | "3" |
📌 List of payment types
Payment Method Types | Value |
---|---|
KNET | "1" |
MPGS | "2" |
CYBS | "5" |
AMEX | "7" |
MPGS AMEX | "8" |
MPGS Apple Pay | "9" |
CYBS Apple Pay | "10" |
KNET Debit Apple Pay | "11" |
KNET Credit Apple Pay | "12" |
KNET Apple Pay International | "13" |
AMEX Apple Pay International | "14" |
Google Pay | "16" |
Request
Responses
- 200
- 404
- 500
Invoice created successfully. Decrypt the server response to view the result.
Not able to create invoice, Unauthorized or Permission Denied
Internal Server Error – An unexpected error occurred on the server while processing the request. This may be due to a temporary issue or a server-side malfunction. Please try again later or contact support if the issue persists.