#maufcost - finalize invoice
1 messages · Page 1 of 1 (latest)
You mean the invoice id?
I've got the subscription schedule id: sub_sched_1LKS5vDTqg4XgBDsAOPFAJKX
No id of the failed request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
I believe it's this one since it's the last one on my logs dashboard: req_qT3M3LY5tm89Pt
Just to give you a bit of context. I am creating a subscription schedule, and I want to get a payment intent client secret from it. So, instead of having to wait for the schedule's invoice to finish processing (after that 1 hour), I am finalizing it myself.
And the specific error message is:
(node:13343) UnhandledPromiseRejectionWarning: Error: Stripe: Argument "invoice" must be a string, but got: [object Object] (on API request to `POST /invoices/{invoice}/finalize`)
Ah. Your syntax is wrong. Needs to be (string, Object) not (Object)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
No problem!
Ok. So now, the invoice is not coming in the schedule object.
Should I also expand the subscription schedule object?
What do you mean by this?
I am creating a subscription schedule, and I want to get the invoice id of that subscription schedule from the stripe.subscriptionSchedules.create call.
I know that I can do this by expanding the call above, but I just don't know what to put in the expand array.
Ah so you need to track down the first invoice id. Gotcha
One moment
You'd want to expand subscription: https://stripe.com/docs/api/subscription_schedules/object#subscription_schedule_object-subscription
Then grab latest_invoice
Thanks! ❤️
No prob