Skip to content

Check a Stripe promo code for a user

Request

Checks a Stripe promo code for the logged in user. The promo code is checked for validity of the current user based on first time order restriction, specific customer restriction, max allowed redemptions and expiration. The payment form payment options are checked to match the minimum payment amount requirements of the promo code.

Security
CookieBlaizeSession or JwtQuery or JwtHeaderXBlaizeJwt or JwtHeaderXZephrJwt or JwtBearer or JwtCookie
Query
codestringrequired

The ID of the Stripe promo code to check.

paymentFormstringrequired

The slug of the Stripe payment form the promo code relates to.

cURL
curl -i -X GET \
  'https://demo-site/zephr/payment/stripe/promo-code?code=string&paymentForm=string' \
  -b blaize_session=YOUR_API_KEY_HERE

Responses

OK

Headers
any
Bodyapplication/json
codestring

Same code supplied as a query parameter in the request

discountstring

The discount offered by this promo code

paymentOptionsArray of objects

The payment options (either from the supplied payment form or from the request body) filtered for promo code validity

Response
{ "code": "string", "discount": "string", "paymentOptions": [ { … } ] }