Test Card Hub
v1.1.0Sandbox test cards, Playwright tests, real-card scanner and decline codes for LATAM gateways.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_gateways List payment gateways
Lists the payment gateway sandboxes with official test cards (Stripe, Mercado Pago MX, Conekta, Openpay, NetPay, Kushki, Clip, PayU, dLocal, Adyen): id, docs URL, date verified, card count per outcome, and the gateway hint (expiry/CVV/cardholder-name rules). Call first to pick a gateway id.
| Parameter | Type | Description |
|---|---|---|
lang | string | Language for descriptions, notes and hints. Default "en". |
find_test_cards Find test cards
Returns sandbox test cards to type into a checkout, filtered by gateway, outcome and brand. Each card includes the number, brand, expected outcome, gateway notes and generic fill values (expiry, CVV, postal code). When gatewayHint contradicts fill values, the hint wins (e.g. Mercado Pago decides the outcome by cardholder name). Returns at most 50 cards (default 10); total tells how many matched.
| Parameter | Type | Description |
|---|---|---|
brand | string | |
environment | string | User environment name from list_environments. |
gateway | string | Gateway id from list_gateways, e.g. "stripe". |
lang | string | Language for descriptions, notes and hints. Default "en". |
limit | integer | |
outcome | string | Expected result of the charge. |
source | string | Default "all". |
list_environments List my environments
Lists the environments saved in the Test Card Hub extension (development, staging, a client), read from the exported backup file configured on the server. Use the names with find_test_cards.
validate_card Validate a card number
Checks a card number before using it in a checkout: Luhn, length, brand, and whether it is a known sandbox test number. verdict "possibly_real_card" means stop: never type it into a form.
| Parameter | Type | Description |
|---|---|---|
number * | string | Card number, spaces and dashes allowed. |
scan_for_real_cards Scan text for real card numbers
Scans text (source code, test fixtures, logs, seed data) for card numbers that may be REAL: Luhn-valid, a known brand, and not a published sandbox number. Findings are masked (first 6 + last 4; last 4 only under 16 digits) and include line and column. Detects digits that are contiguous or grouped by single spaces or dashes; numbers split across lines or by dots are not detected. Pass the file contents as text; this server never reads files. Limits: 200000 characters per call, 50 findings shown.
| Parameter | Type | Description |
|---|---|---|
text * | string | Text to scan, e.g. a file's contents. |
generate_checkout_tests Generate checkout tests
Writes a Playwright test file (TypeScript) with one test per sandbox scenario of a gateway: card, expiry, CVV, and the extra fields the gateway needs (e.g. NetPay customer email, Mercado Pago or Adyen cardholder name), taken from official docs. Selectors in fillCheckout/expectOutcome are a starting point the user must map to their checkout. Returns the file contents; the server writes nothing to disk.
| Parameter | Type | Description |
|---|---|---|
checkoutUrl * | string | http(s) URL of the checkout in test mode. |
gateway * | string | Gateway id from list_gateways, e.g. "netpay". |
lang | string | Language for descriptions, notes and hints. Default "en". |
outcomes | array | Only these outcomes. Default: all. |
explain_decline Explain a decline code
Explains a payment decline / error code of a gateway: the official meaning and source URL (from the gateway docs) plus a SUGGESTED customer message (es/en) and merchant action. Omit code to list the known codes of a gateway. Gateways: stripe, mercado-pago, conekta, openpay, netpay, clip, payu-latam, dlocal, adyen.
| Parameter | Type | Description |
|---|---|---|
gateway * | string | Gateway id, e.g. "stripe". |
code | string | Decline/error code exactly as the gateway returned it. |
lang | string | Language for descriptions, notes and hints. Default "en". |