Skip to content
Cipay
Esc
navigateopen⌘Jpreview

Check a public discount code without resource enumeration

POST/v2/public/discounts/check
Header parameters
x-request-idstring
Optional caller-provided request correlation ID.
min length 1
Request body
requiredapplication/json
locatorstringrequired
min length 1 · max length 160
codestringrequired
max length 64 · matches ^[A-Z0-9_-]{1,64}$
offerIdstring<uuid>
formIdstring<uuid>
Responses
200OK
acceptedbooleanrequired
outcomestringrequired
Allowed:acceptedinvalidineligibleexpiredrate_limited
discountHalalasinteger | anyrequired
Show properties
Any of:
integer
integer
any
any
404Standard Cipay error response.
errorobjectrequired
Show properties
codestringrequired
min length 1
messagestringrequired
min length 1
requestIdstringrequired
min length 1
detailsobject
422Standard Cipay error response.
errorobjectrequired
Show properties
codestringrequired
min length 1
messagestringrequired
min length 1
requestIdstringrequired
min length 1
detailsobject
429Standard Cipay error response.
errorobjectrequired
Show properties
codestringrequired
min length 1
messagestringrequired
min length 1
requestIdstringrequired
min length 1
detailsobject
500Standard Cipay error response.
errorobjectrequired
Show properties
codestringrequired
min length 1
messagestringrequired
min length 1
requestIdstringrequired
min length 1
detailsobject
Request
curl -X POST "https://api.cipay.net/v2/public/discounts/check" \
  -H "Content-Type: application/json" \
  -d '{
  "locator": "string",
  "code": "string",
  "offerId": "<uuid>",
  "formId": "<uuid>"
}'
Response
{
  "accepted": true,
  "outcome": "accepted",
  "discountHalalas": 0
}