#Jan Przysucha
1 messages ยท Page 1 of 1 (latest)
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?
Everything located on the right; First, Last Name, address etc.
Billing address
and these information should also be added to User Details
here
Okay, let me test a few things out
these details are added to payment method; not to customer, and not to invoice
Right, yes that is what I'm seeing.
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 ๐
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
subscription, I'm passing customerID
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
๐ฆ
Since you have the Customer already, you can update the Customer data when you receive the checkout.session.completed event
so I have to listen for the event, get billing details from details of payment method, add it, and after that create a new invoice?
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.
is there any way to suspend invoice creation then?
checkout -> payment -> event -> adding details from payment method to users details -> creating invoice ?
You mean introduce a delay when the Invoice is issued?
should work
Unfortunately the only way I know if is to add a 1 day free trial to your Subscriptions: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-subscription_data-trial_period_days
on checkout.session.completed event I'm getting payment method object with billing address?
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.
https://stripe.com/docs/api/invoices/retrieve - Get Invoice
https://stripe.com/docs/expand - How to expand properties
but if there will be no invoice because of free trial than I'll still be able to get Charge?