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”| Field | Type | Description |
|---|---|---|
| affiliate | Text | Will be provided by Airpay (required) |
| checksum | Text | $string = $param.self::$secret_key; sha256(<concate all values+SECRET KEY>); (required) |
| api-key | Text | Will be provided by airpay ( required) |
| processor-key | Text | Will be provided by airpay ( required) |
Parameter
Section titled “Parameter”| Field | Type | Description |
|---|---|---|
| cost | Text | Cost of production (length 10,required) |
| profit | Text | Profit Margin value (length 3,required) |
| gst | Text | Goods and Services Tax (length 3,required) |
| same_state | Text | same state falg(Y/N) (required) |
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 200
Section titled “Success 200”| Field | Type | Description |
|---|---|---|
| status | Numeric | 400- fail,200-success(length 3) |
| message | Text | success, fail |
| data | 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” } |
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": ""}