#KoRnoliX
1 messages ยท Page 1 of 1 (latest)
Hello ๐
What Stripe SDK are you using?
Hello!
Im using JavaScript Stripe SDK, versioned
"stripe": "^11.15.0",
Are you using Stripe Checkout?
Sure
The idea behind payment links is that anyone accessing it can pay for it.
If you only need to collect billing_address for some users then you'd need to create separate payment links for them
well, im currently creating different payment link for each user (because of metadata under the hood). however, exactly during checkout, i want user to be able to type billing address informations, but i dont want to make it required.
const paymentLink = await this.stripeClient.paymentLinks.create({
line_items: [{ price: XXX], quantity: 1 }],
metadata,
payment_method_types: ['blik', 'card'],
automatic_tax: { enabled: true },
allow_promotion_codes: true,
currency: 'pln',
billing_address_collection: 'auto',
tax_id_collection: {
enabled: true,
},
invoice_creation: {
enabled: true,
},
customer_creation: 'always',
after_completion: {
redirect: {
url: 'XXXX',
},
type: 'redirect',
},
});
there is a line
`billing_address_collection: 'auto',`
which i can set to "required", and then billing info shows up, buts unfortunately its required. if the mode is "auto", actually i dont see any address fields (according to Stripe docs, you want to provide as simple checkouts as possible, however i want a little bit more)
Yeah Checkout decides automatically if it needs specific billing information
https://stripe.com/docs/api/payment_links/payment_links/create#create_payment_link-billing_address_collection
There's no way to only request "some" information
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Hmm, okay, thanks for the information and help!