Appknox Blog | AppSec Insights & Trends

How to Bypass Payment Gateway? | Appknox

Written by Subho Halder | Dec 19, 2017, 9:19:50 AM

Payment bypass is what happens when an app lets the phone decide something only the server should: the price, whether a payment succeeded, or whether a purchase belongs to this user. In 2026, the attacker controls the phone completely. Here's how the bypass works, and how to make the server the only place money is ever decided.

In 2017, our team changed one number in a checkout request and bought a meal for 1% of its price. The order went through. The restaurant cooked it.

We wrote about it at the time as a proxy trick: intercept the request, edit the price, send it on. Nine years later, the same class of bug still shows up in bug bounty reports every month. What's changed is everything around it.

Apps now take money in more ways: in-app purchases, subscriptions, wallets, stored credit, promo codes, refunds and payment webhooks. Each one is another decision an app can get wrong. And the attacker's toolkit has grown from editing traffic to rewriting the app's own logic while it runs.

One principle holds it all together: any payment decision your app makes, an attacker can make for you.

This piece is for anyone whose app takes money: fintech, commerce, food delivery, ticketing, gaming, streaming and betting. It covers how payment bypass works in 2026, how to check your own app, and how to fix it where it actually lives: on the server.

What is payment bypass?

Payment bypass is an attack that gets goods, services or credit without paying the right amount, by tampering with something the app sends or trusts. The attacker changes a price, fakes a success message, reuses a receipt or races two requests through a limit. Nothing crashes. The app does exactly what it was built to do, for the wrong person.

That's why it's called a business-logic flaw. There's no memory corruption, no CVE and often nothing a signature-based scanner recognizes. The bug is a decision made in the wrong place.

The major standards all name it:

Standard

Where payment bypass fits 

OWASP API Security Top 10 (2023)

API6: Unrestricted Access to Sensitive Business Flows, whose own example is buying a ticket, and API1: Broken Object Level Authorization, for paying with or reading someone else's order or wallet

OWASP Top 10 for Business Logic Abuse (2025)

BLA1: Action Limit Overrun, such as reusing coupons or refunds through repeated or unsynchronized requests

PCI DSS v4.0.1, Requirement 6.2.4

Requires software engineering techniques that prevent "attacks on business logic, including attempts to abuse or bypass application features and functionalities"

OWASP MASVS v2.1

MASVS-RESILIENCE, the controls that raise the cost of tampering with the app itself

 

 

If you take card payments, the PCI line matters most. Business-logic abuse isn't a nice-to-have in your secure development process. It's a named requirement.

Seven ways payment bypass happens in 2026

The 2017 version had one move. The 2026 version has at least seven. Most real incidents chain two or three of them.

 

1. Price, quantity and currency tampering

The classic. The app sends price, amount, discount or currency in the checkout request, and the server believes it. Modern variants are subtler than editing $40.00 to $0.40:

  • Negative or zero quantities that turn a line item into a credit.
  • Currency swaps, where an amount meant in one currency is charged in a cheaper one.
  • Rounding and precision abuse, where 0.004 rounds to zero on charge but not on fulfillment.
  • A price set when the cart is built, then trusted at checkout, after the attacker edits the stored cart.

Why mobile makes it easier: the API was built for one client, your app, so it often trusts fields a public web form would never expose.

2. Trusting the "payment succeeded" message

The gateway processes the payment and sends the user back to the app with a success signal. If the backend marks the order paid because the client says so, the attacker skips the payment and sends the success message themselves.

Stripe's documentation is direct about this: you can't rely on the landing page alone to trigger fulfillment, and webhooks are required. The same logic applies to every gateway. The client is not a witness.

3. In-app purchase receipt abuse

App store purchases come with signed proof. The bugs are in how apps check it:

  • Validated on the device. Apple's documentation warns against calling its receipt endpoint from the app, because you control neither end of that connection. That legacy verifyReceipt endpoint is now deprecated in favor of the App Store Server API and signed transactions.
  • Not bound to the buyer. A valid receipt from one account unlocks premium on another, or on a thousand others.
  • Replayed. The same purchase token is redeemed twice because nobody stored the fact that it was used.

4. Flipping the flag on the device

If the app decides isPremium, isPaid or walletBalance, an attacker doesn't need to touch the network at all. Dynamic instrumentation tools such as Frida hook the running app and make the function return whatever they want.

