#roasten-checkout

1 messages · Page 1 of 1 (latest)

warm grotto
#

hi! today we don't support adding your own custom fields to Checkout, in general
But we do support collecting VAT IDs from customers (they see a checkbox to indicate they are purchasing as a business and can then enter their ID), docs are at https://stripe.com/docs/tax/checkout/tax-ids.

eternal bronze
#

thanks I will look into it

#

Looks like I can't do it in setup mode

#

so I have to put it in later on, or any other solution?

marble shard
#

Can you share your API payload?

eternal bronze
#

You cannot set tax_id_collection[enabled]=true in setup mode.

#

$session = $s->checkout->sessions->create([
'payment_method_types' => ['card'],
'mode' => 'setup',
'customer' => $stripe->customer_id,
'success_url' => WEB_ADDRESS.'/index.php?controller=AM&f=stripeSessionCompleted&session_id={CHECKOUT_SESSION_ID}',
'cancel_url' => WEB_ADDRESS.'/#settings',
'billing_address_collection' => 'required',
'tax_id_collection' => [
'enabled' => 'true'
]
]);

#

Not sure if this helps you out, want the customer to be able to insert VAT number in the same process ad they put in credit card and address

marble shard
#

Got it. I guess it's only available in payment/subscription mode where there's actually a payment to process

#

What's the use case for mode: 'setup'?

eternal bronze
#

to have everything done and we triggering a sub later on

marble shard
#

How would you be creating the subscription?

eternal bronze
#

we do that internally and only using invoice function from Stripe

#

so Stripe is not manage the subs

#

Any idea why you don't support it in the setup phase?

marble shard
#

I'm not sure why, my guess is it's just a use case that hadn't been considered

#

I will relay this feedback to the relevant team!

eternal bronze
#

thanks

marble shard
#

Np!