#maufcost - finalize invoice

1 messages · Page 1 of 1 (latest)

broken sonnet
#

Can you share the request ID?

warped sentinel
#

You mean the invoice id?

#

I've got the subscription schedule id: sub_sched_1LKS5vDTqg4XgBDsAOPFAJKX

broken sonnet
#

No id of the failed request

warped sentinel
#

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`)
broken sonnet
#

Ah. Your syntax is wrong. Needs to be (string, Object) not (Object)

warped sentinel
#

Oh dip. Stupid head

#

Thanks a lot haha. You guys are amazing

broken sonnet
#

No problem!

warped sentinel
#

Ok. So now, the invoice is not coming in the schedule object.

#

Should I also expand the subscription schedule object?

broken sonnet
warped sentinel
#

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.

broken sonnet
#

Ah so you need to track down the first invoice id. Gotcha

#

One moment

#

Then grab latest_invoice

warped sentinel
#

Thanks! ❤️

broken sonnet
#

No prob