solidusio / solidus_stripe

💳 Integrate Solidus with Stripe
https://stripe.com
BSD 3-Clause "New" or "Revised" License
36 stars 62 forks source link

being able to create payment intent via API #182

Open loicginoux opened 1 year ago

loicginoux commented 1 year ago

Desired Behavior

I understand that the priority is to have a payment flow working with the starter front. In order to support more cases, it would be good to also be able to create a payment intent for to a given order via API. This would allow API clients (custom front ends, mobile apps) to use this endpoint. suggesting a SolidusStripe::Api::IntentsController#create via the http route POST /api/orders/XXXX/stripe_intents

blocked by https://github.com/solidusio/solidus_stripe/issues/154 related to https://github.com/solidusio/solidus_stripe/issues/173

Current Behavior

For reference, the current payment intent creation is done in a view as said in this comment.

Additional notes

In order to support mobile apps, an ephemeral key may be created as described here

elia commented 1 year ago

Yes, the focus is now on the starter frontend, but by the end of this we'll have the building blocks that will make adding an api controller really straightforward.