#skoshkarli-PI-subs
1 messages · Page 1 of 1 (latest)
Hi there, to clarify — you are not using Subscriptions via Stripe?
You are just using the PaymentIntents API but to do recurring charges and tracking the Subscription yourself (or with a third party)?
I am using subscriptions via Stripe
but it was my understanding that i have to create a PaymentIntent first
Ah thanks for clarifying
No, the Subscription will create the invoice and PaymentIntent automatically
oh interesting
Have you seen https://stripe.com/docs/billing/subscriptions/build-subscriptions before?
If not, recommend reading through that as it will outline the steps for your integration
Correct, the PaymentIntent is still relevant, but you never create it directly in the Subscription flow.
to clarify further, we have a custom checkout page that we are using and will not be using stripe's if that makes any difference
Nope no difference — look at the "custom code" option in the docs above
got it ok thank you. I do have one other question if you dont mind?
Of course!
we have a page where we need to display customers payment info (address, last 4 of card etc). Was looking at https://stripe.com/docs/api/payment_methods/retrieve which looks like it takes a payment method Id of some sort in order to retrieve
is this id stored on the customer object as well somewhere?
Yes that Payment Method ID should be attached to the Customer object
You can list Payment Methods by Customer if you want to retrieve the PaymentMethod ID that way: https://stripe.com/docs/api/payment_methods/list#list_payment_methods-customer
There are a variety of ways to get that ID
You also will want to determine how you are charging the Subscription
You can either set the default payment method at the Subscription level or at the Customer level
For you recurring Subscription charges
That is another way to grab the PM ID
the listpaymentmethods doesn't work for me because it requires a type but i want to see a payment method for the customer's currently active subscription (which should only be one, regardless of payment method type)
Then yeah you would grab based on the Subscription default or the Customer default, depending on how you are setting the default
got it, this is perfect. Thank you so much!