{
  "openapi": "3.1.1",
  "info": {
    "title": "Safepay API V2",
    "description": "Safepay API - API spec. is not final, changes may be introduced",
    "version": "v2"
  },
  "paths": {
    "/v2/connect": {
      "post": {
        "tags": [
          "Connect"
        ],
        "summary": "Connect flow",
        "description": "Connect flow.\r\n\r\nGenerates a ConnectUrl where the user can be validated and connected to Safepay.\r\n\r\nMissing user information, such as phone number or KYC/KYB this will trigger addtional steps in the flow, based on 'Skip' properties.\r\n\r\nAfter the flow the user will be redirected to the ReturnUrl if supplied, otherwise the flow will end on a exit page.\r\n\r\nThe user should be redirected to the ConnectUrl to start the flow.",
        "parameters": [
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Initialize.Request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Initialize.Model"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          }
        }
      }
    },
    "/v2/connect/{referenceId}": {
      "get": {
        "tags": [
          "Connect"
        ],
        "summary": "Get connect",
        "description": "Gets information from the connect flow based on 'ReferenceId'.\r\n\r\nThis should be used to translate a 'ReferenceId' into a 'SafepayAccountId'.",
        "parameters": [
          {
            "name": "referenceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetConnect.Model"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v2/connect/{referenceId}/guest": {
      "post": {
        "tags": [
          "Connect"
        ],
        "summary": "Create a guest user connection",
        "description": "Creates a new guest user and a connection to Safepay.\r\n\r\nNOTICE:\r\nThis feature is not available for all customers.",
        "parameters": [
          {
            "name": "referenceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Name",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PhoneNumber",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Email",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Cvr",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateGuestUser.Model"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v2/connect/{referenceId}/delete": {
      "post": {
        "tags": [
          "Connect"
        ],
        "summary": "Delete a connection for a user",
        "description": "Deletes the connection to Safepay.\r\n\r\nNOTICE: If there is no connection to Safepay, then the user won't be able to part of a transaction.\r\n\r\nThis endpoint should not be used unless there is a very specifc purpose.",
        "parameters": [
          {
            "name": "referenceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v2/documents": {
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Create document for signing",
        "description": "Create document for signing",
        "parameters": [
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CreateDocument.Request"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CreateDocument.Request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateDocument.Model"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      },
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "List documents",
        "description": "List documents",
        "parameters": [
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetDocuments.Model"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v2/documents/{documentId}": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Get document",
        "description": "Get document",
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetDocument.Model"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v2/documents/{documentId}/sign": {
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Sign document",
        "description": "Sign document.\r\n\r\nGenerates a unique URL where the user can sign the document. If supplied the user will be redirect to ReturnUrl after signature flow.",
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignDocument.Request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignDocument.Model"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v2/documents/{documentId}/download": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Download document",
        "description": "Download document.\r\n\r\nReturns a URL where the document can be downloaded.\r\n\r\nIf the document is signed, the URL links to the signed document, otherwise it links to the original uploaded document.",
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetDocumentSignedOrPreviewUrl.Model"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v2/documents/{documentId}/delete": {
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Delete document",
        "description": "Delete document.\r\n\r\nNotice: This will also delete uploaded documents including signed versions.",
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v2/users": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "List users",
        "description": "List users",
        "parameters": [
          {
            "name": "Skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "Take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "Public",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetUsers.Model"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v2/users/{safepayAccountId}": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get user",
        "description": "Get user",
        "parameters": [
          {
            "name": "safepayAccountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetUser.Model"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v2/users/{safepayAccountId}/banks": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "List banks",
        "description": "List banks.\r\n\r\nLists the banks available for bank account onboarding",
        "parameters": [
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetBanks.Model"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v2/users/{safepayAccountId}/bank-accounts": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "List bank accounts connected to user",
        "description": "List bank accounts connected to user                        ",
        "parameters": [
          {
            "name": "safepayAccountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetBankAccounts.Model"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v2/users/{safepayAccountId}/bank-accounts/initialize": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Initialize bank account onboarding",
        "description": "Initialize bank account onboarding.\r\n\r\nThis will generate a URL where the user will be validated and able to select bank accounts for the supplied BankId. If ReturnUrl is supplied, the user will be returned after bank account validation.\r\n\r\nThe user should be redirected to the returned URL.",
        "parameters": [
          {
            "name": "safepayAccountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InitializeBankAccount.Request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitializeBankAccount.Model"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "400": {
            "description": "Bad Request"
          }
        }
      },
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Results for bank account onboarding",
        "description": "Results for bank account onboarding.\r\n\r\nThis should be called this after the user has returned from bank account initialize. The result will include the bank accounts selected by the user.\r\n\r\nUse the BankAccountId to add given bank account to the user via /add endpoint.\r\n\r\nNotice: This is tempoary data, the results will only be available for a short time period.",
        "parameters": [
          {
            "name": "safepayAccountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitializeBankAccountResults.Model"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "400": {
            "description": "Bad Request"
          }
        }
      }
    },
    "/v2/users/{safepayAccountId}/bank-accounts/add": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Add bank account",
        "description": "Add bank account.\r\n\r\nUse the 'BankAccountId' from GET /initialize to add the specific bank account.\r\n\r\nNotice: Only the first bank account added will be marked as default.",
        "parameters": [
          {
            "name": "safepayAccountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddBankAccount.Request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found"
          },
          "400": {
            "description": "Bad Request"
          }
        }
      }
    },
    "/v2/users/{safepayAccountId}/bank-accounts/set-default": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Set bank account as default",
        "description": "Set bank account as default.\r\n\r\nDefault bank account will be used for payout.",
        "parameters": [
          {
            "name": "safepayAccountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetDefaultBankAccount.Request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v2/users/{safepayAccountId}/bank-accounts/delete": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Delete bank account",
        "description": "Delete bank account.\r\n\r\nThis will remove the bank account from the user.\r\n\r\nNotice: There must be at least one bank account connected.",
        "parameters": [
          {
            "name": "safepayAccountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteBankAccount.Request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v2/transactions": {
      "get": {
        "tags": [
          "Transactions"
        ],
        "summary": "List transactions",
        "description": "List all transactions",
        "parameters": [
          {
            "name": "Skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "Take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "Search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ReferenceId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetTransactions.Model"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v2/transactions/marketplace": {
      "post": {
        "tags": [
          "Transactions"
        ],
        "summary": "Create transaction",
        "description": "Initialize a new checkout flow for 'Marketplace' transaction.",
        "parameters": [
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTransactionMarketplace.Request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateTransactionMarketplace.Model"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          }
        }
      }
    },
    "/v2/transactions/auto": {
      "post": {
        "tags": [
          "Transactions"
        ],
        "summary": "Create transaction for Auto",
        "description": "Initialize a new checkout flow for a 'Auto' transaction.",
        "parameters": [
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTransactionAuto.Request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateTransactionAuto.Model"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          }
        }
      }
    },
    "/v2/transactions/{transactionId}": {
      "get": {
        "tags": [
          "Transactions"
        ],
        "summary": "Get transaction",
        "description": "Get transaction details",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetTransaction.Model"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v2/transactions/{transactionId}/delete": {
      "post": {
        "tags": [
          "Transactions"
        ],
        "summary": "Delete a transaction by 'transactionId'",
        "description": "Delete a transaction by 'transactionId'.\r\n\r\nThis is only allowed for transactions without payments. Look at 'Cancel transaction' to cancel transaction with payments.",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v2/transactions/{transactionId}/cancel": {
      "post": {
        "tags": [
          "Transactions"
        ],
        "summary": "Cancel a transaction",
        "description": "Cancel a transaction on behalf of Safepay Account.\r\n\r\nYou must supply a reason for the cancel request.\r\n\r\nPayments will be returned/refunded to Payer.\r\n\r\nSucceeded transactions can't be cancelled.",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReturnPayout.Request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v2/transactions/{transactionId}/payout": {
      "post": {
        "tags": [
          "Transactions"
        ],
        "summary": "Succeed a transaction by 'transactionId'",
        "description": "Succeed a transaction by 'transactionId'.\r\n\r\nThe transaction will be marked as succeeded and payouts defined in transaction will be scheduled for payout.\r\n\r\nCancelled transactions can't be processed for payout.",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReleasePayout.Request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v2/transactions/{transactionId}/update": {
      "post": {
        "tags": [
          "Transactions"
        ],
        "summary": "Update transaction",
        "description": "Updates modifiable transaction properties",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTransaction.Request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v2/transactions/{transactionId}/reimburse-payer": {
      "post": {
        "tags": [
          "Transactions"
        ],
        "summary": "Reimburse a payer for a transaction",
        "description": "Reimburses the payer of a transaction by the specified amount.\r\n\r\nThe payer will be identified from the transaction and reimbursed for the given amount.",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReimbursePayerEndpoint.Request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v2/transactions/{transactionId}/debt-information": {
      "post": {
        "tags": [
          "Transactions"
        ],
        "summary": "Add debt information to a transaction",
        "description": "Adds debt information to a transaction including documentation, amount, FIK code, and bank account details.\r\n\r\nMaximum file size: 10 MB. Accepted file types: PDF, JPG, JPEG, PNG, GIF, BMP, WEBP.",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AddDebtInformation.Request"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/AddDebtInformation.Request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v2/transactions/{transactionId}/debt-information/download": {
      "get": {
        "tags": [
          "Transactions"
        ],
        "summary": "Download debt document",
        "description": "Returns a temporary URL to download the debt document associated with a transaction. The URL is valid for 5 minutes.",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadDebtDocument.Model"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v2/transactions/{transactionId}/bill-of-sale": {
      "post": {
        "tags": [
          "Transactions"
        ],
        "summary": "Add or update bill of sale for a transaction",
        "description": "Add or update the bill of sale for an auto transaction.\r\n\r\nThree modes are supported (checked in order):\r\n- Enable=true: Auto-generate bill of sale from transaction data\r\n- Document: Upload a PDF file directly (max 10 MB)\r\n- Url: Provide URL to external PDF to download\r\n\r\nOnly available for Auto transactions.",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/AddBillOfSale.Request"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/AddBillOfSale.Request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v2/transactions/{transactionId}/change-amount": {
      "post": {
        "tags": [
          "Transactions"
        ],
        "summary": "Change amount",
        "description": "Allows changes to the transaction amount.\r\n\r\nThe amount must be equal or higher than the sum of costs for payee and/or split-payouts.\r\n\r\nChanges are not allowed after an payment has been authorized.\r\n\r\nFor Auto transactions: Changes to amount will generate a new bill of sale.",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangeAmount.Request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v2/transactions/{transactionId}/add-payee": {
      "post": {
        "tags": [
          "Transactions"
        ],
        "summary": "Add payee",
        "description": "Add a Payee to the transaction. This is not allowed if a Payee is already added.",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddPayee.Request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v2/transactions/{transactionId}/add-payer": {
      "post": {
        "tags": [
          "Transactions"
        ],
        "summary": "Add payer",
        "description": "Add a Payer to the transaction. This is not allowed if a Payer is already added.",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddPayer.Request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v2/payments": {
      "post": {
        "tags": [
          "Payments"
        ],
        "summary": "Creates a payment for transaction",
        "description": "Creates a new payment and attaches it to a transaction by 'transactionId'\r\n\r\nThe user should be redirected to the PaymentUrl to start a payment flow",
        "parameters": [
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePayment.Request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePayment.Response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v2/payments/{paymentId}/initialize": {
      "post": {
        "tags": [
          "Payments"
        ],
        "summary": "Initializes a payment link",
        "description": "Generates a new payment link for 'paymentId'\r\n\r\nThis endpoint can generate direct links to PSD2 and VippsMobilepay payment methods. \r\n\r\nIf no payment method is supplied, the user will be presented with UI for payment selection.\r\n\r\nThe user should be redirected to the PaymentUrl to start a payment flow",
        "parameters": [
          {
            "name": "paymentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InitializePayment.Request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitializePayment.Response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v2/webhooks/examples": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List webhook examples",
        "description": "List webhook examples\r\n\r\nExamples of all possible webhooks including payloads.",
        "parameters": [
          {
            "name": "X-Correlation-Id",
            "in": "header",
            "description": "Correlation ID used for logging.",
            "schema": {
              "maxLength": 64,
              "minLength": 20,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetWebhookExamples.Model"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AddBankAccount.Request": {
        "required": [
          "bankId",
          "bankAccountId"
        ],
        "type": "object",
        "properties": {
          "bankId": {
            "type": "string"
          },
          "bankAccountId": {
            "type": "string"
          }
        }
      },
      "AddBillOfSale.Request": {
        "type": "object",
        "properties": {
          "enable": {
            "type": "boolean",
            "description": "If true, auto-generate the bill of sale from transaction data.\r\nTakes precedence over Document and Url."
          },
          "document": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "description": "PDF file to upload. Used if Enable is false and no Document is provided.",
                "$ref": "#/components/schemas/IFormFile"
              }
            ]
          },
          "url": {
            "type": [
              "null",
              "string"
            ],
            "description": "URL to download the bill of sale from. Used if Enable is false and no Document is provided."
          },
          "additionalTerms": {
            "type": [
              "null",
              "string"
            ],
            "description": "Additional terms to include on the generated bill of sale."
          },
          "amount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "description": "Amount to show on the bill of sale. If not provided, uses the transaction amount.",
            "format": "double"
          },
          "requiredSigners": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/AutoInformation.AutoBillOfSale.Signers"
            },
            "description": "Which parties must sign. Defaults to both Payer and Payee.\r\nEmpty array means document is pre-signed."
          }
        }
      },
      "AddDebtInformation.Request": {
        "required": [
          "documentation",
          "amount"
        ],
        "type": "object",
        "properties": {
          "documentation": {
            "description": "Documentation for debt information\r\n\r\nSupported file types:\r\nPDF, JPG, JPEG, PNG, GIF, BMP, WEBP (max 10 MB)",
            "$ref": "#/components/schemas/IFormFile"
          },
          "amount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "fikCode": {
            "type": [
              "null",
              "string"
            ],
            "description": "FIK-number - +71 is the only supported type"
          },
          "bankAccount": {
            "type": [
              "null",
              "string"
            ],
            "description": "14 digits BBAN number or 18 digits IBAN number (without dashes or whitespaces)"
          },
          "bankAccountText": {
            "type": [
              "null",
              "string"
            ],
            "description": "Bank reference text that should be attached to the bank transfer"
          }
        }
      },
      "AddPayee.Request": {
        "type": "object",
        "properties": {
          "safepayAccountId": {
            "type": [
              "null",
              "string"
            ]
          },
          "referenceId": {
            "type": [
              "null",
              "string"
            ]
          },
          "phoneNumber": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AddPayer.Request": {
        "type": "object",
        "properties": {
          "safepayAccountId": {
            "type": [
              "null",
              "string"
            ]
          },
          "referenceId": {
            "type": [
              "null",
              "string"
            ]
          },
          "phoneNumber": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AutoInformation.AutoBillOfSale.Signers": {
        "enum": [
          "Payer",
          "Payee",
          "None"
        ]
      },
      "BankAccountType": {
        "enum": [
          "Bban",
          "Iban"
        ]
      },
      "ChangeAmount.Request": {
        "required": [
          "amount"
        ],
        "type": "object",
        "properties": {
          "amount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "payerFixedFee": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "payeeFixedFee": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "splitPayouts": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/CreateTransactionBase.Request.RequestSplitPayout"
            }
          }
        }
      },
      "CreateDocument.Model": {
        "required": [
          "documentId"
        ],
        "type": "object",
        "properties": {
          "documentId": {
            "type": "string"
          }
        }
      },
      "CreateDocument.Request": {
        "required": [
          "title",
          "document"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "document": {
            "$ref": "#/components/schemas/IFormFile"
          },
          "transactionId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CreateGuestUser.Model": {
        "required": [
          "safepayAccountId"
        ],
        "type": "object",
        "properties": {
          "safepayAccountId": {
            "type": "string"
          }
        }
      },
      "CreatePayment.Request": {
        "required": [
          "safepayAccountId",
          "transactionId"
        ],
        "type": "object",
        "properties": {
          "safepayAccountId": {
            "type": "string"
          },
          "transactionId": {
            "type": "string"
          },
          "amount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "returnUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "skipUI": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "CreatePayment.Response": {
        "required": [
          "paymentId",
          "paymentUrl"
        ],
        "type": "object",
        "properties": {
          "paymentId": {
            "type": "string"
          },
          "paymentUrl": {
            "type": "string"
          }
        }
      },
      "CreateTransactionAuto.Model": {
        "required": [
          "transactionId",
          "checkoutUrl"
        ],
        "type": "object",
        "properties": {
          "connectUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "transactionId": {
            "type": "string",
            "description": "Safepay Transaction Id"
          },
          "id": {
            "type": [
              "null",
              "string"
            ]
          },
          "checkoutUrl": {
            "type": "string",
            "description": "Checkout Url"
          }
        }
      },
      "CreateTransactionAuto.Request": {
        "required": [
          "amount"
        ],
        "type": "object",
        "properties": {
          "autoInformation": {
            "description": "Specific information for \"Auto\" transactions",
            "$ref": "#/components/schemas/CreateTransactionAuto.Request.RequestAutoInformation"
          },
          "amount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "description": "The amount of money the transaction should be based upon. The amount will be rounded to 2 decimals if more than two decimals are send.",
            "format": "double"
          },
          "currency": {
            "description": "The currency to use for the transaction and all related payments. If not specified the default is DKK.\r\n\r\nSupported: DKK, EUR",
            "$ref": "#/components/schemas/Currencies"
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "imageUrls": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "payeeId": {
            "type": [
              "null",
              "string"
            ],
            "description": "Safepay Account Id for payee"
          },
          "payerId": {
            "type": [
              "null",
              "string"
            ],
            "description": "Safepay Account Id for payer"
          },
          "payeeReferenceId": {
            "type": [
              "null",
              "string"
            ],
            "description": "Your payee reference. This is most likely your unique user id for the payee"
          },
          "payerReferenceId": {
            "type": [
              "null",
              "string"
            ],
            "description": "Your payer reference. This is most likely your unique user id for the payer"
          },
          "payeePhoneNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "payerPhoneNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "splitPayouts": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/CreateTransactionBase.Request.RequestSplitPayout"
            }
          },
          "payerFixedFee": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "description": "The fixed fee used to calculate the payees fee taken before payouts. This fee is the fixed fee and the agreed Safepay Nordic fixed fee will be taken from this value.",
            "format": "double"
          },
          "payeeFixedFee": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "description": "The fixed fee used to calculate the payers fee taken before payouts. This fee is the fixed fee and the agreed Safepay Nordic fixed fee will be taken from this value.",
            "format": "double"
          },
          "referenceId": {
            "type": [
              "null",
              "string"
            ]
          },
          "uniquenessKey": {
            "type": [
              "null",
              "string"
            ],
            "description": "The unique idempotency key for this transaction. There will only be at most one successful created transaction for this key"
          },
          "expectedCompletion": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "CreateTransactionAuto.Request.BillOfSale": {
        "type": "object",
        "properties": {
          "enable": {
            "type": "boolean",
            "description": "If true, Bill Of Sale PDF will automatically be generated and string? BillOfSale.Url is ignored"
          },
          "url": {
            "type": [
              "null",
              "string"
            ],
            "description": "URL to Bill of Sale, only used if bool BillOfSale.Enable is false"
          },
          "additionalTerms": {
            "type": [
              "null",
              "string"
            ],
            "description": "Additional terms to be displayed on the Bill of Sale PDF"
          },
          "documentId": {
            "type": [
              "null",
              "string"
            ],
            "description": "Id for the bill of sale document."
          },
          "requiredSigners": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/AutoInformation.AutoBillOfSale.Signers"
            },
            "description": "Specifies which parties are required to sign the Bill of Sale document.\r\nDefaults to both Payer (buyer) and Payee (seller).\r\nIf an empty array is supplied or the value 'none', the document will be marked as signed."
          }
        }
      },
      "CreateTransactionAuto.Request.Debt": {
        "type": "object",
        "properties": {
          "enable": {
            "type": "boolean",
            "description": "If true, Debt collection will be required by payee if not provided"
          }
        }
      },
      "CreateTransactionAuto.Request.RequestAutoInformation": {
        "type": "object",
        "properties": {
          "brand": {
            "type": [
              "null",
              "string"
            ]
          },
          "model": {
            "type": [
              "null",
              "string"
            ]
          },
          "year": {
            "type": [
              "null",
              "string"
            ]
          },
          "mileage": {
            "type": [
              "null",
              "string"
            ]
          },
          "registrationNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "vin": {
            "type": [
              "null",
              "string"
            ]
          },
          "retailAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "firstRegistration": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "billOfSale": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CreateTransactionAuto.Request.BillOfSale"
              }
            ]
          },
          "debt": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CreateTransactionAuto.Request.Debt"
              }
            ]
          }
        }
      },
      "CreateTransactionBase.Request.RequestSplitPayout": {
        "required": [
          "safepayAccountId",
          "amount",
          "bankReferenceText"
        ],
        "type": "object",
        "properties": {
          "safepayAccountId": {
            "type": "string"
          },
          "amount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "bankReferenceText": {
            "type": "string"
          },
          "fikCode": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ValueType<FikCode>"
              }
            ]
          },
          "bankAccount": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ValueType<BankAccountNumber>"
              }
            ]
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CreateTransactionMarketplace.Model": {
        "required": [
          "transactionId",
          "checkoutUrl"
        ],
        "type": "object",
        "properties": {
          "connectUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "transactionId": {
            "type": "string",
            "description": "Safepay Transaction Id"
          },
          "id": {
            "type": [
              "null",
              "string"
            ]
          },
          "checkoutUrl": {
            "type": "string",
            "description": "Checkout Url"
          }
        }
      },
      "CreateTransactionMarketplace.Request": {
        "required": [
          "payerId",
          "title",
          "amount"
        ],
        "type": "object",
        "properties": {
          "payerId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "payeeExtraFee": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "payerExtraFee": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "amount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "description": "The amount of money the transaction should be based upon. The amount will be rounded to 2 decimals if more than two decimals are send.",
            "format": "double"
          },
          "currency": {
            "description": "The currency to use for the transaction and all related payments. If not specified the default is DKK.\r\n\r\nSupported: DKK, EUR",
            "$ref": "#/components/schemas/Currencies"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "imageUrls": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "payeeId": {
            "type": [
              "null",
              "string"
            ],
            "description": "Safepay Account Id for payee"
          },
          "payeeReferenceId": {
            "type": [
              "null",
              "string"
            ],
            "description": "Your payee reference. This is most likely your unique user id for the payee"
          },
          "payerReferenceId": {
            "type": [
              "null",
              "string"
            ],
            "description": "Your payer reference. This is most likely your unique user id for the payer"
          },
          "payeePhoneNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "payerPhoneNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "splitPayouts": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/CreateTransactionBase.Request.RequestSplitPayout"
            }
          },
          "payerFixedFee": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "description": "The fixed fee used to calculate the payees fee taken before payouts. This fee is the fixed fee and the agreed Safepay Nordic fixed fee will be taken from this value.",
            "format": "double"
          },
          "payeeFixedFee": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "description": "The fixed fee used to calculate the payers fee taken before payouts. This fee is the fixed fee and the agreed Safepay Nordic fixed fee will be taken from this value.",
            "format": "double"
          },
          "referenceId": {
            "type": [
              "null",
              "string"
            ]
          },
          "uniquenessKey": {
            "type": [
              "null",
              "string"
            ],
            "description": "The unique idempotency key for this transaction. There will only be at most one successful created transaction for this key"
          },
          "expectedCompletion": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "Currencies": {
        "enum": [
          "DKK",
          "EUR"
        ]
      },
      "DeleteBankAccount.Request": {
        "required": [
          "bankId",
          "bankAccountId"
        ],
        "type": "object",
        "properties": {
          "bankId": {
            "type": "string"
          },
          "bankAccountId": {
            "type": "string"
          }
        }
      },
      "DownloadDebtDocument.Model": {
        "required": [
          "url"
        ],
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "Temporary URL to download the debt document. Valid for 5 minutes."
          }
        }
      },
      "GetBankAccounts.Model": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetBankAccounts.Model.UserBankAccount"
            }
          }
        }
      },
      "GetBankAccounts.Model.UserBankAccount": {
        "required": [
          "bank",
          "bankId",
          "bankAccountId",
          "bban",
          "iban",
          "accountName"
        ],
        "type": "object",
        "properties": {
          "bank": {
            "type": "string"
          },
          "bankId": {
            "type": "string"
          },
          "bankAccountId": {
            "type": "string"
          },
          "accountNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "bban": {
            "type": "string"
          },
          "iban": {
            "type": "string"
          },
          "accountName": {
            "type": "string"
          },
          "isDefault": {
            "type": "boolean"
          }
        }
      },
      "GetBanks.Model": {
        "required": [
          "banks"
        ],
        "type": "object",
        "properties": {
          "banks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetBanks.Model.BankModel"
            }
          }
        }
      },
      "GetBanks.Model.BankModel": {
        "required": [
          "bankId",
          "name",
          "bankCentral"
        ],
        "type": "object",
        "properties": {
          "bankId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "bankCentral": {
            "type": "string"
          }
        }
      },
      "GetConnect.Model": {
        "required": [
          "safepayAccountId",
          "connections"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "null",
              "string"
            ]
          },
          "safepayAccountId": {
            "type": "string"
          },
          "connections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetConnect.Model.UserReference"
            }
          }
        }
      },
      "GetConnect.Model.UserReference": {
        "required": [
          "referenceId"
        ],
        "type": "object",
        "properties": {
          "referenceId": {
            "type": "string"
          },
          "connected": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "GetDocument.Model": {
        "required": [
          "documentId"
        ],
        "type": "object",
        "properties": {
          "documentId": {
            "type": "string",
            "description": "Document Id"
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "signed": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "signers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetDocument.Model.Signer"
            }
          }
        }
      },
      "GetDocument.Model.Signer": {
        "required": [
          "safepayAccountId"
        ],
        "type": "object",
        "properties": {
          "safepayAccountId": {
            "type": "string",
            "description": "Safepay Account Id"
          },
          "referenceId": {
            "type": [
              "null",
              "string"
            ]
          },
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "signed": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "GetDocuments.Model": {
        "required": [
          "documents"
        ],
        "type": "object",
        "properties": {
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetDocuments.Model.Document"
            }
          }
        }
      },
      "GetDocuments.Model.Document": {
        "required": [
          "documentId"
        ],
        "type": "object",
        "properties": {
          "documentId": {
            "type": "string",
            "description": "Document Id"
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "signed": {
            "type": [
              "null",
              "string"
            ],
            "description": "Signed date - when the document was marked as signed",
            "format": "date-time"
          }
        }
      },
      "GetDocumentSignedOrPreviewUrl.Model": {
        "required": [
          "url"
        ],
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "If signed, URL for signed document is returned otherwise returns URL for document preview. URL is valid for 5 minutes."
          }
        }
      },
      "GetTransaction.Model": {
        "required": [
          "transactionId",
          "checkoutUrl",
          "paymentGuideUrl",
          "status",
          "fees"
        ],
        "type": "object",
        "properties": {
          "transactionId": {
            "type": "string",
            "description": "Transaction Id"
          },
          "checkoutUrl": {
            "type": "string"
          },
          "paymentGuideUrl": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "referenceId": {
            "type": [
              "null",
              "string"
            ]
          },
          "amount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "currency": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ValueType<Currencies>"
              }
            ]
          },
          "fees": {
            "$ref": "#/components/schemas/GetTransaction.Model.FeesModel"
          },
          "payee": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/GetTransaction.Model.UserAmountModel"
              }
            ]
          },
          "payer": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/GetTransaction.Model.UserAmountModel"
              }
            ]
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "payments": {
            "$ref": "#/components/schemas/GetTransaction.Model.PaymentsModel"
          },
          "autoInformation": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/GetTransaction.Model.AutoInformationModel"
              }
            ]
          },
          "expectedCompletion": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "GetTransaction.Model.AutoInformationModel": {
        "type": "object",
        "properties": {
          "brand": {
            "type": [
              "null",
              "string"
            ]
          },
          "vehicleIdentificationNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "registrationNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "year": {
            "type": [
              "null",
              "string"
            ]
          },
          "model": {
            "type": [
              "null",
              "string"
            ]
          },
          "retailAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "billOfSale": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/GetTransaction.Model.AutoInformationModel.BillOfSaleModel"
              }
            ]
          },
          "autoDebt": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/GetTransaction.Model.AutoInformationModel.AutoDebtModel"
              }
            ]
          }
        }
      },
      "GetTransaction.Model.AutoInformationModel.AutoDebtModel": {
        "type": "object",
        "properties": {
          "enable": {
            "type": "boolean"
          },
          "amount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "amountRegistered": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "creditors": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/GetTransaction.Model.AutoInformationModel.AutoDebtModel.AutoDebtName"
            }
          },
          "debtors": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/GetTransaction.Model.AutoInformationModel.AutoDebtModel.AutoDebtName"
            }
          },
          "fikCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "bankAccount": {
            "type": [
              "null",
              "string"
            ]
          },
          "bankAccountText": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "GetTransaction.Model.AutoInformationModel.AutoDebtModel.AutoDebtName": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "GetTransaction.Model.AutoInformationModel.BillOfSaleModel": {
        "type": "object",
        "properties": {
          "documentId": {
            "type": [
              "null",
              "string"
            ]
          },
          "signers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetTransaction.Model.AutoInformationModel.BillOfSaleModel.SignerModel"
            }
          },
          "signed": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "GetTransaction.Model.AutoInformationModel.BillOfSaleModel.SignerModel": {
        "required": [
          "safepayAccountId",
          "name",
          "signed"
        ],
        "type": "object",
        "properties": {
          "safepayAccountId": {
            "type": [
              "null",
              "string"
            ]
          },
          "name": {
            "type": "string"
          },
          "signed": {
            "type": "boolean"
          }
        }
      },
      "GetTransaction.Model.FeesModel": {
        "type": "object",
        "properties": {
          "payee": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "description": "Fee amount for Payee",
            "format": "double"
          },
          "payer": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "description": "Fee amount for Payer",
            "format": "double"
          },
          "tenant": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "safepay": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "GetTransaction.Model.PaymentModel": {
        "required": [
          "paymentId",
          "payer",
          "method",
          "amount",
          "status",
          "created"
        ],
        "type": "object",
        "properties": {
          "paymentId": {
            "type": "string",
            "description": "The ID for the payment"
          },
          "payer": {
            "description": "The user who made the payment",
            "$ref": "#/components/schemas/GetTransaction.Model.UserModel"
          },
          "method": {
            "type": "string",
            "description": "The payment method used"
          },
          "amount": {
            "description": "The amount of money paid",
            "$ref": "#/components/schemas/Money"
          },
          "status": {
            "type": "string",
            "description": "The status of the payment"
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "authorized": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "failed": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "GetTransaction.Model.PaymentsModel": {
        "type": "object",
        "properties": {
          "inbound": {
            "$ref": "#/components/schemas/GetTransaction.Model.PaymentsModel.PaymentsDetailsModel"
          }
        }
      },
      "GetTransaction.Model.PaymentsModel.PaymentsDetailsModel": {
        "type": "object",
        "properties": {
          "amount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "payments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetTransaction.Model.PaymentModel"
            }
          }
        }
      },
      "GetTransaction.Model.UserAmountModel": {
        "type": "object",
        "properties": {
          "amount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "description": "Payee: Amount for pay out - Payer: Amount to pay",
            "format": "double"
          },
          "safepayAccountId": {
            "type": [
              "null",
              "string"
            ],
            "description": "Safepay Account Id"
          },
          "referenceId": {
            "type": [
              "null",
              "string"
            ],
            "description": "Tenant supplied ReferenceId"
          },
          "name": {
            "type": [
              "null",
              "string"
            ],
            "description": "Name of the payee/payer"
          },
          "phoneNumber": {
            "type": [
              "null",
              "string"
            ],
            "description": "Phone number of the payee/payer"
          }
        }
      },
      "GetTransaction.Model.UserModel": {
        "type": "object",
        "properties": {
          "safepayAccountId": {
            "type": [
              "null",
              "string"
            ],
            "description": "Safepay Account Id"
          },
          "referenceId": {
            "type": [
              "null",
              "string"
            ],
            "description": "Tenant supplied ReferenceId"
          },
          "name": {
            "type": [
              "null",
              "string"
            ],
            "description": "Name of the payee/payer"
          },
          "phoneNumber": {
            "type": [
              "null",
              "string"
            ],
            "description": "Phone number of the payee/payer"
          }
        }
      },
      "GetTransactions.Model": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetTransactions.Model.TransactionModel"
            }
          },
          "count": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "GetTransactions.Model.AutoInformationModel": {
        "type": "object",
        "properties": {
          "brand": {
            "type": [
              "null",
              "string"
            ]
          },
          "vehicleIdentificationNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "registrationNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "year": {
            "type": [
              "null",
              "string"
            ]
          },
          "model": {
            "type": [
              "null",
              "string"
            ]
          },
          "billOfSale": {
            "type": "boolean"
          },
          "billOfSaleSigned": {
            "type": "boolean"
          },
          "retailAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "GetTransactions.Model.PaymentsModel": {
        "type": "object",
        "properties": {
          "inbound": {
            "$ref": "#/components/schemas/GetTransactions.Model.PaymentsModel.PaymentsDetailsModel"
          }
        }
      },
      "GetTransactions.Model.PaymentsModel.PaymentsDetailsModel": {
        "type": "object",
        "properties": {
          "amount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "GetTransactions.Model.TransactionModel": {
        "required": [
          "transactionId",
          "amount",
          "currency",
          "status",
          "created"
        ],
        "type": "object",
        "properties": {
          "transactionId": {
            "type": "string"
          },
          "amount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "currency": {
            "$ref": "#/components/schemas/Currencies"
          },
          "status": {
            "type": "string"
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "referenceId": {
            "type": [
              "null",
              "string"
            ]
          },
          "payee": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/GetTransactions.Model.UserModel"
              }
            ]
          },
          "payer": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/GetTransactions.Model.UserModel"
              }
            ]
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "autoInformation": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/GetTransactions.Model.AutoInformationModel"
              }
            ]
          },
          "payments": {
            "$ref": "#/components/schemas/GetTransactions.Model.PaymentsModel"
          },
          "expectedCompletion": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "GetTransactions.Model.UserModel": {
        "type": "object",
        "properties": {
          "safepayAccountId": {
            "type": [
              "null",
              "string"
            ],
            "description": "Safepay Account Id"
          },
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "phoneNumber": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "GetUser.Model": {
        "required": [
          "id",
          "safepayAccountId",
          "connections",
          "name",
          "kyc",
          "type"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Safepay Account Id"
          },
          "safepayAccountId": {
            "type": "string"
          },
          "connections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetUser.Model.UserReference"
            }
          },
          "name": {
            "type": "string"
          },
          "kyc": {
            "$ref": "#/components/schemas/GetUser.Model.UserKYC"
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "phoneNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "phoneNumberVerified": {
            "type": "boolean"
          },
          "dateOfBirth": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "cpr": {
            "type": [
              "null",
              "string"
            ]
          },
          "cvr": {
            "type": [
              "null",
              "string"
            ]
          },
          "address": {
            "type": [
              "null",
              "string"
            ]
          },
          "type": {
            "type": "string",
            "description": "'Business' or 'Private' or 'Guest'"
          }
        }
      },
      "GetUser.Model.UserKYC": {
        "type": "object",
        "properties": {
          "level": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "GetUser.Model.UserReference": {
        "required": [
          "referenceId"
        ],
        "type": "object",
        "properties": {
          "referenceId": {
            "type": "string"
          },
          "connected": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "GetUsers.Model": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetUsers.Model.UserModel"
            }
          }
        }
      },
      "GetUsers.Model.UserModel": {
        "required": [
          "safepayAccountId",
          "name",
          "created",
          "type"
        ],
        "type": "object",
        "properties": {
          "safepayAccountId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "phoneNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "phoneNumberVerified": {
            "type": "boolean"
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "type": {
            "type": "string"
          }
        }
      },
      "GetWebhookExamples.Model": {
        "required": [
          "user",
          "transaction"
        ],
        "type": "object",
        "properties": {
          "user": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserWebhook"
            }
          },
          "transaction": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransactionWebhook"
            }
          }
        }
      },
      "IFormFile": {
        "type": "string",
        "format": "binary"
      },
      "Initialize.Model": {
        "required": [
          "connectUrl"
        ],
        "type": "object",
        "properties": {
          "connectUrl": {
            "type": "string"
          }
        }
      },
      "Initialize.Request": {
        "type": "object",
        "properties": {
          "referenceId": {
            "type": [
              "null",
              "string"
            ]
          },
          "bankAccountOnboarding": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "returnUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "allowPrivate": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "allowBusiness": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "skipUI": {
            "type": [
              "null",
              "boolean"
            ],
            "description": "Skips Safepay UI - if set to true, then all UI/UX must be handled by the caller. All other Skip properties is ignored"
          },
          "skipPhoneNumber": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "skipEmail": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "skipBankAccount": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "skipKYC": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "skipKYB": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "InitializeBankAccount.Model": {
        "required": [
          "url"
        ],
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          }
        }
      },
      "InitializeBankAccount.Request": {
        "required": [
          "bankId",
          "returnUrl"
        ],
        "type": "object",
        "properties": {
          "bankId": {
            "type": "string"
          },
          "returnUrl": {
            "type": "string"
          },
          "psd2Type": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ValueType<Psd2Type>"
              }
            ]
          }
        }
      },
      "InitializeBankAccountResults.Model": {
        "required": [
          "bankId",
          "bankName",
          "bankCentral",
          "bankAccounts"
        ],
        "type": "object",
        "properties": {
          "bankId": {
            "type": "string"
          },
          "bankName": {
            "type": "string"
          },
          "bankCentral": {
            "type": "string"
          },
          "bankAccounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InitializeBankAccountResults.Model.BankAccountModel"
            }
          }
        }
      },
      "InitializeBankAccountResults.Model.BankAccountModel": {
        "required": [
          "bankAccountId"
        ],
        "type": "object",
        "properties": {
          "bankAccountId": {
            "type": "string"
          },
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "ownerName": {
            "type": [
              "null",
              "string"
            ]
          },
          "bban": {
            "type": [
              "null",
              "string"
            ]
          },
          "iban": {
            "type": [
              "null",
              "string"
            ]
          },
          "currency": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "InitializePayment.Request": {
        "type": "object",
        "properties": {
          "paymentMethod": {
            "type": [
              "null",
              "string"
            ],
            "description": "Available methods: psd2, bank, vippsmobilepay"
          },
          "bankId": {
            "type": [
              "null",
              "string"
            ],
            "description": "Only for use with payment method: bank"
          },
          "bankAccountId": {
            "type": [
              "null",
              "string"
            ],
            "description": "Only for use with payment method: psd2"
          },
          "returnUrl": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "InitializePayment.Response": {
        "required": [
          "paymentUrl"
        ],
        "type": "object",
        "properties": {
          "paymentUrl": {
            "type": "string"
          }
        }
      },
      "Money": {
        "type": "object",
        "properties": {
          "value": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "currency": {
            "type": "string"
          }
        }
      },
      "ReimbursePayerEndpoint.Request": {
        "required": [
          "amount"
        ],
        "type": "object",
        "properties": {
          "amount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "ReleasePayout.Request": {
        "required": [
          "safepayAccountId"
        ],
        "type": "object",
        "properties": {
          "safepayAccountId": {
            "type": "string"
          }
        }
      },
      "ReturnPayout.Request": {
        "required": [
          "safepayAccountId",
          "reason"
        ],
        "type": "object",
        "properties": {
          "safepayAccountId": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "SetDefaultBankAccount.Request": {
        "required": [
          "bankId",
          "bankAccountId"
        ],
        "type": "object",
        "properties": {
          "bankId": {
            "type": "string"
          },
          "bankAccountId": {
            "type": "string"
          }
        }
      },
      "SignDocument.Model": {
        "required": [
          "url"
        ],
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          }
        }
      },
      "SignDocument.Request": {
        "required": [
          "safepayAccountId"
        ],
        "type": "object",
        "properties": {
          "safepayAccountId": {
            "type": "string"
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "referenceId": {
            "type": [
              "null",
              "string"
            ]
          },
          "returnUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "allowPrivate": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "allowBusiness": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "TransactionWebhook": {
        "required": [
          "transactionId",
          "payee",
          "payer",
          "eventName",
          "eventDate"
        ],
        "type": "object",
        "properties": {
          "transactionId": {
            "type": "string"
          },
          "paymentId": {
            "type": [
              "null",
              "string"
            ]
          },
          "referenceId": {
            "type": [
              "null",
              "string"
            ]
          },
          "payee": {
            "$ref": "#/components/schemas/TransactionWebhook.TransactionWebhookUser"
          },
          "payer": {
            "$ref": "#/components/schemas/TransactionWebhook.TransactionWebhookUser"
          },
          "eventName": {
            "type": "string"
          },
          "eventDate": {
            "type": "string",
            "format": "date-time"
          },
          "webhookId": {
            "type": "string"
          }
        }
      },
      "TransactionWebhook.TransactionWebhookUser": {
        "required": [
          "safepayAccountId"
        ],
        "type": "object",
        "properties": {
          "safepayAccountId": {
            "type": "string"
          },
          "referenceId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UpdateTransaction.Request": {
        "type": "object",
        "properties": {
          "expectedCompletion": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "retailAmount": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "UserWebhook": {
        "required": [
          "safepayAccountId",
          "eventName",
          "eventDate"
        ],
        "type": "object",
        "properties": {
          "safepayAccountId": {
            "type": "string"
          },
          "connections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserWebhook.UserWebhookConnection"
            }
          },
          "eventName": {
            "type": "string"
          },
          "eventDate": {
            "type": "string",
            "format": "date-time"
          },
          "webhookId": {
            "type": "string"
          }
        }
      },
      "UserWebhook.UserWebhookConnection": {
        "required": [
          "referenceId"
        ],
        "type": "object",
        "properties": {
          "referenceId": {
            "type": "string"
          },
          "connected": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ValueType<BankAccountNumber>": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/BankAccountType"
          }
        }
      },
      "ValueType<Currencies>": {
        "enum": [
          "DKK",
          "EUR",
          null
        ]
      },
      "ValueType<FikCode>": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "identification": {
            "type": "string"
          },
          "controlCode": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "creditorCode": {
            "type": "string"
          }
        }
      },
      "ValueType<Psd2Type>": {
        "enum": [
          "Private",
          "Business",
          null
        ]
      }
    },
    "securitySchemes": {
      "API Key": {
        "type": "http",
        "description": "Authorization header using the Bearer scheme, e.g., ```Authorization: Bearer {API Key}```",
        "scheme": "bearer"
      }
    }
  },
  "security": [
    {
      "API Key": [ ]
    }
  ],
  "tags": [
    {
      "name": "Connect"
    },
    {
      "name": "Documents"
    },
    {
      "name": "Users"
    },
    {
      "name": "Transactions"
    },
    {
      "name": "Payments"
    },
    {
      "name": "Webhooks"
    }
  ]
}