#adsaeed

1 messages · Page 1 of 1 (latest)

clear nacelleBOT
worldly prairie
#

Yes you need to choose between direct API (ie. PaymentElement) vs Checkout

#

With Checkout the backend will be a bit different too. But generally Checkout is easier and recommended

#

It's just to create an URL and redirect

outer jungle
#

Our previous BE logics in the case of payment intent failture, price update during order is still in the process, refunds etc will remain the same?

#

Or would we have to implement these again as well?

worldly prairie
#

You will need to implement new endpoint for BE

outer jungle
#

Does checkout allow the user to add/store/ manage multiple cards?

clear nacelleBOT
outer jungle
#

Can user choose primary/ default card?

worldly prairie
#

No not really. That would requires custom integration via direct API (Payment Element)

outer jungle
#

How would be the flow like in that case? where do i choose between my cards as a useR?

worldly prairie
#

To be able to choose the saved card you need to implement your own UI to render the saved cards.

#

Let's say first time I have your customer paid, you will have a Customer object with attached PaymentMethod Id

#

You list all Payment Methods attached to that Customer, in backend, then pass the array back to frontend, ie. those last4

#

Then in frontend, you display ****xxxx and let your customer choose, with some hidden field tighted to its PaymentMethod Id pm_xxx. Whenever they chose, you send the corresponding PaymentMethod Id back to your server to charge them

outer jungle
#

I see, thanks for explaining! in this case, there wouldn't be redirection to the checkout page?

worldly prairie
#

Yes this is a different flow to Checkout

outer jungle
#

Alright! Thanks in your opinion the effort of implementing a new endpoint for BE and switching to API - what's the effort like?