Skip to content

Create Invoice

| View as Markdown

This API will create an invoice for the customer in order to accept the payment. We must pass data containing the complete details of invoice and customer in request. If the request has valid details, we will get an invoice number and payment url for the transaction.

https://kraken.airpay.co.in/airpay/ms/invoicepay/api/create
ParameterType ValueDescriptionValue Like
data requiredJsonXmlData value can be passed in json or xml.The data should be in this format only.This contains the complete details of invoice and customer. (required)
token requiredStringUnique token need to be passed by every company (length 1-150) Calculated by md5(access-token . ’~’ . json_encode(data)); access-token : Provided by airpay data data : parameter passed in the request91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps
format requiredStringMention the format of data param in the api (length 1-7)
Eg. Json or xml
json
expiry_date requiredDateSet the expiry date of invoice
Eg. 2022-08-15 19:57:23 (Year-Month-Day Hour:Minute:Second)
2022-08-15 19:57:23
ParameterType ValueDescriptionValue Like
success requiredAlphanumericSuccess or not
Success - 200 (The transaction is success)
Transaction in Process - 211 (The transaction is processing)
Failed - 400 (The transaction is failed)
Dropped - 401 (The transaction will not register properly)
Cancel - 402 (payment that has not yet been processed)
Incomplete - 403 (Not recieved any call back from bank)
Bounced - 405 (The transaction has bounced)
No Records - 503 (There are no records found)
200
invoice_number requiredNumericInvoice number1234745234245
payment_url requiredStringPayment urlhttps://abc.invpay.co.in/invoice/OSYzMjc1NQ==
{
token: "91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps",
data: {
"MERCHANT_ID":1088,
"INVOICE_NUMBER":"1234745234245",
"TOTAL_AMOUNT":14.0,
"MODE":"pgdc",
"customer": {
"FIRST_NAME":"Vikasvijesh",
"LAST_NAME":"",
"EMAIL":"newcompany@xyz.com",
"PHONE":"9XXXXXX433",
"CITY":"Delhi ",
"STATE":"Delhi ",
"COUNTRY":"India",
"PINCODE":"110001",
"ADDRESS":null
},
"invoice_item": {
"ITEM_NAME":"Loan Repayment",
"ITEM_DESCRIPTION":"",
"ITEM_PRICE":14.0,
"ITEM_QUANTITY":1,
"ITEM_TAX":0.0,
"ITEM_IMAGE":""
},
"CHARGE":,
"SEND_REQUEST": {
"EMAIL":false,
"SMS":true
},
"CUSTOM_DATA": {
"my_custome_field":"abc1234"
}
},
format: "json",
expiry_date: "2022-08-15 19:57:23"
}
HTTP/1.1 200 OK
{
"success": true,
"invoice_number": "1234745234245",
"payment_url": "https://abc.invpay.co.in/invoice/OSYzMjc1NQ=="
}
HTTP/1.1 502 Not Found
{
"status": 502,
"message": []
}