Closed Troy-Yang closed 3 years ago
Hi @Troy-Yang –
You're correct that this is an undocumented (and niche) integration path, primarily designed for Stripe users who needed to upgrade to the PaymentIntents
API (for example, to support Strong Customer Authentication), but still support local payment methods that weren't yet available on the PaymentIntents
API. It's really just an alternative for calling POST /v1/charges
, and shouldn't be necessary for most Stripe users, as you would typically just run the two APIs side-by-side, and especially now as most payment methods are now available directly on the PaymentIntents
API.
Please note this is a different use-case to card_
and source_
compatibility on the PaymentIntents API.
Hi everyone,
I am looking into this demo and it works great!
However, I am confusing on why it works by connecting a paymentIntent with a source together in the demo?
This repo demo codes in client side at this line:
// creating source with metadata ... metadata: { paymentIntent: paymentIntent.id, } ...
Then in webhook of server side at line:
await stripe.paymentIntents.confirm(paymentIntent.id, {source: source.id});
I truly didn't find the
confirm
api includes the source parameter.Can any one explain this part? I know it works, but i am looking for the evidence. Btw, I think the paymentIntent is very good and I do want to use it in Source when dealing with some payment methods.
Thanks in advanced!