The demo gateway is a simulated payment gateway that runs only on dev and stage. Attach it to a site like any other gateway; its payments then decline, time out, settle, return and charge back on demand, with no processor account.
Card numbers choose only the brand and funding. The outcome comes from the payment's amount: a pre-fee total ending in .45 cents picks an outcome by its dollar part, and any other total approves.
Any expiry date in the future and any CVV work.
424242424242424240000566556655564000620000000007411111111111111155555555555544442223003122003222520082828282821051051051051051003782822463100056011111111111117305693000902000435660020203605056200000000000005Any other valid number approves too. It gets the brand of its range and credit funding: 4 Visa; 51-55 and 2221-2720 Mastercard; 34 and 37 Amex; 6011, 644-649 and 65 Discover; 300-305, 3095, 36, 38 and 39 Diners; 3528-3589 JCB; any other 62 UnionPay. Debit and prepaid cards get the debit treatment; a commercial card is credit and Level 3 eligible.
The amount that picks the outcome is the payment's pre-fee total ( totals.total ): tax included, but no surcharge or other site fees, tip, late fees or early-pay discounts. A refund or a void uses the total of the payment it refunds or voids. Card bands also apply to Apple Pay and Google Pay.
Any total without .45 cents2000.45 - 2999.453000.453001.453002.453003.453004.453005.454001.45 - 4999.455001.45 - 5085.455100.455101.455102.455103.455900.45 - 5990.456000.45 - 6099.457001.457002.457003.457004.458001.45 - 8006.4532.74A total from 2000.45 to 2999.45 declines with Braintree's processor code equal to its dollar part. These are the codes most demos need:
2000, 205720012004200520102012, 20132014201520162017, 20182044, 2047Every other code maps to the category its meaning matches:
AVS is matched on the first five digits of the billing ZIP, so a ZIP+4 behaves the same:
20000 answers AVS N (does not match).20001 answers AVS U (not verified).M (matches).CVV always answers M , whatever is entered. To test a CVV decline, use the 2010.45 total (InvalidCvv).
When the demo gateway's Enforce AVS setting is on, an AVS result of N turns an approval into an InvalidZipcode rejection. U never declines. ACH and EFT payments carry no AVS or CVV result.
Any routing and account number works; the outcome comes from the amount alone. These numbers pass the payment forms' checks:
110000000 , account number 000123456789 , checking001 , transit number 12345 , account number 1234567 , checkingAn approved ACH or EFT payment stays captured until it settles. A return from the 5001.45 or 5900.45 bands follows that settlement.
The simulated terminals, Demo Countertop Terminal ( DEMO-T1 ) and Demo Handheld Terminal ( DEMO-T2 ), are interchangeable. Each read is a chip read of a Visa card ending in 1111 (BIN 411111) named DEMO CARDHOLDER. When the site has tipping on, the cardholder picks the first suggested tip, or 15% when none is suggested.
A card-present charge reads its outcome from the pre-fee total before the tip. The card bands above apply to the card it reads, and these totals make the terminal itself fail:
8001.458002.458003.458004.458005.458006.45Settlement, returns, chargebacks, refund settlement and authorization expiry happen later, on a schedule set by the demo gateway's speed: Instant (the default for a new gateway), Fast or Realistic. Instant and Fast wait a fixed time from the moment the event is scheduled, so a return comes that long after the payment settles. Realistic follows the calendar in the site's time zone with a 02:00 cutoff.
Each event reaches Hyfin by a signed webhook and through the nightly batch poll. A settled payment joins the site's open batch, which closes at the next 02:00 in the site's time zone.
To skip the wait, open a demo gateway payment and use its Simulate panel, which also lists the payment's scheduled events and webhook deliveries. Each action shows only while the payment is in a status it applies to, and fires whatever the payment's amount. The panel calls POST /app/payment/{payment_id}/demo/{action} ; settlement declines, returns and chargebacks send their code as {"code": "R01"} .
settlesettlementDeclinereturnchargebackfailRefundexpirecancelAn admin can also close the site's open batch at once with POST /app/paymentGateway/{gateway_id}/demo/closeBatch , which queues the site's batch job.