#sanket8360
1 messages · Page 1 of 1 (latest)
Hi there
We can't re-open threads but if you summarize your issue here then I'd be happy to help
Hi Bismarck nice to see you again.
Yesterday we talked to you about hourly subscriptions.
And I am trying all the links you provided.
But I don't know how I can checkout the product with default payment methods or new payment methods.
?
Hey!
Can you explain a little bit more what you mean by "how I can checkout the product with default payment methods or new payment methods."?
Sure.
I want to subscribe hourly but stripe doesn't offer hourly subscription. So I am going to make this one time payment.
But I have more plans like monthly and yearly intervals. For that plan I use Stripe subscription methods.
So how can I implement one-time checkout with default payment methods?
Gotcha gotcha
So with one-time payments you don't use default payment methods
You have to pass the actual PaymentMethod ID to the payment_method parameter of the PaymentIntent
Here is my UI for both subscription and one-time.
So you want to retrieve the PaymentMethod ID associated with the "saved card" that you have selected.
Then pass that PaymentMethod ID to the PaymentIntent when you create/confirm it
Yes i get my paymentMethodId
But
How do I pass payment intent here?
You need to create the PaymentIntent there using https://stripe.com/docs/api/payment_intents/create
So when you do that you also pass the PaymentMethod ID to payment_method and pass confirm: true
Ok then next?
Well that should create a Charge
https://stripe.com/docs/api/checkout/sessions
So I have to use this API for one time purchase after payment intent?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
?
Yes
If you created/confirmed the PaymentIntent then you should see a charge
Can you give me the example PaymentIntent ID?
Sure
GIve me a min.
Without Payment Method: pi_3NSi1OID8KX4Fnem1a54EKjw
With payment Methods:
pi_3NSi5vID8KX4Fnem0eJ5P2iK
Yep cool so there is a Charge associated with pi_3NSi5vID8KX4Fnem0eJ5P2iK
So that one was successful
Ohhh Ok
So our payment is successful right?
And how do we get payment confirmation in the system?
And how to add expiration time in PaymentIntent?