{
  "openapi": "3.0.3",
  "info": {
    "title": "CardQwest TestConsumerAPI",
    "version": "1.1.1",
    "description": "Run payment-message and card/token tests against your CardQwest test fixtures.\n\n### Start here\n\n1. Get your **consumer test API key** and the card, product, consumer and token UUIDs for your fixtures from ByQwest.\n2. Send JSON with `Content-Type: application/json` and `x-api-key: <your-api-key>`.\n   In Swagger UI select **Authorize**, paste the key value and choose an example.\n   Use the key **value**, not its identifier. This test API requires an API key only.\n3. Replace all example UUIDs and profile/device placeholders before sending.\n4. Inspect the business result or review asynchronous operation history as described below.\n\nBase URL: `https://hby25k5nte.execute-api.eu-central-1.amazonaws.com/test`.\nFor example, the full message URL is\n`https://hby25k5nte.execute-api.eu-central-1.amazonaws.com/test/test/message`.\n\n### Choose a test\n\n| Operation | Use it to test | Result |\n| --- | --- | --- |\n| POST /test/message | Purchase, refund, direct credit, balance inquiry, verification, advice or reversal | Immediate message decision and generated UUID |\n| POST /test/card/inquiry | Tokens associated with your test card | 202 submission acknowledgement |\n| POST /test/card/lifecycle | Card lifecycle and VAU opt-out | 202 submission acknowledgement |\n| POST /test/card/updatemetadata | A configured metadata profile | 202 submission acknowledgement |\n| POST /test/token/inquiry | Token details and optional device/cardholder information | 202 submission acknowledgement |\n| POST /test/token/lifecycle | A token operation, including device-binding approval | 202 submission acknowledgement |\n\n### Read the result\n\n**Message tests:** HTTP 200 means the message was processed. It does not mean a\npayment was approved. Read `response_code` and any `error`. Save `isorequest_uuid`:\nthe API creates it for each call. Never send your own `isorequest_uuid` or creation\ntime. Use the saved UUID as `isorequest_ref_uuid` for a follow-up reversal.\n\n**Card/token tests:** HTTP 202 with `status: ACCEPTED` means the operation was\nsubmitted. It does not confirm completion. Review your ConsumerAPI\n`/tokenmessage/list` history filtered by `card_uuid` or `token_uuid`, then use\n`/tokenmessage/get` with a returned `tokenmessage_uuid` to inspect its request\nand response details. Use your usual ConsumerAPI URL and authentication for those\nhistory calls. `event_id` identifies the submission and is not a token-message UUID.\nThere is no event-status endpoint in this test API.\n\n### Examples and test sequence\n\nThe message example selector includes MCC 5999/5814/4814 purchases, refund,\ndirect credit, balance inquiry, zero-amount account verification, incorrect PIN,\nauthorization advice and reversal. Start with a purchase. Copy its returned UUID\ninto the reversal example's `isorequest_ref_uuid`. Advice uses the original\nresponse code in `transaction.response_code_ref`; when linking advice to a prior\nmessage, also supply its UUID as `isorequest_ref_uuid`.\n\nExamples illustrate request shapes; decisions depend on your card/token state,\nproduct configuration, balance and test scenario. Changes affect those test\nfixtures. A repeated message creates a new UUID and can repeat the action.\nIf a request times out, check the result through your available transaction\nhistory or contact ByQwest with the returned UUID before retrying.\n\n### Troubleshooting\n\n| HTTP status | Meaning | Next step |\n| --- | --- | --- |\n| 200 | Message processed | Inspect response_code; HTTP success alone is not approval |\n| 202 | Card/token operation submitted | Review ConsumerAPI token-message history |\n| 400 | Invalid input or rejected message input | Read error and field; correct the JSON or fixture values |\n| 403 | API key missing, invalid or not enabled for this API | Use the consumer test key value in one x-api-key header |\n| 429 | Request limit exceeded | Slow down and follow Retry-After if supplied |\n| 502 | Processing or submission failed | Retain any message UUID and check the outcome before retrying |\n| 504 | Message processing timed out | Retain isorequest_uuid and check the outcome before retrying |\n\nUnknown operation paths can return a gateway error before request validation.\nCheck the exact URL, POST method and headers first. A 400 validation response to\nan empty JSON object confirms authentication reached request validation.\n"
  },
  "servers": [
    {
      "url": "https://{apiId}.execute-api.{region}.amazonaws.com/test",
      "description": "CardQwest consumer test environment",
      "variables": {
        "apiId": {
          "default": "hby25k5nte",
          "description": "ConsumerTestAPI ID provided by ByQwest"
        },
        "region": {
          "default": "eu-central-1"
        }
      }
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "tags": [
    {
      "name": "Messages",
      "description": "Authorization and follow-up message scenarios"
    },
    {
      "name": "Card tests",
      "description": "Test card tokenization and lifecycle operations"
    },
    {
      "name": "Token tests",
      "description": "Test token inquiry and lifecycle operations"
    }
  ],
  "paths": {
    "/test/message": {
      "post": {
        "operationId": "consumer_test_message",
        "tags": [
          "Messages"
        ],
        "summary": "Submit a test ISO8583 message",
        "description": "Supply a test card, the message type (`isorequest_mti`) and its details.\nA fresh `isorequest_uuid` and creation timestamp are generated for every\ncall; you do not supply them. Save the returned UUID and use it as\n`isorequest_ref_uuid` when sending a reversal or an advice referring to\nthat message. Repeating a request creates another message.\n\nSupported request/response MTIs:\n| Request MTI | Scenario | Response MTI |\n| --- | --- | --- |\n| 0100, 1100 | Authorization or zero-amount account verification | 0110 |\n| 0120, 1120, 1121 | Authorization advice | 0130 |\n| 0400 | Reversal request | 0410 |\n| 0420 | Reversal advice | 0430 |\n| 0520, 1520, 1521 | Reconciliation advice | 0530 |\n| 0600 | Token administration request | 0610 |\n| 0620 | Token administration advice | 0630 |\n\n`configuration.product_uuid` selects your test product and its configured\ncallbacks. `configuration.scheme` identifies the card scheme, for example\nVISA. `transaction.transaction_type_code` selects the business operation:\npurchases and cash use 00/01/10/11; 20 is refund, 26/50 are direct credit,\nand 30 is balance inquiry. PIN change uses `pin_change_request` and supplied\nencrypted PIN material; 72 is PIN unblock. Other scheme-specific\ncodes must match your scenario. Authorization outcomes depend on your\nproduct configuration and callback decisions.\n\nAmounts are digit strings in minor units: EUR 9.00 is `\"900\"` with currency\ncode `\"978\"`. Preserve leading zeros in codes and raw data elements.\nOmitted billing details use the transaction currency and amount; when\nsupplying another billing currency, provide its billing amount and fee.\nFee values may contain the scheme's C/D sign prefix.\n\nSet `merchant.mcc` for merchant-category scenarios. Raw `data_elements`\ncan supply `de_18` (MCC), `de_39` (advice outcome), `de_63_3` (Visa message\nreason), `de_95` (replacement amount) or other scenario-specific fields.\nKeep raw and interpreted fields consistent. Security flags describe the\nsimulated checks: `pin_present`/`pin_ok`, `cvc2_present`/`cvc2_ok`,\n`card_present` and retry counters. Incorrect PIN scenarios can return 55,\nexhausted PIN tries 75, and expired tokens 54.\n\nAdvice requires `transaction.response_code_ref`. Reversal requires the\noriginal `isorequest_ref_uuid`. A partial Visa reversal additionally uses\n`de_63_3: \"2504\"` and `de_95`; completion advice uses `de_63_3: \"3906\"`.\nZero-amount token activation, step-up and device-binding tests require\ntheir corresponding operational flag and exactly one token in `tokens`.\nToken administration uses `transaction.Message_Reason_Code`, such as\n`Token suspend`, `Token resume` or `Tokens deactivate`, with the affected\ntokens and device details.\n\nHTTP 200 indicates a processed message, not approval. Inspect\n`response_code`, `error` and `ret`. The response MTI follows the table\nabove even for the listed alternative ISO versions.\n\n\n### Submit a decoded ISO8583:1987 payload\n\nA decoded message with top-level mti, message_type, data_elements,\noperational_elements and putative_approval_code is not the endpoint request\nshape. Move those message fields into isorequest_details and set top-level\nisorequest_mti to the same value as its mti. Keep card_uuid at the top level.\nThe message endpoint's operation path is /test/message; its full URL includes\nthe base /test prefix and ends in /test/test/message.\n\nFor the consumer endpoint, omit isorequest_uuid and isorequest_create_dtg;\nboth are generated. Omit isorequest_ref_uuid on the first authorization rather\nthan using an empty string. A reference, when supplied, must be a valid UUID.\nUse real JSON booleans: pin_present: false, not pin_present: \"false\".\nconfiguration.scheme is required and must match your test card/product;\nservice_code: \"220\" is not a scheme value. The example uses VISA as an explicit\nscenario choice, not as a conclusion derived from the raw fields.\n\nThe consumer adapter supplies deferred_authorization=false and\npin_change_request=false, empty missing transaction fees, empty missing billing\nfields, and empty security/data_elements objects. The admin /test/auth adapter\ndoes not supply these defaults; use the complete admin example.\n\n### Raw and interpreted values\n\nThe mappings below explain the sample, not an automatic conversion performed by\nthe test endpoint. Supply operational_elements as well as any raw fields needed\nfor the scenario. Neither adapter automatically reconciles duplicated fields.\nKeep them consistent so that the test describes one transaction.\nAll listed raw fields and interpreted codes/amounts are strings. Preserve leading\nzeros. Schemes can vary in field conventions; use your agreed fixture profile.\n\n| Raw field | Meaning | Example | Interpreted field under operational_elements |\n| --- | --- | --- | --- |\n| `de_3` | Processing code (six digits) | `010000` | transaction.transaction_type_code = first two digits, 01; remaining account-type digits stay in the raw field |\n| `de_4` | Transaction amount | `000000005000` | transaction.transaction_ccy.transaction_amount |\n| `de_7` | Transmission date/time, MMDDhhmmss | `0305201638` | transaction.transmission_date_time |\n| `de_11` | System trace audit number (STAN) | `006460` | transaction.stan |\n| `de_12` | Local time, hhmmss | `220305` | transaction.local_transaction_time |\n| `de_13` | Local date, MMDD | `0305` | transaction.local_transaction_date |\n| `de_14` | Expiration, YYMM | `3012` | Raw expiry field; preserve it for the scenario (December 2030) |\n| `de_18` | Merchant category code (MCC) | `5961` | merchant.mcc |\n| `de_22` | POS entry mode | `020` | security.pos_terminal_pan_entry_mode = 02, pos_terminal_pin_entry_mode = 0 |\n| `de_23` | Card sequence number | `000` | Raw field; no dedicated interpreted field in this example |\n| `de_25` | POS condition code | `00` | Raw field; interpretation depends on your scheme scenario |\n| `de_26` | POS capture code | `53` | Raw field; do not infer pin_present from this code alone |\n| `de_28` | Transaction fee | `000000000` | transaction.transaction_ccy.transaction_fee_amount |\n| `de_32` | Acquiring institution ID | `27610000001` | acquiring.acquiring_institution_id_code |\n| `de_37` | Retrieval reference number (RRN) | `163843360000` | transaction.rrn |\n| `de_41` | Terminal ID | `20390059` | merchant.terminal_id |\n| `de_42` | Merchant/card-acceptor ID | `111120000012000` | merchant.merchant_id |\n| `de_43` | Merchant name/location | `contact@neaPay.com\\Almere-Amsterdam\\Neth` | merchant name/city/country fields; raw formatting depends on your scheme |\n| `de_49` | Transaction currency | `566` | transaction.transaction_ccy.transaction_currency_code |\n| `de_51` | Billing currency | `566` | transaction.billing_ccy.billing_currency_code |\n\n`000000005000` is 5000 minor units. Currency `566` is NGN (Naira), with two\nminor-unit digits, so this example represents NGN 50.00. A billing currency of\n`566` matches the transaction currency: an empty billing_amount reuses the\ntransaction amount. For a different billing currency, supply billing_amount.\nThe historical dates are deliberate replay values; replace them consistently\nwhen testing another transaction.\n\nIn the supplied flat sample the duplicate values disagreed:\n\n| Attribute | Raw value | Interpreted value | Corrected example |\n| --- | --- | --- | --- |\n| STAN | de_11 = 006460 | stan = 006475 | 006460 in both |\n| RRN | de_37 = 163843360000 | rrn = 383543440000 | 163843360000 in both |\n| Local date | de_13 = 0305 | local_transaction_date = 0309 | 0305 in both |\n| Local time | de_12 = 220305 | local_transaction_time = 220309 | 220305 in both |\n| Transmission time | de_7 = 0305201638 | transmission_date_time = 0309203835 | 0305201638 in both |\n\nThe corrected example treats the raw values as the reference; confirm that choice\nfor your test scenario. request_server_dtg is optional supplied metadata under\noperational_elements. It is separate from the API-generated creation timestamp\nand from the local/transmission ISO fields, which can use different time bases.\nThe endpoint does not turn that metadata into the generated creation time.\n\nAn empty reference, absent scheme, string-valued flags and a flat message body\nmust be corrected before using this example with the consumer endpoint.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageRequest"
              },
              "examples": {
                "message-accountverification": {
                  "summary": "Message accountverification",
                  "value": {
                    "card_uuid": "00000000-0000-4000-8000-000000000001",
                    "isorequest_mti": "0100",
                    "isorequest_details": {
                      "message_type": "ISO8583:1987",
                      "mti": "0100",
                      "putative_approval_code": "123456",
                      "data_elements": {
                        "de_18": "5999"
                      },
                      "operational_elements": {
                        "configuration": {
                          "product_uuid": "00000000-0000-4000-8000-000000000003",
                          "scheme": "VISA"
                        },
                        "merchant": {
                          "mcc": "5999",
                          "merchant_name": "Test merchant"
                        },
                        "security": {
                          "card_present": true,
                          "pin_present": false,
                          "cvc2_present": false
                        },
                        "transaction": {
                          "transaction_type_code": "00",
                          "transaction_ccy": {
                            "transaction_amount": "0",
                            "transaction_currency_code": "978"
                          }
                        }
                      }
                    }
                  }
                },
                "message-advice": {
                  "summary": "Message advice",
                  "value": {
                    "card_uuid": "00000000-0000-4000-8000-000000000001",
                    "isorequest_mti": "0120",
                    "isorequest_details": {
                      "message_type": "ISO8583:1987",
                      "mti": "0120",
                      "putative_approval_code": "123456",
                      "data_elements": {
                        "de_18": "5999"
                      },
                      "operational_elements": {
                        "configuration": {
                          "product_uuid": "00000000-0000-4000-8000-000000000003",
                          "scheme": "VISA"
                        },
                        "merchant": {
                          "mcc": "5999",
                          "merchant_name": "Test merchant"
                        },
                        "security": {
                          "card_present": true,
                          "pin_present": false,
                          "cvc2_present": false
                        },
                        "transaction": {
                          "transaction_type_code": "00",
                          "transaction_ccy": {
                            "transaction_amount": "900",
                            "transaction_currency_code": "978"
                          },
                          "response_code_ref": "00"
                        }
                      }
                    },
                    "isorequest_ref_uuid": "00000000-0000-4000-8000-000000000009"
                  }
                },
                "message-balanceinquiry": {
                  "summary": "Message balanceinquiry",
                  "value": {
                    "card_uuid": "00000000-0000-4000-8000-000000000001",
                    "isorequest_mti": "0100",
                    "isorequest_details": {
                      "message_type": "ISO8583:1987",
                      "mti": "0100",
                      "putative_approval_code": "123456",
                      "data_elements": {
                        "de_18": "5999"
                      },
                      "operational_elements": {
                        "configuration": {
                          "product_uuid": "00000000-0000-4000-8000-000000000003",
                          "scheme": "VISA"
                        },
                        "merchant": {
                          "mcc": "5999",
                          "merchant_name": "Test merchant"
                        },
                        "security": {
                          "card_present": true,
                          "pin_present": false,
                          "cvc2_present": false
                        },
                        "transaction": {
                          "transaction_type_code": "30",
                          "transaction_ccy": {
                            "transaction_amount": "900",
                            "transaction_currency_code": "978"
                          }
                        }
                      }
                    }
                  }
                },
                "message-directcredit": {
                  "summary": "Message directcredit",
                  "value": {
                    "card_uuid": "00000000-0000-4000-8000-000000000001",
                    "isorequest_mti": "0100",
                    "isorequest_details": {
                      "message_type": "ISO8583:1987",
                      "mti": "0100",
                      "putative_approval_code": "123456",
                      "data_elements": {
                        "de_18": "5999"
                      },
                      "operational_elements": {
                        "configuration": {
                          "product_uuid": "00000000-0000-4000-8000-000000000003",
                          "scheme": "VISA"
                        },
                        "merchant": {
                          "mcc": "5999",
                          "merchant_name": "Test merchant"
                        },
                        "security": {
                          "card_present": true,
                          "pin_present": false,
                          "cvc2_present": false
                        },
                        "transaction": {
                          "transaction_type_code": "26",
                          "transaction_ccy": {
                            "transaction_amount": "900",
                            "transaction_currency_code": "978"
                          }
                        }
                      }
                    }
                  }
                },
                "message-incorrectpin": {
                  "summary": "Message incorrectpin",
                  "value": {
                    "card_uuid": "00000000-0000-4000-8000-000000000001",
                    "isorequest_mti": "0100",
                    "isorequest_details": {
                      "message_type": "ISO8583:1987",
                      "mti": "0100",
                      "putative_approval_code": "123456",
                      "data_elements": {
                        "de_18": "5999"
                      },
                      "operational_elements": {
                        "configuration": {
                          "product_uuid": "00000000-0000-4000-8000-000000000003",
                          "scheme": "VISA"
                        },
                        "merchant": {
                          "mcc": "5999",
                          "merchant_name": "Test merchant"
                        },
                        "security": {
                          "card_present": true,
                          "pin_present": true,
                          "cvc2_present": false,
                          "pin_ok": false,
                          "card_num_invalid_pin": 0
                        },
                        "transaction": {
                          "transaction_type_code": "00",
                          "transaction_ccy": {
                            "transaction_amount": "900",
                            "transaction_currency_code": "978"
                          }
                        }
                      }
                    }
                  }
                },
                "message-iso1987-ngn": {
                  "summary": "Message iso1987 ngn",
                  "value": {
                    "card_uuid": "00000000-0000-4000-8000-000000000001",
                    "isorequest_mti": "0100",
                    "isorequest_details": {
                      "message_type": "ISO8583:1987",
                      "mti": "0100",
                      "putative_approval_code": "A1B2C0",
                      "data_elements": {
                        "de_11": "006460",
                        "de_12": "220305",
                        "de_13": "0305",
                        "de_14": "3012",
                        "de_18": "5961",
                        "de_22": "020",
                        "de_23": "000",
                        "de_25": "00",
                        "de_26": "53",
                        "de_28": "000000000",
                        "de_3": "010000",
                        "de_32": "27610000001",
                        "de_37": "163843360000",
                        "de_4": "000000005000",
                        "de_41": "20390059",
                        "de_42": "111120000012000",
                        "de_43": "contact@neaPay.com\\Almere-Amsterdam\\Neth",
                        "de_49": "566",
                        "de_51": "566",
                        "de_7": "0305201638"
                      },
                      "operational_elements": {
                        "acquiring": {
                          "acquiring_institution_id_code": "27610000001",
                          "acquiring_institution_country_code": "",
                          "forwarding_institution_id_code": ""
                        },
                        "configuration": {
                          "product_uuid": "00000000-0000-4000-8000-000000000003",
                          "scheme": "VISA",
                          "service_code": "220"
                        },
                        "merchant": {
                          "mcc": "5961",
                          "merchant_city": "Almere-Amsterdam",
                          "merchant_id": "111120000012000",
                          "merchant_name": "contact@neaPay.com",
                          "merchant_state_or_country_code": "Neth",
                          "terminal_id": "20390059"
                        },
                        "security": {
                          "icc_present": false,
                          "pin_present": false,
                          "pin_service_code": "",
                          "pos_terminal_pan_entry_mode": "02",
                          "pos_terminal_pin_entry_mode": "0"
                        },
                        "transaction": {
                          "billing_ccy": {
                            "billing_amount": "",
                            "billing_conversion_date": "",
                            "billing_conversion_factor": "",
                            "billing_currency_code": "566",
                            "billing_fee_amount": ""
                          },
                          "capture_date": "",
                          "local_transaction_date": "0305",
                          "local_transaction_time": "220305",
                          "rrn": "163843360000",
                          "stan": "006460",
                          "transaction_ccy": {
                            "transaction_amount": "000000005000",
                            "transaction_currency_code": "566",
                            "transaction_fee_amount": "000000000",
                            "transaction_processing_fee_amount": ""
                          },
                          "transaction_type_code": "01",
                          "transmission_date_time": "0305201638"
                        },
                        "request_server_dtg": "2022-03-12 08:08:59.079"
                      }
                    }
                  }
                },
                "message-mcc-4814": {
                  "summary": "Message mcc 4814",
                  "value": {
                    "card_uuid": "00000000-0000-4000-8000-000000000001",
                    "isorequest_mti": "0100",
                    "isorequest_details": {
                      "message_type": "ISO8583:1987",
                      "mti": "0100",
                      "putative_approval_code": "123456",
                      "data_elements": {
                        "de_18": "4814"
                      },
                      "operational_elements": {
                        "configuration": {
                          "product_uuid": "00000000-0000-4000-8000-000000000003",
                          "scheme": "VISA"
                        },
                        "merchant": {
                          "mcc": "4814",
                          "merchant_name": "Test merchant"
                        },
                        "security": {
                          "card_present": true,
                          "pin_present": false,
                          "cvc2_present": false
                        },
                        "transaction": {
                          "transaction_type_code": "00",
                          "transaction_ccy": {
                            "transaction_amount": "900",
                            "transaction_currency_code": "978"
                          }
                        }
                      }
                    }
                  }
                },
                "message-mcc-5814": {
                  "summary": "Message mcc 5814",
                  "value": {
                    "card_uuid": "00000000-0000-4000-8000-000000000001",
                    "isorequest_mti": "0100",
                    "isorequest_details": {
                      "message_type": "ISO8583:1987",
                      "mti": "0100",
                      "putative_approval_code": "123456",
                      "data_elements": {
                        "de_18": "5814"
                      },
                      "operational_elements": {
                        "configuration": {
                          "product_uuid": "00000000-0000-4000-8000-000000000003",
                          "scheme": "VISA"
                        },
                        "merchant": {
                          "mcc": "5814",
                          "merchant_name": "Test merchant"
                        },
                        "security": {
                          "card_present": true,
                          "pin_present": false,
                          "cvc2_present": false
                        },
                        "transaction": {
                          "transaction_type_code": "00",
                          "transaction_ccy": {
                            "transaction_amount": "200",
                            "transaction_currency_code": "978"
                          }
                        }
                      }
                    }
                  }
                },
                "message-refund": {
                  "summary": "Message refund",
                  "value": {
                    "card_uuid": "00000000-0000-4000-8000-000000000001",
                    "isorequest_mti": "0100",
                    "isorequest_details": {
                      "message_type": "ISO8583:1987",
                      "mti": "0100",
                      "putative_approval_code": "123456",
                      "data_elements": {
                        "de_18": "5999"
                      },
                      "operational_elements": {
                        "configuration": {
                          "product_uuid": "00000000-0000-4000-8000-000000000003",
                          "scheme": "VISA"
                        },
                        "merchant": {
                          "mcc": "5999",
                          "merchant_name": "Test merchant"
                        },
                        "security": {
                          "card_present": true,
                          "pin_present": false,
                          "cvc2_present": false
                        },
                        "transaction": {
                          "transaction_type_code": "20",
                          "transaction_ccy": {
                            "transaction_amount": "900",
                            "transaction_currency_code": "978"
                          }
                        }
                      }
                    }
                  }
                },
                "message-reversal": {
                  "summary": "Message reversal",
                  "value": {
                    "card_uuid": "00000000-0000-4000-8000-000000000001",
                    "isorequest_mti": "0420",
                    "isorequest_details": {
                      "message_type": "ISO8583:1987",
                      "mti": "0420",
                      "putative_approval_code": "123456",
                      "data_elements": {
                        "de_18": "5999"
                      },
                      "operational_elements": {
                        "configuration": {
                          "product_uuid": "00000000-0000-4000-8000-000000000003",
                          "scheme": "VISA"
                        },
                        "merchant": {
                          "mcc": "5999",
                          "merchant_name": "Test merchant"
                        },
                        "security": {
                          "card_present": true,
                          "pin_present": false,
                          "cvc2_present": false
                        },
                        "transaction": {
                          "transaction_type_code": "00",
                          "transaction_ccy": {
                            "transaction_amount": "900",
                            "transaction_currency_code": "978"
                          }
                        }
                      }
                    },
                    "isorequest_ref_uuid": "00000000-0000-4000-8000-000000000009"
                  }
                },
                "message": {
                  "summary": "Message",
                  "value": {
                    "card_uuid": "00000000-0000-4000-8000-000000000001",
                    "isorequest_mti": "0100",
                    "isorequest_details": {
                      "message_type": "ISO8583:1987",
                      "mti": "0100",
                      "putative_approval_code": "123456",
                      "data_elements": {
                        "de_18": "5999"
                      },
                      "operational_elements": {
                        "configuration": {
                          "product_uuid": "00000000-0000-4000-8000-000000000003",
                          "scheme": "VISA"
                        },
                        "merchant": {
                          "mcc": "5999",
                          "merchant_name": "Test merchant"
                        },
                        "security": {
                          "card_present": true,
                          "pin_present": false,
                          "cvc2_present": false
                        },
                        "transaction": {
                          "transaction_type_code": "00",
                          "transaction_ccy": {
                            "transaction_amount": "900",
                            "transaction_currency_code": "978"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Message decision and generated request UUID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                },
                "examples": {
                  "purchase-approved": {
                    "summary": "Illustrative approved purchase",
                    "value": {
                      "isorequest_uuid": "00000000-0000-4000-8000-000000000008",
                      "card_uuid": "00000000-0000-4000-8000-000000000001",
                      "mti": "0110",
                      "response_code": "00",
                      "approval_code": "123456"
                    }
                  },
                  "incorrect-pin": {
                    "summary": "Illustrative incorrect PIN decision",
                    "value": {
                      "isorequest_uuid": "00000000-0000-4000-8000-000000000008",
                      "mti": "0110",
                      "response_code": "55"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/Throttled"
          },
          "502": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "description": "Message processing timed out; the returned isorequest_uuid identifies the attempted message",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/test/card/inquiry": {
      "post": {
        "operationId": "consumer_test_card_inquiry",
        "tags": [
          "Card tests"
        ],
        "summary": "Request the tokens associated with a test card",
        "description": "Use a card belonging to the supplied consumer. This requests the card's token\ninformation and is useful before and after a card or token lifecycle change.\nOnly consumer_uuid and card_uuid are required. No message UUID is needed.\n\nHTTP 202 returns status and event_id. Later, filter ConsumerAPI /tokenmessage/list\nby card_uuid and inspect the newly created token-message record with\n/tokenmessage/get. Allow for asynchronous processing; a pending record is not a\nfailed inquiry.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CardInquiryRequest"
              },
              "examples": {
                "card-inquiry": {
                  "summary": "Card inquiry",
                  "value": {
                    "consumer_uuid": "00000000-0000-4000-8000-000000000002",
                    "card_uuid": "00000000-0000-4000-8000-000000000001"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "$ref": "#/components/responses/Accepted"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/Throttled"
          },
          "502": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/test/card/lifecycle": {
      "post": {
        "operationId": "consumer_test_card_lifecycle",
        "tags": [
          "Card tests"
        ],
        "summary": "Test a card lifecycle operation",
        "description": "Test a lifecycle operation on an existing card belonging to the consumer.\noperation_type and operation_reason are required strings; operation_reason_code\nis optional and must match the operation supported for your test fixture.\nThe provided example uses UPDATE and VAU_CARDHOLDER_OPT_OUT to test VAU opt-out.\nIt does not create or replace a card.\n\nReview the completed card-related token-message record after HTTP 202. The\noperation name is validated as a nonempty string; acceptance does not establish\nthat the supplied operation is supported by the card's scheme configuration.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CardLifecycleRequest"
              },
              "examples": {
                "card-lifecycle": {
                  "summary": "Card lifecycle",
                  "value": {
                    "consumer_uuid": "00000000-0000-4000-8000-000000000002",
                    "card_uuid": "00000000-0000-4000-8000-000000000001",
                    "operation_type": "UPDATE",
                    "operation_reason": "VAU Update",
                    "operation_reason_code": "VAU_CARDHOLDER_OPT_OUT"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "$ref": "#/components/responses/Accepted"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/Throttled"
          },
          "502": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/test/card/updatemetadata": {
      "post": {
        "operationId": "consumer_test_card_metadata",
        "tags": [
          "Card tests"
        ],
        "summary": "Test a card metadata profile update",
        "description": "Apply a metadata profile configured for your test environment to an existing\ncard belonging to the consumer. Supply profile_id and a nonempty\noperation_reason. Replace your-test-profile-id in the example with the profile\nprovided for your scenario; a card UUID is not a profile ID.\n\nAfter HTTP 202, review the card's token-message history for completion or a\nscheme rejection. A successful submission alone does not prove that the profile\nexists or the metadata update succeeded.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CardMetadataRequest"
              },
              "examples": {
                "card-updatemetadata": {
                  "summary": "Card updatemetadata",
                  "value": {
                    "consumer_uuid": "00000000-0000-4000-8000-000000000002",
                    "card_uuid": "00000000-0000-4000-8000-000000000001",
                    "operation_reason": "Updating test card",
                    "profile_id": "your-test-profile-id"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "$ref": "#/components/responses/Accepted"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/Throttled"
          },
          "502": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/test/token/inquiry": {
      "post": {
        "operationId": "consumer_test_token_inquiry",
        "tags": [
          "Token tests"
        ],
        "summary": "Request details of a test token",
        "description": "Retrieve information about a token belonging to the consumer. Both\ninclude_cardholder_verification and include_device_binding default to false.\nSet either flag to true to request the corresponding additional information;\nthese are JSON booleans, not quoted strings.\n\nUse this inquiry before or after a lifecycle operation to compare the token\nstate. After HTTP 202, review ConsumerAPI token-message history filtered by\ntoken_uuid and open the resulting record. The response from this endpoint\ncontains the submission acknowledgement, not the token details.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenInquiryRequest"
              },
              "examples": {
                "token-inquiry": {
                  "summary": "Token inquiry",
                  "value": {
                    "consumer_uuid": "00000000-0000-4000-8000-000000000002",
                    "token_uuid": "00000000-0000-4000-8000-000000000004",
                    "include_cardholder_verification": true,
                    "include_device_binding": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "$ref": "#/components/responses/Accepted"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/Throttled"
          },
          "502": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/test/token/lifecycle": {
      "post": {
        "operationId": "consumer_test_token_lifecycle",
        "tags": [
          "Token tests"
        ],
        "summary": "Test a token lifecycle operation",
        "description": "Submit an operation on an existing token belonging to the consumer. Required:\nconsumer_uuid, token_uuid, operation_type and operation_reason. operator_id is\noptional and identifies the operator for scenarios that use one.\n\nThe example tests TOKEN_DEVICE_BINDING_APPROVE. That operation additionally\nrequires device_info.device_id and device_info.device_index. The index is a\nnonnegative integer. Use the device identifier/index associated with the token's\npending device-binding scenario; the example placeholders are not live devices.\n\nOther operation names must be agreed for your test scenario. This API checks\nthat their names are nonempty; HTTP 202 does not confirm scheme support or a\nstate change. Review the token-message record, then use /test/token/inquiry to\ncheck the resulting state if needed.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenLifecycleRequest"
              },
              "examples": {
                "token-lifecycle": {
                  "summary": "Token lifecycle",
                  "value": {
                    "consumer_uuid": "00000000-0000-4000-8000-000000000002",
                    "token_uuid": "00000000-0000-4000-8000-000000000004",
                    "operator_id": "test-operator",
                    "operation_reason": "Device binding test",
                    "operation_type": "TOKEN_DEVICE_BINDING_APPROVE",
                    "device_info": {
                      "device_id": "your-test-device-id",
                      "device_index": 1
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "$ref": "#/components/responses/Accepted"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/Throttled"
          },
          "502": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "Consumer test key provided by ByQwest"
      }
    },
    "responses": {
      "InvalidRequest": {
        "description": "Invalid JSON, invalid field or missing scenario input",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "validation": {
                "summary": "Invalid or missing input",
                "value": {
                  "error": "Invalid request",
                  "field": "body"
                }
              },
              "reversal-reference": {
                "summary": "Missing original message reference",
                "value": {
                  "error": "isorequest_ref_uuid is required for reversal"
                }
              }
            }
          }
        }
      },
      "Forbidden": {
        "description": "Missing, invalid or disabled consumer test API key. Check the key value, exact endpoint and duplicate headers.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              }
            },
            "example": {
              "message": "Forbidden"
            }
          }
        }
      },
      "Throttled": {
        "description": "Request rate or quota limit exceeded; slow down and honor Retry-After when supplied.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              }
            },
            "example": {
              "message": "Too Many Requests"
            }
          }
        }
      },
      "Unavailable": {
        "description": "The test request could not be processed or accepted",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Accepted": {
        "description": "Test operation accepted for asynchronous processing",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "status",
                "event_id"
              ],
              "properties": {
                "status": {
                  "type": "string",
                  "enum": [
                    "ACCEPTED"
                  ]
                },
                "event_id": {
                  "type": "string",
                  "description": "Submission identifier; not a completion result"
                }
              }
            },
            "example": {
              "status": "ACCEPTED",
              "event_id": "00000000-0000-4000-8000-000000000008"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "field": {
            "type": "string",
            "description": "Location of invalid input"
          },
          "isorequest_uuid": {
            "type": "string",
            "format": "uuid",
            "description": "Generated ID when message processing was attempted"
          }
        }
      },
      "MessageResponse": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "isorequest_uuid": {
            "type": "string",
            "format": "uuid",
            "description": "Generated message ID; save for follow-up requests"
          },
          "mti": {
            "type": "string",
            "description": "Response message type"
          },
          "card_uuid": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "Existing test card UUID; use the same card throughout a related message sequence."
          },
          "token_uuid": {
            "type": "string",
            "format": "uuid",
            "description": "Existing test token UUID belonging to the consumer."
          },
          "response_code": {
            "type": "string",
            "description": "Business decision code; HTTP success does not indicate approval"
          },
          "approval_code": {
            "type": "string",
            "description": "Approval code when provided for the scenario; use response_code to interpret the decision."
          },
          "available_balance": {
            "type": "string"
          },
          "amount_authorized": {},
          "reset_card_num_invalid_pin": {
            "type": "boolean"
          },
          "reset_card_num_invalid_cvc2": {
            "type": "boolean"
          },
          "ret": {
            "type": "object",
            "additionalProperties": true,
            "description": "Optional scenario-specific result details; present fields depend on the message type."
          },
          "error": {
            "type": "object",
            "additionalProperties": true,
            "description": "Optional processing/business-error details; inspect even when HTTP status is 200."
          }
        }
      },
      "MessageRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "card_uuid",
          "isorequest_mti",
          "isorequest_details"
        ],
        "properties": {
          "card_uuid": {
            "type": "string",
            "format": "uuid",
            "description": "Existing test card UUID; use the same card throughout a related message sequence."
          },
          "isorequest_mti": {
            "type": "string",
            "enum": [
              "0100",
              "1100",
              "0120",
              "1120",
              "1121",
              "0400",
              "0420",
              "0520",
              "1520",
              "1521",
              "0600",
              "0620"
            ]
          },
          "isorequest_ref_uuid": {
            "type": "string",
            "format": "uuid",
            "description": "Prior message UUID; required for reversal"
          },
          "new_pin_block": {
            "type": "string",
            "description": "Scenario-specific PIN-change input"
          },
          "recrypted_new_kpin": {
            "type": "string",
            "description": "Encrypted new PIN for a PIN-change scenario"
          },
          "recrypted_new_kpin_token": {
            "type": "string",
            "description": "Encrypted new token PIN for a PIN-change scenario"
          },
          "isorequest_details": {
            "type": "object",
            "additionalProperties": true,
            "required": [
              "operational_elements",
              "putative_approval_code"
            ],
            "properties": {
              "message_type": {
                "type": "string",
                "example": "ISO8583:1987"
              },
              "mti": {
                "type": "string",
                "description": "When supplied, must match isorequest_mti"
              },
              "putative_approval_code": {
                "type": "string",
                "minLength": 1,
                "description": "Proposed approval code for an approved message"
              },
              "request_server_dtg": {
                "type": "string",
                "description": "Optional timestamp for the simulated message"
              },
              "data_elements": {
                "type": "object",
                "additionalProperties": true,
                "description": "Raw ISO8583 elements keyed by de_...; keep consistent with operational_elements",
                "properties": {
                  "de_18": {
                    "type": "string",
                    "description": "Merchant category code (MCC). merchant.mcc. String value; preserve leading zeros.",
                    "example": "5961"
                  },
                  "de_39": {
                    "type": "string",
                    "description": "Original decision for relevant advice scenarios"
                  },
                  "de_63_3": {
                    "type": "string",
                    "pattern": "^[0-9]{4}$",
                    "description": "Visa message reason code"
                  },
                  "de_95": {
                    "type": "string",
                    "minLength": 12,
                    "description": "Replacement amount; first 12 digits are transaction minor units"
                  },
                  "de_55_95": {
                    "type": "string",
                    "pattern": "^[0-9a-fA-F]{10}$"
                  },
                  "de_55_9F33": {
                    "type": "string",
                    "pattern": "^[0-9a-fA-F]{6}$"
                  },
                  "de_3": {
                    "description": "Processing code (six digits). transaction.transaction_type_code = first two digits, 01; remaining account-type digits stay in the raw field. String value; preserve leading zeros.",
                    "example": "010000"
                  },
                  "de_4": {
                    "description": "Transaction amount. transaction.transaction_ccy.transaction_amount. String value; preserve leading zeros.",
                    "example": "000000005000"
                  },
                  "de_7": {
                    "description": "Transmission date/time, MMDDhhmmss. transaction.transmission_date_time. String value; preserve leading zeros.",
                    "example": "0305201638"
                  },
                  "de_11": {
                    "description": "System trace audit number (STAN). transaction.stan. String value; preserve leading zeros.",
                    "example": "006460"
                  },
                  "de_12": {
                    "description": "Local time, hhmmss. transaction.local_transaction_time. String value; preserve leading zeros.",
                    "example": "220305"
                  },
                  "de_13": {
                    "description": "Local date, MMDD. transaction.local_transaction_date. String value; preserve leading zeros.",
                    "example": "0305"
                  },
                  "de_14": {
                    "description": "Expiration, YYMM. Raw expiry field; preserve it for the scenario (December 2030). String value; preserve leading zeros.",
                    "example": "3012"
                  },
                  "de_22": {
                    "description": "POS entry mode. security.pos_terminal_pan_entry_mode = 02, pos_terminal_pin_entry_mode = 0. String value; preserve leading zeros.",
                    "example": "020"
                  },
                  "de_23": {
                    "description": "Card sequence number. Raw field; no dedicated interpreted field in this example. String value; preserve leading zeros.",
                    "example": "000"
                  },
                  "de_25": {
                    "description": "POS condition code. Raw field; interpretation depends on your scheme scenario. String value; preserve leading zeros.",
                    "example": "00"
                  },
                  "de_26": {
                    "description": "POS capture code. Raw field; do not infer pin_present from this code alone. String value; preserve leading zeros.",
                    "example": "53"
                  },
                  "de_28": {
                    "description": "Transaction fee. transaction.transaction_ccy.transaction_fee_amount. String value; preserve leading zeros.",
                    "example": "000000000"
                  },
                  "de_32": {
                    "description": "Acquiring institution ID. acquiring.acquiring_institution_id_code. String value; preserve leading zeros.",
                    "example": "27610000001"
                  },
                  "de_37": {
                    "description": "Retrieval reference number (RRN). transaction.rrn. String value; preserve leading zeros.",
                    "example": "163843360000"
                  },
                  "de_41": {
                    "description": "Terminal ID. merchant.terminal_id. String value; preserve leading zeros.",
                    "example": "20390059"
                  },
                  "de_42": {
                    "description": "Merchant/card-acceptor ID. merchant.merchant_id. String value; preserve leading zeros.",
                    "example": "111120000012000"
                  },
                  "de_43": {
                    "description": "Merchant name/location. merchant name/city/country fields; raw formatting depends on your scheme. String value; preserve leading zeros.",
                    "example": "contact@neaPay.com\\Almere-Amsterdam\\Neth"
                  },
                  "de_49": {
                    "description": "Transaction currency. transaction.transaction_ccy.transaction_currency_code. String value; preserve leading zeros.",
                    "example": "566"
                  },
                  "de_51": {
                    "description": "Billing currency. transaction.billing_ccy.billing_currency_code. String value; preserve leading zeros.",
                    "example": "566"
                  }
                }
              },
              "operational_elements": {
                "type": "object",
                "additionalProperties": true,
                "required": [
                  "configuration",
                  "transaction"
                ],
                "properties": {
                  "configuration": {
                    "type": "object",
                    "additionalProperties": true,
                    "required": [
                      "product_uuid",
                      "scheme"
                    ],
                    "properties": {
                      "product_uuid": {
                        "type": "string",
                        "format": "uuid",
                        "description": "Test product selecting callback configuration"
                      },
                      "scheme": {
                        "type": "string",
                        "minLength": 1,
                        "example": "VISA"
                      },
                      "service_code": {
                        "type": "string",
                        "description": "Three-digit card service code, e.g. 220. It does not replace configuration.scheme."
                      }
                    }
                  },
                  "transaction": {
                    "type": "object",
                    "additionalProperties": true,
                    "required": [
                      "transaction_type_code",
                      "transaction_ccy"
                    ],
                    "properties": {
                      "transaction_type_code": {
                        "type": "string",
                        "pattern": "^[0-9]{2}$",
                        "description": "Two-digit operation code; 00 purchase, 20 refund, 26/50 direct credit, 30 balance inquiry. Preserve leading zeros."
                      },
                      "deferred_authorization": {
                        "type": "boolean",
                        "default": false,
                        "description": "Whether this scenario is a deferred authorization; omitted means false."
                      },
                      "pin_change_request": {
                        "type": "boolean",
                        "default": false,
                        "description": "Request a PIN-change scenario; omitted means false. Requires appropriate PIN-change inputs."
                      },
                      "response_code_ref": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Original decision code; required for authorization advice"
                      },
                      "Message_Reason_Code": {
                        "type": "string",
                        "description": "Token administration reason; spelling is case-sensitive"
                      },
                      "transaction_ccy": {
                        "type": "object",
                        "additionalProperties": true,
                        "required": [
                          "transaction_amount",
                          "transaction_currency_code"
                        ],
                        "properties": {
                          "transaction_amount": {
                            "type": "string",
                            "pattern": "^[0-9]+$",
                            "description": "Amount in minor units"
                          },
                          "transaction_currency_code": {
                            "type": "string",
                            "pattern": "^[0-9]{3,4}$",
                            "example": "978",
                            "description": "Numeric currency code as a string, e.g. 978 for EUR. Use the code supported by your product."
                          },
                          "transaction_fee_amount": {
                            "type": "string",
                            "pattern": "^([CD]?[0-9]+)?$",
                            "default": ""
                          },
                          "transaction_processing_fee_amount": {
                            "description": "Optional processing-fee string; empty means not supplied in this replay example."
                          }
                        }
                      },
                      "billing_ccy": {
                        "type": "object",
                        "additionalProperties": true,
                        "properties": {
                          "billing_currency_code": {
                            "type": "string",
                            "pattern": "^([0-9]{3,4})?$",
                            "default": ""
                          },
                          "billing_amount": {
                            "type": "string",
                            "pattern": "^[0-9]*$",
                            "default": ""
                          },
                          "billing_fee_amount": {
                            "type": "string",
                            "pattern": "^([CD]?[0-9]+)?$",
                            "default": ""
                          },
                          "billing_conversion_date": {
                            "description": "Optional currency-conversion date string."
                          },
                          "billing_conversion_factor": {
                            "description": "Optional conversion factor string; empty means not supplied."
                          }
                        },
                        "description": "Optional converted billing amounts. Empty or omitted currency uses the transaction currency/amount; another currency requires billing_amount."
                      },
                      "stan": {
                        "description": "System trace audit number; string matching de_11."
                      },
                      "rrn": {
                        "description": "Retrieval reference number; string matching de_37."
                      },
                      "local_transaction_date": {
                        "description": "Local date string MMDD matching de_13."
                      },
                      "local_transaction_time": {
                        "description": "Local time string hhmmss matching de_12."
                      },
                      "transmission_date_time": {
                        "description": "Transmission string MMDDhhmmss matching de_7."
                      },
                      "capture_date": {
                        "description": "Optional capture date string for the scenario."
                      }
                    }
                  },
                  "merchant": {
                    "type": "object",
                    "additionalProperties": true,
                    "properties": {
                      "mcc": {
                        "type": "string",
                        "pattern": "^[0-9]{4}$"
                      },
                      "merchant_name": {
                        "type": "string"
                      },
                      "merchant_id": {
                        "type": "string"
                      },
                      "merchant_city": {
                        "type": "string"
                      },
                      "merchant_state_or_country_code": {
                        "type": "string"
                      },
                      "terminal_id": {
                        "type": "string"
                      }
                    }
                  },
                  "security": {
                    "type": "object",
                    "additionalProperties": true,
                    "properties": {
                      "pin_present": {
                        "type": "boolean"
                      },
                      "pin_ok": {
                        "type": "boolean"
                      },
                      "new_pin_allowed": {
                        "type": "boolean",
                        "description": "Simulated PIN-change validation decision"
                      },
                      "cvc2_present": {
                        "type": "boolean"
                      },
                      "cvc2_ok": {
                        "type": "boolean"
                      },
                      "card_present": {
                        "type": "boolean"
                      },
                      "card_num_invalid_pin": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "card_num_invalid_cvc2": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "card_duplicate_atc": {
                        "type": "boolean"
                      },
                      "card_verification_results": {
                        "type": "string",
                        "pattern": "^[0-9a-fA-F]{8,}$"
                      },
                      "icc_present": {
                        "description": "Whether the simulated transaction includes ICC/chip data. Use a JSON boolean."
                      },
                      "pin_service_code": {
                        "description": "Scenario-specific PIN service code as a string."
                      },
                      "pos_terminal_pan_entry_mode": {
                        "description": "PAN entry component of de_22, e.g. 02; string, preserve zeros."
                      },
                      "pos_terminal_pin_entry_mode": {
                        "description": "PIN entry component of de_22, e.g. 0; string."
                      }
                    },
                    "description": "Simulated card-present and PIN/CVC validation outcomes for the test; these flags do not carry plaintext PIN/CVC values."
                  },
                  "tokens": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "description": "Scenario-specific token information; zero-amount activation, step-up or device binding requires exactly one token."
                  },
                  "device": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "token_activation_request": {
                    "type": "boolean"
                  },
                  "token_step_up_authentication_request": {
                    "type": "boolean"
                  },
                  "device_binding_request": {
                    "type": "boolean"
                  },
                  "token_creation": {
                    "type": "boolean"
                  },
                  "acquiring": {
                    "description": "Acquiring/forwarding institution identifiers. Use string values; empty strings in the replay example mean no supplied value.",
                    "properties": {
                      "acquiring_institution_id_code": {
                        "description": "Acquiring institution identifier; matches de_32."
                      },
                      "acquiring_institution_country_code": {
                        "description": "Acquirer country code for the scenario, when supplied."
                      },
                      "forwarding_institution_id_code": {
                        "description": "Forwarding institution identifier, when supplied."
                      }
                    }
                  },
                  "request_server_dtg": {
                    "description": "Optional caller-supplied replay metadata, as a string. Independent of the generated isorequest_create_dtg.",
                    "example": "2022-03-12 08:08:59.079"
                  }
                }
              }
            }
          }
        },
        "description": "Test ISO message. Do not supply isorequest_uuid or isorequest_create_dtg; the API generates them."
      },
      "CardInquiryRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "consumer_uuid",
          "card_uuid"
        ],
        "properties": {
          "consumer_uuid": {
            "type": "string",
            "format": "uuid",
            "description": "Consumer that owns the test card or token; use your assigned fixture UUID."
          },
          "card_uuid": {
            "type": "string",
            "format": "uuid",
            "description": "Existing test card UUID; use the same card throughout a related message sequence."
          }
        }
      },
      "CardLifecycleRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "consumer_uuid",
          "card_uuid",
          "operation_type",
          "operation_reason"
        ],
        "properties": {
          "consumer_uuid": {
            "type": "string",
            "format": "uuid",
            "description": "Consumer that owns the test card or token; use your assigned fixture UUID."
          },
          "card_uuid": {
            "type": "string",
            "format": "uuid",
            "description": "Existing test card UUID; use the same card throughout a related message sequence."
          },
          "operation_type": {
            "type": "string",
            "minLength": 1,
            "example": "UPDATE",
            "description": "Operation name agreed for this test scenario; preserve spelling and case."
          },
          "operation_reason": {
            "type": "string",
            "minLength": 1,
            "description": "Reason for the operation, as supported by your scenario."
          },
          "operation_reason_code": {
            "type": "string",
            "example": "VAU_CARDHOLDER_OPT_OUT",
            "description": "Optional scheme reason code; for example VAU_CARDHOLDER_OPT_OUT."
          }
        }
      },
      "CardMetadataRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "consumer_uuid",
          "card_uuid",
          "profile_id",
          "operation_reason"
        ],
        "properties": {
          "consumer_uuid": {
            "type": "string",
            "format": "uuid",
            "description": "Consumer that owns the test card or token; use your assigned fixture UUID."
          },
          "card_uuid": {
            "type": "string",
            "format": "uuid",
            "description": "Existing test card UUID; use the same card throughout a related message sequence."
          },
          "profile_id": {
            "type": "string",
            "minLength": 1,
            "description": "Test card metadata profile ID"
          },
          "operation_reason": {
            "type": "string",
            "minLength": 1,
            "description": "Reason for the operation, as supported by your scenario."
          }
        }
      },
      "TokenInquiryRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "consumer_uuid",
          "token_uuid"
        ],
        "properties": {
          "consumer_uuid": {
            "type": "string",
            "format": "uuid",
            "description": "Consumer that owns the test card or token; use your assigned fixture UUID."
          },
          "token_uuid": {
            "type": "string",
            "format": "uuid",
            "description": "Existing test token UUID belonging to the consumer."
          },
          "include_cardholder_verification": {
            "type": "boolean",
            "default": false,
            "description": "Request cardholder-verification information in the completed inquiry."
          },
          "include_device_binding": {
            "type": "boolean",
            "default": false,
            "description": "Request device-binding information in the completed inquiry."
          }
        }
      },
      "TokenLifecycleRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "consumer_uuid",
          "token_uuid",
          "operation_type",
          "operation_reason"
        ],
        "properties": {
          "consumer_uuid": {
            "type": "string",
            "format": "uuid",
            "description": "Consumer that owns the test card or token; use your assigned fixture UUID."
          },
          "token_uuid": {
            "type": "string",
            "format": "uuid",
            "description": "Existing test token UUID belonging to the consumer."
          },
          "operation_type": {
            "type": "string",
            "minLength": 1,
            "example": "TOKEN_DEVICE_BINDING_APPROVE",
            "description": "Operation name agreed for this test scenario; preserve spelling and case."
          },
          "operation_reason": {
            "type": "string",
            "minLength": 1,
            "description": "Reason for the operation, as supported by your scenario."
          },
          "operator_id": {
            "type": "string",
            "description": "Optional operator identifier for the test operation."
          },
          "device_info": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "device_id",
              "device_index"
            ],
            "properties": {
              "device_id": {
                "type": "string",
                "minLength": 1
              },
              "device_index": {
                "type": "integer",
                "minimum": 0
              }
            },
            "description": "Device associated with this token; required for TOKEN_DEVICE_BINDING_APPROVE."
          }
        }
      }
    }
  }
}
