Setting Stripe customer #14544
-
|
Hi everyone. I'm struggling to understand how I can, using Medusa + its Stripe integration, make sure that transactions in Stripe are linked to the proper customer (for analytics, saved credit cards infos, etc). At first I made a custom endpoint to create a payment intent (following Stripe's documentation here : https://docs.stripe.com/payments/accept-a-payment?platform=ios#add-server-endpoint) but then I realized (I think) that the Medusa workflow is a little different, as I need to initialize a payment session of a payment collection, and this process with Stripe's provider id will use Stripe's API directly to create the intent. But I can't see a way, via this /store/payment-collections/{id}/payment-sessions API, to set the customer infos. What would be the proper way to achieve what I want to do? PS : I'm only using the Medusa Storefront API for now (mobile app context) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Ah my bad, it's apparently already handled via the account holder mechanism! So I did nothing but create an endpoint to be able to get the required informations to display Stripe's payment sheet (id, ephemeral key), the rest is automatically handled by Medusa. |
Beta Was this translation helpful? Give feedback.
Ah my bad, it's apparently already handled via the account holder mechanism!
So I did nothing but create an endpoint to be able to get the required informations to display Stripe's payment sheet (id, ephemeral key), the rest is automatically handled by Medusa.