curl --request POST 'https://api.mayar.id/hl/v1/coupon/validate' \
--header 'Authorization: Bearer Paste-Your-API-Key-Here' \
--header 'Content-Type: application/json' \
--data '{
"paymentLinkId": "4d26ea37-d093-4b92-8f5f-0faec64d65b0",
"tickets": [],
"couponCode": "NFRBFUK",
"finalAmount": 0,
"customerEmail": ""
}'
{
"statusCode": 200,
"messages": "Success",
"data": {
"valid": true,
"coupon": {
"id": "08d233e9-91bc-4d9b-afc2-1dbbe38a1186",
"code": "143KYCN",
"discountType": "percentage",
"discountValue": 10,
"minimumPurchase": null,
"eligibleCustomerType": "all"
}
}
}
Discount & Coupon
Validate Coupon
Endpoint used to validate whether a coupon code has been used or not
Was this page helpful?
