Skip to main content
Next Defence - Next-Gen AI Cyber Security Firm
Australia & New Zealand[email protected](02) 9064 2614
INSIGHT

Merchant Loyalty Fraud: An API Test Plan for Points, Credit and Refunds

Model a merchant account with a synthetic points balance, a promotional credit and a refund tied to an original purchase.

Treat loyalty balances as financial-like value

Model a merchant account with a synthetic points balance, a promotional credit and a refund tied to an original purchase. Each asset has a different origin, expiration rule and approved use; the API should not permit an attacker to convert one into another merely by changing an object identifier. Test whether an authenticated shopper can read and redeem their own points without discovering another shopper’s balance. Include a service-side adjustment used by customer support, and ensure the support role cannot issue unlimited value or edit the underlying transaction history without independent approval. A price discount, points redemption and card refund may appear together in the checkout interface but require separate server-side authorisation and ledger events. Ask the product owner to specify normal customer success and exact prohibited value transfer before test accounts are configured.

Map the system and its dependencies

Two concrete operations define the boundary. First, a legitimate shopper redeems available points once on an eligible fictional order and receives an accurate ledger entry. Second, a duplicated reward event issues extra credit, or a cross-account request transfers another shopper’s balance. The assessor should use this actual evidence set: List API endpoints, transaction IDs, owner checks, idempotency, ledger locks, refunds and settlement reconciliation. to identify the receiving system and distinguish the permitted transaction from the prohibited one. The proposed correction is: Enforce server-side ownership and atomic state transitions with duplicate protection.

Agree the operational safeguards

The tangible business objective is: Customer balances and purchase totals must remain accurate under retries and partner integrations. A restriction would have to preserve the approved action: A legitimate shopper redeems available points once on an eligible fictional order and receives an accurate ledger entry. The proposed improvement is: Enforce server-side ownership and atomic state transitions with duplicate protection.

An appropriately scoped exception might be required because high promotional traffic and reversals are normal but must not relax correctness checks. It should be tied to the current approved activity: A legitimate shopper redeems available points once on an eligible fictional order and receives an accurate ledger entry. The exception must not permit: A duplicated reward event issues extra credit, or a cross-account request transfers another shopper’s balance.

Positive and negative test cases

Build a positive case from this authorised operation: A legitimate shopper redeems available points once on an eligible fictional order and receives an accurate ledger entry. Construct a negative case using: A duplicated reward event issues extra credit, or a cross-account request transfers another shopper’s balance. Relevant observations: List API endpoints, transaction IDs, owner checks, idempotency, ledger locks, refunds and settlement reconciliation. Final condition: Customer balances and purchase totals must remain accurate under retries and partner integrations.

Reconcile the result

Final responsibility sits with retail loyalty product owner and payment engineering lead. Retain the evidence set: List API endpoints, transaction IDs, owner checks, idempotency, ledger locks, refunds and settlement reconciliation. The improvement is: Enforce server-side ownership and atomic state transitions with duplicate protection. Retest the unsafe path: A duplicated reward event issues extra credit, or a cross-account request transfers another shopper’s balance.

After implementation, rerun this practical test: Use test orders to replay, reverse and cross-account redeem the same loyalty event without balance inflation. Confirm the final business result: Customer balances and purchase totals must remain accurate under retries and partner integrations. Deny this operation after the change: A duplicated reward event issues extra credit, or a cross-account request transfers another shopper’s balance.

Assessment worksheet

Mark checks as passed, failed or untested.

  • Service sponsor: Retail loyalty product owner and payment engineering lead
  • Current situation: A retailer lets customers convert loyalty points to store credit and combine them with refunds through several partner APIs.
  • Permitted result: A legitimate shopper redeems available points once on an eligible fictional order and receives an accurate ledger entry.
  • Unsafe result: A duplicated reward event issues extra credit, or a cross-account request transfers another shopper’s balance.
  • Evidence sources: List API endpoints, transaction IDs, owner checks, idempotency, ledger locks, refunds and settlement reconciliation.
  • Qualifying exception: High promotional traffic and reversals are normal but must not relax correctness checks.
  • Controlled improvement: Enforce server-side ownership and atomic state transitions with duplicate protection.
  • Positive and negative test: Use test orders to replay, reverse and cross-account redeem the same loyalty event without balance inflation.
  • Exit and retest: Customer balances and purchase totals must remain accurate under retries and partner integrations.

When the primary contact is unavailable

Accountable authority: Retail loyalty product owner and payment engineering lead. The original control assumption needs testing: The API validates the caller token but trusts the supplied customer account and positive amount. A reliable review should include technical evidence from list API endpoints, transaction IDs, owner checks, idempotency, ledger locks, refunds and settlement reconciliation. and an acceptance decision that the legitimate action still functions: A legitimate shopper redeems available points once on an eligible fictional order and receives an accurate ledger entry. The requested security improvement is: Enforce server-side ownership and atomic state transitions with duplicate protection.

For independent assurance, demonstrate the precise experiment: Use test orders to replay, reverse and cross-account redeem the same loyalty event without balance inflation. The analyst should correlate the result with list API endpoints, transaction IDs, owner checks, idempotency, ledger locks, refunds and settlement reconciliation. A successful test must preserve a legitimate shopper redeems available points once on an eligible fictional order and receives an accurate ledger entry. without accepting a duplicated reward event issues extra credit, or a cross-account request transfers another shopper’s balance.

