#uh oh

1 messages ยท Page 1 of 1 (latest)

mossy spruceBOT
short notch
#

The subscription doesn't have that status but the subscription will have a latest_invoice and that invoice will have a payment intent in the requires_action state

solemn mirage
#

So I need to make another call to Stripe to get the invoice object?

short notch
solemn mirage
#
const sub = await stripe.subscriptions.create(
  {
      customer: stripe_customer_id,
      items: [{ price: price_stripe_id }],
      proration_behavior: 'none',
  }, {
      stripeAccount: ".......",
      expand: ['latest_invoice'],
    }
);```
#

Would it be like this?

short notch
#

Yes, though you would likely want to expand latest_invoice.payment_intent if you are looking for whether 3DS is needed. I don't think the invoice will have any info specifically about that

solemn mirage
#

Right now, in the subscription object that's being returned, latest_invoice is only a string

#

not an object

short notch
#

Sounds like expand isn't being passed in properly.

#

Oh in our ref, expand goes in the first hash not the second. Can you try moving it there?

solemn mirage
#

It worked! thank you!

solemn mirage
#

Quick question about renewals for subscriptions. If a customer uses a payment method that requires 3DS, would it ask for 3DS when the subscription is renewed? or it's only when the subscription is first created

plucky finch
#

๐Ÿ‘‹ stepping in