#tungtn1099
1 messages · Page 1 of 1 (latest)
👋 Hi there, Happy to help!
that propoerty is an expandable one. By default it has the InvoiceId (as a String)
if you expand that field you'll get an Invoice object
how do i expand it?
I invite you to learn more about expanding:
https://stripe.com/docs/api/expanding_objects
For example, in your use case:
const subscription = await stripe.subscriptions.create({
customer: customerId,
items: [{
price: priceId,
}],
payment_behavior: 'default_incomplete',
payment_settings: { save_default_payment_method: 'on_subscription' },
expand: ['latest_invoice.payment_intent'],
});
Yes correct.
thanks :D