#incredible_panda_56720
1 messages · Page 1 of 1 (latest)
Do you see your customer address in this field? https://stripe.com/docs/api/invoices/object#invoice_object-customer_address
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
give me a sec ... let me check ..
just checked ... customer_address comes as null
I guess because via checkout api, the address which is collected gets attached to the payment method, not to the customer .
Orakaro , you there ?
I see, you are checking other discussions as well .. I'll be waiting for your reply .. hope this thread does not get closed .
Hi, sorry and no worry
Yeah if the customer doesn't have the address, we won't take it into the Invoice. You would want to make sure the Customer has address
You can set it during handling webhook events, ie checkout.session.completed
hmm I see, but the first invoice that will be generated after checkout.session.completed ... that invoice won't have the address right ? because I am going to add the address after the checkout session completed event ?
I see. Can you try this parameter? https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-billing_address_collection
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
outlined here https://stripe.com/docs/payments/collect-addresses?payment-ui=checkout#collect-an-address
I am using this only ... but via this the address collected gets attached to the payment_method only. It does not appear in customer's billing address.
I mean I am using billing_address_collection parameter, let me check the second link you sent ..
Sorry, can you also try this customer_udpate.address? https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer_update-address
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
set both parameters same time
yes .. let me try to set this one as well... haven't tried this .
yeah now it works... was such a small thing that I missed, thanks for the help
Hi Orakaro, just one more thing, what is the behavior of auto vs required in billing_address_collection ?
I want to make the billing_address_collection as optional .... so I used auto ... but the **Billing Address ** field itself was not visible in the checkout page with auto mode ..
auto means we only collect it if it's necessary, ie. only if it's required for tax calculation. It's something automatic. If you want full control, you would want to use required based on your condition