#skoshkarli-PI-subs

1 messages · Page 1 of 1 (latest)

quaint light
#

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)?

sly apex
#

I am using subscriptions via Stripe

#

but it was my understanding that i have to create a PaymentIntent first

quaint light
#

Ah thanks for clarifying

#

No, the Subscription will create the invoice and PaymentIntent automatically

sly apex
#

oh interesting

quaint light
#

If not, recommend reading through that as it will outline the steps for your integration

sly apex
#

was looking at this

#

and that mentioned the PaymentIntent

quaint light
#

Correct, the PaymentIntent is still relevant, but you never create it directly in the Subscription flow.

sly apex
#

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

quaint light
#

Nope no difference — look at the "custom code" option in the docs above

sly apex
#

got it ok thank you. I do have one other question if you dont mind?

quaint light
#

Of course!

sly apex
#

is this id stored on the customer object as well somewhere?

quaint light
#

Yes that Payment Method ID should be attached to the Customer object

sly apex
#

i only see a default source in the docs

#

or will that be default_payment_method key?

quaint light
#

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

sly apex
#

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)

quaint light
#

Then yeah you would grab based on the Subscription default or the Customer default, depending on how you are setting the default

sly apex
#

got it, this is perfect. Thank you so much!