#Jan Przysucha

1 messages ยท Page 1 of 1 (latest)

lucid sableBOT
stoic field
#

Hi ๐Ÿ‘‹

What do you mean by "add billing details to the invoice"? What are you collecting that you want to pass on to the invoice?

rustic gull
#

Everything located on the right; First, Last Name, address etc.

#

Billing address

#

and these information should also be added to User Details

stoic field
#

Okay, let me test a few things out

rustic gull
#

these details are added to payment method; not to customer, and not to invoice

stoic field
#

Right, yes that is what I'm seeing.

rustic gull
#

is there any way to copy them automatically to invoice? otherwise it would be useless for EU, so I guess there has to be a way ๐Ÿ˜„

stoic field
#

What mode are you using? Are you passing in a Customer ID? Do you have an example Checkout Session ID?

#

I just created a new Customer using Checkout and when I entered billing address it did add the data to the customer.address

rustic gull
#

subscription, I'm passing customerID

stoic field
#

Ah, it will include this data if you are creating a new customer but I don't think it will add to an existing Customer

rustic gull
#

๐Ÿ˜ฆ

stoic field
#

Since you have the Customer already, you can update the Customer data when you receive the checkout.session.completed event

rustic gull
#

but the invoice is already generated

#

no billing details :{

rustic gull
stoic field
#

Unfortunately so. This is a known issue and I can add your feedback to the feature request to allow populating this data to the Customer.

rustic gull
#

is there any way to suspend invoice creation then?

#

checkout -> payment -> event -> adding details from payment method to users details -> creating invoice ?

stoic field
#

You mean introduce a delay when the Invoice is issued?

rustic gull
#

should work

stoic field
rustic gull
#

on checkout.session.completed event I'm getting payment method object with billing address?

stoic field
#

Actually the object that has that data is the related Charge.

#

You can get there from the checkout.session.completed event data though. By using the invoice ID in the Checkout Session to look up the Invoice and expand the charge property.

rustic gull
#

but if there will be no invoice because of free trial than I'll still be able to get Charge?