#shubham_29707
1 messages · Page 1 of 1 (latest)
Did you add the description before or after the first invoice was created?
i tried after invoice was created by subscription
i am not able to add description before
i need to add memo in invoice during creating subscription but it created and finalised automatic so i cannot update
@cobalt zinc
Thanks for waiting! Discord is busy now and will take time to respond
Can you share the request ID (req_xxx) that you add the description? Here’s how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support site 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.
sure
req_uzxVKJHzbWdX2c
this is the request id
I'm taking over this thread
Hi there, so you want to set a description on the invoices genreated by a subscription?
yes
thank you
OK, you should listen to invoice.created event. In the webhook handler, you can update the invoice's description (https://stripe.com/docs/api/invoices/update#update_invoice-description) before finalizing it.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
but for automatic charged subscription it will finalised invoice very fast so can i update ?
Yes you can update
ok thank you i am trying
@raven light
i am getting error Finalized invoices can't be updated in this way
it did not wait in event invoice.created
Hi! Can you share the request ID (req_xxx)? Here's how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support site 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.
sure this is the request id
req_JGV8wubrvt36hX
this request id of update invoice api
req_mbtlmh4Eng9pRR
Did you update the description while handling invoice.created events?
yes
i have created subscription
after that in webhook event invoice.created i have called a function in which i am updating description but that update api called after invoice.finalized
Ah right, the first invoice will be finalized immediately, so you can't update it while handling invoice.created, but you can update the subsequent invoices.
then for 1st invoice how could i add description in invoice?
Create their subscription with trial_end set a couple of seconds into the future. The subscription will first generate a $0 invoice, and once the trial is over a non-zero invoice will be created with a one hour draft period. The initial status of this subscription will be trialing and will transition to either active or past_due depending on the payment outcome.