This is also why certificate pinning doesn't stop payment bypass. Pinning protects your users from someone else intercepting their traffic. It does nothing against a user who owns the device and has already hooked the pinning check.

5. Race conditions

The server checks a limit, then records that it was used. In the milliseconds between, parallel requests all pass the check. One gift card is redeemed ten times. One balance is spent twice. One refund is issued three times.

This used to be dismissed as too timing-dependent to exploit remotely. PortSwigger's single-packet attack changed that by landing 20 to 30 HTTP/2 requests in one TCP packet, removing network jitter from the equation. If your coupon or refund endpoint isn't atomic, assume it's raceable.

6. Someone else's order or wallet

The API accepts an order_id, wallet_id or payment_method_id and doesn't check it belongs to the caller. The attacker pays for their order with your saved card, applies your store credit, or reads your invoices. This is broken object-level authorization, and in payment flows it moves money.

7. Coupon, referral and top-up logic

Promotions are business rules written in a hurry before a launch. Discounts that stack when they shouldn't. Referral credit for referring yourself. Wallet top-ups credited before the bank transfer settles, then spent, then reversed. None of these need a hacking tool. They need someone who reads the rules more carefully than the team that wrote them.

How to check whether your app is vulnerable

You don't need exotic tooling to find most of these. You need a test device, an intercepting proxy such as Burp Suite, a staging environment and the patience to ask "what if the client lied?" at every step of checkout.

Test only apps you own or are authorized to test, in a staging environment, with test payment methods.

Work through these six checks:

  1. Edit the money fields. Intercept the checkout request. Change price, quantity, currency and discount. Try zero, negative and very small values. If any order completes at the wrong amount, the server is trusting the client.
  2. Fake the success. Start a payment, cancel it at the gateway, then send the app's "payment succeeded" request yourself. If the order is marked paid, the backend trusts the client's account of the payment.
  3. Move a receipt. Buy an in-app product on account A. Replay its receipt or purchase token from account B. Then replay it on account A a second time. Both should fail.
  4. Race the limits. Send the same coupon redemption, refund or withdrawal 20 times in parallel. Burp Repeater's send-group-in-parallel option and Turbo Intruder both do this. Count how many succeed.
  5. Swap the IDs. In every request that names an order, wallet, payment method or receipt, substitute one belonging to a second test account.
  6. Hook the app. On a test device, use an instrumentation tool to force the app's entitlement or payment-status checks to return true. If premium content unlocks with no server call, the decision lives on the device.

If any check passes, you've found a payment bypass. If all six fail cleanly, you've found something rarer: a checkout that doesn't trust the phone.

How to prevent payment bypass

Every fix below follows from one rule: the server decides, the client asks. The app can display a price, start a checkout and show a receipt. It never gets the final word on any of them.

 

1. The server sets every price

The client sends product IDs and quantities. The server looks up prices, applies discounts, calculates tax and creates the payment amount. If a request carries a price, ignore it, and log it, because it may be someone testing you. Validate quantities as positive integers within sane limits, and fix the currency on the server.

2. Confirm payment server to server

Fulfill only after your backend has confirmed the payment with the gateway directly, through a signed webhook or an API lookup. Verify every webhook's signature before acting on it. Treat the client's "success" as a hint to refresh the screen, never as proof.

3. Validate in-app purchases on the server, and bind them to the user

  • Apple: verify signed transactions on your server using the App Store Server API or the signed transaction data StoreKit provides. Set an appAccountToken, a UUID that ties the transaction to a user on your service, when the purchase starts, and check it when you grant access.
  • Google: verify each purchase token with the Google Play Developer API, match it to the user through the obfuscated account ID you passed at purchase, and use the token as the unique key. Acknowledgement from the backend after granting access. Google automatically refunds purchases that aren't acknowledged within three days.
  • Both: store every transaction or token you've redeemed, and refuse to redeem it twice.

4. Make money operations atomic and idempotent

Check the limit and record its use in a single database transaction, or protect it with a uniqueness constraint, so parallel requests can't all pass the check. Give every payment, refund and redemption an idempotency key, so a retry or a race repeats the response, not the operation. Stripe's guidance on fulfillment says the same: your function may be called multiple times, even at the same moment, for the same session, and must handle it.

5. Authorize every object

Every order, wallet, payment method, receipt and refund ID in a request is checked against the user making it. Every time, on every endpoint, including the internal-looking ones the app calls only during checkout.

