Policy Payment API
This API is for policy payment to be done by customer. We must pass policy id, amount to be deducted, provider id and order id in request. If the request has valid details, we will get a success response.
https://kraken.airpay.co.in/airpay/ms/insurance/api/policy-paymentHeader
Section titled “Header”| Field | Type | Description |
|---|---|---|
| content-type | string | Value : application/x-www-form-urlencoded (required) |
| processor-key | string | Authentication key for airay. Eg 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps (length 20, required) |
| checksum | string | Sha256 of value of hash(‘sha256’,’(orderid)(affiliateid)(ampunt)(policytype)(companyid), processor-key) (required) |
Parameter
Section titled “Parameter”| Field | Type | Description |
|---|---|---|
| policy_id | numeric | Insurance policy id(required) |
| amount | numeric | The premium amount that will be deducted by insurance company (length 10,2, required) |
| provider_id | numeric | Insurance provider id (required) |
| ses_code | string | This should be encoded secret key provided by airpay when order creation (required) |
| order_id | string | Reference txnid shared by affiliate while initiating the transaction (length 20(fixed), required) |
Request-Example:
Section titled “Request-Example:”curl --location 'https://kraken.airpay.co.in/airpay/ms/insurance/api/policy-payment' \--header 'content_type: application/x-www-form-urlencoded' \--header 'processor-key: xvuvkuxKczCf8sap8Zv5ia9qzPEB9iPRvtLr4iJn4SzmMjfuWgVvSsXvyw==' \--header 'checksum: d1e2629k8b5818aa186a4b7d8m5d9a03b6aef297842ec571ad0cc2278bcfcf93' \--header 'Content-Type: application/json' \--header 'Cookie: _csrf=103936bf306d2998165c59d08c9288e68459dcac60bba4d8kcdb7c0a17163ea6a%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%22XORQcv-kviZ_teErDmi5drwuAhdUQpZE%22%3B%7D' \--data '{ "policy_id": "2307", "provider_id": "7", "ses_code": "dbad39fd18d5e4fc9c9ad6a14466a624faed3a91fb035ca0062f6b1e39ea4a05", "amount": "1", "order_id": "MAWEM107051648117107"}'Success 200
Section titled “Success 200”| Field | Type | Description |
|---|---|---|
| status | Numeric | api status [1- success,0-fail] (length 1) |
| data | Jsonarray | data provided will be with orderid |
| message | string | message (length 50) |
Success-Response:
Section titled “Success-Response:”{ "status": "1", "data": [], "message": "success"}Error-Response:
Section titled “Error-Response:”{ "status": "0", "data": [], "message": "Duplicate Order"}