#EvelynWaugh

1 messages · Page 1 of 1 (latest)

lusty wedgeBOT
foggy hollow
foggy hollow
#

Could you share what you would like to achieve?

#

Once the invoice is finalized, the invoice can't be updated

#

You can only update an invoice when it's still in draft status

last patrol
#

I want add information to pdf invoice on subscription. In docs says that I can do this on invoice.created event - but I can't. Maybe in live mode it will be succeed, because of 1 hour gap when invoice will be draft, I don't know, I try to know this from you.

#

I see that invoice on invoice.created event has open status. In test mode.

#

As I published on stackoverflow, I use example from stripe docs to listen to stripe events:

#

switch ($event->type) {case 'invoice.created': break;}

foggy hollow
#

I'll be stepping away and my colleague @uneven igloo will be taking over this thread to follow up the invoice update

uneven igloo
#

👋 Gimme a few mins to catch up

#

Okie so the first Invoice of a Subscription which is created with collection_method = charge_automatically won't have that 1 hour and will be finalized immediately. It's because you control the logic before the 1st Invoice is generated, as opposed to 2nd onward Invoice which would be generated programatically.

#

Taking a step back, which information you wish to update?

last patrol
#

I want add client company and customer company at the right top via custom_fields and also if it is possible add fields to Bill to section

#

left top*

uneven igloo
last patrol
#

wow, thanks, I will try this.

#

And Bill to section is there any way to add text there ?

uneven igloo
#

I think that's also the Customer. Can you try adding information to the Customer object?

last patrol
#

I am using Stripe Checkout for subscriptions, maybe I need to use Payment Element for this task. I have added custom_fields to Customer, but customer is updated in the last event, after invoice created, and invoice doesn't include those fields.

#

wait, I will try not to update CUstomer on customer.created event but manually create him

uneven igloo
#

Create him first then supply to Checkout Session

craggy sparrow
#

Hey, taking over here. Let me know if there's any follow-up Qs I can answer!

last patrol
#

Hi, looks like everything ok. Above you can find invoice image, and do you know how to add fields or text to Bill to section ? I see that phone, address and email there but if there a way to add something there ?

craggy sparrow
#

Are you talking about customizing the invoice ?

last patrol
#

no, with custom fields I add to the top left section after invoice number, I am talking about Bill to section where customer email

craggy sparrow
#

AFAIK, no you can't in that section

last patrol
#

thanks