{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-qr/qr.sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Test Server","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"test-server"},"children":["Test Server"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Electrum hosts a number of test servers that can be used to test that an Electrum API has been implemented correctly."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The QR Code Payments test server replicates the behaviour of the Electrum Switch by validating incoming API request payloads and returning a relevant API response. Each QR Code Payments operation can be tested against the following base URL endpoint:"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["https://wiremock.exosphere.electrum.dev"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Electrum ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://docs.electrumsoftware.com/openapi/qr/openapi/openapi"},"children":["QR Code Payment Service Interface Documentation"]}," and the Electrum ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://docs.electrumsoftware.com/qr/public/design-considerations-retailer"},"children":["QR Code Payment Service Implementation Guide"]}," specify how each QR Code Payment operation must be implemented and populated."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If a given request does not follow the Electrum specification, the test server will return a mismatch error detailing the formatting issue of the delivered API request."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"authorisation"},"children":["Authorisation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Electrum test servers have a built-in mock OAuth 2.0 authorisation scheme. All requests to the Electrum test server require an 'Authorization' header."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To acquire an OAuth 2.0 token, Electrum has a generic service to generate new tokens:"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Authorisation Details"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Access Token Url: https://auth.electrum.dev/auth/realms/Mock-Server-Switch-Testing/protocol/openid-connect/token"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Client Id: electrum-test-client"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Client Secret: 83a9a5d0-60a0-4a04-a5b9-ea708953b777"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Grant Type: Client Credentials"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Alternatively, if you will not be calling or making use of OAuth 2.0 token generation while integrating with the test servers, you can manually set the authorisation header to match the following format and regex:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Plain text"},"children":["Plain text"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["‘Authorization’ : Bearer\\s[A-Za-z0-9-]+.[A-Za-z0-9-]+.[A-Za-z0-9-_]+$"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"scenarios"},"children":["Scenarios"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["There are a number of different test scenarios for each operation. To ensure that you route requests to the correct test scenario, populate the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}," field in the request payload with a designated suffix value."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Scenario"},"children":["Scenario"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Designated suffix value"},"children":["Designated suffix value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Success"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The originating system receives a successful API response from Electrum."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["[any string]000100"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Delayed"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The originating system receives a delayed API response from Electrum, outside of the originating system’s internal timeout period."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["[any string]000200"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Timeout 1"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The originating system receives no response from Electrum."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["[any string]000300"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Timeout 2"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The originating system receives a timeout error message from Electrum, indicating that the upstream entity did not respond."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["[any string]000301"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Decline 1"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The originating system receives a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GENERAL_ERROR"]}," error message from Electrum."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["[any string]000400"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Decline 2"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The originating system receives a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FORMAT_ERROR"]}," error message from Electrum."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["[any string]000401"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"operations"},"children":["Operations"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Electrum QR Code Payments test server facilitates routing to API endpoints, mirroring the conventional Electrum endpoint format."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The supported operations, the request method, the endpoints, and the available test scenarios are listed below. Route requests to the correct test scenario by populating the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}," field in the request payload with the designated suffix value."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Not all scenarios are available for every operation. The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["notifyScan"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["confirmPayment"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["reversePayment"]}," operations support only the Success, Timeout 2, and Decline 1 scenarios. If you attempt to trigger a scenario that is not supported by a particular operation then this will result in a mismatch error from the test server."]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Operation"},"children":["Operation"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Method"},"children":["Method"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Endpoint"},"children":["Endpoint"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Routing field"},"children":["Routing field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Available scenarios"},"children":["Available scenarios"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["createQrCode"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/qr/v1/qrCodes"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Success, Delayed, Timeout 1, Timeout 2, Decline 1, Decline 2"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pay"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/qr/v1/payments"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Success, Delayed, Timeout 1, Timeout 2, Decline 1, Decline 2"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["notifyScan"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/scans"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Success, Timeout 2, Decline 1"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["confirmPayment"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/qr/v1/payments/confirmations"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Success, Timeout 2, Decline 1"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["reversePayment"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/qr/v1/payments/reversals"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Success, Timeout 2, Decline 1"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The operations listed above encompass the full set of available API requests that can be tested against the Electrum QR Code Payments test server. Originating systems and/or service providers should utilise only operations that are relevant to their specific integration."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"static-response-values"},"children":["Static Response Values"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The test server will populate (using generic values) all fields in an API response message that the VAS service provider would typically populate in a real transaction."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["So, there may be instances where the response message contains an optional field that is not required for your specific project integration. You can ignore these fields if they are not relevant to your specific integration."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"usage-notes"},"children":["Usage Notes"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All responses received from the test server are populated with generic test data."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ensure that all requests sent to the test server use the correct HTTP method (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST"]},") for all QR operations. Information on request payloads is available on the Electrum ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://docs.electrumsoftware.com/openapi/qr/openapi/openapi"},"children":["QR Code Payment Service Interface Documentation"]},"."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["notifyScan"]}," operation is initiated by the payment partner/service provider (e.g., PayJustNow) towards Electrum when a consumer scans the displayed QR code. Electrum acknowledges receipt with an HTTP ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["202"]}," response before processing the payment authorisation."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The pay operation supports both payment authorisation (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tranType"]}," = ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GOODS_AND_SERVICES"]},") and refund processing (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tranType"]}," = ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RETURNS"]},"). Ensure the appropriate ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tranType"]}," value is set when testing each flow."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tranId"]}," field links a pay request to its preceding ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["createQrCode"]}," response. The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tranId"]}," returned by ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["createQrCode"]}," must be included in the subsequent pay request payload."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["allowedPartners"]}," field should be populated in both ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["createQrCode"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pay"]}," requests to enable Electrum to validate partners."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Confirmation (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["confirmPayment"]},") and reversal (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["reversePayment"]},") messages are sent as store-and-forward (SAF) advice messages."]}]}]}]},"headings":[{"value":"Test Server","id":"test-server","depth":1},{"value":"Authorisation","id":"authorisation","depth":2},{"value":"Scenarios","id":"scenarios","depth":2},{"value":"Operations","id":"operations","depth":2},{"value":"Static Response Values","id":"static-response-values","depth":2},{"value":"Usage Notes","id":"usage-notes","depth":2}],"frontmatter":{"seo":{"title":"Test Server"}},"lastModified":"2026-07-10T07:16:09.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/qr/public/qr-test-server","userData":{"isAuthenticated":false,"teams":["anonymous"]}}