HSRCPAY Documentation

Sandbox Issuer Resolution

How sandbox card prefixes resolve issuer and BIN metadata, and what this does not simulate.

Sandbox issuer resolution exists in HSRC Pay, but it is not an issuer behavior simulation engine.

The codebase resolves card prefixes to an issuer plus BIN metadata: network, country, brand, IIN, phone, prefix, and card type. The resolved issuer is stored on the payment method and can be used by routing capability checks. It does not create issuer behavior.

Runtime Model

StepWhat happens
PAN cleanupNon-digit characters are removed from the submitted card number.
Network fallbackThe resolver can infer a network from card-number ranges.
BIN lookupThe sandbox repository loads bin_list rows and selects the longest matching prefix.
Issuer + metadata resultThe resolved result contains issuer, network, country, iin, brand, phone, prefix, and type.
Payment method updateThe resolved fields are persisted on the payment method and _sys_resolve_result metadata.
Routing inputProvider capability matching can read issuer, network, country, card type, currency, secure mode, and installment data.

What This Does

  • Resolves a sandbox issuer for card payment methods when the card prefix matches a BIN record.
  • Adds sandbox-only BIN metadata to card payment methods.
  • Lets tests cover provider method compatibility by issuer, network, country, and card type when provider capabilities are configured for those fields.
  • Keeps sandbox BIN data separate from production BIN intelligence.

What This Does Not Do

  • It is not a real issuer, bank, ACS, card network, or licensed financial institution.
  • It does not simulate issuer decisions.
  • It does not map BINs or issuers to requires_action, hard decline, soft decline, insufficient funds, invalid account, fraud, or issuer unavailable.
  • It does not guarantee production approval, routing, fees, or provider behavior.
  • It is not a public API for managing issuer profiles.

Relationship With Sandbox Cards

Sandbox cards and sandbox issuer resolution are related but not the same thing:

AreaSourceRuntime purpose
Sandbox card allowlistSandboxCardsAccept or reject card test data in the sandbox provider.
Sandbox issuer resolutionSandboxBinList / bin_listResolve issuer and BIN metadata for the payment method.
3DS resultPayment config + sandbox adaptersecure_mode: true returns requires_action for a valid sandbox card.
Explicit error simulationProvider/sandbox scenario configexpectedSandboxErr or equivalent configuration, not card/BIN number.

Example Metadata

The public docs intentionally do not expose the full internal BIN list. The shape is:

FieldMeaning
prefixMatching card prefix used by longest-prefix lookup
iinIIN value, usually derived from the prefix
networkVISA, MASTERCARD, TROY, AMEX, etc.
issuerResolved sandbox issuer label; not a real issuer decision engine
countryCountry metadata used as a routing input
brandSandbox card product label
typeCREDIT, DEBIT, or PREPAID
phoneSandbox metadata field from the BIN record

On this page