{
  "swagger": "2.0",
  "info": {
    "version": "v5",
    "title": "API 5"
  },
  "host": "www.merchantsuite.com",
  "basePath": "/rest/v5",
  "schemes": [
    "https"
  ],
  "paths": {
    "/batch/upload": {
      "post": {
        "tags": [
          "Batch"
        ],
        "summary": "Submit batch",
        "operationId": "Batch_UploadBatch",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "submitBatchFileRequest",
            "in": "body",
            "description": "",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UpdateBatchFileRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/batch/stats/search": {
      "post": {
        "tags": [
          "Batch"
        ],
        "summary": "Get batch Statistics",
        "operationId": "Batch_SearchBatchStats",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "batchSearchRequest",
            "in": "body",
            "description": "",
            "required": true,
            "schema": {
              "$ref": "#/definitions/SearchBatchRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/BatchStats"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/batch/{batchFileId}/result": {
      "post": {
        "tags": [
          "Batch"
        ],
        "summary": "Download Batch Result",
        "operationId": "Batch_DownloadBatchResult",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "batchFileId",
            "in": "path",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/DownloadBatchResultRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "application/zip",
            "schema": {
              "format": "byte",
              "type": "string"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/billers/{billerCode}/payment-rules": {
      "get": {
        "tags": [
          "Biller"
        ],
        "summary": "Get biller payment rules",
        "operationId": "Biller_GetPaymentRules",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "billerCode",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/PaymentRules"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/ivr/smartbilling": {
      "post": {
        "tags": [
          "Ivr"
        ],
        "summary": "Insert IVR smart billing session",
        "operationId": "Ivr_InsertSmartBilling",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/SmartBillingRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/SmartBillingResponse"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/payreq/{guid}": {
      "put": {
        "tags": [
          "PaymentRequest"
        ],
        "summary": "Update payment request",
        "operationId": "PaymentRequest_UpdatePaymentRequest",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "guid",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "paymentRequestUpdateRequest",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PaymentRequestUpdateRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/PaymentRequestResponse"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/payreq/{guid}/cancel": {
      "put": {
        "tags": [
          "PaymentRequest"
        ],
        "summary": "Cancel Payment Request",
        "operationId": "PaymentRequest_CancelPaymentRequest",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "guid",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/PaymentRequestResponse"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/payreq": {
      "post": {
        "tags": [
          "PaymentRequest"
        ],
        "summary": "Create Payment Request",
        "description": "Email Address and/or Mobile number required.  Payments Link are only published in Emails, not SMS messages.",
        "operationId": "PaymentRequest_CreatePaymentRequest",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "request",
            "in": "body",
            "description": "",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreatePaymentRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/PaymentRequestResponse"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/payreq/search": {
      "post": {
        "tags": [
          "PaymentRequest"
        ],
        "summary": "Search payment requests",
        "operationId": "PaymentRequest_SearchPaymentRequest",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "paymentRequestSearchRequest",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PaymentRequestSearchRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/PaymentRequestSearchResponse"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/payreq/{guid}/resend": {
      "post": {
        "tags": [
          "PaymentRequest"
        ],
        "summary": "Resend Payment Request",
        "operationId": "PaymentRequest_ResendPaymentRequest",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "guid",
            "in": "path",
            "description": "",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/PaymentRequestResponse"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/reports/settlementfiles": {
      "post": {
        "tags": [
          "Reporting"
        ],
        "summary": "Retrieve settlement reports for merchant",
        "description": "The response contains the content of the report(s) in .zip format.<br />\r\nPlease save the contents to a file with .zip extension and unzip the file using unzip utility to access the report(s).",
        "operationId": "Reporting_RetrieveSettlementReports",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/RetrieveSettlementReportsRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "application/zip",
            "schema": {
              "format": "byte",
              "type": "string"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/tokens/{token}": {
      "get": {
        "tags": [
          "Token"
        ],
        "summary": "Get token",
        "operationId": "Token_GetToken",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Token"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      },
      "put": {
        "tags": [
          "Token"
        ],
        "summary": "Update token",
        "description": "Only card or bank details is required, not both.",
        "operationId": "Token_UpdateToken",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "description": "",
            "required": true,
            "type": "string"
          },
          {
            "name": "tokenUpdateRequest",
            "in": "body",
            "description": "",
            "required": true,
            "schema": {
              "$ref": "#/definitions/TokenUpdateRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Token"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Token"
        ],
        "summary": "Delete token",
        "operationId": "Token_DeleteToken",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/tokens/extended/{token}": {
      "get": {
        "tags": [
          "Token"
        ],
        "summary": "Get token extended",
        "operationId": "Token_GetTokenExtended",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/TokenExtended"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/tokens": {
      "post": {
        "tags": [
          "Token"
        ],
        "summary": "Add new token",
        "operationId": "Token_AddToken",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "tokenAddRequest",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/TokenAddRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Token"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/tokens/search": {
      "post": {
        "tags": [
          "Token"
        ],
        "summary": "Search tokens",
        "operationId": "Token_SearchToken",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "tokenSearchRequest",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/TokenSearchRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/TokenSearchResponse"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/tokens/search/extended": {
      "post": {
        "tags": [
          "Token"
        ],
        "summary": "Search tokens extended returns extended information such as mac code results.\r\nThis end point will be extended over time to include additional details as required.\r\nIt is recommended for clients to avoid using this end-point if their parsers do not accept additional\r\nfields in the response and request objects, as this may cause issues when new fields are added in the future.",
        "operationId": "Token_SearchTokenExtended",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "tokenSearchRequest",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/TokenSearchRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/TokenSearchResponseExtended"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/tokens/txn/{txnNumber}": {
      "post": {
        "tags": [
          "Token"
        ],
        "summary": "Tokenise transaction",
        "operationId": "Token_TokeniseTxn",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "txnNumber",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Token"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/tokens/authkeys/{authkey}/payment-method": {
      "get": {
        "tags": [
          "TokenAuthkey"
        ],
        "summary": "Get payment method",
        "operationId": "TokenAuthkey_GetPaymentMethod",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "authkey",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/TokenPaymentMethod"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      },
      "put": {
        "tags": [
          "TokenAuthkey"
        ],
        "summary": "Attach payment method",
        "description": "Only card or bank details is required, not both. <br />\r\nNote that if your system is passing credit card or bank details, it will be directly in scope for PCI compliance.",
        "operationId": "TokenAuthkey_AttachPaymentMethod",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "authkey",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/AttachTokenPaymentMethodRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/TokenPaymentMethod"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/tokens/authkeys/{authkey}/token-details": {
      "put": {
        "tags": [
          "TokenAuthkey"
        ],
        "summary": "Attach token details",
        "operationId": "TokenAuthkey_AttachTokenDetails",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [],
        "parameters": [
          {
            "name": "authkey",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/TokenDetailsRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Successful"
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      },
      "patch": {
        "tags": [
          "TokenAuthkey"
        ],
        "summary": "Update token details",
        "description": "Use when updating a token to only update supplied fields.",
        "operationId": "TokenAuthkey_UpdateTokenDetails",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [],
        "parameters": [
          {
            "name": "authkey",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/TokenDetailsRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Successful"
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/tokens/authkeys": {
      "post": {
        "tags": [
          "TokenAuthkey"
        ],
        "summary": "Create a token authkey",
        "description": "When 'token' is not supplied, authkey will create a new token. <br />\r\nWhen 'token' is supplied, authkey will update the existing token.",
        "operationId": "TokenAuthkey_CreateAuthkey",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreateTokenAuthkeyRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Successful",
            "schema": {
              "$ref": "#/definitions/CreateAuthkeyResponse"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/tokens/authkeys/{authkey}/process": {
      "post": {
        "tags": [
          "TokenAuthkey"
        ],
        "summary": "Process token",
        "description": "Token will be created/updated (depending on whether the authkey was created with a token number). <br />\r\nAuthkey will be deleted after this operation.",
        "operationId": "TokenAuthkey_Process",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "authkey",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ProcessTokenRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ProcessTokenResponse"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/tokens/authkeys/{authkey}/client/payment-method": {
      "get": {
        "tags": [
          "TokenAuthkeyClient"
        ],
        "summary": "Get payment method",
        "operationId": "TokenAuthkeyClient_GetPaymentMethod",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "authkey",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ClientPaymentMethodResponse"
            }
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        }
      },
      "put": {
        "tags": [
          "TokenAuthkeyClient"
        ],
        "summary": "Attach payment method",
        "description": "Only card or bank details is required, not both. <br />\r\nNote that if your system is passing credit card or bank details, it will be directly in scope for PCI compliance.",
        "operationId": "TokenAuthkeyClient_AttachPaymentMethod",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "authkey",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/AttachTokenPaymentMethodRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ClientTokenPaymentMethod"
            }
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        }
      }
    },
    "/txns/{txnNumber}": {
      "get": {
        "tags": [
          "Txn"
        ],
        "summary": "Get transaction",
        "operationId": "Txn_GetTxn",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "txnNumber",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Txn"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/txns/extended/{txnNumber}": {
      "get": {
        "tags": [
          "Txn"
        ],
        "summary": "Retrieves a transaction and provides extended transaction details in the response.\r\n            \r\nThe extended details include additional information such as Merchant Advice Code (MAC) results,\r\nwhich can be useful for clients that require more comprehensive data when retrieving a transaction.\r\n            \r\nThe extended end point will be extended over time to include additional details as required.\r\nIt is recommended for clients to avoid using this end-point if their parsers do not accept additional\r\nfields in the response and request objects, as this may cause issues when new fields are added in the future.",
        "operationId": "Txn_GetTxnExtended",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "txnNumber",
            "in": "path",
            "description": "The transaction number to retrieve",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/TxnExtended"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/txns": {
      "post": {
        "tags": [
          "Txn"
        ],
        "summary": "Process transaction",
        "operationId": "Txn_Process",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/TwoPartyTxnProcessRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Txn"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/txns/search": {
      "post": {
        "tags": [
          "Txn"
        ],
        "summary": "Search for transactions",
        "operationId": "Txn_SearchTxns",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/TxnSearchRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/TxnSearchResponse"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/txns/extended": {
      "post": {
        "tags": [
          "Txn"
        ],
        "summary": "Processes a transaction and provides extended transaction details in the response.\r\n            \r\nThe extended details include additional information such as Merchant Advice Code (MAC) results,\r\nwhich can be useful for clients that require more comprehensive data after processing a transaction.\r\n            \r\nThe extended end point will be extended over time to include additional details as required.\r\nIt is recommended for clients to avoid using this end-point if their parsers do not accept additional\r\nfields in the response and request objects, as this may cause issues when new fields are added in the future.",
        "operationId": "Txn_ProcessExtended",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/TwoPartyTxnProcessRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/TxnExtended"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/txns/extended/search": {
      "post": {
        "tags": [
          "Txn"
        ],
        "summary": "Searches for transactions and provides extended transaction details in the response.\r\n            \r\nThe extended details include additional information such as Merchant Advice Code (MAC) results,\r\nwhich can be useful for clients that require more comprehensive data when searching for transactions.\r\n            \r\nThe extended end point will be extended over time to include additional details as required.\r\nIt is recommended for clients to avoid using this end-point if their parsers do not accept additional\r\nfields in the response and request objects, as this may cause issues when new fields are added in the future.",
        "operationId": "Txn_SearchTxnsExtended",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/TxnSearchRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/TxnSearchResponseExtended"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/txns/authkeys/{authkey}/authentication": {
      "get": {
        "tags": [
          "TxnAuthkey"
        ],
        "summary": "Get authentication result",
        "operationId": "TxnAuthkey_GetAuthentication",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "authkey",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Authentication"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/txns/authkeys/{authkey}/payment-method": {
      "get": {
        "tags": [
          "TxnAuthkey"
        ],
        "summary": "Get payment method",
        "operationId": "TxnAuthkey_GetPaymentMethod",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "authkey",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/PaymentMethodResponse"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      },
      "put": {
        "tags": [
          "TxnAuthkey"
        ],
        "summary": "Attach payment method",
        "description": "Note that if your system is passing credit card details, it will be directly in scope for PCI compliance.",
        "operationId": "TxnAuthkey_AttachPaymentMethod",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "authkey",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/AttachPaymentMethodRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/PaymentMethodResponse"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/txns/authkeys/{authkey}/txn-details": {
      "put": {
        "tags": [
          "TxnAuthkey"
        ],
        "summary": "Attach txn details",
        "operationId": "TxnAuthkey_AttachTxnDetails",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [],
        "parameters": [
          {
            "name": "authkey",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/TxnDetailsRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Successful"
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/txns/authkeys/{authkey}/order-details": {
      "put": {
        "tags": [
          "TxnAuthkey"
        ],
        "summary": "Attach order details",
        "operationId": "TxnAuthkey_AttachOrderDetails",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [],
        "parameters": [
          {
            "name": "authkey",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/OrderDetails"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Successful"
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/txns/authkeys/{authkey}/fraud-screening": {
      "put": {
        "tags": [
          "TxnAuthkey"
        ],
        "summary": "Attach fraud screening details",
        "operationId": "TxnAuthkey_AttachFraudScreening",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [],
        "parameters": [
          {
            "name": "authkey",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/FraudScreeningRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Successful"
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/txns/authkeys/{authkey}/customer-details": {
      "put": {
        "tags": [
          "TxnAuthkey"
        ],
        "summary": "Attach customer details",
        "operationId": "TxnAuthkey_AttachCustomerDetails",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [],
        "parameters": [
          {
            "name": "authkey",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CustomerDetails"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Successful"
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/txns/authkeys/{authkey}/hpp-configuration": {
      "put": {
        "tags": [
          "TxnAuthkey"
        ],
        "summary": "Attach HPP configurations\r\nExisting/deprecated version with no webhook and API version fields - retained for backwards-compatibility",
        "operationId": "TxnAuthkey_AttachHppConfiguration",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "authkey",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/HppConfigurationRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "string"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/txns/authkeys/{authkey}/statement-descriptor": {
      "put": {
        "tags": [
          "TxnAuthkey"
        ],
        "summary": "Attach statement descriptor",
        "description": "Contact information to be printed on the cardholders' account statements.\r\nStatement Descriptors are for Payment Facilitators only.\r\nThe Statement Descriptors will only be used if you have this feature.\r\nPlease contact the bank if you are a Payment Facilitator and wish to use this feature.\r\nNote, the cardholders' bank may not display all the information on the cardholders' statement.",
        "operationId": "TxnAuthkey_AttachStatementDescriptor",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [],
        "parameters": [
          {
            "name": "authkey",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/StatementDescriptor"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Successful"
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/txns/authkeys/{authkey}/hpp-configuration-with-webhook": {
      "put": {
        "tags": [
          "TxnAuthkey"
        ],
        "summary": "Attach HPP configurations\r\nNew version with webhook and API version parameters",
        "operationId": "TxnAuthkey_AttachHppConfigurationWithWebhook",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "authkey",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/HppConfigurationWithWebhookRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "string"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/txns/authkeys": {
      "post": {
        "tags": [
          "TxnAuthkey"
        ],
        "summary": "Create a transaction authkey",
        "operationId": "TxnAuthkey_CreateAuthkey",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Successful",
            "schema": {
              "$ref": "#/definitions/CreateAuthkeyResponse"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/txns/authkeys/{authkey}/process": {
      "post": {
        "tags": [
          "TxnAuthkey"
        ],
        "summary": "Process transaction",
        "description": "Authkey will be deleted after this operation",
        "operationId": "TxnAuthkey_Process",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "authkey",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/TxnProcessRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ProcessTxnResponse"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/txns/authkeys/{authkey}/process-extended": {
      "post": {
        "tags": [
          "TxnAuthkey"
        ],
        "summary": "Processes a transaction and provides extended transaction details in the response.\r\n\r\nThe extended details include additional information such as Address Verification Services (AVS),\r\nwhich can be useful for clients that require more comprehensive data after processing a transaction.\r\n            \r\nThe process-extended end point will be extended over time to include additional details as required.\r\nIt is recommended for clients to avoid using this end-point if their parsers do not accept additional\r\nfields in the response and request objects, as this may cause issues when new fields are added in the future.",
        "description": "Authkey will be deleted after this operation",
        "operationId": "TxnAuthkey_ProcessExtended",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "authkey",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/TxnProcessRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ProcessTxnResponseExtended"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/txns/authkeys/{authkey}/initiate-provider": {
      "post": {
        "tags": [
          "TxnAuthkey"
        ],
        "summary": "Initiate payment method provider",
        "operationId": "TxnAuthkey_InitiateProvider",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [],
        "parameters": [
          {
            "name": "authkey",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/TxnInitiateProviderRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Successful"
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/txns/authkeys/{authkey}/authentication-iframe": {
      "post": {
        "tags": [
          "TxnAuthkey"
        ],
        "summary": "Setup authentication iframe",
        "operationId": "TxnAuthkey_SetupAuthenticationIframe",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "authkey",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/SetupAuthenticationIframeResponse"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/txns/authkeys/{authkey}/client/klarna": {
      "get": {
        "tags": [
          "TxnAuthkeyClient"
        ],
        "summary": "Retrieves the Klarna session",
        "operationId": "TxnAuthkeyClient_GetKlarnaSession",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "authkey",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/KlarnaSession"
            }
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        }
      }
    },
    "/txns/authkeys/{authkey}/client/payment-method": {
      "get": {
        "tags": [
          "TxnAuthkeyClient"
        ],
        "summary": "Get payment method",
        "operationId": "TxnAuthkeyClient_GetPaymentMethod",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "authkey",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ClientPaymentMethodResponse"
            }
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        }
      },
      "put": {
        "tags": [
          "TxnAuthkeyClient"
        ],
        "summary": "Attach payment method",
        "operationId": "TxnAuthkeyClient_AttachPaymentMethod",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "authkey",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/AttachClientPaymentMethodRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ClientPaymentMethodResponse"
            }
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        }
      }
    },
    "/txns/authkeys/{authkey}/client/payment-method/apple-pay-payment-token": {
      "put": {
        "tags": [
          "TxnAuthkeyClient"
        ],
        "summary": "Attach an Apple Pay payment token as a payment method",
        "operationId": "TxnAuthkeyClient_AttachApplePayPaymentToken",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "authkey",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ApplePayPaymentToken"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ClientPaymentMethodResponse"
            }
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        }
      }
    },
    "/txns/authkeys/{authkey}/client/payment-method/google-pay-payment-token": {
      "put": {
        "tags": [
          "TxnAuthkeyClient"
        ],
        "summary": "Attach Google Pay payment token as a payment method",
        "operationId": "TxnAuthkeyClient_AttachGooglePayPaymentToken",
        "consumes": [
          "application/json",
          "text/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "authkey",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/GooglePayRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ClientPaymentMethodResponse"
            }
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        }
      }
    },
    "/txns/resultkeys/{resultKey}": {
      "get": {
        "tags": [
          "TxnResultkey"
        ],
        "summary": "Retrieve process txn with resultkey",
        "operationId": "TxnResultkey_RetrieveProcessTxnResult",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "resultKey",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/Txn"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    },
    "/txns/resultkeys/extended/{resultKey}": {
      "get": {
        "tags": [
          "TxnResultkey"
        ],
        "summary": "Retrieves a processed transaction result and provides extended transaction details in the response.\r\n            \r\nThe extended details include additional information such as Merchant Advice Code (MAC) results,\r\nwhich can be useful for clients that require more comprehensive data when retrieving a transaction result.\r\n            \r\nThe extended end point will be extended over time to include additional details as required.\r\nIt is recommended for clients to avoid using this end-point if their parsers do not accept additional\r\nfields in the response and request objects, as this may cause issues when new fields are added in the future.",
        "operationId": "TxnResultkey_RetrieveProcessTxnResultExtended",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "resultKey",
            "in": "path",
            "description": "The result key returned from a processed transaction",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/TxnExtended"
            }
          },
          "401": {
            "$ref": "#/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/responses/Error"
          },
          "400": {
            "$ref": "#/responses/InvalidRequest"
          }
        },
        "security": [
          {
            "basic": []
          }
        ]
      }
    }
  },
  "definitions": {
    "UpdateBatchFileRequest": {
      "required": [
        "fileName",
        "fileContent"
      ],
      "type": "object",
      "properties": {
        "fileName": {
          "type": "string"
        },
        "fileContent": {
          "type": "string"
        }
      }
    },
    "SearchBatchRequest": {
      "type": "object",
      "properties": {
        "submittedFrom": {
          "type": "string"
        },
        "submittedTo": {
          "type": "string"
        },
        "fileName": {
          "type": "string"
        }
      }
    },
    "BatchStats": {
      "type": "object",
      "properties": {
        "batchFileId": {
          "format": "int32",
          "type": "integer"
        },
        "txnCount": {
          "format": "int32",
          "type": "integer"
        },
        "processedCount": {
          "format": "int32",
          "type": "integer"
        },
        "origFileName": {
          "type": "string"
        },
        "resultFileName": {
          "type": "string"
        },
        "submittedTime": {
          "type": "string"
        },
        "completedTime": {
          "type": "string"
        },
        "batchState": {
          "type": "string"
        },
        "percentageProcessed": {
          "format": "int32",
          "type": "integer"
        }
      }
    },
    "DownloadBatchResultRequest": {
      "required": [
        "downloadFormat"
      ],
      "type": "object",
      "properties": {
        "zipContents": {
          "type": "boolean"
        },
        "downloadFormat": {
          "enum": [
            "BPOINT",
            "VIRTUALPOS",
            "VIRTUALPOSPLUS",
            "UNSPECIFIED"
          ],
          "type": "string",
          "example": "BPOINT"
        },
        "declinedOnlyTxns": {
          "type": "boolean"
        }
      }
    },
    "PaymentRules": {
      "type": "object",
      "properties": {
        "amountLimits": {
          "$ref": "#/definitions/AmountLimits"
        },
        "acceptedCards": {
          "type": "array",
          "items": {
            "enum": [
              "Unspecified",
              "Amex",
              "Mastercard",
              "Visa",
              "Diners",
              "ChinaUnionPay",
              "Jcb",
              "DirectEntry"
            ],
            "type": "string"
          }
        },
        "surchargeRules": {
          "description": "List of surcharge settings by card scheme, location and type.\r\nSurcharge is calculated as Clamp(fixedAmount + (percent * amount), limits.minimum, limits.maximum)",
          "type": "array",
          "items": {
            "$ref": "#/definitions/SurchargeRule"
          }
        },
        "acceptedPaymentMethodProviders": {
          "type": "array",
          "items": {
            "enum": [
              "Unspecified",
              "Klarna"
            ],
            "type": "string"
          }
        }
      }
    },
    "AmountLimits": {
      "type": "object",
      "properties": {
        "minimum": {
          "format": "int32",
          "type": "integer"
        },
        "maximum": {
          "format": "int32",
          "type": "integer"
        }
      }
    },
    "SurchargeRule": {
      "type": "object",
      "properties": {
        "scheme": {
          "enum": [
            "Unspecified",
            "Amex",
            "Mastercard",
            "Visa",
            "Diners",
            "ChinaUnionPay",
            "Jcb",
            "DirectEntry"
          ],
          "type": "string",
          "example": "Amex"
        },
        "type": {
          "enum": [
            "Unspecified",
            "Debit",
            "Credit",
            "ChargeCard"
          ],
          "type": "string",
          "example": "Debit"
        },
        "localisation": {
          "enum": [
            "Unspecified",
            "Local",
            "International"
          ],
          "type": "string",
          "example": "Local"
        },
        "fixedAmount": {
          "format": "int32",
          "type": "integer"
        },
        "percent": {
          "format": "double",
          "type": "number"
        },
        "limits": {
          "$ref": "#/definitions/AmountLimits"
        }
      }
    },
    "SmartBillingRequest": {
      "required": [
        "billerCode",
        "crn1",
        "originalAmount",
        "transferFlag",
        "customerPhoneNumber"
      ],
      "type": "object",
      "properties": {
        "billerCode": {
          "type": "string"
        },
        "crn1": {
          "type": "string"
        },
        "crn2": {
          "type": "string"
        },
        "crn3": {
          "type": "string"
        },
        "originalAmount": {
          "format": "int64",
          "type": "integer"
        },
        "merchantReference": {
          "type": "string"
        },
        "transferFlag": {
          "type": "boolean"
        },
        "agentPhoneNumber": {
          "type": "string"
        },
        "customerPhoneNumber": {
          "type": "string"
        }
      }
    },
    "SmartBillingResponse": {
      "type": "object",
      "properties": {
        "diversionNumber": {
          "type": "string"
        }
      }
    },
    "PaymentRequestUpdateRequest": {
      "required": [
        "acceptablePaymentType"
      ],
      "type": "object",
      "properties": {
        "acceptablePaymentType": {
          "enum": [
            "SingleFull",
            "MultipleCapped",
            "SingleAny"
          ],
          "type": "string",
          "example": "SingleFull"
        },
        "amount": {
          "format": "int64",
          "type": "integer"
        },
        "dueDate": {
          "type": "string"
        },
        "expiryDate": {
          "type": "string"
        }
      }
    },
    "PaymentRequestResponse": {
      "type": "object",
      "properties": {
        "acceptablePaymentType": {
          "enum": [
            "SingleFull",
            "MultipleCapped",
            "SingleAny"
          ],
          "type": "string",
          "example": "SingleFull"
        },
        "paymentBillerAction": {
          "enum": [
            "PayOnly",
            "PreAuthOnly",
            "PayAndTokenise",
            "PreAuthAndTokenise",
            "TokeniseOnly",
            "UpdateToken",
            "PayAndUpdateToken",
            "PreAuthAndUpdateToken"
          ],
          "type": "string",
          "example": "PayOnly"
        },
        "amount": {
          "format": "int64",
          "type": "integer"
        },
        "currency": {
          "type": "string"
        },
        "token": {
          "type": "string"
        },
        "amountPaid": {
          "format": "int64",
          "type": "integer"
        },
        "amountOutstanding": {
          "format": "int64",
          "type": "integer"
        },
        "crn1": {
          "type": "string"
        },
        "crn2": {
          "type": "string"
        },
        "crn3": {
          "type": "string"
        },
        "merchantReference": {
          "type": "string"
        },
        "dueDate": {
          "type": "string"
        },
        "expiryDate": {
          "type": "string"
        },
        "emailSenderName": {
          "type": "string"
        },
        "invoiceDate": {
          "type": "string"
        },
        "messagingMode": {
          "enum": [
            "Gateway",
            "Merchant"
          ],
          "type": "string",
          "example": "Gateway"
        },
        "billerCode": {
          "type": "string"
        },
        "guid": {
          "type": "string"
        },
        "paymentRequestUrl": {
          "type": "string"
        },
        "status": {
          "enum": [
            "Saved",
            "Sent",
            "Unpaid",
            "Registered",
            "Cancelled",
            "PaidInFull",
            "PaidPartially",
            "Refunded",
            "RefundedPartially",
            "OverDue",
            "Expired",
            "AuthOnly"
          ],
          "type": "string",
          "example": "Saved"
        },
        "emailAddress": {
          "type": "string"
        },
        "mobilePhoneNumber": {
          "type": "string"
        }
      }
    },
    "CreatePaymentRequest": {
      "required": [
        "acceptablePaymentType",
        "paymentBillerAction",
        "amount",
        "currency",
        "billerCode",
        "crn1",
        "emailAddress",
        "messagingMode",
        "mobilePhoneNumber"
      ],
      "type": "object",
      "properties": {
        "acceptablePaymentType": {
          "enum": [
            "SingleFull",
            "MultipleCapped",
            "SingleAny"
          ],
          "type": "string",
          "example": "SingleFull"
        },
        "paymentBillerAction": {
          "enum": [
            "PayOnly",
            "PreAuthOnly",
            "PayAndTokenise",
            "PreAuthAndTokenise",
            "TokeniseOnly",
            "UpdateToken",
            "PayAndUpdateToken",
            "PreAuthAndUpdateToken"
          ],
          "type": "string",
          "example": "PayOnly"
        },
        "amount": {
          "format": "int64",
          "type": "integer"
        },
        "currency": {
          "type": "string"
        },
        "billerCode": {
          "type": "string"
        },
        "crn1": {
          "type": "string"
        },
        "crn2": {
          "type": "string"
        },
        "crn3": {
          "type": "string"
        },
        "dueDate": {
          "type": "string"
        },
        "emailAddress": {
          "type": "string",
          "example": "example@email.com"
        },
        "emailSenderName": {
          "type": "string"
        },
        "expiryDate": {
          "type": "string"
        },
        "merchantReference": {
          "type": "string"
        },
        "messagingMode": {
          "enum": [
            "Gateway",
            "Merchant"
          ],
          "type": "string",
          "example": "Gateway"
        },
        "mobilePhoneNumber": {
          "type": "string"
        },
        "mobilePhoneNumberCountryCode": {
          "type": "string"
        },
        "token": {
          "type": "string"
        }
      }
    },
    "PaymentRequestSearchRequest": {
      "type": "object",
      "properties": {
        "paymentBillerAction": {
          "type": "array",
          "items": {
            "enum": [
              "PayOnly",
              "PreAuthOnly",
              "PayAndTokenise",
              "PreAuthAndTokenise",
              "TokeniseOnly",
              "UpdateToken",
              "PayAndUpdateToken",
              "PreAuthAndUpdateToken"
            ],
            "type": "string"
          }
        },
        "fromAmount": {
          "format": "int64",
          "type": "integer"
        },
        "toAmount": {
          "format": "int64",
          "type": "integer"
        },
        "fromAmountOutstanding": {
          "format": "int64",
          "type": "integer"
        },
        "toAmountOutstanding": {
          "format": "int64",
          "type": "integer"
        },
        "fromAmountPaid": {
          "format": "int64",
          "type": "integer"
        },
        "toAmountPaid": {
          "format": "int64",
          "type": "integer"
        },
        "crn1": {
          "type": "string"
        },
        "crn2": {
          "type": "string"
        },
        "crn3": {
          "type": "string"
        },
        "fromInvoiceDate": {
          "type": "string"
        },
        "toInvoiceDate": {
          "type": "string"
        },
        "fromDueDate": {
          "type": "string"
        },
        "toDueDate": {
          "type": "string"
        },
        "token": {
          "type": "string"
        },
        "merchantReference": {
          "type": "string"
        },
        "fromExpiryDate": {
          "type": "string"
        },
        "toExpiryDate": {
          "type": "string"
        },
        "billerCode": {
          "type": "string"
        },
        "emailAddress": {
          "type": "string"
        },
        "emailSenderName": {
          "type": "string"
        },
        "mobilePhoneNumber": {
          "type": "string"
        },
        "guid": {
          "type": "string"
        },
        "numberOfRecords": {
          "format": "int32",
          "type": "integer"
        },
        "continueFrom": {
          "type": "string"
        }
      }
    },
    "PaymentRequestSearchResponse": {
      "type": "object",
      "properties": {
        "paymentRequestSearchRequest": {
          "$ref": "#/definitions/PaymentRequestSearchRequest"
        },
        "resultCount": {
          "format": "int32",
          "type": "integer"
        },
        "continueFrom": {
          "type": "string"
        },
        "paymentRequestResponse": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PaymentRequestResponse"
          }
        }
      }
    },
    "RetrieveSettlementReportsRequest": {
      "required": [
        "settlementDate"
      ],
      "type": "object",
      "properties": {
        "settlementDate": {
          "type": "string"
        }
      }
    },
    "Token": {
      "type": "object",
      "properties": {
        "token": {
          "type": "string"
        },
        "merchantNumber": {
          "type": "string"
        },
        "crn1": {
          "type": "string"
        },
        "crn2": {
          "type": "string"
        },
        "crn3": {
          "type": "string"
        },
        "paymentMethod": {
          "$ref": "#/definitions/TokenPaymentMethod"
        },
        "emailAddress": {
          "description": "Customer's email address",
          "type": "string"
        },
        "createdDateTime": {
          "format": "date-time",
          "type": "string"
        },
        "updatedDateTime": {
          "format": "date-time",
          "type": "string"
        }
      }
    },
    "TokenPaymentMethod": {
      "type": "object",
      "properties": {
        "card": {
          "$ref": "#/definitions/MaskedCardDetails"
        },
        "bank": {
          "$ref": "#/definitions/BankAccountDetails"
        }
      }
    },
    "MaskedCardDetails": {
      "type": "object",
      "properties": {
        "number": {
          "description": "The masked card number, in the format 123456...789",
          "type": "string"
        },
        "expiry": {
          "$ref": "#/definitions/ExpiryDate"
        },
        "name": {
          "type": "string"
        },
        "scheme": {
          "enum": [
            "Unspecified",
            "Amex",
            "Mastercard",
            "Visa",
            "Diners",
            "ChinaUnionPay",
            "Jcb",
            "DirectEntry"
          ],
          "type": "string",
          "example": "Amex"
        },
        "localisation": {
          "enum": [
            "Unspecified",
            "Local",
            "International"
          ],
          "type": "string",
          "example": "Local"
        },
        "type": {
          "enum": [
            "Unspecified",
            "Debit",
            "Credit",
            "ChargeCard"
          ],
          "type": "string",
          "example": "Debit"
        }
      }
    },
    "BankAccountDetails": {
      "required": [
        "bsb",
        "account"
      ],
      "type": "object",
      "properties": {
        "bsb": {
          "type": "string"
        },
        "account": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "ExpiryDate": {
      "required": [
        "month",
        "year"
      ],
      "type": "object",
      "properties": {
        "month": {
          "type": "string"
        },
        "year": {
          "type": "string"
        }
      }
    },
    "TokenUpdateRequest": {
      "required": [
        "crn1",
        "card",
        "bank"
      ],
      "type": "object",
      "properties": {
        "crn1": {
          "type": "string"
        },
        "crn2": {
          "type": "string"
        },
        "crn3": {
          "type": "string"
        },
        "card": {
          "$ref": "#/definitions/TokenCardDetails",
          "description": "One payment method (Card or Bank) must be specified"
        },
        "bank": {
          "$ref": "#/definitions/BankAccountDetails",
          "description": "One payment method (Card or Bank) must be specified"
        },
        "emailAddress": {
          "type": "string"
        }
      }
    },
    "TokenCardDetails": {
      "required": [
        "number",
        "expiry"
      ],
      "type": "object",
      "properties": {
        "number": {
          "type": "string"
        },
        "expiry": {
          "$ref": "#/definitions/ExpiryDate"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "TokenExtended": {
      "type": "object",
      "properties": {
        "token": {
          "type": "string"
        },
        "merchantNumber": {
          "type": "string"
        },
        "crn1": {
          "type": "string"
        },
        "crn2": {
          "type": "string"
        },
        "crn3": {
          "type": "string"
        },
        "paymentMethod": {
          "$ref": "#/definitions/TokenPaymentMethod"
        },
        "emailAddress": {
          "description": "Customer's email address",
          "type": "string"
        },
        "createdDateTime": {
          "format": "date-time",
          "type": "string"
        },
        "updatedDateTime": {
          "format": "date-time",
          "type": "string"
        },
        "merchantAdviceCodeResult": {
          "$ref": "#/definitions/MerchantAdviceCodeResult"
        }
      }
    },
    "MerchantAdviceCodeResult": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "panBlocked": {
          "type": "boolean"
        }
      }
    },
    "TokenAddRequest": {
      "required": [
        "crn1",
        "card",
        "bank"
      ],
      "type": "object",
      "properties": {
        "crn1": {
          "type": "string"
        },
        "crn2": {
          "type": "string"
        },
        "crn3": {
          "type": "string"
        },
        "card": {
          "$ref": "#/definitions/TokenCardDetails",
          "description": "One payment method (card or Bank) must be supplied"
        },
        "bank": {
          "$ref": "#/definitions/BankAccountDetails",
          "description": "One payment method (card or Bank) must be supplied"
        },
        "emailAddress": {
          "type": "string"
        }
      }
    },
    "TokenSearchRequest": {
      "type": "object",
      "properties": {
        "token": {
          "type": "string"
        },
        "scheme": {
          "type": "array",
          "items": {
            "enum": [
              "Unspecified",
              "Amex",
              "Mastercard",
              "Visa",
              "Diners",
              "ChinaUnionPay",
              "Jcb",
              "DirectEntry"
            ],
            "type": "string"
          }
        },
        "crn1": {
          "type": "string"
        },
        "crn2": {
          "type": "string"
        },
        "crn3": {
          "type": "string"
        },
        "expiredCardsOnly": {
          "type": "boolean"
        },
        "expiry": {
          "$ref": "#/definitions/ExpiryDate"
        },
        "createdFrom": {
          "type": "string"
        },
        "createdTo": {
          "type": "string"
        },
        "lastUpdateFrom": {
          "type": "string"
        },
        "lastUpdateTo": {
          "type": "string"
        },
        "maskedCardNumber": {
          "type": "string"
        },
        "accountName": {
          "type": "string"
        },
        "txnSource": {
          "type": "array",
          "items": {
            "enum": [
              "Unspecified",
              "Api",
              "CallCentre",
              "CustomerPortal",
              "Internet",
              "IShop",
              "Ivr",
              "BackOffice",
              "MobileBackOffice",
              "Sftp"
            ],
            "type": "string"
          }
        },
        "userCreated": {
          "type": "string"
        },
        "userUpdated": {
          "type": "string"
        },
        "emailAddress": {
          "type": "string"
        },
        "numberOfRecords": {
          "format": "int32",
          "type": "integer"
        },
        "continueFrom": {
          "type": "string"
        }
      }
    },
    "TokenSearchResponse": {
      "type": "object",
      "properties": {
        "tokens": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Token"
          }
        },
        "tokenSearchRequest": {
          "$ref": "#/definitions/TokenSearchRequest"
        },
        "resultCount": {
          "format": "int32",
          "type": "integer"
        },
        "continueFrom": {
          "type": "string"
        }
      }
    },
    "TokenSearchResponseExtended": {
      "type": "object",
      "properties": {
        "tokens": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/TokenExtended"
          }
        },
        "tokenSearchRequest": {
          "$ref": "#/definitions/TokenSearchRequest"
        },
        "resultCount": {
          "format": "int32",
          "type": "integer"
        },
        "continueFrom": {
          "type": "string"
        }
      }
    },
    "AttachTokenPaymentMethodRequest": {
      "required": [
        "card",
        "bank"
      ],
      "type": "object",
      "properties": {
        "card": {
          "$ref": "#/definitions/TokenCardDetails",
          "description": "Must provide one payment type (Card or Bank)"
        },
        "bank": {
          "$ref": "#/definitions/BankAccountDetails",
          "description": "Must provide one payment type (Card or Bank)"
        }
      }
    },
    "TokenDetailsRequest": {
      "required": [
        "crn1"
      ],
      "type": "object",
      "properties": {
        "crn1": {
          "type": "string"
        },
        "crn2": {
          "type": "string"
        },
        "crn3": {
          "type": "string"
        },
        "emailAddress": {
          "description": "Customer's email address",
          "type": "string"
        }
      }
    },
    "CreateTokenAuthkeyRequest": {
      "type": "object",
      "properties": {
        "token": {
          "description": "When supplied, existing token will be updated instead of added",
          "type": "string"
        }
      }
    },
    "CreateAuthkeyResponse": {
      "type": "object",
      "properties": {
        "authkey": {
          "description": "The authkey identifier, used in subsequent requests",
          "type": "string"
        }
      }
    },
    "ProcessTokenRequest": {
      "type": "object",
      "properties": {
        "webhook": {
          "$ref": "#/definitions/TxnWebhook"
        }
      }
    },
    "TxnWebhook": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string"
        },
        "version": {
          "description": "The API version of the webhook response. Defaults to API version of the request.",
          "type": "string"
        }
      }
    },
    "ProcessTokenResponse": {
      "type": "object",
      "properties": {
        "token": {
          "$ref": "#/definitions/Token"
        }
      }
    },
    "ClientPaymentMethodResponse": {
      "type": "object",
      "properties": {
        "isToken": {
          "description": "Whether the payment method is a token",
          "type": "boolean"
        },
        "card": {
          "$ref": "#/definitions/MaskedCardDetails"
        },
        "bank": {
          "$ref": "#/definitions/MaskedBankAccountDetails"
        },
        "accepted": {
          "description": "Whether the payment method is accepted by biller rules",
          "type": "boolean"
        },
        "surcharge": {
          "format": "int64",
          "description": "Calculated surcharge amount according to the biller rules",
          "type": "integer"
        },
        "provider": {
          "enum": [
            "Unspecified",
            "Klarna"
          ],
          "type": "string",
          "example": "Klarna"
        }
      }
    },
    "MaskedBankAccountDetails": {
      "type": "object",
      "properties": {
        "bsb": {
          "type": "string"
        },
        "account": {
          "description": "The masked account number, in the format 5...8",
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "ClientTokenPaymentMethod": {
      "type": "object",
      "properties": {
        "card": {
          "$ref": "#/definitions/MaskedCardDetails"
        },
        "bank": {
          "$ref": "#/definitions/MaskedBankAccountDetails"
        }
      }
    },
    "Txn": {
      "type": "object",
      "properties": {
        "action": {
          "enum": [
            "Unspecified",
            "Payment",
            "Refund",
            "UnmatchedRefund",
            "PreAuth",
            "Capture",
            "Reversal",
            "VerifyOnly"
          ],
          "type": "string",
          "example": "Payment"
        },
        "type": {
          "enum": [
            "Unspecified",
            "Internet",
            "CallCentre",
            "CardPresent",
            "ECommerce",
            "Ivr",
            "MailOrder",
            "TelephoneOrder"
          ],
          "type": "string",
          "example": "Internet"
        },
        "subType": {
          "enum": [
            "Unspecified",
            "Single",
            "Recurring"
          ],
          "type": "string",
          "example": "Single"
        },
        "source": {
          "type": "string"
        },
        "billerCode": {
          "type": "string"
        },
        "merchantNumber": {
          "type": "string"
        },
        "crn1": {
          "type": "string"
        },
        "crn2": {
          "type": "string"
        },
        "crn3": {
          "type": "string"
        },
        "merchantReference": {
          "description": "Reference that is for internal use only.",
          "type": "string"
        },
        "currency": {
          "type": "string",
          "example": "AUD"
        },
        "amount": {
          "format": "int64",
          "description": "Total transaction amount in the lowest denomination for the currency",
          "type": "integer",
          "example": 110
        },
        "amountOriginal": {
          "format": "int64",
          "description": "Base transaction amount in the lowest denomination for the currency (without surcharge)",
          "type": "integer",
          "example": 100
        },
        "amountSurcharge": {
          "format": "int64",
          "description": "Surcharge amount in the lowest denomination for the currency",
          "type": "integer",
          "example": 10
        },
        "paymentMethod": {
          "$ref": "#/definitions/PaymentMethod"
        },
        "processedDateTime": {
          "format": "date-time",
          "description": "Date and time when transaction was processed",
          "type": "string"
        },
        "settlementDate": {
          "description": "Date of settlement. In YYYYMMDD format.",
          "type": "string"
        },
        "emailAddress": {
          "description": "Customer's email address",
          "type": "string",
          "example": "example@email.com"
        },
        "originalTxnNumber": {
          "description": "Used for refunds, reversals and captures. Transaction number of the original transaction",
          "type": "string"
        },
        "responseCode": {
          "description": "Summary response code. 0 means the transaction was approved. Any other value indicates a decline or error",
          "type": "string"
        },
        "bankResponseCode": {
          "description": "Response code returned from the issuing bank",
          "type": "string"
        },
        "responseText": {
          "description": "Description of the ResponseCode.",
          "type": "string"
        },
        "txnNumber": {
          "type": "string"
        },
        "receiptNumber": {
          "type": "string"
        },
        "authoriseId": {
          "description": "AuthoriseId issued by the Acquirer for approved transactions. Not all Acquirers return the AuthoriseId even if the transaction is approved.",
          "type": "string"
        },
        "rrn": {
          "description": "Retrieval reference number.",
          "type": "string"
        },
        "storeCard": {
          "description": "Whether the cardholder agreed to save their card details.",
          "type": "boolean"
        },
        "cvnResult": {
          "$ref": "#/definitions/CvnResult"
        },
        "isThreeDs": {
          "description": "Whether transaction was subject to 3D Secure verification",
          "type": "boolean"
        },
        "isCvnPresent": {
          "description": "Whether CVN was present",
          "type": "boolean"
        },
        "isTestTxn": {
          "description": "Whether the transaction was processed as a test transaction.",
          "type": "boolean"
        },
        "fraudScreeningResult": {
          "$ref": "#/definitions/FraudScreeningResult"
        },
        "statementDescriptor": {
          "$ref": "#/definitions/StatementDescriptor"
        },
        "threeDsResult": {
          "$ref": "#/definitions/ThreeDsResult"
        }
      }
    },
    "PaymentMethod": {
      "type": "object",
      "properties": {
        "token": {
          "type": "string"
        },
        "card": {
          "$ref": "#/definitions/MaskedCardDetails"
        },
        "bank": {
          "$ref": "#/definitions/BankAccountDetails"
        },
        "provider": {
          "enum": [
            "Unspecified",
            "Klarna"
          ],
          "type": "string",
          "example": "Klarna"
        }
      }
    },
    "CvnResult": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        }
      }
    },
    "FraudScreeningResult": {
      "type": "object",
      "properties": {
        "rejected": {
          "type": "boolean"
        },
        "responseCode": {
          "type": "string"
        },
        "responseMessage": {
          "type": "string"
        },
        "provider": {
          "$ref": "#/definitions/ProviderResult"
        }
      }
    },
    "StatementDescriptor": {
      "type": "object",
      "properties": {
        "city": {
          "type": "string"
        },
        "companyName": {
          "type": "string"
        },
        "countryCode": {
          "type": "string"
        },
        "postcode": {
          "type": "string"
        },
        "state": {
          "type": "string"
        },
        "addressLine1": {
          "type": "string"
        },
        "addressLine2": {
          "type": "string"
        },
        "merchantName": {
          "type": "string"
        },
        "phoneNumber": {
          "type": "string"
        }
      }
    },
    "ThreeDsResult": {
      "type": "object",
      "properties": {
        "fields": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ThreeDsField"
          }
        }
      }
    },
    "ProviderResult": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "response": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ProviderResponseKeyValue"
          }
        },
        "errors": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ProviderResponseError"
          }
        }
      }
    },
    "ThreeDsField": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      }
    },
    "ProviderResponseKeyValue": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      }
    },
    "ProviderResponseError": {
      "type": "object",
      "properties": {
        "field": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      }
    },
    "TxnExtended": {
      "description": "Processes a transaction and provides extended transaction details in the response.",
      "type": "object",
      "properties": {
        "action": {
          "enum": [
            "Unspecified",
            "Payment",
            "Refund",
            "UnmatchedRefund",
            "PreAuth",
            "Capture",
            "Reversal",
            "VerifyOnly"
          ],
          "type": "string",
          "example": "Payment"
        },
        "type": {
          "enum": [
            "Unspecified",
            "Internet",
            "CallCentre",
            "CardPresent",
            "ECommerce",
            "Ivr",
            "MailOrder",
            "TelephoneOrder"
          ],
          "type": "string",
          "example": "Internet"
        },
        "subType": {
          "enum": [
            "Unspecified",
            "Single",
            "Recurring"
          ],
          "type": "string",
          "example": "Single"
        },
        "source": {
          "type": "string"
        },
        "billerCode": {
          "type": "string"
        },
        "merchantNumber": {
          "type": "string"
        },
        "crn1": {
          "type": "string"
        },
        "crn2": {
          "type": "string"
        },
        "crn3": {
          "type": "string"
        },
        "merchantReference": {
          "description": "Reference that is for internal use only.",
          "type": "string"
        },
        "currency": {
          "type": "string",
          "example": "AUD"
        },
        "amount": {
          "format": "int64",
          "description": "Total transaction amount in the lowest denomination for the currency",
          "type": "integer",
          "example": 110
        },
        "amountOriginal": {
          "format": "int64",
          "description": "Base transaction amount in the lowest denomination for the currency (without surcharge)",
          "type": "integer",
          "example": 100
        },
        "amountSurcharge": {
          "format": "int64",
          "description": "Surcharge amount in the lowest denomination for the currency",
          "type": "integer",
          "example": 10
        },
        "paymentMethod": {
          "$ref": "#/definitions/PaymentMethod"
        },
        "processedDateTime": {
          "format": "date-time",
          "description": "Date and time when transaction was processed",
          "type": "string"
        },
        "settlementDate": {
          "description": "Date of settlement. In YYYYMMDD format.",
          "type": "string"
        },
        "emailAddress": {
          "description": "Customer's email address",
          "type": "string",
          "example": "example@email.com"
        },
        "originalTxnNumber": {
          "description": "Used for refunds, reversals and captures. Transaction number of the original transaction",
          "type": "string"
        },
        "responseCode": {
          "description": "Summary response code. 0 means the transaction was approved. Any other value indicates a decline or error",
          "type": "string"
        },
        "bankResponseCode": {
          "description": "Response code returned from the issuing bank",
          "type": "string"
        },
        "responseText": {
          "description": "Description of the ResponseCode.",
          "type": "string"
        },
        "txnNumber": {
          "type": "string"
        },
        "receiptNumber": {
          "type": "string"
        },
        "authoriseId": {
          "description": "AuthoriseId issued by the Acquirer for approved transactions. Not all Acquirers return the AuthoriseId even if the transaction is approved.",
          "type": "string"
        },
        "rrn": {
          "description": "Retrieval reference number.",
          "type": "string"
        },
        "storeCard": {
          "description": "Whether the cardholder agreed to save their card details.",
          "type": "boolean"
        },
        "cvnResult": {
          "$ref": "#/definitions/CvnResult"
        },
        "isThreeDs": {
          "description": "Whether transaction was subject to 3D Secure verification",
          "type": "boolean"
        },
        "isCvnPresent": {
          "description": "Whether CVN was present",
          "type": "boolean"
        },
        "isTestTxn": {
          "description": "Whether the transaction was processed as a test transaction.",
          "type": "boolean"
        },
        "fraudScreeningResult": {
          "$ref": "#/definitions/FraudScreeningResult"
        },
        "statementDescriptor": {
          "$ref": "#/definitions/StatementDescriptor"
        },
        "threeDsResult": {
          "$ref": "#/definitions/ThreeDsResult"
        },
        "avsResult": {
          "$ref": "#/definitions/AVSResult"
        },
        "merchantAdviceCodeResult": {
          "$ref": "#/definitions/MerchantAdviceCodeResult",
          "description": "Merchant advice code returned by gateway."
        }
      }
    },
    "AVSResult": {
      "type": "object",
      "properties": {
        "code": {
          "enum": [
            "Unspecified",
            "FullMatch",
            "PartialMatch",
            "NoMatch",
            "NotSupported",
            "NotAvailable",
            "SystemUnavailable",
            "NotRequested",
            "Unrecognized"
          ],
          "type": "string",
          "example": "FullMatch"
        },
        "rawCode": {
          "type": "string"
        }
      }
    },
    "TwoPartyTxnProcessRequest": {
      "required": [
        "action",
        "type",
        "subType",
        "crn1",
        "currency",
        "amount",
        "cardDetails"
      ],
      "type": "object",
      "properties": {
        "action": {
          "enum": [
            "Unspecified",
            "Payment",
            "Refund",
            "UnmatchedRefund",
            "PreAuth",
            "Capture",
            "Reversal",
            "VerifyOnly"
          ],
          "type": "string",
          "example": "Payment"
        },
        "type": {
          "enum": [
            "Unspecified",
            "Internet",
            "CallCentre",
            "CardPresent",
            "ECommerce",
            "Ivr",
            "MailOrder",
            "TelephoneOrder"
          ],
          "type": "string",
          "example": "Internet"
        },
        "subType": {
          "enum": [
            "Unspecified",
            "Single",
            "Recurring"
          ],
          "type": "string",
          "example": "Single"
        },
        "billerCode": {
          "type": "string"
        },
        "crn1": {
          "type": "string"
        },
        "crn2": {
          "type": "string"
        },
        "crn3": {
          "type": "string"
        },
        "merchantReference": {
          "type": "string"
        },
        "currency": {
          "type": "string",
          "example": "AUD"
        },
        "amount": {
          "format": "int64",
          "description": "Total transaction amount in the lowest denomination for the currency",
          "type": "integer",
          "example": 110
        },
        "amountOriginal": {
          "format": "int64",
          "description": "Base transaction amount in the lowest denomination for the currency (without surcharge)",
          "type": "integer",
          "example": 100
        },
        "amountSurcharge": {
          "format": "int64",
          "description": "Surcharge amount in the lowest denomination for the currency",
          "type": "integer",
          "example": 10
        },
        "emailAddress": {
          "description": "Customer's email address",
          "type": "string",
          "example": "example@email.com"
        },
        "originalTxnNumber": {
          "description": "Used for refunds, reversals and captures. Transaction number of the original transaction",
          "type": "string"
        },
        "testMode": {
          "description": "Flag to indicate whether transactions should be processed in test mode",
          "type": "boolean"
        },
        "cardDetails": {
          "$ref": "#/definitions/CardDetails"
        },
        "statementDescriptor": {
          "$ref": "#/definitions/StatementDescriptor"
        },
        "txnWebhook": {
          "$ref": "#/definitions/TxnWebhook"
        }
      }
    },
    "CardDetails": {
      "required": [
        "number",
        "expiry"
      ],
      "type": "object",
      "properties": {
        "cvn": {
          "type": "string"
        },
        "number": {
          "type": "string"
        },
        "expiry": {
          "$ref": "#/definitions/ExpiryDate"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "TxnSearchRequest": {
      "type": "object",
      "properties": {
        "action": {
          "type": "array",
          "items": {
            "enum": [
              "Unspecified",
              "Payment",
              "Refund",
              "UnmatchedRefund",
              "PreAuth",
              "Capture",
              "Reversal",
              "VerifyOnly"
            ],
            "type": "string"
          }
        },
        "txnSource": {
          "type": "array",
          "items": {
            "enum": [
              "Unspecified",
              "Api",
              "CallCentre",
              "CustomerPortal",
              "Internet",
              "IShop",
              "Ivr",
              "BackOffice",
              "MobileBackOffice",
              "Sftp"
            ],
            "type": "string"
          }
        },
        "fromDate": {
          "type": "string"
        },
        "toDate": {
          "type": "string"
        },
        "receiptNumber": {
          "type": "string"
        },
        "merchantReference": {
          "type": "string"
        },
        "crn1": {
          "type": "string"
        },
        "crn2": {
          "type": "string"
        },
        "crn3": {
          "type": "string"
        },
        "currency": {
          "type": "string",
          "example": "AUD"
        },
        "amount": {
          "format": "int64",
          "type": "integer"
        },
        "maskedCardNumber": {
          "type": "string"
        },
        "expiry": {
          "$ref": "#/definitions/ExpiryDate"
        },
        "responseCode": {
          "type": "string"
        },
        "txnNumber": {
          "type": "string"
        },
        "authoriseId": {
          "type": "string"
        },
        "settlementDate": {
          "type": "string"
        },
        "rrn": {
          "type": "string"
        },
        "scheme": {
          "type": "array",
          "items": {
            "enum": [
              "Unspecified",
              "Amex",
              "Mastercard",
              "Visa",
              "Diners",
              "ChinaUnionPay",
              "Jcb",
              "DirectEntry"
            ],
            "type": "string"
          }
        },
        "bankResponseCode": {
          "type": "string"
        },
        "billerCode": {
          "type": "string"
        },
        "token": {
          "type": "string"
        },
        "numberOfRecords": {
          "format": "int32",
          "type": "integer"
        },
        "continueFrom": {
          "type": "string"
        }
      }
    },
    "TxnSearchResponse": {
      "type": "object",
      "properties": {
        "transactions": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Txn"
          }
        },
        "searchTxnsRequest": {
          "$ref": "#/definitions/TxnSearchRequest"
        },
        "resultCount": {
          "format": "int32",
          "type": "integer"
        },
        "continueFrom": {
          "type": "string"
        }
      }
    },
    "TxnSearchResponseExtended": {
      "type": "object",
      "properties": {
        "transactions": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/TxnExtended"
          }
        },
        "searchTxnsRequest": {
          "$ref": "#/definitions/TxnSearchRequest"
        },
        "resultCount": {
          "format": "int32",
          "type": "integer"
        },
        "continueFrom": {
          "type": "string"
        }
      }
    },
    "Authentication": {
      "type": "object",
      "properties": {
        "status": {
          "enum": [
            "InProgress",
            "Complete"
          ],
          "type": "string",
          "example": "InProgress"
        }
      }
    },
    "PaymentMethodResponse": {
      "type": "object",
      "properties": {
        "accepted": {
          "description": "Whether the payment method is accepted, affected by biller rules when a BillerCode is supplied",
          "type": "boolean"
        },
        "surcharge": {
          "format": "int64",
          "description": "Calculated surcharge amount, affected by biller rules when a BillerCode is supplied",
          "type": "integer"
        },
        "token": {
          "type": "string"
        },
        "card": {
          "$ref": "#/definitions/MaskedCardDetails"
        },
        "bank": {
          "$ref": "#/definitions/BankAccountDetails"
        },
        "provider": {
          "enum": [
            "Unspecified",
            "Klarna"
          ],
          "type": "string",
          "example": "Klarna"
        }
      }
    },
    "AttachPaymentMethodRequest": {
      "required": [
        "token",
        "card"
      ],
      "type": "object",
      "properties": {
        "token": {
          "type": "string"
        },
        "card": {
          "$ref": "#/definitions/CardDetails",
          "description": "Card details, or if a token is supplied, this will be used to override card expiry and/or supply CVN"
        },
        "provider": {
          "enum": [
            "Unspecified",
            "Klarna"
          ],
          "type": "string",
          "example": "Klarna"
        }
      }
    },
    "TxnDetailsRequest": {
      "required": [
        "action",
        "type",
        "subType",
        "amount",
        "crn1",
        "currency"
      ],
      "type": "object",
      "properties": {
        "action": {
          "enum": [
            "Unspecified",
            "Payment",
            "Refund",
            "UnmatchedRefund",
            "PreAuth",
            "Capture",
            "Reversal",
            "VerifyOnly"
          ],
          "type": "string",
          "example": "Payment"
        },
        "type": {
          "enum": [
            "Unspecified",
            "Internet",
            "CallCentre",
            "CardPresent",
            "ECommerce",
            "Ivr",
            "MailOrder",
            "TelephoneOrder"
          ],
          "type": "string",
          "example": "Internet"
        },
        "subType": {
          "enum": [
            "Unspecified",
            "Single",
            "Recurring"
          ],
          "type": "string",
          "example": "Single"
        },
        "amount": {
          "format": "int64",
          "description": "Base transaction amount in the lowest denomination for the currency (excluding any surcharge)",
          "type": "integer",
          "example": 100
        },
        "billerCode": {
          "type": "string"
        },
        "crn1": {
          "type": "string"
        },
        "crn2": {
          "type": "string"
        },
        "crn3": {
          "type": "string"
        },
        "merchantReference": {
          "description": "Reference that is for internal use only.",
          "type": "string"
        },
        "currency": {
          "type": "string",
          "example": "AUD"
        },
        "bypass3ds": {
          "description": "Whether to bypass 3DS authentication",
          "type": "boolean",
          "example": false
        },
        "tokenisationMode": {
          "enum": [
            "Default",
            "None",
            "OptIn",
            "All"
          ],
          "type": "string",
          "example": "Default"
        },
        "emailAddress": {
          "description": "Customer's email address",
          "type": "string",
          "example": "example@email.com"
        },
        "storeCard": {
          "description": "Whether the cardholder agrees to save their card details",
          "type": "boolean"
        },
        "testMode": {
          "description": "Flag to indicate whether transactions should be processed in test mode",
          "type": "boolean"
        }
      }
    },
    "OrderDetails": {
      "type": "object",
      "properties": {
        "shippingAddress": {
          "$ref": "#/definitions/OrderAddress"
        },
        "billingAddress": {
          "$ref": "#/definitions/OrderAddress"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/OrderItem"
          }
        },
        "shippingMethod": {
          "enum": [
            "Unspecified",
            "NextDayService",
            "TwoDayService",
            "ThreeDayService",
            "LowCostCarrier",
            "CustomerChoice",
            "International",
            "Military",
            "CollectAtStore",
            "Other",
            "Standard",
            "Priority",
            "ETicket",
            "DigitalGoods"
          ],
          "type": "string",
          "example": "NextDayService"
        },
        "recipients": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/OrderRecipient"
          }
        }
      }
    },
    "OrderAddress": {
      "type": "object",
      "properties": {
        "personalDetails": {
          "$ref": "#/definitions/PersonalDetails"
        },
        "contactDetails": {
          "$ref": "#/definitions/ContactDetails"
        },
        "address": {
          "$ref": "#/definitions/Address"
        },
        "comments": {
          "type": "string"
        }
      }
    },
    "OrderItem": {
      "type": "object",
      "properties": {
        "quantity": {
          "format": "double",
          "type": "number"
        },
        "sku": {
          "type": "string"
        },
        "productCode": {
          "type": "string"
        },
        "partNumber": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "unitPrice": {
          "format": "int64",
          "type": "integer"
        },
        "shippingNumber": {
          "type": "string"
        },
        "shippingMethod": {
          "enum": [
            "Unspecified",
            "NextDayService",
            "TwoDayService",
            "ThreeDayService",
            "LowCostCarrier",
            "CustomerChoice",
            "International",
            "Military",
            "CollectAtStore",
            "Other",
            "Standard",
            "Priority",
            "ETicket",
            "DigitalGoods"
          ],
          "type": "string",
          "example": "NextDayService"
        },
        "comments": {
          "type": "string"
        },
        "giftMessage": {
          "type": "string"
        },
        "totalAmount": {
          "format": "int32",
          "type": "integer"
        }
      }
    },
    "OrderRecipient": {
      "type": "object",
      "properties": {
        "personalDetails": {
          "$ref": "#/definitions/PersonalDetails"
        },
        "contactDetails": {
          "$ref": "#/definitions/ContactDetails"
        },
        "address": {
          "$ref": "#/definitions/Address"
        }
      }
    },
    "PersonalDetails": {
      "type": "object",
      "properties": {
        "salutation": {
          "type": "string"
        },
        "firstName": {
          "type": "string"
        },
        "middleName": {
          "type": "string"
        },
        "lastName": {
          "type": "string"
        },
        "dateOfBirth": {
          "type": "string"
        }
      }
    },
    "ContactDetails": {
      "type": "object",
      "properties": {
        "homePhoneNumber": {
          "type": "string"
        },
        "mobilePhoneNumber": {
          "type": "string"
        },
        "workPhoneNumber": {
          "type": "string"
        },
        "faxNumber": {
          "type": "string"
        },
        "emailAddress": {
          "type": "string"
        }
      }
    },
    "Address": {
      "type": "object",
      "properties": {
        "addressLine1": {
          "type": "string"
        },
        "addressLine2": {
          "type": "string"
        },
        "addressLine3": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "state": {
          "type": "string"
        },
        "postcode": {
          "type": "string"
        },
        "countryCode": {
          "type": "string"
        }
      }
    },
    "FraudScreeningRequest": {
      "type": "object",
      "properties": {
        "performFraudScreening": {
          "type": "boolean"
        },
        "deviceFingerprint": {
          "type": "string"
        },
        "customerIpAddress": {
          "type": "string"
        },
        "txnSourceWebsiteUrl": {
          "type": "string"
        },
        "customFields": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/CustomField"
          }
        },
        "browserHeaders": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/BrowserHeader"
          }
        },
        "deviceInformation": {
          "$ref": "#/definitions/DeviceInformation"
        },
        "customer": {
          "$ref": "#/definitions/CustomerDetails",
          "description": "Customer details (equivalent to PUT /customer-details endpoint)"
        },
        "order": {
          "$ref": "#/definitions/OrderDetails",
          "description": "Order details (equivalent to PUT /order-details endpoint)"
        }
      }
    },
    "CustomField": {
      "type": "object",
      "properties": {
        "value": {
          "type": "string"
        }
      }
    },
    "BrowserHeader": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      }
    },
    "DeviceInformation": {
      "type": "object",
      "properties": {
        "locationLatitude": {
          "type": "string"
        },
        "locationLongitude": {
          "type": "string"
        },
        "mobileCountryCode": {
          "type": "string"
        },
        "mobileNetworkCode": {
          "type": "string"
        },
        "carrierName": {
          "type": "string"
        },
        "imei": {
          "type": "string"
        },
        "mobileOs": {
          "type": "string"
        }
      }
    },
    "CustomerDetails": {
      "type": "object",
      "properties": {
        "customerNumber": {
          "type": "string"
        },
        "daysOnFile": {
          "format": "int32",
          "type": "integer"
        },
        "isExistingCustomer": {
          "description": "Flag to indicate if this is an existing customer",
          "type": "boolean"
        },
        "personalDetails": {
          "$ref": "#/definitions/PersonalDetails"
        },
        "contactDetails": {
          "$ref": "#/definitions/ContactDetails"
        },
        "address": {
          "$ref": "#/definitions/Address"
        }
      }
    },
    "HppConfigurationRequest": {
      "required": [
        "redirectionUrl"
      ],
      "type": "object",
      "properties": {
        "redirectionUrl": {
          "type": "string"
        },
        "tokeniseTxnCheckBoxDefaultValue": {
          "type": "boolean"
        },
        "hideCRN1": {
          "type": "boolean"
        },
        "hideCRN2": {
          "type": "boolean"
        },
        "hideCRN3": {
          "type": "boolean"
        },
        "hideBillerCode": {
          "type": "boolean"
        },
        "returnBarLabel": {
          "type": "string"
        },
        "returnBarUrl": {
          "type": "string"
        }
      }
    },
    "HppConfigurationWithWebhookRequest": {
      "type": "object",
      "properties": {
        "redirectionUrl": {
          "type": "string"
        },
        "tokeniseTxnCheckBoxDefaultValue": {
          "type": "boolean"
        },
        "hideCRN1": {
          "type": "boolean"
        },
        "hideCRN2": {
          "type": "boolean"
        },
        "hideCRN3": {
          "type": "boolean"
        },
        "hideBillerCode": {
          "type": "boolean"
        },
        "returnBarLabel": {
          "type": "string"
        },
        "returnBarUrl": {
          "type": "string"
        },
        "webhook": {
          "$ref": "#/definitions/TxnWebhook"
        }
      }
    },
    "TxnProcessRequest": {
      "type": "object",
      "properties": {
        "webhook": {
          "$ref": "#/definitions/TxnWebhook"
        },
        "surcharge": {
          "$ref": "#/definitions/TxnSurcharge"
        },
        "updateToken": {
          "description": "When processing with a token, whether the token's expiry date should be updated",
          "type": "boolean"
        }
      }
    },
    "TxnSurcharge": {
      "type": "object",
      "properties": {
        "calculate": {
          "description": "Whether to calculate the surcharge from Biller rules",
          "type": "boolean"
        },
        "amount": {
          "format": "int64",
          "description": "The surcharge amount, will be added to the Transaction Amount.",
          "type": "integer"
        }
      }
    },
    "ProcessTxnResponse": {
      "type": "object",
      "properties": {
        "txn": {
          "$ref": "#/definitions/Txn"
        }
      }
    },
    "ProcessTxnResponseExtended": {
      "type": "object",
      "properties": {
        "txn": {
          "$ref": "#/definitions/TxnExtended"
        }
      }
    },
    "TxnInitiateProviderRequest": {
      "type": "object",
      "properties": {
        "surcharge": {
          "$ref": "#/definitions/TxnSurcharge"
        }
      }
    },
    "SetupAuthenticationIframeResponse": {
      "type": "object",
      "properties": {
        "iframe": {
          "$ref": "#/definitions/AuthenticationIframe",
          "description": "Details on the iframe, will be null if the authentication is immediately complete"
        },
        "authentication": {
          "$ref": "#/definitions/Authentication"
        }
      }
    },
    "AuthenticationIframe": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string"
        },
        "origin": {
          "type": "string"
        }
      }
    },
    "KlarnaSession": {
      "type": "object",
      "properties": {
        "clientToken": {
          "type": "string"
        },
        "paymentMethodCategories": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/KlarnaPaymentMethodCategory"
          }
        }
      }
    },
    "KlarnaPaymentMethodCategory": {
      "type": "object",
      "properties": {
        "identifier": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "logoUrl": {
          "type": "string"
        }
      }
    },
    "AttachClientPaymentMethodRequest": {
      "required": [
        "card"
      ],
      "type": "object",
      "properties": {
        "card": {
          "$ref": "#/definitions/CardDetails"
        }
      }
    },
    "ApplePayPaymentToken": {
      "required": [
        "paymentData",
        "paymentMethod",
        "transactionIdentifier"
      ],
      "type": "object",
      "properties": {
        "paymentData": {
          "$ref": "#/definitions/ApplePayPaymentData"
        },
        "paymentMethod": {
          "$ref": "#/definitions/ApplePayPaymentMethod"
        },
        "transactionIdentifier": {
          "type": "string"
        }
      }
    },
    "ApplePayPaymentData": {
      "required": [
        "data",
        "signature",
        "header",
        "version"
      ],
      "type": "object",
      "properties": {
        "data": {
          "type": "string"
        },
        "signature": {
          "type": "string"
        },
        "header": {
          "$ref": "#/definitions/ApplePayPaymentDataHeader"
        },
        "version": {
          "type": "string"
        }
      }
    },
    "ApplePayPaymentMethod": {
      "required": [
        "network",
        "type"
      ],
      "type": "object",
      "properties": {
        "displayName": {
          "type": "string"
        },
        "network": {
          "type": "string"
        },
        "type": {
          "type": "string"
        }
      }
    },
    "ApplePayPaymentDataHeader": {
      "required": [
        "transactionId",
        "publicKeyHash",
        "applicationData",
        "ephemeralPublicKey"
      ],
      "type": "object",
      "properties": {
        "transactionId": {
          "type": "string"
        },
        "publicKeyHash": {
          "type": "string"
        },
        "applicationData": {
          "type": "string"
        },
        "ephemeralPublicKey": {
          "type": "string"
        }
      }
    },
    "GooglePayRequest": {
      "required": [
        "payload"
      ],
      "type": "object",
      "properties": {
        "payload": {
          "type": "string"
        }
      }
    },
    "Error": {
      "type": "object",
      "properties": {
        "code": {
          "enum": [
            "Unspecified",
            "Fatal",
            "SystemDown",
            "InvalidFields",
            "InvalidCredentials",
            "NotAuthenticated",
            "InvalidPermissions",
            "InvalidPayload",
            "InvalidFlow",
            "NotFound"
          ],
          "type": "string",
          "example": "Fatal"
        },
        "message": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SubError"
          }
        }
      }
    },
    "SubError": {
      "type": "object",
      "properties": {
        "code": {
          "enum": [
            "Unspecified",
            "Mandatory",
            "Invalid",
            "OutOfRange",
            "NotFound",
            "MaxLength",
            "MinLength",
            "BannedCharacters"
          ],
          "type": "string",
          "example": "Mandatory"
        },
        "message": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      }
    }
  },
  "responses": {
    "Error": {
      "description": "Unknown error occurred",
      "schema": {
        "$ref": "#/definitions/Error"
      }
    },
    "InvalidRequest": {
      "description": "Request was invalid",
      "schema": {
        "$ref": "#/definitions/Error"
      }
    },
    "Unauthorized": {
      "description": "Invalid credentials, or user does not have required permissions",
      "schema": {
        "$ref": "#/definitions/Error"
      }
    }
  },
  "securityDefinitions": {
    "basic": {
      "type": "basic",
      "description": "Basic HTTP Authentication. Username supplied should be API user's username and merchant number in the format: 'apiUsername|merchantNumber'"
    }
  }
}