Sometimes you may want to charge an extra fee (or offer a discount) depending on the card a customer uses at checkout — for example, a small surcharge for international cards, or a discount for a particular bank’s cards.
Our Payment Gateway-Based Fees & Discounts plugin now lets you do this through its new BIN API integration.
To do this, you must first configure the BIN API and define the card rules from the respective Payment Gateways tab.
Configuring the BIN API
↑ Back to topThe BIN API allows the plugin to automatically detect the issuing country and bank of the customer’s card at checkout. Let’s configure this step by step:
Tick Enable BIN API Card Rules. This lets the plugin detect issuing country and bank using BIN lookups.

Select a BIN API provider:
- Binlist (Free) — https://lookup.binlist.net. This is a free service that can look up card details. It’s great for testing or low-volume sites, but it only allows a limited number of look-ups per hour/day (this is called a “rate limit”).
- Neutrino (Paid) — A paid service recommended for live stores with many orders. It’s faster, more accurate, and has much higher limits.
Enable “Cache Results” — This stores previous look-ups so the plugin doesn’t keep asking the BIN service again for the same card. This means if multiple customers use the same card type, the plugin won’t call Binlist every time. It speeds up checkout and helps you stay within the free limits.
Set “Cache Duration (hours)” — How long to store a lookup before checking again. The default is 24 hours; for busy stores you can increase to 48–72 hours.
Finally, click Save changes.

Card Details Section Configuration
↑ Back to topSome payment gateways (like Stripe or Braintree) automatically send card details such as Visa/MasterCard, Credit/Debit, Issuer Country, and Bank Name to WooCommerce. In those cases, the plugin uses that information to apply the right fees or discounts.
However, not all gateways share this data. To make sure fees are still applied correctly, you can enable a Card Details section at checkout. Enabling the options below will control whether the Card Payment Details section can be displayed at checkout.

Enabling these options here does not automatically show the section for every gateway. You also need to enable Show Card Payment Details inside each individual gateway’s settings (e.g., PayPal, Stripe).

What customers will see
↑ Back to topWhen enabled, a short form will appear just above the payment gateway options, asking the customer to confirm:
- Card Type – Credit or Debit
- Card Brand (Scheme) – Visa, MasterCard, American Express, or Other
- Card Issued In (Location) – Domestic or International
- Issuing Bank – Bank name (dropdown or text field)

Install and Activate a Card-Payment Gateway
↑ Back to topTo set up and test card-based fees or discounts, you’ll need at least one payment gateway that supports card payments. This feature works with all major card-payment gateways, including:
- WooCommerce Stripe Payment Gateway
- WooCommerce PayPal Payments
- WooCommerce Authorize.Net Gateway
- Payment Plugins Braintree for WooCommerce
In this guide, we’ll demonstrate the process using WooCommerce Stripe Payment Gateway.
Adding Card-Based Fees or Discounts in Your Store
↑ Back to topSometimes you want to recover the cost of accepting certain cards, or encourage customers to use a preferred card by offering a discount. Let’s see how to do this for the Stripe payment gateway plugin.
The steps for creating card rules (Card Type, Scheme, Issuer Country, Bank, Fee/Discount) are the same across all supported gateways. However, each payment gateway has its own integration settings that must be completed before you can use card rules:
- Stripe – requires API keys and webhook setup.
- PayPal – needs to be connected to your PayPal account, typically via API credentials.
- Authorize.Net – uses API Login ID, Transaction Key, and Public Client Key.
- Braintree – requires Merchant ID, Public Key, and Private Key.
Once the gateway itself is properly configured, you’ll find the Card Rules section in that gateway’s settings, and you can add your fee/discount rules just like in the Stripe example given below.
Go to Plugins > Add New, search for “WooCommerce Stripe Payment Gateway”, click Install, then Activate. Once activated you’ll see a “Credit / Debit Card” section under WooCommerce > Settings > Payment Gateway Fees & Discounts. This is where you’ll create your card rules.

After enabling card rules, scroll down and click Add New Rule.

A new field will appear where you can define all the conditions in one go. For example, you might choose Credit Card as the type, set the scheme to MasterCard, select United States (US) as the issuing country, mark the location as International (if the card is from outside your store’s country), pick Bank of America as the bank, and then type 5 in the Fee field.

When a customer selects the Stripe Credit/Debit Card option at checkout, a small “Card Payment Details” section appears above the card fields (if you’ve turned it on in the settings). The customer fills in those details. If what they enter matches the rules you’ve set up, the fee or discount you configured is applied automatically to their order right away.

If a customer’s entered Card Details do not match the actual card used for payment,a notice will appear on the Edit Order page in your WooCommerce admin, so you can review and take action if needed.

With the BIN API integration and Card Details fallback section, you now have full control over how fees and discounts are applied based on the exact card your customers use. Whether you want to recover higher costs from international transactions or reward loyal customers from a specific bank, the plugin makes it easy to configure rules that match your business needs.