Skip to content
MCP Server

API integration

You originate an authorization into Switchbench exactly as your real system would originate one toward a payment network. What Switchbench does with it depends on the transport:

  • REST (structured transaction routes, e.g. POST /transaction/sale/pos) — Switchbench is on the originating side. It asks the Visa engine to prepare an outbound authorization from your typed JSON fields, sends it over your active mTLS TCP connection to your fintech backend, waits for that backend’s response, and finalizes it into the REST response you receive. Your fintech backend is the responder, so a live mTLS connection must already be open (see Before you begin). The routes accept requests today, but the end-to-end round trip is not runnable yet (#533).
  • Inbound ISO 8583 over mTLS TCP — Switchbench would act as the issuer/network on the other side: validate the message, apply the configured behaviour, compute fidelity, and return the response itself. This direction is not yet available — SMP has no inbound framing loop routing fintech-initiated frames to SVE/SME (#538), and no guide is published for it. Unsolicited inbound frames are logged and discarded.

The same two rules govern the result, within the flows that run today:

  • Fidelity is computed — for the supported flows. ISO 8583 framing and the prepare-leg cryptographic artefacts for the supported Visa server-first authorization are calculated by the engine; you do not configure them. Response-leg crypto (PIN-change confirmation, key-exchange finalization) is not yet wired (#549), and PIN operations accept clear PIN digits only (#536). Mastercard scheme-specific fidelity, including its own SHE crypto integration, reaches parity with Visa as separate work (#539). The direct HSMaaS / payShield path (port 11014) is unaffected by these and runs today.
  • Behaviour is optional. The business outcome — approve, decline, partial approval, timeout, and similar — is selected from a behaviour you define for that card number / BIN range, configured separately from message fidelity. Without one the engine runs its normal faithful processing; configure a behaviour only when you want a specific simulated outcome.

Every transport needs the credentials described in Before you begin, which carries a per-path prerequisites table, plus an optional scenario behaviour when you want a specific simulated outcome. Note in particular that a REST transaction needs an API key to authenticate the structured transaction call but also a client certificate and a live mTLS TCP connection — held open by your fintech backend as the responder — to complete. Read that page first.

The Docs column is how complete the written guide is; Runtime is what actually executes today.

GuideTransportAuthDocsRuntime
Initiating a test transaction over RESTStructured transaction routes over HTTPSAPI keyCompleteRoutes live; full round trip blocked (#533)
Visa ISO 8583 over mTLS TCPPort 11012Client certificateCompleteServer-first delivery leg only, in isolation; client-initiated auth not routed (#538); end-to-end blocked (#533)
HSMaaS (raw payShield) over mTLS TCPPort 11014Client certificateCompleteRunnable end to end; canonical payShield command subset only
Mastercard ISO 8583 over mTLS TCPPort 11013Client certificatePlaceholderSame mTLS/framing as Visa; client-initiated routing (#538) and SME scheme + SHE crypto fidelity (#539) pending

REST is the simplest entry point — an API key and a single HTTP call, with no mTLS on the call itself — and is the natural first integration. Completing a REST transaction still depends on your fintech backend holding a live mTLS TCP connection open as the responder, so a full round trip also needs a client certificate; a pure-REST caller with no live connection gets a 502 delivery error. The ISO 8583 and HSMaaS transports require a client certificate and a live mTLS TCP connection to the FRP edge that you open yourself.

For the field-by-field contract of the structured transaction routes — request and response schemas, every error status with its RFC 7807 body — see the API reference.