{
  "openapi": "3.0.1",
  "x-stoplight": {
    "id": "ug91pl2h37xmd"
  },
  "info": {
    "title": "Banking",
    "version": "v1",
    "description": "Banking API for merchant account and transaction operations. All endpoints require a merchant session token passed via the `X-Session` header."
  },
  "paths": {
    "/accounting/v1/accounts": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get Merchant Accounts - related to the input session",
        "description": "Returns a paginated list of all accounts linked to the merchant identified by the session token.",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Page number (1-based). Defaults to the first page if omitted."
          },
          {
            "name": "size",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Number of accounts to return per page."
          },
          {
            "name": "X-Session",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Non-interactive merchant session token. Identifies the merchant whose accounts are returned.",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "required": true,
            "name": "X-Partner-Id",
            "description": "Partner identifier assigned during integration onboarding."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "X-Application-Id",
            "required": true,
            "description": "Application identifier assigned during integration onboarding."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiGatewayLibrary.Models.PaginatedList`1[Application.Common.Models.Account.Response.AccountResponseModel"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "items": [
                        {
                          "account_number": "50085063456",
                          "iban": "50085063456",
                          "currency": "EUR",
                          "name": "EUR Account",
                          "is_reserve": false,
                          "is_suspense_account": false
                        }
                      ],
                      "page": 1,
                      "page_size": 20,
                      "total_pages": 1,
                      "total_count": 2,
                      "has_previous_page": false,
                      "has_next_page": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "type": "string",
                      "title": "string",
                      "status": 0,
                      "detail": "string",
                      "instance": "string",
                      "errors": {
                        "property1": [
                          "string"
                        ],
                        "property2": [
                          "string"
                        ]
                      },
                      "property1": null,
                      "property2": null
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "type": "string",
                      "title": "string",
                      "status": 0,
                      "detail": "string",
                      "instance": "string",
                      "property1": null,
                      "property2": null
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "type": "string",
                      "title": "string",
                      "status": 0,
                      "detail": "string",
                      "instance": "string",
                      "property1": null,
                      "property2": null
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "type": "string",
                      "title": "string",
                      "status": 0,
                      "detail": "string",
                      "instance": "string",
                      "property1": null,
                      "property2": null
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "type": "string",
                      "title": "string",
                      "status": 0,
                      "detail": "string",
                      "instance": "string",
                      "property1": null,
                      "property2": null
                    }
                  }
                }
              }
            }
          }
        },
        "x-stoplight": {
          "id": "a67blgeayv8zo"
        },
        "requestBody": {
          "content": {}
        },
        "operationId": "get-merchant-accounts-related-to-the-input-session"
      },
      "parameters": []
    },
    "/accounting/v1/accounts/statements": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Generate Account Statement File",
        "description": "Generates and downloads an account statement file for the given account and date. The `date` field must be provided in `yyyy-MM-dd` format. Returns a file download (`application/octet-stream`).",
        "parameters": [
          {
            "name": "X-Session",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "Non-interactive merchant session token."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "X-Partner-Id",
            "required": true,
            "description": "Partner identifier assigned during integration onboarding."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "X-Application-Id",
            "required": true,
            "description": "Application identifier assigned during integration onboarding."
          }
        ],
        "requestBody": {
          "content": {
            "application/json; x-api-version=1": {
              "schema": {
                "$ref": "#/components/schemas/Application.Common.Models.Account.Request.AccountStatementRequestModel"
              },
              "examples": {
                "Example 1": {
                  "value": {
                    "account_number": "50085063456",
                    "document_type": "MT940MultiCash",
                    "date": "2024-01-15T00:00:00Z"
                  }
                }
              }
            },
            "text/json; x-api-version=1": {
              "schema": {
                "$ref": "#/components/schemas/Application.Common.Models.Account.Request.AccountStatementRequestModel"
              }
            },
            "application/*+json; x-api-version=1": {
              "schema": {
                "$ref": "#/components/schemas/Application.Common.Models.Account.Request.AccountStatementRequestModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Statement file download. Returns `application/octet-stream`. The filename is formatted as `daily_statement_{account_number}_{MM-dd}.txt`.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "": {
                      "type": "string",
                      "x-stoplight": {
                        "id": "6qvi81yr12vco"
                      },
                      "example": "\t :20:200111\n :25:50710731642\n :28:601\n :60F:C200309EUR12345,\n :62F:C200309EUR12345,\n :64:C200309EUR12345,"
                    }
                  }
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "": "\n:20:200111\n :25:50710731642\n :28:601\n :60F:C200309EUR12345,\n :62F:C200309EUR12345,\n :64:C200309EUR12345,"
                    }
                  }
                }
              }
            }
          }
        },
        "x-stoplight": {
          "id": "zmt23ot1oqfhr"
        },
        "operationId": "generate-account-statement-file-based-on-input-date"
      },
      "parameters": []
    },
    "/accounting/v1/accounts/{accountNumber}": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get Account Details by account number or IBAN",
        "description": "Returns detailed information about a single account, including its status, balance, and linked platform identifiers.",
        "operationId": "get-account-details-by-account-number",
        "x-stoplight": {
          "id": "q3r8vn2kpwxzy"
        },
        "parameters": [
          {
            "name": "accountNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The account number or IBAN of the account to retrieve."
          },
          {
            "name": "X-Session",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Non-interactive merchant session token."
          },
          {
            "name": "X-Partner-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Partner identifier assigned during integration onboarding."
          },
          {
            "name": "X-Application-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Application identifier assigned during integration onboarding."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.Common.Models.Account.Response.AccountDetailsResponseModel"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "status": "active",
                      "date_created": "2022-03-10T08:30:00Z",
                      "wallet_id": 100045,
                      "account_number": "50085063456",
                      "account_name": "EUR Account",
                      "modulr_id": "A21BX0001",
                      "modulr_currency": "EUR",
                      "balance": 1250.00,
                      "balance_sc": 1250.00,
                      "currency": "EUR"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "accountNumber",
          "in": "path",
          "required": true,
          "description": "The account number or IBAN of the account to retrieve."
        }
      ]
    },
    "/accounting/v1/transactions": {
      "get": {
        "tags": [
          "Transaction"
        ],
        "summary": "Get Merchant Transactions List",
        "description": "Returns a paginated, filtered list of transactions for the merchant. All filter parameters are optional and can be combined.",
        "parameters": [
          {
            "name": "start_trn_id",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Return only transactions with an internal ID greater than or equal to this value. Use the `id` from the last item of a previous response for efficient cursor-based iteration through large result sets."
          },
          {
            "name": "transaction_types",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated list of transaction type codes to filter by (e.g., `013,501`). If omitted, all transaction types are returned."
          },
          {
            "name": "sign",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Application.Common.Enums.TransactionSign"
            },
            "description": "Filter by transaction direction. `Credit` returns incoming transactions (funds received); `Debit` returns outgoing transactions (funds sent). If omitted, both directions are returned."
          },
          {
            "name": "from_date",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Return only transactions on or after this date/time (ISO 8601, e.g., `2024-01-01T00:00:00Z`)."
          },
          {
            "name": "to_date",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Return only transactions on or before this date/time (ISO 8601, e.g., `2024-01-31T23:59:59Z`)."
          },
          {
            "name": "account_number",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by a specific account number. Returns transactions across all merchant accounts if omitted."
          },
          {
            "name": "ruid",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by RUID (Reference Unique ID) — the merchant-assigned order identifier provided at payment creation time. Useful for matching transactions back to specific orders."
          },
          {
            "name": "order",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Application.Common.Enums.TransactionOrder"
            },
            "description": "Sort direction for results. `Ascending` returns oldest transactions first; `Descending` returns newest first."
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Page number (1-based)."
          },
          {
            "name": "size",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Number of transactions to return per page."
          },
          {
            "name": "X-Session",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "Non-interactive merchant session token."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "required": true,
            "name": "X-Partner-Id",
            "description": "Partner identifier assigned during integration onboarding."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "required": true,
            "name": "X-Application-Id",
            "description": "Application identifier assigned during integration onboarding."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.Common.Models.Base.PaginationListModel`1[Application.Common.Models.Transaction.Response.TransactionListResponseModel]"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "items": [
                        {
                          "id": 10474587,
                          "date": "2025-10-20T10:52:36",
                          "payment_reference": "POSA01525856ITL4",
                          "transaction_type": "013",
                          "transaction_currency": "EUR",
                          "transaction_amount": 0.88,
                          "original_currency": "EUR",
                          "original_amount": 0.22,
                          "sign": "Credit",
                          "reference_number": "REF1234567890",
                          "reference_number_type": "None",
                          "terminal_id": "80026232",
                          "serial_number": "N96N960WC15224",
                          "account_number": "50480563548",
                          "ruid": "string",
                          "billing_descriptor": "DEMO K300",
                          "pan": "*9766",
                          "description": "DEMO K300 - 000057 / Payment on TID 80025996, 0.88 EUR"
                        }
                      ],
                      "page": 0,
                      "page_size": 0,
                      "total_pages": 0,
                      "total_count": 0,
                      "has_previous_page": true,
                      "has_next_page": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "type": "string",
                      "title": "string",
                      "status": 0,
                      "detail": "string",
                      "instance": "string",
                      "errors": {
                        "property1": [
                          "string"
                        ],
                        "property2": [
                          "string"
                        ]
                      },
                      "property1": null,
                      "property2": null
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "type": "string",
                      "title": "string",
                      "status": 0,
                      "detail": "string",
                      "instance": "string",
                      "property1": null,
                      "property2": null
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "type": "string",
                      "title": "string",
                      "status": 0,
                      "detail": "string",
                      "instance": "string",
                      "property1": null,
                      "property2": null
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "type": "string",
                      "title": "string",
                      "status": 0,
                      "detail": "string",
                      "instance": "string",
                      "property1": null,
                      "property2": null
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "type": "string",
                      "title": "string",
                      "status": 0,
                      "detail": "string",
                      "instance": "string",
                      "property1": null,
                      "property2": null
                    }
                  }
                }
              }
            }
          }
        },
        "x-stoplight": {
          "id": "0mgqn2fw2rgdu"
        },
        "x-internal": false,
        "operationId": "get-merchant-transactions-list"
      },
      "parameters": []
    },
    "/accounting/v1/transactions/{payment_reference}": {
      "get": {
        "tags": [
          "Transaction"
        ],
        "summary": "Get Merchant Transaction Details based on Payment Reference",
        "description": "Returns full structured details for a single transaction. The response contains a `general` object with flags and type info, plus a `details` array of key-value pairs whose content varies by transaction type.",
        "parameters": [
          {
            "name": "payment_reference",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The unique payment reference of the transaction to retrieve (e.g., `POSA01525856ITL4`). This value is present on every item returned by the transaction list endpoint."
          },
          {
            "name": "X-Session",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "Non-interactive merchant session token."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "required": true,
            "name": "X-Partner-Id",
            "description": "Partner identifier assigned during integration onboarding."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "required": true,
            "name": "X-Application-Id",
            "description": "Application identifier assigned during integration onboarding."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application.Common.Models.Transaction.Response.TransactionDetailsResponseModel"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "general": {
                        "can_request_reversal": true,
                        "is_fee": false,
                        "is_reversal": false,
                        "transaction_type": "013"
                      },
                      "details": [
                        {
                          "label": "Payment from card",
                          "value": "2722"
                        },
                        {
                          "label": "Terminal ID",
                          "value": "80026232"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "type": "string",
                      "title": "string",
                      "status": 0,
                      "detail": "string",
                      "instance": "string",
                      "additionalProp1": "string",
                      "additionalProp2": "string",
                      "additionalProp3": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "type": "string",
                      "title": "string",
                      "status": 0,
                      "detail": "string",
                      "instance": "string",
                      "additionalProp1": "string",
                      "additionalProp2": "string",
                      "additionalProp3": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "type": "string",
                      "title": "string",
                      "status": 0,
                      "detail": "string",
                      "instance": "string",
                      "additionalProp1": "string",
                      "additionalProp2": "string",
                      "additionalProp3": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "type": "string",
                      "title": "string",
                      "status": 0,
                      "detail": "string",
                      "instance": "string",
                      "additionalProp1": "string",
                      "additionalProp2": "string",
                      "additionalProp3": "string"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "type": "string",
                      "title": "string",
                      "status": 0,
                      "detail": "string",
                      "instance": "string",
                      "additionalProp1": "string",
                      "additionalProp2": "string",
                      "additionalProp3": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "x-stoplight": {
          "id": "iypmt994ekbty"
        },
        "operationId": "get-merchant-transaction-details-based-on-payment-reference"
      },
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "payment_reference",
          "in": "path",
          "required": true,
          "description": "The unique payment reference of the transaction to retrieve."
        }
      ]
    },
    "/accounting/v1/transactions/multiple": {
      "get": {
        "tags": [
          "Transaction"
        ],
        "summary": "Get Multiple Merchant Transactions Details based on Payment References",
        "description": "Returns structured details for multiple transactions in a single request. Each item in the response array corresponds to one of the requested payment references.",
        "parameters": [
          {
            "name": "payment_references",
            "in": "query",
            "required": true,
            "schema": {
              "minLength": 1,
              "type": "string",
              "example": "POSA019251FTE01,POSA019251FYWTE02"
            },
            "description": "Comma-separated list of payment references to look up (e.g., `POSA019251FTE01,POSA019251FYWTE02`). Minimum 1 reference required."
          },
          {
            "name": "X-Session",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "Non-interactive merchant session token."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "X-Partner-Id",
            "required": true,
            "description": "Partner identifier assigned during integration onboarding."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "X-Application-Id",
            "required": true,
            "description": "Application identifier assigned during integration onboarding."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Application.Common.Models.Transaction.Response.MultipleTransactionsResponseModel"
                  }
                },
                "examples": {
                  "Example 1": {
                    "value": [
                      {
                        "payment_reference": "POSA019251FTE01",
                        "general": {
                          "can_request_reversal": true,
                          "is_fee": false,
                          "is_reversal": false,
                          "transaction_type": "013"
                        },
                        "details": [
                          {
                            "value": "2722",
                            "label": "Payment from card"
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "type": "string",
                      "title": "string",
                      "status": 0,
                      "detail": "string",
                      "instance": "string",
                      "additionalProp1": "string",
                      "additionalProp2": "string",
                      "additionalProp3": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "type": "string",
                      "title": "string",
                      "status": 0,
                      "detail": "string",
                      "instance": "string",
                      "additionalProp1": "string",
                      "additionalProp2": "string",
                      "additionalProp3": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "type": "string",
                      "title": "string",
                      "status": 0,
                      "detail": "string",
                      "instance": "string",
                      "additionalProp1": "string",
                      "additionalProp2": "string",
                      "additionalProp3": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "type": "string",
                      "title": "string",
                      "status": 0,
                      "detail": "string",
                      "instance": "string",
                      "additionalProp1": "string",
                      "additionalProp2": "string",
                      "additionalProp3": "string"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "type": "string",
                      "title": "string",
                      "status": 0,
                      "detail": "string",
                      "instance": "string",
                      "additionalProp1": "string",
                      "additionalProp2": "string",
                      "additionalProp3": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "x-stoplight": {
          "id": "way67sd35xrfq"
        },
        "operationId": "get-multiple-merchant-transactions-details-based-on-payment-references"
      },
      "parameters": []
    }
  },
  "components": {
    "schemas": {
      "Application.Common.Enums.AccountStatementDocumentType": {
        "enum": [
          "MT940MultiCash",
          "MT940SWIFT",
          "MT940Structured",
          "MT940StructuredWithIban"
        ],
        "type": "string",
        "description": "Output format for generated account statement files.\n\n- `MT940MultiCash` — MT940 format compatible with MultiCash banking software.\n- `MT940SWIFT` — Standard MT940 SWIFT message format.\n- `MT940Structured` — MT940 structured format with additional structured data fields.\n- `MT940StructuredWithIban` — MT940 structured format with the IBAN included in the output.",
        "x-stoplight": {
          "id": "8mw23qknqph2i"
        },
        "x-examples": {
          "Example 1": "MT940MultiCash"
        }
      },
      "Application.Common.Enums.AccountStatus": {
        "enum": [
          "active",
          "test",
          "selfOut",
          "executed",
          "restructured",
          "transferredInArgus",
          "closedByHolder",
          "closedByIssuer",
          "deleted",
          "reserved",
          "unknown"
        ],
        "type": "string",
        "description": "Current lifecycle status of an account.\n\n- `active` — Account is open and fully operational.\n- `test` — Account is in test/sandbox mode.\n- `selfOut` — Account has been self-closed by the holder.\n- `executed` — Account has been fully executed and settled.\n- `restructured` — Account has undergone restructuring.\n- `transferredInArgus` — Account was transferred to the Argus risk management system.\n- `closedByHolder` — Account was closed at the account holder's request.\n- `closedByIssuer` — Account was closed by the issuing institution.\n- `deleted` — Account has been deleted.\n- `reserved` — Account is reserved but not yet active.\n- `unknown` — Account status could not be determined.",
        "x-stoplight": {
          "id": "m9p4kn1vbwxyz"
        }
      },
      "Application.Common.Enums.ReferenceNumberType": {
        "enum": [
          "None",
          "ReferenceNumber",
          "InvoiceNumber",
          "ProductID",
          "ReservationNumber"
        ],
        "type": "string",
        "description": "Indicates what kind of merchant reference was associated with the transaction.\n\n- `None` — No reference number was provided.\n- `ReferenceNumber` — A generic merchant reference number.\n- `InvoiceNumber` — An invoice number.\n- `ProductID` — A product identifier.\n- `ReservationNumber` — A reservation or booking number.",
        "x-stoplight": {
          "id": "mofwxvp9rwbny"
        }
      },
      "Application.Common.Enums.TransactionOrder": {
        "enum": [
          "Ascending",
          "Descending"
        ],
        "type": "string",
        "description": "Sort direction for transaction list results.\n\n- `Ascending` — Return results oldest-first (earliest date first).\n- `Descending` — Return results newest-first (latest date first).",
        "x-stoplight": {
          "id": "5wnv2bejomwtr"
        }
      },
      "Application.Common.Enums.TransactionSign": {
        "enum": [
          "Credit",
          "Debit"
        ],
        "type": "string",
        "description": "Indicates the direction of a transaction relative to the merchant account.\n\n- `Credit` — Incoming transaction; funds were received into the account (e.g., a card payment).\n- `Debit` — Outgoing transaction; funds were sent out of the account (e.g., a fee or refund).",
        "x-stoplight": {
          "id": "0dv0y306k4xhk"
        }
      },
      "Application.Common.Models.Account.Request.AccountStatementRequestModel": {
        "required": [
          "account_number",
          "date",
          "document_type"
        ],
        "type": "object",
        "properties": {
          "account_number": {
            "minLength": 1,
            "type": "string",
            "description": "The account number for which to generate the statement."
          },
          "document_type": {
            "$ref": "#/components/schemas/Application.Common.Enums.AccountStatementDocumentType"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "description": "The date for which to generate the statement. Only the date portion is used (`yyyy-MM-dd`); the time component is ignored."
          }
        },
        "additionalProperties": false,
        "x-stoplight": {
          "id": "bjnovyprvrm8p"
        },
        "x-examples": {
          "Example 1": {
            "account_number": "50085063456",
            "document_type": "MT940MultiCash",
            "date": "2024-01-15T00:00:00Z"
          }
        }
      },
      "Application.Common.Models.Account.Response.AccountResponseModel": {
        "type": "object",
        "additionalProperties": false,
        "description": "Summary information for a merchant account.",
        "x-stoplight": {
          "id": "lqiqunqivl913"
        },
        "properties": {
          "account_number": {
            "type": "string",
            "example": "50085063456",
            "nullable": true,
            "description": "The account number used for transactions and statements."
          },
          "iban": {
            "type": "string",
            "example": "50085063456",
            "nullable": true,
            "description": "IBAN for the account. For some account types this equals `account_number`."
          },
          "currency": {
            "type": "string",
            "example": "EUR",
            "nullable": true,
            "description": "ISO 4217 currency code for the account (e.g., `EUR`, `GBP`)."
          },
          "name": {
            "type": "string",
            "example": "EUR Account",
            "nullable": true,
            "description": "Display name of the account as configured by the merchant."
          },
          "is_reserve": {
            "type": "boolean",
            "default": false,
            "description": "`true` if this is a reserve account — funds held by the platform as a security deposit and not available for immediate withdrawal."
          },
          "is_suspense_account": {
            "type": "boolean",
            "default": false,
            "description": "`true` if this is a suspense account used for temporary holds or pending settlements."
          }
        },
        "x-examples": {
          "Example 1": {
            "account_number": "50085063456",
            "iban": "50085063456",
            "currency": "EUR",
            "name": "EUR Account",
            "is_reserve": false,
            "is_suspense_account": false
          }
        }
      },
      "Application.Common.Models.Account.Response.AccountDetailsResponseModel": {
        "type": "object",
        "additionalProperties": false,
        "description": "Detailed information about a single merchant account.",
        "x-stoplight": {
          "id": "t7m2vn9kpwxzy"
        },
        "properties": {
          "status": {
            "$ref": "#/components/schemas/Application.Common.Enums.AccountStatus"
          },
          "date_created": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Date and time the account was created."
          },
          "wallet_id": {
            "type": "integer",
            "format": "int64",
            "nullable": true,
            "description": "Internal platform wallet identifier linked to this account."
          },
          "account_number": {
            "type": "string",
            "nullable": true,
            "description": "The account number."
          },
          "account_name": {
            "type": "string",
            "nullable": true,
            "description": "Display name of the account."
          },
          "modulr_id": {
            "type": "string",
            "nullable": true,
            "description": "Account identifier in the Modulr payment platform."
          },
          "modulr_currency": {
            "type": "string",
            "nullable": true,
            "description": "ISO 4217 currency code of the linked Modulr account."
          },
          "balance": {
            "type": "number",
            "format": "double",
            "nullable": true,
            "description": "Current available balance in `currency`."
          },
          "balance_sc": {
            "type": "number",
            "format": "double",
            "nullable": true,
            "description": "Current balance expressed in the settlement currency."
          },
          "currency": {
            "type": "string",
            "nullable": true,
            "description": "ISO 4217 currency code for this account (e.g., `EUR`)."
          }
        },
        "x-examples": {
          "Example 1": {
            "status": "active",
            "date_created": "2022-03-10T08:30:00Z",
            "wallet_id": 100045,
            "account_number": "50085063456",
            "account_name": "EUR Account",
            "modulr_id": "A21BX0001",
            "modulr_currency": "EUR",
            "balance": 1250.00,
            "balance_sc": 1250.00,
            "currency": "EUR"
          }
        }
      },
      "ApiGatewayLibrary.Models.PaginatedList`1[Application.Common.Models.Account.Response.AccountResponseModel": {
        "type": "object",
        "additionalProperties": false,
        "description": "Paginated list of accounts.",
        "x-stoplight": {
          "id": "en0dslccg8uhp"
        },
        "properties": {
          "items": {
            "type": "array",
            "nullable": true,
            "description": "The accounts on the current page.",
            "items": {
              "$ref": "#/components/schemas/Application.Common.Models.Account.Response.AccountResponseModel"
            }
          },
          "page": {
            "type": "integer",
            "x-stoplight": {
              "id": "otxn2r2e7qma3"
            },
            "description": "Current page number.",
            "example": 1
          },
          "page_size": {
            "type": "integer",
            "x-stoplight": {
              "id": "phgwzijccd2ez"
            },
            "description": "Number of items per page.",
            "example": 20
          },
          "total_pages": {
            "type": "integer",
            "x-stoplight": {
              "id": "0vzgjsblhcv88"
            },
            "description": "Total number of pages.",
            "example": 1
          },
          "total_count": {
            "type": "integer",
            "x-stoplight": {
              "id": "lrhv2hfoee5gj"
            },
            "description": "Total number of accounts across all pages.",
            "example": 2
          },
          "has_previous_page": {
            "type": "boolean",
            "x-stoplight": {
              "id": "i58cse37uet4w"
            },
            "description": "`true` if there is a page before the current one.",
            "default": false
          },
          "has_next_page": {
            "type": "boolean",
            "x-stoplight": {
              "id": "f78kk4nu8th9k"
            },
            "description": "`true` if there is a page after the current one.",
            "default": false
          }
        },
        "x-examples": {
          "Example 1": {
            "items": [
              {
                "account_number": "50085063456",
                "iban": "50085063456",
                "currency": "EUR",
                "name": "EUR Account",
                "is_reserve": false,
                "is_suspense_account": false
              }
            ],
            "page": 1,
            "page_size": 20,
            "total_pages": 1,
            "total_count": 2,
            "has_previous_page": false,
            "has_next_page": false
          }
        }
      },
      "Application.Common.Models.Base.PaginationListModel`1[Application.Common.Models.Transaction.Response.TransactionListResponseModel]": {
        "type": "object",
        "additionalProperties": false,
        "description": "Paginated list of transactions.",
        "x-stoplight": {
          "id": "0i7roa2kmar6w"
        },
        "properties": {
          "items": {
            "type": "array",
            "nullable": true,
            "description": "The transactions on the current page.",
            "items": {
              "$ref": "#/components/schemas/Application.Common.Models.Transaction.Response.TransactionListResponseModel"
            }
          },
          "page": {
            "type": "integer",
            "x-stoplight": {
              "id": "i6vgkh8dvol1g"
            },
            "description": "Current page number."
          },
          "page_size": {
            "type": "integer",
            "x-stoplight": {
              "id": "pkmxjd5j0qgcx"
            },
            "description": "Number of items per page."
          },
          "total_pages": {
            "type": "integer",
            "x-stoplight": {
              "id": "sbmph7b5ypain"
            },
            "description": "Total number of pages."
          },
          "total_count": {
            "type": "integer",
            "x-stoplight": {
              "id": "jx455wedo6ddw"
            },
            "description": "Total number of transactions across all pages."
          },
          "has_previous_page": {
            "type": "boolean",
            "x-stoplight": {
              "id": "vk47o8g05mbtv"
            },
            "description": "`true` if there is a page before the current one."
          },
          "has_next_page": {
            "type": "boolean",
            "x-stoplight": {
              "id": "cq5vn8by1udrv"
            },
            "description": "`true` if there is a page after the current one."
          }
        }
      },
      "Application.Common.Models.Transaction.Response.Base.GeneralDetails": {
        "type": "object",
        "additionalProperties": false,
        "description": "General flags and type information about a transaction.",
        "x-stoplight": {
          "id": "9ud4o9l0vj561"
        },
        "properties": {
          "can_request_reversal": {
            "type": "boolean",
            "default": true,
            "description": "`true` if a reversal can still be requested for this transaction."
          },
          "is_fee": {
            "type": "boolean",
            "default": true,
            "description": "`true` if this transaction is a platform fee charge rather than a card payment."
          },
          "is_reversal": {
            "type": "boolean",
            "default": true,
            "description": "`true` if this transaction is itself a reversal of an earlier transaction."
          },
          "transaction_type": {
            "type": "string",
            "example": "501",
            "nullable": true,
            "description": "Transaction type code that categorises the transaction (e.g., `013` for a card payment, `501` for a fee)."
          }
        },
        "x-examples": {
          "Example 1": {
            "can_request_reversal": true,
            "is_fee": false,
            "is_reversal": false,
            "transaction_type": "013"
          }
        }
      },
      "Application.Common.Models.Transaction.Response.Base.TransactionDetails": {
        "type": "object",
        "additionalProperties": false,
        "description": "A single key-value detail entry for a transaction. The full set of entries varies by transaction type.",
        "x-stoplight": {
          "id": "apb4s6pr2apnf"
        },
        "properties": {
          "value": {
            "type": "string",
            "example": "2722",
            "nullable": true,
            "description": "The detail value."
          },
          "label": {
            "type": "string",
            "example": "Payment from card",
            "nullable": true,
            "description": "Human-readable label describing what this detail represents."
          }
        },
        "x-examples": {
          "Example 1": {
            "value": "2722",
            "label": "Payment from card"
          }
        }
      },
      "Application.Common.Models.Transaction.Response.MultipleTransactionsResponseModel": {
        "type": "object",
        "description": "Detailed information for a single transaction, returned as part of a multiple-transaction lookup.",
        "properties": {
          "payment_reference": {
            "type": "string",
            "nullable": true,
            "description": "The payment reference this entry corresponds to."
          },
          "general": {
            "$ref": "#/components/schemas/Application.Common.Models.Transaction.Response.Base.GeneralDetails"
          },
          "details": {
            "type": "array",
            "nullable": true,
            "description": "Variable list of key-value detail entries for the transaction. Content varies by `transaction_type`.",
            "items": {
              "$ref": "#/components/schemas/Application.Common.Models.Transaction.Response.Base.TransactionDetails"
            }
          }
        },
        "additionalProperties": false,
        "x-stoplight": {
          "id": "31opspb7r21bf"
        }
      },
      "Application.Common.Models.Transaction.Response.TransactionDetailsResponseModel": {
        "type": "object",
        "description": "Full structured details for a single transaction.",
        "properties": {
          "general": {
            "$ref": "#/components/schemas/Application.Common.Models.Transaction.Response.Base.GeneralDetails"
          },
          "details": {
            "type": "array",
            "nullable": true,
            "description": "Variable list of key-value detail entries for the transaction. Content varies by `transaction_type`.",
            "items": {
              "$ref": "#/components/schemas/Application.Common.Models.Transaction.Response.Base.TransactionDetails"
            }
          }
        },
        "additionalProperties": false,
        "x-stoplight": {
          "id": "36vp2gb832weh"
        }
      },
      "Application.Common.Models.Transaction.Response.TransactionListResponseModel": {
        "type": "object",
        "additionalProperties": false,
        "description": "Summary information for a single transaction in a paginated list.",
        "x-stoplight": {
          "id": "sjuqdvvmyejv9"
        },
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "example": 10474587,
            "description": "Unique internal transaction ID. Can be used as `start_trn_id` in subsequent requests for cursor-based iteration."
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2025-10-20T10:52:36",
            "description": "Date and time the transaction occurred."
          },
          "payment_reference": {
            "type": "string",
            "example": "POSA01525856ITL4",
            "nullable": true,
            "description": "Unique platform-assigned payment reference. Use this value to retrieve full transaction details via the single or multiple detail endpoints."
          },
          "transaction_type": {
            "type": "string",
            "example": "013",
            "nullable": true,
            "description": "Transaction type code that categorises the transaction (e.g., `013` for a card payment, `501` for a fee)."
          },
          "transaction_currency": {
            "type": "string",
            "example": "EUR",
            "nullable": true,
            "description": "ISO 4217 currency code for the settled transaction amount."
          },
          "transaction_amount": {
            "type": "number",
            "format": "double",
            "example": 0.88,
            "description": "Amount settled in `transaction_currency`."
          },
          "original_currency": {
            "type": "string",
            "example": "EUR",
            "nullable": true,
            "description": "ISO 4217 currency code of the original card transaction before Dynamic Currency Conversion (DCC). Equals `transaction_currency` when no conversion occurred."
          },
          "original_amount": {
            "type": "number",
            "format": "double",
            "example": 0.22,
            "description": "Amount in `original_currency` before any DCC conversion."
          },
          "sign": {
            "$ref": "#/components/schemas/Application.Common.Enums.TransactionSign"
          },
          "reference_number": {
            "type": "string",
            "example": "REF1234567890",
            "nullable": true,
            "description": "Merchant-assigned reference number submitted with the original payment (e.g., an invoice or order ID). See `reference_number_type` for the reference category."
          },
          "reference_number_type": {
            "$ref": "#/components/schemas/Application.Common.Enums.ReferenceNumberType"
          },
          "terminal_id": {
            "type": "string",
            "example": "80026232",
            "nullable": true,
            "description": "Identifier of the POS terminal that processed the transaction."
          },
          "serial_number": {
            "type": "string",
            "example": "N96N960WC15224",
            "nullable": true,
            "description": "Serial number of the POS device."
          },
          "account_number": {
            "type": "string",
            "example": "50480563548",
            "nullable": true,
            "description": "Account number to which this transaction was settled."
          },
          "ruid": {
            "type": "string",
            "example": "ORDER-00123",
            "nullable": true,
            "description": "Merchant-assigned Reference Unique ID from the original payment request — typically an order identifier. Can be used to filter the transaction list via the `ruid` query parameter."
          },
          "billing_descriptor": {
            "type": "string",
            "example": "DEMO K300",
            "nullable": true,
            "description": "Merchant billing descriptor — the name that appears on the cardholder's bank statement."
          },
          "pan": {
            "type": "string",
            "example": "*9766",
            "nullable": true,
            "description": "Last 4 digits of the card used for the transaction, masked with an asterisk (e.g., `*9766`)."
          },
          "description": {
            "type": "string",
            "example": "DEMO K300 - 000057 / Payment on TID 80025996, 0.88 EUR",
            "nullable": true,
            "description": "Human-readable description of the transaction."
          }
        },
        "x-examples": {
          "Example 1": {
            "id": 10474587,
            "date": "2025-10-20T10:52:36",
            "payment_reference": "POSA01525856ITL4",
            "transaction_type": "013",
            "transaction_currency": "EUR",
            "transaction_amount": 0.88,
            "original_currency": "EUR",
            "original_amount": 0.22,
            "sign": "Credit",
            "reference_number": "REF1234567890",
            "reference_number_type": "None",
            "terminal_id": "80026232",
            "serial_number": "N96N960WC15224",
            "account_number": "50480563548",
            "ruid": "ORDER-00123",
            "billing_descriptor": "DEMO K300",
            "pan": "*9766",
            "description": "DEMO K300 - 000057 / Payment on TID 80025996, 0.88 EUR"
          }
        }
      },
      "Microsoft.AspNetCore.Mvc.ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "detail": {
            "type": "string"
          },
          "instance": {
            "type": "string"
          },
          "additionalProp1": {
            "type": "string"
          },
          "additionalProp2": {
            "type": "string"
          },
          "additionalProp3": {
            "type": "string"
          }
        },
        "x-examples": {
          "Example 1": {
            "type": "string",
            "title": "string",
            "status": 0,
            "detail": "string",
            "instance": "string",
            "additionalProp1": "string",
            "additionalProp2": "string",
            "additionalProp3": "string"
          }
        }
      },
      "Microsoft.AspNetCore.Mvc.ValidationProblemDetails": {
        "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails",
        "x-examples": {
          "Example 1": {
            "type": "string",
            "title": "string",
            "status": 0,
            "detail": "string",
            "instance": "string",
            "property1": null,
            "property2": null
          }
        },
        "description": "",
        "title": ""
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "security": [
    {
      "Bearer": []
    }
  ],
  "servers": [
    {
      "url": "https://demo-api-gateway.mypos.com",
      "description": "Demo"
    },
    {
      "url": "https://api-gateway.mypos.com",
      "description": "Prod"
    }
  ],
  "x-Session": null
}
