#becki_42684

1 messages · Page 1 of 1 (latest)

cunning patrolBOT
echo turret
#

Hi 👋

Okay a Subscription Schedule creates a Subscription object (with future changed baked in, that's the schedule part).

To get the Payment Intent you need to look at the latest_invoice property on the Subscription object. https://docs.stripe.com/api/subscriptions/object#subscription_object-latest_invoice

This will have a payment_intent property that links to the Payment Intent.

You can expand all of this to get this data in a single API call. Retrieve the Subscription and pass expand=['latest_invoice.payment_intent] and you will get both the full Invoice and Payment Intent objects (instead of IDs).
https://docs.stripe.com/expand

languid pewter
#

okay, when i tried that, all i got was a setup payment intent i believe

echo turret
#

Okay well let's take a step back. Are you creating the Subscription with a free trial period?

languid pewter
#

no, but i need the first payment period to be a different price than the other periods. not necessarily a discount, it could be more the first period.

echo turret
#

Okay, do you have an example Subscription or SubSchedule ID I could take a look at?

cunning patrolBOT
languid pewter
#

not handy, i've been banging my head against this wall for awhile. would i get a setup intent if there was no price for the first phase?

eager sage
#

Hello if you get an id we can take a look to see what you're doing

#

But yeah a $0 invoice won't have a payment intent, so that makes sense

languid pewter
#

ok, that must have been an error on my end. i just wanted to confirm that that was the correct logic.

#

thank you!

eager sage
#

yep yep. you can use setupintent to collect payment method as well if the first invoice is $0

#

but that all sounds normal