#Murder

1 messages ยท Page 1 of 1 (latest)

sharp sinewBOT
burnt cradle
visual marten
#

Yeah but when i created an invoice and save it to a variable it says its None

#

"hosted_invoice_url": null,

#

o it is on the example as well

#

Is there a way to generate one or something similar so i can have a link to pay?

burnt cradle
#

Your Invoice will need to be in a finalized state (i.e. ready for payment) in order for that field to exist. Can you confirm that it is?

visual marten
#

It says Incomplete

burnt cradle
#

What's the status on the Invoice itself?

#

Should be one of draft, open, paid, uncollectible, or void

visual marten
#

Oh

#

Open

burnt cradle
#

Alright, okay, so if hosted_invoice_url is null then the Invoice must have been set to collection_method: charge_automatically, which means you can't get the URL from the API. You can either (a) go to the Invoice in the Stripe dashboard and select "Send invoice", or (b) void that invoice and create a new one with collection_method: send_invoice

visual marten
#

But i am using that collection method

burnt cradle
#

Do you have an Invoice ID I can look at?

visual marten
#

Yeah sure

#

in_1LzotFE86oi1VR03NSEscRm6

burnt cradle
visual marten
#

But when i print it, thats what it comes as

#

Lemme test it, one sec

burnt cradle
#

Where/when are you printing it?

visual marten
#

Now its working haha

#

Yeah i was printing it too early

#

Changed to printing it when sent and it works

burnt cradle
#

Nice!

visual marten
#

Thank you ๐Ÿ™‚

burnt cradle
#

Good to know that it's working as expected, because the alternative was that Stripe was broken and that's a much harder problem to solve

burnt cradle
visual marten