XF 2.2 Passing ZIP/Postal Code through Stripe Payment API


Hi everyone,

Does anyone know how to require a ZIP/Postal Code on the payment page, and pass it through the Stripe API? I'm hoping to cut down on fraudulent cards being used, and this would be pretty ideal for my forum.
Not quite the same, but some regions require an address for Stripe, so it's really something that needs to be added: https://xenforo.com/community/threads/no-ability-to-ask-for-shipping-address-for-stripe.183740/
Unfortunately that thread seems pretty dead so I had to take a look around for myself, as I need a solution in the near future (as Stripe charges $15 per dispute, which is quite costly).

Looking at Stripe documentation it looks like it could be possible to integrate a zip code by passing
, but that seems to be for only their legacy checkout.

I took a look at js/xf/payment.js and it does look entirely possible to create and pass a ZIP code to Stripe, though I wouldn't necessarily want to try it without actual solid knowledge of php and javascript (though it could be quite trivial), as it looks like you'll also need to modify the actual payment handler.

At this point I'll probably have to consider just moving to the legacy Stripe checkout page, as XenForo isn't necessarily built for eCommerce.
Top Bottom