#secSeNige-payment-element

1 messages ยท Page 1 of 1 (latest)

plucky birch
#

Hello ๐Ÿ‘‹

solar haven
#

hi

plucky birch
#

Double checking to make sure ๐Ÿ˜„

solar haven
#

thank you

plucky birch
#

there are multiple questions so I'll try to answer them one by one

Am i right in thinking the users email is required to load the paymentIntent for the payment element?
It may be important to your app's flow but a user's email is NOT required to create a payment intent for the payment element

#

also am i right in thinking there is currently no method of calling a function only if the payment has succeeded on the client side?
You can put functions behind a conditional to check if the payment has succeeded or failed and then call the appropriate function

solar haven
#

in the stripe docs for the example regarding using the payment element with subscriptions, the subscription is created before the payment element is rendered.

this makes sense because this is the information i use to provision access to my application once i have received confirmation of payment via webhooks.

I'm just wondering if there is an example of a registration flow available that doesn't require any user details to receive payment and provision access to my platform.

plucky birch
#

it feels a bit strange registering a user before i confirm payment, if i can't confirm payment before then i also need to design a whole solution purely for users who dont have the money or decide to delay.
You can implement webhooks and listen for events when the payment succeeds or fails and decide to either persist or delete the user accordingly.

solar haven
#

ok that makes sense

#

it does feel strange when added to my current application flow, i guess a more or less complete redesign of that will be needed to incorporate the payment element

plucky birch
#

Hmm can you tell me what platform you're building your integration on?

solar haven
#

it's react client side with express server

#

nodejs

solar haven
plucky birch
#

sure thing

solar haven
#

when implementing your suggestion above where the user is registered and deleted if they fail to pay

is there a time limit on payment intents, and if so could you tell me the webhook i need to listen to in order to invoke deletion of the user

#

in other words, how would you determine whether a user has failed payment, decided not to proceed and someone who is just taking a long time with their payment

plucky birch