Simulating a Card Purchase
This walks through simulating a card purchase end to end: creating it, settling it, and confirming the outcome. See Simulation Scenarios first if the endpoints and event names are new.
All requests go to Penny Simulation (https://simulate.sandbox.api.thepennyinc.com).
Prerequisites
You need an active Sandbox card funded by a Capital Account with enough available balance for the purchase. Simulation does not create them. Create the Capital Account on Penny Banking, fund it with a simulated inbound payment from a linked account (POST /transaction/payment with "settle": true), and issue the card with Issuing a Card. The card must belong to the business you authenticate as.
1. Create the purchase
POST /transaction/card runs the simulated purchase through Penny’s authorization — account and card eligibility, available funds, spend controls, and any configured live decisioning callback — and the simulator confirms the result the way a card network would. A decline is still a successful response that contains a declined transaction.
Every following event call targets the response’s transaction_id. Store it.
Add "force": true to skip authorization and record the purchase as settled, modeling an offline or store-and-forward capture. You cannot request a specific decision: without force, the outcome is whatever Penny’s authorization decides. To test a decline, configure a spend control that the purchase breaks.
2. Settle it
Settlement amounts are deltas, not cumulative totals. To exercise a multi-part settlement, send several transaction.settled events, each with its own Idempotency-Key and a partial amount (for example, "80.00" and then "40.00").
3. Confirm it
Read the simulated transaction through Penny Banking’s transaction endpoint:
See Transactions for its shape and Reading Transactions & Ledger Entries for how to find and reconcile it with other Sandbox transaction activity.
Next steps
- Simulation Scenarios — the full set of transaction kinds and events, including funding payments
- Retries & Idempotency — why each event gets its own key, and how to retry one safely
- Subscribing to Webhooks — get notified as a simulated transaction moves through its lifecycle instead of polling for it