#Meet Shah
1 messages · Page 1 of 1 (latest)
You can use this endpoint: https://stripe.com/docs/api/invoices/send
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Request req_d08wRCtG3vVuP3: You can only manually send an invoice if its collection method is 'send_invoice'.
giving me this error
Ah, then I guess you'd just do it via the Dashboard I'm afraid
Alternatively you can use get the invoice_pdf from the API and share it with your customer
and how can I send recipt of paid status payment?
Again, from the Dashboard
We don't really have APIs to trigger that as it's done automatically (in live mode, assuming you have the setting enabled)
so recipt will send to user automatically?
In live mode, yes: https://stripe.com/docs/receipts
We don't send invoices/receipts in test mode automatically
invoice = stripe.Invoice.create(
customer=customer_id,
stripe_account=account_id,
collection_method='charge_automatically',
auto_advance = True
)
inovoiceitem=stripe.InvoiceItem.create(
customer=customer_id,
stripe_account=account_id,
amount = 1500,
currency = 'usd',
invoice = invoice.id
)
invoice = stripe.Invoice.finalize_invoice(
invoice.id,
stripe_account=account_id
)
stripe.Invoice.pay(invoice.id,stripe_account=account_id,
receipt_email='meet@infy.tv')
I have aboce code
in this test mode invoice is getting genrated and payment is also getting completed
I want to send invoice and recipt to user
recipt will send as you said
For invoice I need to downlaod pdf and then need to send?
In test mode, you go to the Dashboard page for the Invoice and you can send it from there
Otherwise, in live mode, if you have the setting enabled it'll send automatically on payment
Yes, as explained here: https://stripe.com/docs/invoicing/send-email
okay thanks