#ReneDenmark-checkout-promo-code

1 messages · Page 1 of 1 (latest)

oblique pagoda
#

Hey there! Can you share the ID of the Checkout Session?

#

ReneDenmark-checkout-promo-code

sturdy wraith
#

Don't know where to find that. It is on test.

oblique pagoda
#

Thanks let me check

sturdy wraith
#

Here is the js code: const options = {
clientSecret: clientsecret,
// Fully customizable with appearance API.
appearance: {/.../},
};

        // Set up Stripe.js and Elements to use in checkout form, passing the client secret obtained in step 5
        elements = stripe.elements(options);

        // Create and mount the Payment Element
        const paymentElement = elements.create('payment', {
  fields: {
      "allow_promotion_codes": true,
    billingDetails: {
      //name: 'never',
      //email: 'never',
      //address: 'never'
    }
  }
});
        paymentElement.mount('#payment-element');
oblique pagoda
#

Ah, so you're not using Checkout?

sturdy wraith
#

ohh sorry.

oblique pagoda
#

allow_promotion_codes isn't a valid parameter with Elements

sturdy wraith
#

Aha. Not in any form?

oblique pagoda
#

The associated discount would then be reflected on the resulting Payment Intent

sturdy wraith
#

Ok. To bad. Thanks for the effort.

oblique pagoda
#

You could use Checkout instead, which will make this way easier

sturdy wraith
#

Yes, but we like the in page payment instead of the redirects.