Skip to main content

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

  • Based on the payment gateway subscription from Hesabe
  • Pass subscribed payment method number in an array format. Eg: [1,2,5,10]
  • Check below "List of payment types table" for more information 👇
Field NameDescriptionRequired
merchantCodePass the merchant code✅ Yes
mobileNumberPass the customer mobile number✅ Yes
customerNamePass the customer name✅ Yes
amountPass the invoice amount✅ Yes
countryCodePass the mobile number country code✅ Yes
invoiceType
  • "0" - URL sharing
  • "1" - SMS invoice
✅ Yes
referenceNumber Pass invoice number ✅ Yes
invoiceSubType
  • "0" - SMS
  • "1" - WhatsApp
  • "2" - Email
  • "3" - URL
✅ Yes
allocatePayType✅ Yes
expiresAtPass invoice expiry date "YYYY-MM-DD" ✅ Yes
language
  • "en" - For english invoice
  • "ar" - For arabic invoice
  • Defalut is "en"
⚠️ Optional
descriptionPass invoice description details ⚠️ Optional
customerEmailPass customer email address if "invoiceSubType" is "2" ⚠️ Optional

📌 List of invoice sub types

TypesDescriptionValue
SMSSend an invoice link to the customer via SMS"0"
WhatsAppShare the invoice link with the customer via WhatsApp"1"
EmailSend the invoice link to the customer via email"2"
URLCopy and share the invoice link through any platform"3"

📌 List of payment types

Payment Method TypesValue
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

Invoice created successfully. Decrypt the server response to view the result.