Create Invoice
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/createParameter
Section titled “Parameter”| Field | Type | Description |
|---|---|---|
| data | Json | Xml |
| token | String | Unique token need to be passed by every company (length 150, required) Calculated by md5(access-token . ’~’ . json_encode(data)); access-token : Provided by airpay data data : parameter passed in the request |
| format | String | Mention the format of data param in the api (length 7, required) Eg. Json or xml |
| expiry_date | Date | Set the expiry date of invoice (required) Eg. 2022-08-15 19:57:23 (Year-Month-Day Hour:Minute:Second) |
Request-Example:
Section titled “Request-Example:”{ 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"}Success 200
Section titled “Success 200”| Field | Type | Description |
|---|---|---|
| success | Alphanumeric | Success 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) |
| invoice_number | Numeric | Invoice number |
| payment_url | String | Payment url |
Success-Response:
Section titled “Success-Response:”HTTP/1.1 200 OK{ "success": true, "invoice_number": "1234745234245", "payment_url": "https://abc.invpay.co.in/invoice/OSYzMjc1NQ=="}Error-Response: Not Found
Section titled “Error-Response: Not Found”HTTP/1.1 502 Not Found { "status": 502, "message": [] }