#brittkim

1 messages · Page 1 of 1 (latest)

static auroraBOT
thorny pulsar
glass depot
#

Hi there 👋 promo codes are only supported through Checkout Sessions. Can you elaborate on what you're referring to when you mention email, are you wanting to always collect an email address as part of a Payment Element integration?

thorny pulsar
#

I'm specifically wondering how to accomplish this using the PaymentElement (or what other elements I would need)

#

Yeah, I'm basically just wondering how I accomplish a lot of what I'm seeing on the Payment Links (like in the image I shared), though I am currently using Payment Elements for my UI

#

I'm now reading about checkout sessions

glass depot
#

Checkout Sessions are going to the be the closest parity to Payment Links (Payment Links actually use Checkout Sessions under the hood). Elements doesn't support promotion codes currently, and you would need to build your own custom field for collecting those if that's something you want to support, but they won't be linked back to the Payment because you can't associated Payment Intents with coupons/promotion codes.

thorny pulsar
#

Okay

#

Great

#

Is there a resource for seeing all the ways to configure the checkout session

glass depot
#

For email, you would display your own field for collecting that, and then suppress it within the Payment Element. You do so by setting this field to never when creating the Payment Intent:
https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-fields-billingDetails-email
then ensure you pass the value you collect in your field when confirming the payment.
https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-fields-billingDetails-email

thorny pulsar
#

PERFECT

#

Thanks!

glass depot
#

Any time!!