#cavint9510

1 messages ยท Page 1 of 1 (latest)

astral sierraBOT
gaunt lotus
queen bone
#

so i can't add metadata to invoice when i create subscription immediately?

gaunt lotus
#

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

queen bone
#

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.

gaunt lotus
#

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

queen bone
gaunt lotus
#

Can you share the invoice ID (in_xxx)?

queen bone
#

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"

gaunt lotus
queen bone
#

wait moment,i make a test

astral sierraBOT
queen bone
#

I'm confused.yesterday i receive a invoice.finalized event,but the subscription was no automatic deduction.Today, it automatically deducts fees.

north helm
#

Hi, taking over here

queen bone
#

hey

#

so if i want to bind metadata to this subscription lastest invoice before inovice.paid event comming.how can ido?

north helm
#

Let's focus on one question first

#

Do you want to look at the automatic deduct, or the metadata?

queen bone
#

metadata

#

Automatic deduct we can discuss later.

north helm
#

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

queen bone
#

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

north helm
#

That's because it's the first Invoice

#

The first Invoice will always finalized and attempt to charge immediately

queen bone
#

ok

#

Maybe you can tell me how to bind metadata before invoice.paid at first subscribe

#

๐Ÿ˜‚

north helm
#

It's a tricky one

#

But yes the first Invoice has been difficult to modify, in charge_automatically mode