Build cases around transaction sequence, not HTTP codes

Create a synthetic order that earns points, is partially returned and subsequently has a support adjustment applied. Attempt replay of the earning event, double redemption during concurrent requests, alteration of the refund destination, cross-account reward transfer and use of an expired promotion. For each, compare the request result with the authoritative order and loyalty ledgers. A web API returning an error is not enough if an asynchronous task still posts value later; conversely, a transient processing error need not mean an unlawful transfer occurred. Include an old mobile-app client whose API shape is still accepted. Check idempotency keys, ownership validation and server-side limits at the point where credit or refund is committed. Use fictional value and prohibit live payment capture during the exercise.

A support exception must not be a hidden payment path

Give customer support a legitimate case where a lost account prevents a shopper from using a small loyalty balance. Present an impersonator who knows the correct order number and asks to move the credit to another account. The team should use a verified recovery route before granting any transfer, apply amount and role limits, and record a second approval for unusual corrections. Test the same support role against a different customer’s account and against a manual refund adjustment it was not authorised to perform. If a product cannot distinguish a loyalty correction from issuing new monetary credit, escalate that design problem rather than approving a broad exception. Retire emergency permissions at the end of the case and verify that cached support tokens cannot continue editing balances.

Make the acceptance pack suitable for finance and engineering

Provide a matrix linking each API test to the authenticated identity, merchant account, object identifier, permitted operation, expected ledger effect and observed result. Engineering signs off enforcement and concurrency safety; the merchant finance owner signs off value reconciliation; customer support confirms a practical recovery path for legitimate shoppers. Attach before-and-after synthetic ledger totals and any failed request identifiers. A material mismatch between visible reward balance and settlement record must remain a failure even if the security gateway blocked one suspicious request. Repeat the most important tests after a promotion-engine change, payment-provider migration or release of a new support dashboard. The retained evidence should allow a different assessor to distinguish attempted fraud, authorised correction and completed transfer without reconstructing the whole system from memory.

Reversals make naive balance checks unreliable

A loyalty API may receive a purchase reversal after points have already been redeemed. The ledger must identify the associated earning transaction and the business rule for reclaiming value, rather than allowing a client to submit arbitrary negative adjustments. Build a test with an earned reward, a partial redemption and a later refund of the underlying purchase. Inspect the order in which ledger entries are applied and how an insufficient balance is represented. A correction should not silently debit another customer or generate negative credit without an approved policy. If customer service must intervene, its permission should be limited to a documented case and adjustment ceiling. Verify that a repeated reversal message does not apply twice and that the user-facing balance agrees with the authoritative transaction record.

API identity must be linked to merchant responsibility

A marketplace may host multiple merchants using a shared loyalty provider. Even when users have valid account sessions, a transaction should be restricted to the correct merchant programme and funding pool. Present two synthetic merchants with similar card identifiers and attempt to redeem one programme’s value through the other’s API. Record the authenticated customer, merchant context, programme identifier and actual ledger changes. Ask whether support administrators can cross merchant boundaries and, if so, under which documented case authorisation. A prohibited request needs a clear deny at the service that commits value; an edge gateway accepting the message is not proof of final permission. Retest this case after a merchant migration or loyalty partner update to ensure the financial boundary survives ordinary commercial changes.

Make promotions part of the negative-test coverage

A limited-time promotional campaign may multiply legitimate points earnings and redemption attempts. The API needs to enforce eligibility, one-time redemption and account ownership even when many shoppers act concurrently. Construct fictional campaigns with one qualifying purchase and one transaction outside the eligibility window. The service should reject the latter without relying on low traffic volume as its fraud control. Compare the promotional ledger with actual reward issuance and the expected merchant cost. This test helps engineering and finance distinguish a legitimate sales surge from a flaw that repeatedly issues value.

Keep customer-service corrections distinct from system reconciliation

If the merchant grants a discretionary credit after investigating a synthetic loyalty dispute, that gesture should be recorded as a separate authorised adjustment rather than concealed as a change to the original earning event. The transaction history must preserve the original purchase, redemption, attempted misuse and eventual correction. The customer should see a comprehensible explanation of their current balance, while finance can still reconcile issued value. Test whether the support role can view the necessary case without editing an unrelated merchant’s ledger. This protects accurate customer service and makes later fraud investigation possible without treating every refund or goodwill credit as the same transaction type.

Sources and further reading

Explore Next Defence expertise

Next Defence can help retail payments teams exercise loyalty-credit, redemption and refund APIs using invented transactions and repeat callback scenarios. The acceptance record should reconcile customer balances against issuer and order ledgers without probing live gift-card accounts.

Explore Application Security & DevSecOps ↗

LET'S TALK

Let’s talk about your security.

Tell us what you are protecting, where you need greater visibility or what you want to achieve. We will help identify the right next step.

Talk to a Security Specialist

Describe your security requirements. Please do not submit passwords, credentials or confidential incident evidence. This form is not an emergency incident-response channel.

Form powered by HubSpot. Review our Privacy Policy. If the form doesn’t load, email [email protected].