Choose a card type
How many?
1

Test data only. Local fixtures do not issue cards, verify accounts or provide payment authorization. Use them only in authorized tests. Why?

VisaTEST CARD
•••• •••• •••• ••••
Cardholder—
ExpiresMM/YY
CVV•••
  • Generated fields are not uploaded
  • Randomly generated in your browser
  • Every number passes the Luhn check

Distinguish a recognized Troy card from an enabled payment method

A checkout can identify a Troy-shaped number correctly while the merchant’s configuration does not enable that method. It can also lose the logo asset while acceptance stays enabled. Those are different states and should produce different messages. This page provides a presentation fixture that keeps brand recognition, acceptance and artwork independent.

The generator emits 16-digit Luhn-valid strings starting with 9792 and a three-digit synthetic security code. The example number 9792123456789018 is a fixed local test input. The accompanying acceptance values are mocks, not results obtained from a Turkish gateway.

Define the three acceptance states

TROY is Türkiye’s payment scheme; BKM’s overview also explains that international use involves an international scheme logo on the card. A short prefix check cannot resolve those routing arrangements or the capabilities of a particular merchant account.

For this test contract, true means the mocked checkout configuration enables TROY, false means it does not, and missing or unexpected data means acceptance is unconfirmed. The candidate prefix is deliberately restricted to the generator’s 9792 profile. Braintree’s maintained card-type configuration includes additional Troy patterns, so 9792 must not be presented as an exhaustive list.

SituationBrand labelExpected customer-facing behavior
Recognized profile, capability true, logo loadedTROYSay the method is enabled for this checkout
Same input with the logo unavailableTROY as textPreserve the same acceptance state
Recognized profile, capability falseTROYSay this checkout does not accept TROY
Configuration has not loadedTROYKeep acceptance unconfirmed rather than guessing
Capability arrives as the string "false"TROYTreat the malformed response as unconfirmed
Input no longer matches the configured shapeGeneric Card/Kart labelClear the stale brand and acceptance message

The string case matters because JavaScript treats a nonempty string as truthy. A loose if (capability) check would accidentally turn "false" into an enabled payment method.

Run the Turkish and English presentation cases

Download the Troy capability mocks and the runnable UI contract checks :

node --test troy-capabilities.test.mjs

The fixtures cover both languages, a fallback to English for an unsupported locale, missing artwork, explicit rejection of truthy strings and a cleared brand after deletion. The disabled message in Turkish is “Bu ödeme formu TROY kabul etmiyor.” It describes the checkout’s capability rather than blaming the number the customer entered.

function presentTroy(number, capability, locale, logoLoaded) {
  const candidate = typeof number === 'string' && /^9792\d{12}$/.test(number);
  const acceptance = candidate && capability === true ? 'enabled'
    : candidate && capability === false ? 'disabled' : 'unconfirmed';
  const messages = locale === 'tr' ? {
    enabled: 'TROY bu ödeme formunda etkin.',
    disabled: 'Bu ödeme formu TROY kabul etmiyor.',
    unconfirmed: 'Kart kabul durumu henüz doğrulanmadı.'
  } : {
    enabled: 'TROY is enabled for this checkout.',
    disabled: 'This checkout does not accept TROY.',
    unconfirmed: 'Card acceptance has not been confirmed.'
  };
  return {
    brand: candidate ? 'TROY' : null,
    acceptance,
    message: messages[acceptance],
    presentation: candidate && logoLoaded === true ? 'logo-with-text' : 'text',
    label: candidate ? 'TROY' : locale === 'tr' ? 'Kart' : 'Card'
  };
}

The runner also checks that changing the logo cannot alter acceptance, changing the locale cannot enable a disabled method, and switching capability states replaces the message without losing the brand label. The function checks number shape only; checksum, other fields and payment readiness must be assessed separately.

Connect the mocks to your actual checkout

Replace presentTroy with an adapter that reads your component’s visible label, message and presentation state. Supply capability through the same interface used for your real merchant configuration, using mocks in the test. Do not infer that capability from the customer’s country, interface language or a matching prefix.

In a browser test, force the logo request to fail and confirm the TROY text remains readable. Check that a brand image has an appropriate accessible name and that the acceptance message is not communicated by color alone. Switch between Turkish and English without resetting the mocked capability. Then shorten the input and confirm that the previous enabled message disappears.

Keep “enabled” distinct from “payment approved.” Use provider-published fixtures in a separate sandbox test flow for authorization and 3-D Secure outcomes. The payment-form checklist helps connect those responses to the rest of the interface.

For disagreements between local brand rules, use the Maestro candidate-resolution tests. The BIN and IIN guide explains what a prefix cannot establish, and the tool directory provides the other available network generators.

Frequently Asked Questions

Does recognizing 9792 prove this checkout accepts Troy?
No. The sample treats the prefix as a brand candidate and reads acceptance from separate mocked merchant configuration. A recognized brand can still be disabled or unconfirmed for that checkout.
Should a missing Troy logo produce an unsupported-card error?
No. Missing artwork is a presentation failure. The example keeps the TROY text label and the same acceptance state whether or not the logo loaded.
What does the Turkish disabled-state message say?
Bu ödeme formu TROY kabul etmiyor. It describes this checkout’s configured acceptance, without claiming that the customer’s card number is invalid.
Is 9792 a complete Troy prefix reference?
No. It is the profile implemented by this generator and the fixture. Use maintained provider data for broader identification, co-badged products and routing; do not treat this small example as an authoritative allocation list.