#rohit-PaymentIntent
1 messages · Page 1 of 1 (latest)
Hi there, I'd recommend you to update your integration to use the PaymentElement + PaymentIntent API.
So after creating the PaymentIntent, send its client_secret to front end, use the client_secret to render the payment elements, where your customer can input the card details
A payment method will be created implicitly under the hood.
for the client side, I can use stripe checkout form with this?
Yes, using Stripe Checkout is even easier, you just create a Checkout session and open the session.url in your browser.
and I can also use it with subscription as well?
Currently:
- I have a custom form at client side to capture customer card details.
- Then I create Stripe.card.createToken with these details.
- Then I add card object to the stripe customer sources
Yes, you can use Checkout Session with subscription by setting the mode=subscription https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-mode
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.