Test Card Hub

v1.1.0
io.github.eyrockscript/test-card-hub Checked 2 days ago Published 22 days ago

Sandbox 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.

ParameterTypeDescription
langstringLanguage 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.

ParameterTypeDescription
brandstring
environmentstringUser environment name from list_environments.
gatewaystringGateway id from list_gateways, e.g. "stripe".
langstringLanguage for descriptions, notes and hints. Default "en".
limitinteger
outcomestringExpected result of the charge.
sourcestringDefault "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.

ParameterTypeDescription
number *stringCard 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.

ParameterTypeDescription
text *stringText 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.

ParameterTypeDescription
checkoutUrl *stringhttp(s) URL of the checkout in test mode.
gateway *stringGateway id from list_gateways, e.g. "netpay".
langstringLanguage for descriptions, notes and hints. Default "en".
outcomesarrayOnly 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.

ParameterTypeDescription
gateway *stringGateway id, e.g. "stripe".
codestringDecline/error code exactly as the gateway returned it.
langstringLanguage for descriptions, notes and hints. Default "en".