#rob-promotioncode-validation

1 messages · Page 1 of 1 (latest)

abstract perchBOT
mossy sapphire
#

rob-promotioncode-validation

#

Can you clarify what you mean by "when validation a promo code"

lean pewter
#

so, if we have a customer enter a promo code in our FE, and we want to get a promotion code object back from Stripe representing that promo ... is there a way to search by code value, rather than bringing back a list of all codes...

This is the api reference:

#

can we search by the customer-facing code instead of bringing back all the codes?

mossy sapphire
#

The picture you took shows you the exact API to use

#

you use the List PromotionCodes API and pass code: 'xxxxx' to filter and get the one you want from its code

lean pewter
#

ohhh, so we can pass in code, and it will return the single matching entry as a filter?

#

I didn't know it worked like that ...

mossy sapphire
#

Yes!