bigcommerce / checkout-sdk-js

BigCommerce Checkout JavaScript SDK
MIT License
133 stars 217 forks source link

Why is billing request required to submit order if no payment is required? #850

Open flyingL123 opened 4 years ago

flyingL123 commented 4 years ago

If an order does not require payment, for example if a customer can pay for their entire order with store credit, a billing address should not be required to successfully submit the order.

I am trying to service.submitOrder({useStoreCredit:true}), without ever entering a billing address, but I receive an error that my billing address is invalid.

What billing address is the customer supposed to enter if they aren't required to submit payment details?

lpschz commented 4 years ago

At the moment, billing address is always required. The way we modelled our checkout (UI), the payment step comes at the end, after billing address.

When entering the billing address, you might know in advance if order will require an additional payment or not.

We could look into making billing address not required if theres no payment. This change though might not happen any time soon. You could, in the meantime, just submit a dummy/empty billing address.

flyingL123 commented 4 years ago

Thanks @capsula4. Our checkout asks for billing information on the payment step (like Shopify does). In order to simplify the interface, I hide the billing address section if the selected payment method doesn't require it:

image

image

Right now I just set it equal to shipping (assuming there are physical items), but it would be nice if it wasn't required at all since certain payment methods as well as store credit do not actually need it.

Just wanted to give you some more background. Thanks again.