#firebalsi

1 messages · Page 1 of 1 (latest)

devout finchBOT
full loom
#

Hi, let me help you with this.

#

I am not sure if there's an example somewhere but it should be possible.

#

The customer will be charged when you confirm the payment.

#

Are you following any guide for integrating ECE?

paper vortex
full loom
paper vortex
#

Ah I see, this is not enable by default?

full loom
full loom
#

You can try doing this and if PayPal doesn't show up, you can ask Stripe Support to enable this for you.

paper vortex
full loom
devout finchBOT
paper vortex
#

Alright thank you so much, I think I understand.

So in the onConfirm callback we would have to create the payment method based on the expressCheckoutElement, then we can create a subscription using subscription.create() and we send back the "latest_invoice.payment_intent.client_secret" we just revieved after creating the subscription. Then we need to call confirmPayment and prive it with the client secret.

Would the confirmPayment function als trigger the user being redirected back to website from the wallet or would they be redirected earlier in the process already?

And does this seem correct or am I maybe missing something?

unique fossil
#

generally it would redirect them, to the return_url you pass. To be honest I haven't built this exact flow myself yet so I don't have good intuition for how the pieces would fit together

#

but in general the correct way to start subscriptions on Stripe is to create the Subscription first and then confirm the latest_invoice.payment_intent.client_secret on the frontend yes

paper vortex
#

Alright, thank you. Then I will test this out with the ExpressCheckout element and hopefully it will work with this element as expected