Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
API Reference
Retrieve a coupon, including the categories or products it applies to
cURL
curl --request GET \ --url https://api.hit-pay.com/v1/coupons/{coupon_id} \ --header 'X-BUSINESS-API-KEY: <x-business-api-key>'
import requests url = "https://api.hit-pay.com/v1/coupons/{coupon_id}" headers = {"X-BUSINESS-API-KEY": "<x-business-api-key>"} response = requests.get(url, headers=headers) print(response.text)
const options = {method: 'GET', headers: {'X-BUSINESS-API-KEY': '<x-business-api-key>'}}; fetch('https://api.hit-pay.com/v1/coupons/{coupon_id}', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.hit-pay.com/v1/coupons/{coupon_id}", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "X-BUSINESS-API-KEY: <x-business-api-key>" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.hit-pay.com/v1/coupons/{coupon_id}" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("X-BUSINESS-API-KEY", "<x-business-api-key>") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) }
HttpResponse<String> response = Unirest.get("https://api.hit-pay.com/v1/coupons/{coupon_id}") .header("X-BUSINESS-API-KEY", "<x-business-api-key>") .asString();
require 'uri' require 'net/http' url = URI("https://api.hit-pay.com/v1/coupons/{coupon_id}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["X-BUSINESS-API-KEY"] = '<x-business-api-key>' response = http.request(request) puts response.read_body
{ "id": "a304f0fd-4ebb-4a8f-bc90-c7341f90080c", "business_id": "98567029-f559-49f9-916b-042a4255b32a", "name": "Year End Sale", "code": "YEAREND10", "fixed_amount": 500, "percentage": 0, "coupons_left": 100, "is_promo_banner": false, "banner_text": null, "created_at": "2026-10-19T13:23:03.000000Z", "updated_at": "2026-10-19T13:23:03.000000Z", "starts_at": "2026-10-31T16:00:00.000000Z", "ends_at": "2026-12-30T16:00:00.000000Z", "coupon_type": 2, "minimum_cart_amount": 2000, "deleted_at": null, "applies_to_ids": [ { "id": "9bd48afd-ed47-4bdb-aac0-388d6b25d199", "name": "Apparels" } ] }
{ "message": "" }
{ "error_code": "model_not_found", "message": "No query results for Coupon #<coupon_id>" }
"b286daabf9921b5a01a4621f026c111e046f8911feba212996c92159b98427d"
The coupon ID.
200
Fixed discount in minor units (cents).
Percentage discount as a fraction (0.15 = 15%).
0.15
Remaining uses; null = unlimited.
null
UTC.
1
2
3
Minimum cart amount in minor units (cents).
Categories or products the coupon applies to. Empty for coupon_type 1.
coupon_type
Show child attributes
Was this page helpful?