6. Raise the cost of tampering, and know its limits

Root and jailbreak detection, hook detection, integrity checks and obfuscation make device-side attacks slower and noisier. That's worth having for fraud and account-takeover defense. But none of it fixes a decision made on the device. Treat app hardening as friction, never as the control.

7. Watch the money

Reconcile what you were paid against what you fulfilled. Alert on orders where value and amount paid don't match, on redemption spikes and on receipts used from multiple accounts. Hold mismatches before shipping.

8. Assess every release

Payment logic changes constantly: a new promotion, a new gateway, a new SKU, a new country. Each one can reopen a bypass you closed last quarter. Assess payment flows before and after every release, not once a year.

Where automated assessment helps, and where you need a human

We'll be straight about this, because it matters more than any feature list. Business-logic flaws are the hardest class of bug for any automated tool to find. A scanner can tell you a field is exposed. It can't know that your Tuesday promotion was never meant to stack with a referral credit.


So the honest answer is both, at different cadences.

 

Automated assessment, every release

Expert pen testing, on a schedule and before major launches

Finds well

Exposed price and amount parameters, missing object-level authorization, payment state and secrets stored on the device, weak tamper resistance, insecure network configuration

Multi-step abuse: coupon chains, refund loops, race conditions across workflows, promotion logic, flows that only break in a specific order

Strength

Runs on every build, catches regressions the day they ship

Understands the business rules and tries to break them the way a motivated attacker would

Gap

Can't reason about what your business intended

Covers one moment in time

Automation keeps yesterday's fixes fixed. People find tomorrow's bypass. You need both.

How we approach it

  • Assess every build. Appknox runs static and dynamic analysis and API scanning on every build, so exposed payment parameters, broken authorization and insecure storage of payment state are caught before release.
  • Know which findings are real. KnoxIQ ranks findings by exploitability and gives your team steps to reproduce, so a payment issue that can actually move money goes to the top of the queue.
  • Go deeper on the logic. For payment flows, our security team pen-tests the business logic itself: the chains, races and promotion rules no scanner can reason about.

Payment bypass checklist

For your next sprint:

  •  Remove every price, amount, discount and currency field the server trusts from client requests
  •  Fulfill orders only after a signed webhook or a server-side lookup confirms payment
  •  Verify in-app purchases on the server and bind them to the user with appAccountToken or the obfuscated account ID
  •  Store every redeemed transaction and purchase token, and reject reuse
  •  Make coupon, refund, top-up and withdrawal operations atomic, with idempotency keys
  •  Check ownership of every order, wallet, payment method and receipt ID on every endpoint
  •  Alert on mismatches between amount paid and value fulfilled
  •  Replay a "payment succeeded" request against staging this week, and see what happens

Frequently asked questions

What is a payment bypass vulnerability? A business-logic flaw that lets someone get goods, services or credit without paying the right amount, usually because the app or its backend trusts a price, a payment status or a receipt that came from the client.

How do attackers bypass a payment gateway? They rarely break the gateway itself. They go around it: editing the amount before it reaches the gateway, sending a fake success message after it, reusing a receipt from another account, or racing requests through a limit. The gateway processes exactly what it's given. The flaw is in how the app and its backend use the result.

Does certificate pinning prevent payment bypass? No. Pinning stops third parties from intercepting your users' traffic. An attacker testing their own device can bypass pinning with instrumentation tools, and many payment bypasses don't need to touch traffic at all. The fix is server-side validation.

How do you validate in-app purchases securely? On your server, never only on the device. Verify signed transactions with Apple's App Store Server API and purchase tokens with the Google Play Developer API, bind each purchase to the user's account, and record each one so it can't be redeemed twice.

Is payment bypass covered by PCI DSS? Yes. PCI DSS v4.0.1 Requirement 6.2.4 requires software engineering techniques that prevent attacks on business logic, including attempts to abuse or bypass application features.

The bug was never the price field

In 2017, we bought a meal for 1% of its price by editing one number. The lesson wasn't that the number was exposed. It was that the app trusted the phone.

Nine years on, the phone is more powerful, the payment flows are more complex and the tools to rewrite an app while it runs are free. The rule hasn't moved: the server decides, the client asks.

See whether your checkout trusts the phone. Book a demo, and we'll assess your app's payment flows and the APIs behind them. https://www.appknox.com/book-a-demo