Surcharging
Learn how to implement credit card surcharging to pass processing costs to customers. Includes setup requirements, compliance rules, security guidelines, and technical implementation guidance.
Surcharging
Add a credit card surcharge (a fee on a credit card payment) through your API integration to pass on some of your card acceptance costs to customers.
Review the Payment Card Industry Data Security Standard (PCI DSS) guidance and never store sensitive card data. Before processing a payment, tokenize the card information (replace sensitive card details with a payment method identifier). Tokenization supports your compliance efforts; it does not guarantee compliance or replace applicable requirements. Consult your legal and compliance teams regarding specific requirements.
Getting Started
A fee added to credit card payments that allows merchants to pass processing costs to customers. Only applies to credit cards, not debit or prepaid cards.
Contact Stax to configure your merchant account for surcharging and enable automatic customer notifications. This setup supports your compliance efforts; consult your legal and compliance teams regarding specific requirements.
Rules and Requirements
Basic Rules
- Credit cards only - Apply surcharges only to credit card transactions, not debit or prepaid cards
- Account setup required - Contact Stax to configure your merchant account for surcharging
- Existing merchants - Current Stax merchants can contact us to enable surcharging
- Customer notification - Required notice to customers (we handle this automatically)
Compliance Requirements
Mastercard Disclosure: Complete the required form: Mastercard Surcharge Disclosure
Transaction Requirements:
- Software must notify customers of surcharge fees on payment screens, receipts, and emails
- Customers can cancel before transaction completion
- Surcharges must appear on payment pages and receipts
Automatic Restrictions - Stax does not apply surcharges when:
- The payment method is a debit card, as identified by its bank identification number (BIN, the initial card digits used to identify the card issuer and type)
- The billing or shipping address is in a prohibited state or territory
Refund Handling: Refund the full surcharge amount (pro-rated for partial refunds)
Implementation Guide
Technical Flow
Follow this implementation sequence:
- Create a customer (optional)
- Tokenize the credit card - Creates customer if none exists
- Calculate surcharge amount using the tokenized card
- Charge the tokenized card
Making Surcharge Payments
Important: Do NOT include the surcharge amount in your API request total.
Example: For a $100 transaction with $3 surcharge:
- Display to customer: "Your total is $103 (includes $3 surcharge)"
- Send to API:
"total": 100(not 103)
Set payment_method_id to the id returned by a successful Stax.js tokenization request. The UUID below is illustrative sample data from the tokenization documentation; replace it with the ID from your response, not a value you invent. This ID comes from the API response, not a Dashboard navigation step.
{
"payment_method_id": "2e34394f-5f1d-4ec0-a56d-f669509a5b13",
"meta": {
"tax": 0,
"subtotal": 100
},
"total": 100,
"pre_auth": 0
}Checking merchant setup:
- Call GET Merchant Registration and check that
cnp_credit_surcharge_rate > 0. - Call GET Merchant and check that
is_surcharging_merchant = true.
Calculating Surcharge Amount
Use the Review a transaction's surcharge information endpoint to:
- Verify merchant surcharging setup
- Check payment method BIN type is "CREDIT"
- Get surcharge rate and amount for UI display
Example Response (for $100 transaction at 3% rate):
{
"bin_type": "CREDIT",
"surcharge_rate": 3.0,
"surcharge_amount": 3.00,
"total_with_surcharge_amount": 103.00
}Note: Debit cards return no surcharge information.
Refunding Surcharge Transactions
Full refunds only: When you refund a surcharged transaction, refund the entire amount (including the surcharge) to the customer.
Example:
- Original charge: $103 ($100 + $3 surcharge)
- Refund to customer: $103 (full amount)
- Merchant account debited: $100 (original transaction amount)
Testing and Compliance
Testing Surcharging
Sandbox Setup:
- Request a sandbox account specifically configured for surcharging
- Contact support to enable surcharging on your test account
- Test the complete implementation flow with our test card numbers
Test Cards Available:
- CREDIT BIN type cards
- DEBIT BIN type cards
- When BIN type is unavailable, assume DEBIT (no surcharge)
Digital Wallets Limitation
Important Limitation:
Stax processes digital wallet payments (Apple Pay, Google Pay) without a surcharge because:
- We cannot check the BIN type before processing
- Standard card-not-present rates apply instead of surcharge rates
This affects all digital wallet transactions on surcharging-enabled merchants.
Important: This documentation covers card-not-present transactions (payments without a physical card reader) only. Contact support for card-present implementation details.
Your surcharge calculation succeeds when the response returns the expected rate, surcharge amount, and total for a credit card. For the $100 example above, confirm surcharge_amount is 3.00 and total_with_surcharge_amount is 103.00; debit cards return no surcharge information.
Updated 4 days ago
