---
title: "Beyond Test Cards: A Fake Payment Provider for Testing at Scale"
description: "Lyft built a Fake Payment Provider that implements the same provider interface as real processors (tokenize, authorize, increment, capture, charge, refund, void), so it can simulate partial failures, soft declines with retries, pending responses, timeouts and outages that processor test cards cannot."
url: "https://swe.quest/articles/beyond-test-cards-a-fake-payment-provider-for-testing-at-scale-9be029b6af37f767"
canonical: "https://eng.lyft.com/beyond-test-cards-a-fake-payment-provider-for-testing-at-scale-c69dddadb115"
source: "Lyft Engineering"
published: "2026-11-10"
difficulty: "medium"
kind: "Case study"
reading_minutes: 15
tags: ["payments","testing","resilience","system-design"]
---

# Beyond Test Cards: A Fake Payment Provider for Testing at Scale

A post on [Lyft Engineering](https://swe.quest/sources/lyft.md), published 2026-11-10, 15 min read, Case study. Original: [https://eng.lyft.com/beyond-test-cards-a-fake-payment-provider-for-testing-at-scale-c69dddadb115](https://eng.lyft.com/beyond-test-cards-a-fake-payment-provider-for-testing-at-scale-c69dddadb115)

## Summary

Lyft built a Fake Payment Provider that implements the same provider interface as real processors (tokenize, authorize, increment, capture, charge, refund, void), so it can simulate partial failures, soft declines with retries, pending responses, timeouts and outages that processor test cards cannot. Each test scenario is encoded into a fake low-value token, persisted as a high-value token, and kept stable across the charge lifecycle. Scenarios are dictionaries of per-action specs with success predicates (including a 50% chaos mode), delays, network decline codes and per-attempt retry specs. Strict routing rules confine the fake to simulated users. That lets it run safely in production for load testing the full payment stack, and new scenarios can be added through an AI coding skill whose output still goes through code review.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Payments & fintech](https://swe.quest/tags/payments.md) (Domains)
- [Testing](https://swe.quest/tags/testing.md) (Engineering practices)
- [Resilience](https://swe.quest/tags/resilience.md) (Distributed systems)
- [System design](https://swe.quest/tags/system-design.md) (Architecture & design)

## Prerequisites

- payment authorization and capture flows ([easy posts on Identity & auth](https://swe.quest/tags/identity-auth.md?difficulty=easy))
- card tokenization
- retry and fallback patterns

## Keywords

Lyft, Fake Payment Provider, Low Value Token, High Value Token, network decline codes, load testing

## Related posts

- [10 Tips for Building Resilient Payment Systems](https://swe.quest/articles/10-tips-for-building-resilient-payment-systems-94c9ade99576742c.md): Shopify Engineering · 2022-07-28 · Medium · 13 min read · Payments & fintech, Resilience, Observability, Incidents & postmortems, Ruby
  Ten lessons from Shopify's payment infrastructure for keeping payment systems reliable at scale.
- [Performance Testing At Scale—for BFCM and Beyond](https://swe.quest/articles/performance-testing-at-scale-for-bfcm-and-beyond-2d2b72564f475785.md): Shopify Engineering · 2023-01-27 · Medium · 15 min read · Capacity planning, Performance engineering, Testing, Scaling, E-commerce
  Shopify prepares for Black Friday Cyber Monday by repeatedly running full-scale load tests against production: scaling Shopify Core and dependencies (nginx routing, ProxySQL, key/value store) to their BFCM profile, layering five Cronograma-driven traffic flows (browse/buy, admin, flash sale, Storefront API, Hydrogen/Oxygen) with an abort switch, then scaling down in reverse order and running blameless retrospectives.
- [Autonomous testing of services at scale](https://swe.quest/articles/autonomous-testing-of-services-at-scale-54aa6a1bfbfb71d4.md): Meta Engineering · 2021-10-20 · Medium · 13 min read · Testing, Microservices, RPC & gRPC, Sandboxing & isolation, Developer productivity
  Meta built an integration testing framework for back-end services that reuses production containerization and routing to spin up ephemeral test environments, with per-service boundaries where requests go to local services, in-process Python mocks, in-memory replicas, production (read-only) or are blocked.
- [Building an End to End load test automation system on top of Kubernetes](https://swe.quest/articles/building-an-end-to-end-load-test-automation-system-on-top-of-kubernetes-7beb3707dbd053ca.md): Zalando Engineering · 2021-03-01 · Medium · 9 min read · Testing, Performance engineering, Kubernetes, Payments & fintech, Capacity planning
  Zalando's payments team built an automated end-to-end load testing system in its Kubernetes test cluster.
- [How a global fintech scaled coding agent traffic with Dedicated Model Inference](https://swe.quest/articles/how-a-global-fintech-scaled-coding-agent-traffic-with-dedicated-model-inference-84f93581c0f0597b.md): Together AI · 2026-09-18 · Medium · 6 min read · Inference & serving, AI for coding, Capacity planning, Load balancing
  A global fintech serves its internal coding-agent traffic on GLM 5.2 via Together's Dedicated Model Inference, where spiky, engineering-hours load with long prompts (ISL p50/p95 of roughly 81K/178K tokens) at low RPS made concurrency, not throughput, the design priority.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
