GST Calculator
This api is for calculating GST(Goods and Services Tax) . We have to pass cost , profit , gst and same_state flag in request. If the request have valid data we will get a success response.
https://kraken.airpay.co.in/airpay/ms/baas/api/gst-calculatorHeader
Section titled “Header”| Parameter | Type Value | Description | Value Like |
|---|---|---|---|
| affiliate required | Text | Will be provided by airpay | 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps |
| checksum required | Text | $string = $param.self::$secret_key; sha256(<concate all values+SECRET KEY>); (required) | 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps |
| api-key required | Text | Will be provided by airpay | 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps |
| processor-key required | Text | Will be provided by airpay | 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps |
Request Body
Section titled “Request Body”| Parameter | Type Value | Description | Value Like |
|---|---|---|---|
| cost required | Text (10) | Cost of production | 10000 |
| profit required | Text (3) | Profit Margin value | 500 |
| gst required | Text (3) | Goods and Services Tax | 100.50 |
| same_state required | Text | same state falg(Y/N) | Y |
Success 200
Section titled “Success 200”| Parameter | Type Value | Description | Value Like |
|---|---|---|---|
| status required | Numeric ( 3) | 400- fail,200-success | 200,400 |
| message required | Text | success, fail | sucess,fail |
| data required | Text | { “cost”: { “amount”: “10000.00”, “gst”: { “sgst”: “5025.00”, “cgst”: “5025.00”, “igst”: "" } }, “profit”: { “amount”: “50000.00”, “gst”: { “sgst”: “25125.00”, “cgst”: “25125.00”, “igst”: "" } }, “total_gst”: “60300.00”, “total_amount”: “120300.00” } |
Request Example
Section titled “Request Example” curl --location --request POST 'https://kraken.airpay.co.in/airpay/ms/baas/api/gst-calculator' \--header 'api-key: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \--header 'affiliate: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \--header 'checksum: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \--header 'processor-key: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \--header 'Content-Type: application/x-www-form-urlencoded' \--data-urlencode 'cost=10000' \--data-urlencode 'profit=500' \--data-urlencode 'gst=100.50' \--data-urlencode 'same_state=Y'Success Response
Section titled “Success Response”{ "status": 200, "message": "success", "data": { "cost": { "amount": "10000.00", "gst": { "sgst": "5025.00", "cgst": "5025.00", "igst": "" } }, "profit": { "amount": "50000.00", "gst": { "sgst": "25125.00", "cgst": "25125.00", "igst": "" } }, "total_gst": "60300.00", "total_amount": "120300.00" }}Error Response
Section titled “Error Response”{ "status": "400", "message": "Failed", "data": ""}