#cavint9510
1 messages ยท Page 1 of 1 (latest)
After you receive invoice.created event, you may use Update Invoice API to update its metadata: https://stripe.com/docs/api/invoices/update#update_invoice-metadata
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
so i can't add metadata to invoice when i create subscription immediately?
Metadata set on the Subscription object won't be populated to the Invoice object. I'm afraid you can only update invoice metadata after the invoice is created
ok,i have other question. i receive invoice.finalized when i create a subscription.This invoice will not automatically attempt to be paid, is this the correct process.
It depends on what collection_method value is and whether the default_payment_method is set. If collection_method is set to charge_automatically and has default_payment_method, then the payment of the invoice will then be attempted automatically
Can you share the invoice ID (in_xxx)?
And if i received invoice.finalized ,but i response a error to stripe.Whether this invoice will continue to try to pay?
"id": "in_1NQMnQCrULKoEJyg3776ES6S"
The invoice has been paid successfully: https://dashboard.stripe.com/test/events/evt_1NQMnRCrULKoEJygXPO6nsOt
wait moment,i make a test
I'm confused.yesterday i receive a invoice.finalized event,but the subscription was no automatic deduction.Today, it automatically deducts fees.

Hi, taking over here
hey
so if i want to bind metadata to this subscription lastest invoice before inovice.paid event comming.how can ido?
Let's focus on one question first
Do you want to look at the automatic deduct, or the metadata?
So before invoice.finalized, and after invoice.created, you will normally have about 1 hour to update your Invoice
There you can call Update Invoice API, and setup the metadata
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Actually when i create a subscription, this invoice create->finalized->paid at once.
like this
why?
i know how to bind metadata to invoice.but i can't bind it before invoice.paid
That's because it's the first Invoice
The first Invoice will always finalized and attempt to charge immediately
ok
Maybe you can tell me how to bind metadata before invoice.paid at first subscribe
๐