#Murder
1 messages ยท Page 1 of 1 (latest)
Are you looking for this?
https://stripe.com/docs/api/invoices/object#invoice_object-hosted_invoice_url
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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?
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?
It says Incomplete
What's the status on the Invoice itself?
Should be one of draft, open, paid, uncollectible, or void
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
Do you have an Invoice ID I can look at?
hosted_invoice_url is not null: https://dashboard.stripe.com/events/evt_1LzotHE86oi1VR03MQhIdCRE
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Where/when are you printing it?
Now its working haha
Yeah i was printing it too early
Changed to printing it when sent and it works
Nice!
Thank you ๐
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
Sure thing!
๐คฃ I would imagine haha