#elBR

1 messages · Page 1 of 1 (latest)

harsh merlinBOT
iron burrow
#

Hey there

steep carbon
#

I am applying this promotion code

#

promo_1LhY69EMyoEBRsWZLbzkExON

#

that is created for a coupon that can be used only once

iron burrow
#

Looking

#

Give me a min

steep carbon
#

ok thank you

iron burrow
#

Duration "once" just means that it would only apply to one payment

steep carbon
#

yes but the customer can pay multiple invoices if I apply that coupon to the same customer

iron burrow
#

Correct

steep carbon
#

I am not understanding the part "would only apply to one payment"

iron burrow
#

If you only want the promo code to be used a single time then you set max_redemptions

steep carbon
#

but then what does it mean when I just set once and no max_redemptions. Is it the same as a coupon that is not "once"?

iron burrow
#

This explains how duration works... it has to do with how many payments the coupon or promo code will apply to if you set it on a Subsscription

#

max_redemptions is specifically for how many times that promo code can be used

steep carbon
#

I am not using it for a subscription

iron burrow
#

Right, so once doesn't really have an effect for you, but it also doesn't do the behavior you want. You need to use max_redemptions if you don't want the promo code to be redeemed multiple times.

#

As maybe you are trying to just allow your promo code to be used by new Customers?

proven current
#

ok thank you

#

I have another question

#

I make my customer type the promotion code code

#

What is the best approach to check if that is valid or not?

iron burrow
#

I'm not sure what you mean

proven current
#

I don’t see any api call for verifying it

iron burrow
#

We will validate the promo code for you.

#

Based on how you create it

proven current
#

I create for example a promotion code with name “SALE”

#

and then I give that name to the customer

#

as all platform do

#

right?

#

then I want to validate it with the right promotion code and apply the discount

iron burrow
#

Are you using Stripe Checkout?

proven current
#

no I am making custom

iron burrow
#

With one-off invoices?

proven current
#

yes

#

if I would use Stripe checkout wouldn’t I do the same

iron burrow
#

Okay so then yeah this works a bit differently for you since we don't actually support applying promo codes directly to one-off invoices.

#

When you create an invoice you use the discounts hash

#

Which only takes either coupon or discount

#

Then you apply the coupon associated with the promo code.

#

Stripe Checkout allows for taking Promo Codes directly.

#

So all that happens is the Customer enters the promo code on Checkout and then it is applied directly

proven current
#

but what API call does Stripe use in Checkout. Why it isn’t also available for us that use one-off invoices?

iron burrow
#

Because it just hasn't been built yet on one-off invoices unfortunately