Coming soon. The Upcharge API, SDKs and MCP server aren't live yet. This is a preview of what we're building, and paths and fields may change. Leave your number for early access
Priya builds booking software for dog groomers. Her groomers wanted their 3% back.
The state rules were the easy part. Her app could look those up. What it couldn't do was promise a surcharge would never land on a debit card or go over a cap. That takes a compliance layer that checks every payment. So her app runs every payment through ours, and only legal fees get charged.
The API is coming soon. Paths and field names may change before it goes live.
What Priya wrote, and what she didn't have to
It works like Stripe, with one difference: we don't charge the card right away. Our card fields sit on her page and turn the card into a token. Her app asks for a quote, and we tell it whether the card is credit or debit and what the surcharge is. She shows that to the customer, and nothing is charged until her app says go. The hard part, making sure every surcharge is allowed, happens on our side.
quote = upcharge.surcharge.quote(token, amount, state)
show(quote.disclosure, quote.total)
upcharge.payments.create(quote.id) // or don't
That's the whole shape of it. The quickstart has the real code.
Is this card credit, debit or prepaid?
This is the one your code can't answer by itself, and getting it wrong means a surcharge on a debit card, which card brands don't allow. Every payment runs through our compliance checks before any surcharge is shown. Debit and prepaid never get one.
How much can she charge?
The lowest of the groomer's actual cost, the card brand cap and the state cap. In Texas that's her cost. In Oklahoma it would be 2% at most.
What does the customer need to see?
The API sends back the exact wording for that state, ready for the checkout screen, the sign and the receipt.
What happens when a law changes?
We update the rule on our side and send a rules.updated webhook. Priya doesn't ship a code change.
Where does the card number go?
Into our card fields, which sit in an iframe on her page. It never touches her servers. Upcharge is PCI DSS compliant through our parent company, Carpay.
The call her app makes
When someone books Biscuit's groom and enters a card, Priya's app sends the amount, the card token and the groomer's state. Nothing gets charged here. Here's the same call for a bigger ticket in New York, where the rules are stricter about how the price is shown.
Amounts are in cents. A debit card, a prepaid card or a state that bans surcharges comes back with "eligible": false and a surcharge of 0.
curl https://api.upchargepayments.com/v1/surcharge/quote \ -H "Authorization: Bearer $UPCHARGE_KEY" \ -d amount=100000 \ -d payment_method=pm_7Rk2Qx \ -d merchant_state=NY
{
"id": "qt_8Fq2mX",
"eligible": true,
"card_type": "credit",
"rate": 0.0289,
"surcharge": 2890,
"total": 102890,
"rule": "NY: at cost, dollars-and-cents display",
"disclosure": "Credit price $1,028.90. Debit or cash $1,000.00."
}If you're building an app, like Priya
Start with the quickstart. If an AI agent is writing your code, point it at the MCP server and it gets the rules as tools.
If other businesses run on your software
RouteWise makes scheduling software for plumbers and HVAC shops. They added surcharging for every shop on their platform. Their story is on the platforms page.
Tell us what you're building
Leave your number. We'll send sandbox keys and put you in touch with one of the engineers who built the API.