#power-subscription-coupon

1 messages · Page 1 of 1 (latest)

vapid oreBOT
coral warren
#

Unfortunately one-off payments don't support coupons like that. For an Elements page you will need your own coupon/discount logic

potent vector
#

ok thanks. do you mean on my backend?

#

Can you point me in the right direction in your docs for this?

#

i already have a subscription setup in my stripe account

#

so i can't just pass a coupond value somehow that I can retrieve from stripe?

coral warren
#

Whoops my brain forgot that you could be using subscriptions with this for a moment. You can apply this to the subscription on your backend, one moment finding the doc

potent vector
#

ok thanks!

coral warren
potent vector
#

ok great thanks alot!

potent vector
#
const response = await stripe.confirmCardPayment(clientSecret, {
                payment_method: {
                    card: cardElement as StripeCardNumberElement,
                    billing_details: {
                        name: name,
                        email: email,
coupon: 'ksjdfkjsdf'
                    },
                },
            });
#

can i just add a value to the payload?

coral warren
#

This would be a separate custom rest call to your server that sends the code to your backend.

potent vector
#

ok thanks

#

one last question sorry, where can i view all the available fields to pass for the billing_details: object?

#

im thinking maybe i can pass the coupon value into some available field for the billing_details object and then grab it on my backend?

coral warren
#

Unfortunately you can't pass the coupon as part of this stripe call. It will have to be a separate call to your server which then makes the call, and once that is successful the client side confirm call can be made.