{
  "openapi": "3.1.1",
  "info": {
    "title": "Payments Internal",
    "description": "Payments internal API endpoints. These endpoint are used to either mend broken payments, work with payment configurations or work with kafka errors.",
    "termsOfService": "https://developer.entur.no/terms-of-service",
    "contact": {
      "name": "Entur",
      "url": "https://developer.entur.org"
    },
    "version": "2026.11.7"
  },
  "servers": [
    {
      "url": "https://api.entur.io/sales",
      "description": "Entur's Production environment"
    },
    {
      "url": "https://api.staging.entur.io/sales",
      "description": "Entur's Staging environment"
    },
    {
      "url": "https://api.dev.entur.io/sales/v1",
      "description": "Entur's Development environment"
    }
  ],
  "security": [
    {
      "jwt": []
    }
  ],
  "tags": [
    {
      "name": "Payment Mending",
      "description": "Repair a payment transaction and recover or deactivate a credit transaction."
    },
    {
      "name": "Payment Search",
      "description": "Look up payments by any known identifier."
    },
    {
      "name": "Credit Search",
      "description": "Look up credits by any known identifier."
    },
    {
      "name": "Transaction Search",
      "description": "Look up payment transactions by any known identifier, and fetch a transaction's data at the payment provider."
    },
    {
      "name": "Payment Aggregate",
      "description": "Fetch a single payment together with its linked credits and a computed cross-domain summary."
    },
    {
      "name": "Payment Configuration",
      "description": "Manage payment configurations: the credentials and settings for an account at a payment provider."
    },
    {
      "name": "Payment Method",
      "description": "Manage payment methods: which payment types a distribution channel offers, and the payment configuration each one uses."
    },
    {
      "name": "Kafka",
      "description": "Fetch and delete kafka errors (Events that failed in publishing step). Also attempt resending kafka events that failed."
    },
    {
      "name": "Partner",
      "description": "List partners derived from payment method configuration."
    }
  ],
  "paths": {
    "/v1/credits/{creditId}/transactions/{transactionId}/recover": {
      "put": {
        "tags": [
          "Payment Mending"
        ],
        "summary": "Manual failure recovery for a credit transaction",
        "description": "Sets the requestId of the credit transaction provided. The requestId is an idempotency key used against external payment providers to be able to retry transaction without side-effects.",
        "operationId": "updateCreditTransactionForFailureRecovery",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreditTransactionFailureRecovery"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Ok",
            "content": {
              "application/hal+json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/notFound"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/dciHeader"
        },
        {
          "$ref": "#/components/parameters/posHeader"
        },
        {
          "$ref": "#/components/parameters/creditIdPathParam"
        },
        {
          "$ref": "#/components/parameters/transactionIdPathParam"
        },
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/credits/{creditId}/deactivate": {
      "post": {
        "tags": [
          "Payment Mending"
        ],
        "summary": "Deactivates payment.",
        "description": "Deactivates a credit and returns the altered credit entity. A credit cannot be deactivated once any of its payment transactions has been credited (409 Conflict). If it is partially credited, execute it again to credit the rest.",
        "operationId": "deactivateCredit",
        "responses": {
          "200": {
            "description": "Ok",
            "content": {
              "application/hal+json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "404": {
            "$ref": "#/components/responses/notFound"
          },
          "409": {
            "$ref": "#/components/responses/conflict"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          },
          "501": {
            "$ref": "#/components/responses/notImplemented"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/dciHeader"
        },
        {
          "$ref": "#/components/parameters/posHeader"
        },
        {
          "$ref": "#/components/parameters/creditIdPathParam"
        },
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/kafka-errors": {
      "get": {
        "tags": [
          "Kafka"
        ],
        "summary": "Get all Kafka Errors",
        "description": "Returns all Kafka Errors from the Kafka Error table.",
        "operationId": "getAllKafkaErrors",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/hal+json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/KafkaErrorResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "404": {
            "$ref": "#/components/responses/notFound"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/kafka-errors/{id}": {
      "delete": {
        "tags": [
          "Kafka"
        ],
        "summary": "Remove Kafka Error",
        "description": "Delete the specific Kafka Error from the table.",
        "operationId": "removeKafkaError",
        "parameters": [
          {
            "$ref": "#/components/parameters/kafkaErrorPathParam"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/noContent"
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "404": {
            "$ref": "#/components/responses/notFound"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/kafka-errors/{id}/resend": {
      "put": {
        "tags": [
          "Kafka"
        ],
        "summary": "Resend Kafka Error",
        "description": "Try to send the specific Kafka Error message once more.",
        "operationId": "resendKafkaError",
        "parameters": [
          {
            "$ref": "#/components/parameters/kafkaErrorPathParam"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "404": {
            "$ref": "#/components/responses/notFound"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/payments/{paymentId}/transactions/{transactionId}/resend": {
      "put": {
        "tags": [
          "Kafka"
        ],
        "summary": "Resend PaymentEvents for PaymentTransction",
        "description": "Try to send the the events for a PaymentTransaction once more.",
        "operationId": "resendEventsForPaymentTransaction",
        "parameters": [
          {
            "$ref": "#/components/parameters/paymentIdPathParam"
          },
          {
            "$ref": "#/components/parameters/transactionIdPathParam"
          }
        ],
        "responses": {
          "204": {
            "description": "PaymentEvents successfully sent"
          },
          "404": {
            "$ref": "#/components/responses/notFound"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/payment-configurations": {
      "get": {
        "tags": [
          "Payment Configuration"
        ],
        "summary": "Find all Payment Configurations.",
        "description": "Find all Payment Configurations.",
        "operationId": "findPaymentConfigurations",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/hal+json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PaymentConfigurationResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "404": {
            "$ref": "#/components/responses/notFound"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "post": {
        "tags": [
          "Payment Configuration"
        ],
        "summary": "Create new Payment Configuration.",
        "description": "Creates a new Payment Configuration.",
        "operationId": "createNewPaymentConfiguration",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentConfigurationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/hal+json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentConfigurationResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "404": {
            "$ref": "#/components/responses/notFound"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/payment-configurations/webhooks": {
      "post": {
        "tags": [
          "Payment Configuration"
        ],
        "summary": "Register Webhooks",
        "description": "Register webhooks for the Vipps Epayment API",
        "operationId": "registerWebhook",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookRegistration"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/hal+json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentConfigurationResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "delete": {
        "tags": [
          "Payment Configuration"
        ],
        "summary": "Delete webhook",
        "description": "Delete webhook from merchant config and the Vipps Webhooks API",
        "operationId": "deleteWebhook",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookDeletion"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "$ref": "#/components/responses/noContent"
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/payment-configurations/webhooks/{merchantSerialNumber}": {
      "get": {
        "tags": [
          "Payment Configuration"
        ],
        "summary": "Get registered webhooks",
        "description": "Gets all registered webhooks for a merchant serial number",
        "operationId": "getWebhooks",
        "parameters": [
          {
            "name": "merchantSerialNumber",
            "in": "path",
            "description": "Merchant serial number (MSN) identifying the merchant configuration.",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": "707070"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/hal+json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhooks"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/payment-configurations/{id}": {
      "get": {
        "tags": [
          "Payment Configuration"
        ],
        "summary": "Find Payment Configuration.",
        "description": "Find a Payment Configuration by id.",
        "operationId": "findPaymentConfiguration",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/hal+json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentConfigurationResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "404": {
            "$ref": "#/components/responses/notFound"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "put": {
        "tags": [
          "Payment Configuration"
        ],
        "summary": "Update Payment Configuration",
        "description": "Updates all fields of a Payment Configuration to the corresponding field from the Payment Configuration Request",
        "operationId": "updatePaymentConfiguration",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentConfigurationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/hal+json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentConfigurationResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "404": {
            "$ref": "#/components/responses/notFound"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "delete": {
        "tags": [
          "Payment Configuration"
        ],
        "summary": "Remove Payment Configuration",
        "description": "Removes the specified Payment Configuration by its id.",
        "operationId": "removePaymentConfiguration",
        "responses": {
          "204": {
            "$ref": "#/components/responses/noContent"
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "404": {
            "$ref": "#/components/responses/notFound"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/paymentConfigurationIdPathParam"
        },
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/payment-configurations/{id}/active-subscription-key": {
      "put": {
        "tags": [
          "Payment Configuration"
        ],
        "summary": "Set active Vipps subscription key",
        "description": "Sets which of the primary and secondary subscription keys is used for calls to Vipps. Only valid for Vipps payment configurations.",
        "operationId": "updateActiveSubscriptionKey",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ActiveSubscriptionKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/hal+json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentConfigurationResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "404": {
            "$ref": "#/components/responses/notFound"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/paymentConfigurationIdPathParam"
        },
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/payment-configurations/payment-providers": {
      "get": {
        "tags": [
          "Payment Configuration"
        ],
        "summary": "Get all payment providers",
        "description": "Returns a list of all payment providers Entur is integrating with.",
        "operationId": "getPaymentProviders",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/hal+json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "examples": {
                  "default": {
                    "value": [
                      "VIPPS",
                      "NETAXEPT",
                      "NETS",
                      "XLEDGER"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "404": {
            "$ref": "#/components/responses/notFound"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/payment-configurations/search": {
      "get": {
        "tags": [
          "Payment Configuration"
        ],
        "summary": "Search for Payment Configurations",
        "description": "Search parameters are cumulative, meaning they filter with AND, not OR",
        "operationId": "searchForPaymentConfigurations",
        "parameters": [
          {
            "name": "accountName",
            "in": "query",
            "description": "Search by Account Name",
            "required": false,
            "style": "form",
            "explode": true,
            "allowReserved": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "examples": {
              "equals without operator": {
                "summary": "When operation is omitted it is treated as equals.",
                "value": [
                  "Entur Web"
                ]
              },
              "equals": {
                "value": [
                  "eq:Entur Web"
                ]
              },
              "not equals": {
                "value": [
                  "ne:Entur Web"
                ]
              }
            }
          },
          {
            "name": "id",
            "in": "query",
            "description": "Search by ID",
            "required": false,
            "style": "form",
            "explode": true,
            "allowReserved": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "examples": {
              "equals without operator": {
                "summary": "When operation is omitted it is treated as equals.",
                "value": [
                  "1"
                ]
              },
              "equals": {
                "value": [
                  "eq:1"
                ]
              },
              "not equals": {
                "value": [
                  "ne:1"
                ]
              }
            }
          },
          {
            "$ref": "#/components/parameters/paginationPageParam"
          },
          {
            "name": "paymentProvider",
            "in": "query",
            "description": "Search by Payment Provider",
            "required": false,
            "style": "form",
            "explode": true,
            "allowReserved": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "examples": {
              "equals without operator": {
                "summary": "When operation is omitted it is treated as equals.",
                "value": [
                  "NETAXEPT"
                ]
              },
              "equals": {
                "value": [
                  "eq:NETAXEPT"
                ]
              },
              "not equals": {
                "value": [
                  "ne:NETAXEPT"
                ]
              }
            }
          },
          {
            "$ref": "#/components/parameters/paginationPerPageParam"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/hal+json": {
                "schema": {
                  "$ref": "#/components/schemas/PageOfPaymentConfigurationResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "404": {
            "$ref": "#/components/responses/notFound"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/payments/{paymentId}/transactions/{transactionId}/credit": {
      "post": {
        "tags": [
          "Payment Mending"
        ],
        "summary": "Credit the transaction.",
        "description": "Credits the specified transaction with the supplied amount. If the amount is left out, the amount is considered to be the full amount captured. Once the transaction is fully credited, the state will be updated to CREDITED, and the transaction cannot be credited further. This operation can be seen in the operation log of the transaction as CREDIT.",
        "operationId": "creditTransaction",
        "responses": {
          "204": {
            "$ref": "#/components/responses/noContent"
          },
          "404": {
            "$ref": "#/components/responses/notFound"
          },
          "409": {
            "$ref": "#/components/responses/conflict"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          },
          "501": {
            "$ref": "#/components/responses/notImplemented"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/dciHeader"
        },
        {
          "$ref": "#/components/parameters/posHeader"
        },
        {
          "$ref": "#/components/parameters/paymentIdPathParam"
        },
        {
          "$ref": "#/components/parameters/transactionIdPathParam"
        },
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/payments/{paymentId}/transactions/{transactionId}/payment-provider-data": {
      "get": {
        "tags": [
          "Transaction Search"
        ],
        "summary": "Get information about a singular transaction from the payment provider.",
        "description": "Returns information about the transaction from the payment provider. Useful if you want to check i.e. the status of the transaction with the payment provider without logging into an admin portal.",
        "operationId": "getPaymentProviderDataForTransaction",
        "parameters": [
          {
            "$ref": "#/components/parameters/paymentIdPathParam"
          },
          {
            "$ref": "#/components/parameters/transactionIdPathParam"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok",
            "content": {
              "application/hal+json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentProviderTransactionResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/notFound"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/payments/{paymentId}/aggregate": {
      "get": {
        "tags": [
          "Payment Aggregate"
        ],
        "summary": "Get an aggregated view of a single payment.",
        "description": "Returns the payment, the credits linked to it, and a computed cross-domain summary in one response. Intended for drill-down on a payment id that is already known; use the payment and credit search endpoints to find ids.",
        "operationId": "getAggregatedPayment",
        "parameters": [
          {
            "$ref": "#/components/parameters/paymentIdPathParam"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok",
            "content": {
              "application/hal+json": {
                "schema": {
                  "$ref": "#/components/schemas/AggregatedPaymentResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "payment": {
                        "orderId": "HE8NDS7XY",
                        "orderVersion": 1,
                        "paymentId": 123,
                        "totalAmount": "450.00",
                        "currency": "NOK",
                        "organisationId": 1,
                        "createdAt": "2025-01-12T16:13:13Z"
                      },
                      "credits": [],
                      "summary": {
                        "totalAmount": "450.00",
                        "capturedAmount": "450.00",
                        "creditedAmount": "0.00",
                        "remainingAmountToCapture": "0.00",
                        "remainingAmountToCredit": "450.00",
                        "currency": "NOK",
                        "transactionCount": 1,
                        "creditCount": 0
                      },
                      "warnings": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "404": {
            "$ref": "#/components/responses/notFound"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/payment-methods": {
      "post": {
        "tags": [
          "Payment Method"
        ],
        "summary": "Create new Payment Method.",
        "description": "Creates new Payment Method based on specified input parameters.",
        "operationId": "createNewPaymentMethod",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentMethodRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/hal+json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentMethodResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "404": {
            "$ref": "#/components/responses/notFound"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/payment-methods/{id}": {
      "get": {
        "tags": [
          "Payment Method"
        ],
        "summary": "Find Payment Method.",
        "description": "Finds the given Payment Method by its id.",
        "operationId": "findPaymentMethod",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/hal+json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentMethodResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "404": {
            "$ref": "#/components/responses/notFound"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "put": {
        "tags": [
          "Payment Method"
        ],
        "summary": "Update Payment Method.",
        "description": "Updates all fields of a Payment Method to the corresponding field from the Payment Method Request.",
        "operationId": "updatePaymentMethod",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentMethodRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/hal+json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentMethodResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "404": {
            "$ref": "#/components/responses/notFound"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "delete": {
        "tags": [
          "Payment Method"
        ],
        "summary": "Remove Payment Method.",
        "description": "Removes a Payment Method by its id.",
        "operationId": "removePaymentMethod",
        "responses": {
          "204": {
            "$ref": "#/components/responses/noContent"
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "404": {
            "$ref": "#/components/responses/notFound"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/paymentMethodIdPathParam"
        },
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/payment-methods/payment-type-groups": {
      "get": {
        "tags": [
          "Payment Method"
        ],
        "summary": "Returns all payment type groups",
        "description": "Finds and returns all payment type groups",
        "operationId": "getAllPaymentTypeGroups",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/hal+json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "examples": {
                  "default": {
                    "value": [
                      "PAYMENTCARD",
                      "MOBILE",
                      "INVOICE",
                      "GIFTCARD"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "404": {
            "$ref": "#/components/responses/notFound"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/payment-methods/payment-types": {
      "get": {
        "tags": [
          "Payment Method"
        ],
        "summary": "Returns all payment types",
        "description": "Finds and returns all payment types.",
        "operationId": "getAllPaymentTypes",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/hal+json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "examples": {
                  "default": {
                    "value": [
                      "VISA",
                      "MASTERCARD",
                      "VIPPS",
                      "GIFTCARD"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "404": {
            "$ref": "#/components/responses/notFound"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/payment-methods/{id}/restore": {
      "put": {
        "tags": [
          "Payment Method"
        ],
        "summary": "Restore Payment Method.",
        "description": "Restore a Payment Method by its id.",
        "operationId": "restorePaymentMethod",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/hal+json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentMethodResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "404": {
            "$ref": "#/components/responses/notFound"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/paymentMethodIdPathParam"
        },
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/payment-methods/options": {
      "get": {
        "tags": [
          "Payment Method"
        ],
        "summary": "Payment methods that can be set up on a distribution channel.",
        "description": "Returns the payment methods that can still be set up on the distribution channel, whether each needs a payment configuration, and the merchant config fields of each payment provider.",
        "operationId": "getPaymentMethodOptions",
        "parameters": [
          {
            "name": "distributionChannelId",
            "in": "query",
            "description": "The distribution channel to set up payment methods on.",
            "required": true,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": "ENT:DistributionChannel:Web"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/hal+json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentMethodOptionsResponse"
                },
                "examples": {
                  "nothing-set-up": {
                    "summary": "Nothing is set up on the distribution channel yet",
                    "value": {
                      "distributionChannelId": "ENT:DistributionChannel:Web",
                      "offers": [
                        {
                          "paymentTypeGroup": "PAYMENTCARD",
                          "paymentType": "VISA",
                          "paymentProvider": "NETAXEPT",
                          "paymentConfiguration": "REQUIRED",
                          "onlyForCredits": false
                        },
                        {
                          "paymentTypeGroup": "PAYMENTCARD",
                          "paymentType": "MASTERCARD",
                          "paymentProvider": "NETAXEPT",
                          "paymentConfiguration": "REQUIRED",
                          "onlyForCredits": false
                        },
                        {
                          "paymentTypeGroup": "MOBILE",
                          "paymentType": "VIPPS",
                          "paymentProvider": "VIPPS",
                          "paymentConfiguration": "REQUIRED",
                          "onlyForCredits": false
                        }
                      ],
                      "providers": [
                        {
                          "paymentProvider": "NETAXEPT",
                          "fields": [
                            {
                              "name": "merchantId",
                              "type": "STRING",
                              "required": true
                            },
                            {
                              "name": "token",
                              "type": "STRING",
                              "required": true
                            },
                            {
                              "name": "force3DSecure",
                              "type": "BOOLEAN",
                              "required": true
                            }
                          ],
                          "defaults": {
                            "force3DSecure": true
                          }
                        },
                        {
                          "paymentProvider": "VIPPS",
                          "fields": [
                            {
                              "name": "merchantSerialNumber",
                              "type": "STRING",
                              "required": true
                            },
                            {
                              "name": "clientId",
                              "type": "STRING",
                              "required": true
                            },
                            {
                              "name": "clientSecret",
                              "type": "STRING",
                              "required": true
                            },
                            {
                              "name": "primarySubscriptionKey",
                              "type": "STRING",
                              "required": true
                            },
                            {
                              "name": "secondarySubscriptionKey",
                              "type": "STRING",
                              "required": true
                            },
                            {
                              "name": "activeSubscriptionKey",
                              "type": "ENUM",
                              "required": false,
                              "values": [
                                "PRIMARY",
                                "SECONDARY"
                              ]
                            },
                            {
                              "name": "isApp",
                              "type": "BOOLEAN",
                              "required": true
                            }
                          ],
                          "defaults": {}
                        }
                      ]
                    }
                  },
                  "provider-already-set-up": {
                    "summary": "Visa is set up: the other cards use its payment configuration",
                    "value": {
                      "distributionChannelId": "ENT:DistributionChannel:Web",
                      "offers": [
                        {
                          "paymentTypeGroup": "PAYMENTCARD",
                          "paymentType": "MASTERCARD",
                          "paymentProvider": "NETAXEPT",
                          "paymentConfiguration": "REQUIRED",
                          "sharedPaymentConfigurationId": 42,
                          "onlyForCredits": false
                        }
                      ],
                      "providers": [
                        {
                          "paymentProvider": "NETAXEPT",
                          "fields": [
                            {
                              "name": "merchantId",
                              "type": "STRING",
                              "required": true
                            },
                            {
                              "name": "token",
                              "type": "STRING",
                              "required": true
                            },
                            {
                              "name": "force3DSecure",
                              "type": "BOOLEAN",
                              "required": true
                            }
                          ],
                          "defaults": {
                            "force3DSecure": true
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "404": {
            "$ref": "#/components/responses/notFound"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/payment-methods/setup": {
      "post": {
        "tags": [
          "Payment Method"
        ],
        "summary": "Set up payment methods on a distribution channel.",
        "description": "Creates one or more payment methods paid through the same payment provider on a distribution channel, together with their payment configuration, all or nothing. A soft-deleted payment method with the same configuration is restored instead of created again.",
        "operationId": "setUpPaymentMethods",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentMethodSetupRequest"
              },
              "examples": {
                "new-configuration": {
                  "summary": "Cards with a new payment configuration",
                  "value": {
                    "distributionChannelId": "ENT:DistributionChannel:Web",
                    "paymentMethods": [
                      {
                        "paymentTypeGroup": "PAYMENTCARD",
                        "paymentType": "VISA"
                      },
                      {
                        "paymentTypeGroup": "PAYMENTCARD",
                        "paymentType": "MASTERCARD"
                      }
                    ],
                    "paymentConfiguration": {
                      "accountName": "Entur Web",
                      "merchantConfig": {
                        "merchantId": "12345678",
                        "token": "secret"
                      }
                    }
                  }
                },
                "existing-configuration": {
                  "summary": "A card on an existing payment configuration",
                  "value": {
                    "distributionChannelId": "ENT:DistributionChannel:Web",
                    "paymentMethods": [
                      {
                        "paymentTypeGroup": "PAYMENTCARD",
                        "paymentType": "AMEX"
                      }
                    ],
                    "paymentConfiguration": {
                      "id": 42
                    }
                  }
                },
                "no-configuration": {
                  "summary": "A payment method that takes no payment configuration",
                  "value": {
                    "distributionChannelId": "ENT:DistributionChannel:SalesAndService",
                    "paymentMethods": [
                      {
                        "paymentTypeGroup": "AGENT"
                      }
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/hal+json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentMethodSetupResponse"
                },
                "examples": {
                  "created": {
                    "summary": "Cards created with a new payment configuration",
                    "value": {
                      "paymentConfigurationId": 42,
                      "created": [
                        {
                          "id": 101,
                          "distributionChannelId": "ENT:DistributionChannel:Web",
                          "paymentTypeGroup": "PAYMENTCARD",
                          "paymentType": "VISA",
                          "paymentConfig": {
                            "id": 42,
                            "accountName": "Entur Web",
                            "paymentProvider": "NETAXEPT",
                            "merchantConfig": {
                              "merchantId": "12345678",
                              "token": "***",
                              "force3DSecure": true
                            }
                          }
                        },
                        {
                          "id": 102,
                          "distributionChannelId": "ENT:DistributionChannel:Web",
                          "paymentTypeGroup": "PAYMENTCARD",
                          "paymentType": "MASTERCARD",
                          "paymentConfig": {
                            "id": 42,
                            "accountName": "Entur Web",
                            "paymentProvider": "NETAXEPT",
                            "merchantConfig": {
                              "merchantId": "12345678",
                              "token": "***",
                              "force3DSecure": true
                            }
                          }
                        }
                      ],
                      "restored": []
                    }
                  },
                  "restored": {
                    "summary": "A soft-deleted payment method without payment configuration restored",
                    "value": {
                      "created": [],
                      "restored": [
                        {
                          "id": 87,
                          "distributionChannelId": "ENT:DistributionChannel:SalesAndService",
                          "paymentTypeGroup": "AGENT"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "404": {
            "$ref": "#/components/responses/notFound"
          },
          "409": {
            "$ref": "#/components/responses/conflict"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/payment-methods/search": {
      "get": {
        "tags": [
          "Payment Method"
        ],
        "summary": "Search for Payment Methods",
        "description": "Search parameters are cumulative, meaning they filter with AND, not OR.",
        "operationId": "searchForPaymentMethods",
        "parameters": [
          {
            "name": "deleted",
            "in": "query",
            "description": "Filter by whether the PaymentMethod is marked as deleted or not",
            "required": false,
            "style": "form",
            "explode": true,
            "allowReserved": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "examples": {
              "equals without operator": {
                "summary": "When operation is omitted it is treated as equals.",
                "value": [
                  "true"
                ]
              },
              "equals": {
                "value": [
                  "eq:true"
                ]
              },
              "not equals": {
                "value": [
                  "ne:true"
                ]
              }
            }
          },
          {
            "name": "distributionChannelId",
            "in": "query",
            "description": "Filter by distributionChannelId",
            "required": false,
            "style": "form",
            "explode": true,
            "allowReserved": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "examples": {
              "equals without operator": {
                "summary": "When operation is omitted it is treated as equals.",
                "value": [
                  "ENT:DistributionChannel:Test"
                ]
              },
              "equals": {
                "value": [
                  "eq:ENT:DistributionChannel:Test"
                ]
              },
              "not equals": {
                "value": [
                  "ne:ENT:DistributionChannel:Test"
                ]
              }
            }
          },
          {
            "name": "id",
            "in": "query",
            "description": "Filter by ID",
            "required": false,
            "style": "form",
            "explode": true,
            "allowReserved": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "examples": {
              "equals without operator": {
                "summary": "When operation is omitted it is treated as equals.",
                "value": [
                  "1"
                ]
              },
              "equals": {
                "value": [
                  "eq:1"
                ]
              },
              "not equals": {
                "value": [
                  "ne:1"
                ]
              }
            }
          },
          {
            "$ref": "#/components/parameters/paginationPageParam"
          },
          {
            "name": "paymentType",
            "in": "query",
            "description": "Filter by PaymentType",
            "required": false,
            "style": "form",
            "explode": true,
            "allowReserved": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "examples": {
              "equals without operator": {
                "summary": "When operation is omitted it is treated as equals.",
                "value": [
                  "VISA"
                ]
              },
              "equals": {
                "value": [
                  "eq:VISA"
                ]
              },
              "not equals": {
                "value": [
                  "ne:VISA"
                ]
              }
            }
          },
          {
            "name": "paymentTypeGroup",
            "in": "query",
            "description": "Filter by PaymentTypeGroup",
            "required": false,
            "style": "form",
            "explode": true,
            "allowReserved": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "examples": {
              "equals without operator": {
                "summary": "When operation is omitted it is treated as equals.",
                "value": [
                  "PAYMENTCARD"
                ]
              },
              "equals": {
                "value": [
                  "eq:PAYMENTCARD"
                ]
              },
              "not equals": {
                "value": [
                  "ne:PAYMENTCARD"
                ]
              }
            }
          },
          {
            "$ref": "#/components/parameters/paginationPerPageParam"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/hal+json": {
                "schema": {
                  "$ref": "#/components/schemas/PageOfPaymentMethodResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "404": {
            "$ref": "#/components/responses/notFound"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/payments/search": {
      "get": {
        "tags": [
          "Payment Search"
        ],
        "summary": "Find payments by any known identifier.",
        "description": "Looks up payments matching the given id against PaymentId or OrderId. Returns every payment that matches, so a single OrderId can yield more than one payment if the order has been paid for multiple times (e.g. across order versions). To look up a payment by a transaction identifier (PaymentTransactionId, ExternalTransactionId or RRN), use /v1/transactions/search.",
        "operationId": "findPaymentsByAnyId",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "description": "The identifier to search for. Matched against PaymentId and OrderId.",
            "required": true,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "paymentId": {
                "summary": "A Payment.id",
                "value": "12345"
              },
              "orderId": {
                "summary": "A Payment.orderId",
                "value": "ORDER-6789"
              },
              "rrn": {
                "summary": "A PaymentTransaction.rrn",
                "value": "000000123456"
              }
            }
          },
          {
            "$ref": "#/components/parameters/paginationPageParam"
          },
          {
            "$ref": "#/components/parameters/paginationPerPageParam"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/hal+json": {
                "schema": {
                  "$ref": "#/components/schemas/PageOfPayment"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/credits/search": {
      "get": {
        "tags": [
          "Credit Search"
        ],
        "summary": "Find credits by any known identifier.",
        "description": "Looks up credits matching the given id against CreditId, OrderId or CreditTransactionId. Returns every credit that matches any one of these, so a single OrderId can yield more than one credit.",
        "operationId": "findCreditsByAnyId",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "description": "The identifier to search for. Matched against CreditId, OrderId and CreditTransactionId.",
            "required": true,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "creditId": {
                "summary": "A Credit.creditId",
                "value": "12345"
              },
              "orderId": {
                "summary": "A Credit.orderId",
                "value": "ORDER-6789"
              },
              "rrn": {
                "summary": "A CreditTransaction.rrn",
                "value": "000000123456"
              }
            }
          },
          {
            "$ref": "#/components/parameters/paginationPageParam"
          },
          {
            "$ref": "#/components/parameters/paginationPerPageParam"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/hal+json": {
                "schema": {
                  "$ref": "#/components/schemas/PageOfCredit"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/transactions/search": {
      "get": {
        "tags": [
          "Transaction Search"
        ],
        "summary": "Find payment transactions by any known identifier.",
        "description": "Looks up payment transactions matching the given id against PaymentTransactionId, ExternalTransactionId or RRN. Returns every transaction that matches any one of these, so a single RRN can yield more than one transaction since RRN is not guaranteed unique.",
        "operationId": "findTransactionsByAnyId",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "description": "The identifier to search for. Matched against PaymentTransactionId, ExternalTransactionId and RRN.",
            "required": true,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "paymentTransactionId": {
                "summary": "A PaymentTransaction.id",
                "value": "12345"
              },
              "rrn": {
                "summary": "A PaymentTransaction.rrn",
                "value": "000000123456"
              }
            }
          },
          {
            "$ref": "#/components/parameters/paginationPageParam"
          },
          {
            "$ref": "#/components/parameters/paginationPerPageParam"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/hal+json": {
                "schema": {
                  "$ref": "#/components/schemas/PageOfTransactionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/transactions": {
      "get": {
        "tags": [
          "Transaction Search"
        ],
        "summary": "Query payment transactions by attribute.",
        "description": "Searches payment transactions by attribute rather than by identifier. Filters are AND-combined; a value with no operator prefix is treated as equals. status, paymentType and paymentTypeGroup accept eq and ne. createdAt additionally accepts the range operators gt, gte, lt, lte (e.g. 'gte:2025-09-30T22:00:00.000Z'). To look up a transaction by PaymentTransactionId, ExternalTransactionId or RRN, use /v1/transactions/search instead.",
        "operationId": "searchForPaymentTransactions",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "description": "TransactionStatus. One of CREATED, INITIATED, CAPTURED, REJECTED, CANCELLED, CREDITED.",
            "required": false,
            "style": "form",
            "explode": true,
            "allowReserved": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "examples": {
              "equals without operator": {
                "summary": "When operator is omitted it is treated as equals.",
                "value": [
                  "CAPTURED"
                ]
              },
              "not equals": {
                "value": [
                  "ne:REJECTED"
                ]
              }
            }
          },
          {
            "name": "paymentType",
            "in": "query",
            "description": "PaymentType of the transaction's payment method. E.g. VISA, MASTERCARD, VIPPS, COLLECTOR. Transactions with no resolved payment method are not matched.",
            "required": false,
            "style": "form",
            "explode": true,
            "allowReserved": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "examples": {
              "equals without operator": {
                "summary": "When operator is omitted it is treated as equals.",
                "value": [
                  "VISA"
                ]
              },
              "not equals": {
                "value": [
                  "ne:VIPPS"
                ]
              }
            }
          },
          {
            "name": "paymentTypeGroup",
            "in": "query",
            "description": "PaymentTypeGroup of the transaction's payment method. E.g. PAYMENTCARD, MOBILE, INVOICE. Transactions with no resolved payment method are not matched.",
            "required": false,
            "style": "form",
            "explode": true,
            "allowReserved": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "examples": {
              "equals without operator": {
                "summary": "When operator is omitted it is treated as equals.",
                "value": [
                  "PAYMENTCARD"
                ]
              }
            }
          },
          {
            "name": "createdAt",
            "in": "query",
            "description": "Timestamp for when the transaction was first created. Combine gte/lte for a range.",
            "required": false,
            "style": "form",
            "explode": true,
            "allowReserved": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "examples": {
              "equals without operator": {
                "summary": "When operator is omitted it is treated as equals.",
                "value": [
                  "2025-09-30T22:00:00.000Z"
                ]
              },
              "greater than or equal": {
                "value": [
                  "gte:2025-09-30T22:00:00.000Z"
                ]
              },
              "less than": {
                "value": [
                  "lt:2025-10-01T22:00:00.000Z"
                ]
              }
            }
          },
          {
            "$ref": "#/components/parameters/paginationPageParam"
          },
          {
            "$ref": "#/components/parameters/paginationPerPageParam"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/hal+json": {
                "schema": {
                  "$ref": "#/components/schemas/PageOfTransactionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/payments/repair": {
      "post": {
        "tags": [
          "Payment Mending"
        ],
        "summary": "Repair a set of transactions.",
        "description": "Checks all transactions connected to the order ids in the request object, and if theres a mismatch between the payment provider and our status, the transaction will be credited.",
        "operationId": "repairFailedTransactions",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RepairTransactionsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/hal+json": {
                "schema": {
                  "$ref": "#/components/schemas/RepairTransactionsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/partners": {
      "get": {
        "tags": [
          "Partner"
        ],
        "summary": "Get all partners",
        "description": "Returns a list of partners from the partner registry.",
        "operationId": "getPartners",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/hal+json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PartnerResponse"
                  }
                },
                "examples": {
                  "partners": {
                    "summary": "Payment partner",
                    "value": [
                      {
                        "organisationId": 1,
                        "codeSpace": "ENT",
                        "tradingName": "Entur",
                        "legalName": "ENTUR AS"
                      },
                      {
                        "organisationId": 2,
                        "codeSpace": "NSB",
                        "tradingName": "Vy",
                        "legalName": "VY GROUP AS"
                      }
                    ]
                  }
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "post": {
        "tags": [
          "Partner"
        ],
        "summary": "Create a partner",
        "description": "Registers a new partner in the partner registry.",
        "operationId": "createPartner",
        "requestBody": {
          "description": "The partner to register in the partner registry.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePartnerRequest"
              },
              "examples": {
                "entur": {
                  "summary": "Register Entur as a partner",
                  "value": {
                    "organisationId": 1,
                    "codeSpace": "ENT",
                    "tradingName": "Entur",
                    "legalName": "ENTUR AS"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Partner created",
            "content": {
              "application/hal+json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerResponse"
                },
                "examples": {
                  "default": {
                    "value": {
                      "organisationId": 2,
                      "codeSpace": "NSB",
                      "tradingName": "Vy",
                      "legalName": "VY GROUP AS"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/badRequest"
          },
          "409": {
            "$ref": "#/components/responses/conflict"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/partners/{codeSpace}": {
      "get": {
        "tags": [
          "Partner"
        ],
        "summary": "Get partner details",
        "description": "Returns detailed payment configuration for a single partner, grouped by distribution channel. Returns 404 if no active payment methods exist for the given codeSpace.",
        "operationId": "getPartner",
        "parameters": [
          {
            "name": "codeSpace",
            "in": "path",
            "description": "The NeTEx code space identifying the partner (e.g. ENT, NSB).",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string",
              "examples": [
                "ENT"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/hal+json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerDetailResponse"
                },
                "examples": {
                  "entur": {
                    "summary": "Entur partner with two distribution channels",
                    "value": {
                      "organisationId": 1,
                      "codeSpace": "ENT",
                      "tradingName": "Entur",
                      "legalName": "ENTUR AS",
                      "dciEntries": [
                        {
                          "dci": "ENT:DistributionChannel:App",
                          "dciType": "App",
                          "entries": [
                            {
                              "paymentMethodId": 42,
                              "paymentConfigurationId": 7,
                              "paymentType": "PAYMENTCARD",
                              "cardType": "VISA",
                              "provider": "NETAXEPT",
                              "name": "Entur App",
                              "config": {
                                "provider": "NETAXEPT",
                                "merchantId": "12002714",
                                "force3DSecure": true,
                                "token": "***"
                              }
                            }
                          ]
                        },
                        {
                          "dci": "ENT:DistributionChannel:Web",
                          "dciType": "Web",
                          "entries": [
                            {
                              "paymentMethodId": 43,
                              "paymentConfigurationId": 8,
                              "paymentType": "PAYMENTCARD",
                              "cardType": "MASTERCARD",
                              "provider": "NETAXEPT",
                              "name": "Entur Web",
                              "config": {
                                "provider": "NETAXEPT",
                                "merchantId": "12002713",
                                "force3DSecure": true,
                                "token": "***"
                              }
                            }
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/notFound"
          },
          "500": {
            "$ref": "#/components/responses/internalServerError"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    }
  },
  "components": {
    "schemas": {
      "PaymentSummary": {
        "title": "PaymentSummary",
        "required": [
          "capturedAmount",
          "creditCount",
          "creditedAmount",
          "currency",
          "remainingAmountToCapture",
          "remainingAmountToCredit",
          "totalAmount",
          "transactionCount"
        ],
        "type": "object",
        "properties": {
          "totalAmount": {
            "type": "string",
            "description": "Total amount of the payment, represented in the standard currency. The integer and fractional digits are separated by a dot.",
            "examples": [
              "450.00"
            ]
          },
          "capturedAmount": {
            "type": "string",
            "description": "Sum of all CAPTURE operations across the payment's transactions, including unsuccessful ones, represented in the standard currency.",
            "examples": [
              "450.00"
            ]
          },
          "creditedAmount": {
            "type": "string",
            "description": "Sum of all CREDIT operations across the payment's transactions, including unsuccessful ones, represented in the standard currency.",
            "examples": [
              "0.00"
            ]
          },
          "remainingAmountToCapture": {
            "type": "string",
            "description": "Total amount minus captured amount, represented in the standard currency.",
            "examples": [
              "0.00"
            ]
          },
          "remainingAmountToCredit": {
            "type": "string",
            "description": "Captured amount minus credited amount, represented in the standard currency.",
            "examples": [
              "450.00"
            ]
          },
          "currency": {
            "type": "string",
            "description": "The currency of the payment, as a 3-letter ISO-4217 code.",
            "examples": [
              "NOK"
            ]
          },
          "transactionCount": {
            "type": "integer",
            "description": "Number of transactions on the payment.",
            "format": "int32",
            "examples": [
              1
            ]
          },
          "creditCount": {
            "type": "integer",
            "description": "Number of credits linked to the payment.",
            "format": "int32",
            "examples": [
              0
            ]
          }
        },
        "description": "Computed cross-domain summary of amounts and counts, rolled up across all of the payment's transactions and its linked credits. For per-transaction figures, see each entry in payment.transactionHistory[].summary.",
        "examples": [
          {
            "totalAmount": "450.00",
            "capturedAmount": "450.00",
            "creditedAmount": "0.00",
            "remainingAmountToCapture": "0.00",
            "remainingAmountToCredit": "450.00",
            "currency": "NOK",
            "transactionCount": 1,
            "creditCount": 0
          }
        ]
      },
      "AggregatedPaymentResponse": {
        "title": "AggregatedPaymentResponse",
        "required": [
          "credits",
          "payment",
          "summary",
          "warnings"
        ],
        "type": "object",
        "properties": {
          "payment": {
            "$ref": "#/components/schemas/PaymentResponse"
          },
          "credits": {
            "type": "array",
            "description": "Credits linked to the payment. Empty if none exist.",
            "items": {
              "$ref": "#/components/schemas/CreditResponse"
            }
          },
          "invoice": {
            "$ref": "#/components/schemas/InvoiceInfo"
          },
          "summary": {
            "$ref": "#/components/schemas/PaymentSummary"
          },
          "warnings": {
            "type": "array",
            "description": "Non-fatal warnings gathered while assembling the response. A warning means some part of the response could not be filled in; it does not invalidate the parts that could. Each entry names the response field it concerns, so a consumer can react per field without parsing the message text. Empty when everything was assembled successfully.",
            "items": {
              "$ref": "#/components/schemas/AggregateWarning"
            },
            "examples": [
              []
            ]
          }
        },
        "description": "Aggregated view of a single payment: the payment itself, its linked credits, its invoice (if any), and a computed cross-domain summary. Used by Ops Center to render a drill-down timeline for one known payment id."
      },
      "AggregateWarning": {
        "title": "AggregateWarning",
        "required": [
          "code",
          "field",
          "message"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Machine-readable identifier for what went wrong. Match on this rather than on `message`, whose wording may change at any time. `INVOICE_FETCH_FAILED`: the Invoice service could not be reached or returned an error. `INVOICE_NOT_UNIQUE`: more than one invoice exists for the payment's order id and version, so it is not clear which one to report.",
            "enum": [
              "INVOICE_FETCH_FAILED",
              "INVOICE_NOT_UNIQUE"
            ],
            "examples": [
              "INVOICE_FETCH_FAILED"
            ]
          },
          "field": {
            "type": "string",
            "description": "Name of the field in this response that the warning concerns. That field is absent precisely because of this warning.",
            "examples": [
              "invoice"
            ]
          },
          "message": {
            "type": "string",
            "description": "Human-readable explanation, for display to support staff. Not a stable contract — do not parse it, and do not match on it. Use `code` instead.",
            "examples": [
              "Unable to fetch invoice data for orderId HE8NDS7XY in orderVersion 1. Invoice data omitted."
            ]
          }
        },
        "description": "A non-fatal problem encountered while assembling the response, tying a machine-readable code to the response field it affected.",
        "examples": [
          {
            "code": "INVOICE_FETCH_FAILED",
            "field": "invoice",
            "message": "Unable to fetch invoice data for orderId HE8NDS7XY in orderVersion 1. Invoice data omitted."
          }
        ]
      },
      "InvoiceInfo": {
        "title": "InvoiceInfo",
        "required": [
          "createdAt",
          "id",
          "invoiceFees",
          "invoiceLines",
          "invoiceStatus",
          "invoiceType"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the invoice in the Invoice service.",
            "format": "int64",
            "examples": [
              212345
            ]
          },
          "invoiceType": {
            "type": "string",
            "description": "The type of invoice, as reported by the Invoice service: COLLECTOR, TWO_B2B, TWO_B2B_CONSOLIDATED or XLEDGER. XLEDGER is used for kontrollgebyr (penalty fare) invoices. Passed through as a string rather than an enum, since the Invoice service owns this value set and may extend it.",
            "examples": [
              "COLLECTOR"
            ]
          },
          "invoiceStatus": {
            "type": "string",
            "description": "The status of the invoice, as reported by the Invoice service: DRAFT, SENT, READY_TO_CREDIT, PARTIALLY_CREDITED or CREDITED. Passed through as a string rather than an enum, since the Invoice service owns this value set and may extend it.",
            "examples": [
              "SENT"
            ]
          },
          "externalInvoiceNumber": {
            "type": "string",
            "description": "Invoice number generated on an external device (e.g. a mobile terminal), written on the physical invoice. Absent for invoices not issued from such a device.",
            "examples": [
              "302473061455"
            ]
          },
          "createdAt": {
            "type": "string",
            "description": "When the invoice was first created.",
            "format": "date-time",
            "examples": [
              "2025-01-12T16:13:13Z"
            ]
          },
          "updatedAt": {
            "type": "string",
            "description": "When the invoice was last updated. Absent if the invoice has never been updated.",
            "format": "date-time",
            "examples": [
              "2025-01-14T09:02:41Z"
            ]
          },
          "invoiceLines": {
            "type": "array",
            "description": "The invoice lines, one per charged, credited or adjusted item. Empty if the invoice has none.",
            "items": {
              "$ref": "#/components/schemas/InvoiceLineInfo"
            }
          },
          "invoiceFees": {
            "type": "array",
            "description": "Fees on the invoice, e.g. kontrollgebyr (feeType PENALTY) or onboard-sales fees (feeType ONBOARD). Empty if the invoice has none.",
            "items": {
              "$ref": "#/components/schemas/InvoiceFeeInfo"
            }
          }
        },
        "description": "The invoice belonging to this payment's order, as reported by the Invoice service. Invoice data is not stored in Payment — it is fetched at request time. Absent both when the payment genuinely has no invoice and when the invoice could not be fetched; the two cases are distinguished by whether warnings contains an entry about the invoice."
      },
      "InvoiceLineInfo": {
        "title": "InvoiceLineInfo",
        "required": [
          "amount",
          "createdAt",
          "id",
          "operation",
          "orderLineId",
          "orderVersion",
          "productDescription",
          "quantity",
          "reference"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the invoice line.",
            "format": "int64",
            "examples": [
              212345
            ]
          },
          "orderLineId": {
            "type": "string",
            "description": "Id of the order line the product belongs to.",
            "examples": [
              "83c87fa0-062a-471a-a840-6296717edefc"
            ]
          },
          "productDescription": {
            "type": "string",
            "description": "Text describing the purchased item.",
            "examples": [
              "Vy Ordinær Stavanger stasjon - Bergen stasjon"
            ]
          },
          "amount": {
            "type": "string",
            "description": "The amount to pay, represented in the standard currency. The integer and fractional digits are separated by a dot.",
            "examples": [
              "20.05"
            ]
          },
          "quantity": {
            "type": "integer",
            "description": "The product order volume.",
            "format": "int32",
            "examples": [
              2
            ]
          },
          "taxRate": {
            "type": "string",
            "description": "Tax rate applied to the line, in percent.",
            "examples": [
              "24"
            ]
          },
          "reference": {
            "type": "string",
            "description": "Alphanumeric reference linked to this specific line on the invoice.",
            "examples": [
              "NO1"
            ]
          },
          "operation": {
            "type": "string",
            "description": "The monetary operation this line has on the invoice. One of CHARGE, CREDIT, ADJUST.",
            "examples": [
              "CHARGE"
            ]
          },
          "orderVersion": {
            "type": "integer",
            "description": "The order version this line was added in. May be older than the payment's current order version.",
            "format": "int32",
            "examples": [
              1
            ]
          },
          "createdAt": {
            "type": "string",
            "description": "When the invoice line was first created.",
            "format": "date-time",
            "examples": [
              "2025-01-12T16:13:13Z"
            ]
          },
          "updatedAt": {
            "type": "string",
            "description": "When the invoice line was last updated. Absent if it has never been updated.",
            "format": "date-time",
            "examples": [
              "2025-01-14T09:02:41Z"
            ]
          }
        },
        "description": "A single line on an invoice."
      },
      "InvoiceFeeInfo": {
        "title": "InvoiceFeeInfo",
        "required": [
          "amount",
          "description",
          "feeType",
          "operation",
          "orderFeeId",
          "orderLineIds",
          "orderVersion",
          "reference",
          "taxAmount"
        ],
        "type": "object",
        "properties": {
          "orderFeeId": {
            "type": "string",
            "description": "Id of the fee from the order. The Invoice service exposes no separate id for the fee itself, so this is its identifier here.",
            "examples": [
              "44c5af69-6ab0-0b5a-8c31-2dc8a78c2abe"
            ]
          },
          "amount": {
            "type": "string",
            "description": "Total amount of the fee including taxes, represented in the standard currency. The integer and fractional digits are separated by a dot.",
            "examples": [
              "100.00"
            ]
          },
          "taxAmount": {
            "type": "string",
            "description": "The portion of the amount that is tax, represented in the standard currency.",
            "examples": [
              "24.00"
            ]
          },
          "taxRate": {
            "type": "string",
            "description": "Tax rate applied to the fee, in percent.",
            "examples": [
              "24"
            ]
          },
          "currency": {
            "type": "string",
            "description": "The currency of the fee, as a 3-letter ISO-4217 code. Absent if the Invoice service did not record one.",
            "examples": [
              "NOK"
            ]
          },
          "description": {
            "type": "string",
            "description": "Text describing the fee.",
            "examples": [
              "Kontrollgebyr"
            ]
          },
          "reference": {
            "type": "string",
            "description": "Alphanumeric reference linked to this specific fee on the invoice.",
            "examples": [
              "GEB1"
            ]
          },
          "feeType": {
            "type": "string",
            "description": "Type of fee. PENALTY is kontrollgebyr. Known values are MANUAL, REFUNDING, ONBOARD, CHANGE, INVOICE, CHANGE_NON_REFUNDABLE, PENALTY, BOOKING and UNKNOWN, but the Invoice service copies this straight through from the Order API without validating it against an enum, so treat the set as open and do not fail on an unrecognised value.",
            "examples": [
              "PENALTY"
            ]
          },
          "orderLineIds": {
            "type": "array",
            "description": "The order lines this fee is connected to. Empty if the fee is not tied to specific lines.",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "67288afb-e8b8-44f8-abe3-dd2258eb524b"
              ]
            ]
          },
          "operation": {
            "type": "string",
            "description": "The monetary operation this fee has on the invoice. One of CHARGE, CREDIT, ADJUST.",
            "examples": [
              "CHARGE"
            ]
          },
          "orderVersion": {
            "type": "integer",
            "description": "The order version this fee is connected to.",
            "format": "int32",
            "examples": [
              1
            ]
          }
        },
        "description": "A fee on an invoice. Kontrollgebyr (penalty fare) is modelled as a fee with feeType PENALTY, typically on an XLEDGER invoice."
      },
      "CreditTransactionFailureRecovery": {
        "title": "CreditTransactionFailureRecovery",
        "required": [
          "requestId"
        ],
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string",
            "description": "Idempotency key to use against 3rd party PSP APIs supporting such functionality. Used as a way to correct transactions out of sync with the 3rd party.",
            "examples": [
              "4ee4aaed-c6eb-4871-beef-3fa912a61234"
            ]
          }
        },
        "description": "RequestBody with what requestId to apply to a credit transaction, where the initial execution for some reason failed.",
        "examples": [
          {
            "requestId": "4ee4aaed-c6eb-4871-beef-3fa912a61234"
          }
        ]
      },
      "KafkaErrorResponse": {
        "title": "KafkaError",
        "required": [
          "className",
          "createdAt",
          "id",
          "key",
          "payload",
          "retries",
          "topic",
          "updatedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The database id of the KafkaError",
            "format": "int64",
            "examples": [
              1
            ]
          },
          "errorMessage": {
            "type": "string",
            "description": "An error message describing why publishing the kafka event failed.",
            "examples": [
              "Failed to send; nested exception is org.apache.kafka.common.errors.TimeoutException: Expiring 1 record(s) for payments-production-0:120001 ms has passed since batch creation"
            ]
          },
          "retries": {
            "type": "integer",
            "description": "How many times we tried to publish the event",
            "format": "int64",
            "examples": [
              30
            ]
          },
          "className": {
            "type": "string",
            "description": "The name of the event that failed to be published.",
            "examples": [
              "org.entur.payment.kafka.Payment"
            ]
          },
          "topic": {
            "type": "string",
            "description": "The topic the event should have been published to.",
            "examples": [
              "payments-production"
            ]
          },
          "key": {
            "type": "string",
            "description": "The id of the resource, i.e. payment or payment transaction, the event is published for.",
            "examples": [
              "123"
            ]
          },
          "payload": {
            "type": "string",
            "description": "The content of the event formatted as byte.",
            "examples": [
              "KDIwMjEtMTItMzFUMTI6MzQ6NTZaTU9CSUxFTlNCIFRlc3QgUGF5bG9hZCk="
            ],
            "contentEncoding": "base64"
          },
          "createdAt": {
            "type": "string",
            "description": "When the kafka error was created.",
            "format": "date-time",
            "examples": [
              "2025-09-30T22:00:00Z"
            ]
          },
          "updatedAt": {
            "type": "string",
            "description": "When the kafka error was last updated",
            "format": "date-time",
            "examples": [
              "2025-09-30T22:00:00Z"
            ]
          }
        },
        "examples": [
          {
            "id": 1,
            "errorMessage": "Failed to send; nested exception is org.apache.kafka.common.errors.TimeoutException: Expiring 1 record(s) for payments-production-0:120001 ms has passed since batch creation",
            "retries": 30,
            "className": "org.entur.payment.kafka.Payment",
            "topic": "payments-production",
            "key": "123",
            "payload": "KDIwMjEtMTItMzFUMTI6MzQ6NTZaTU9CSUxFTlNCIFRlc3QgUGF5bG9hZCk=",
            "createdAt": "2025-09-30T22:00:00.000Z",
            "updatedAt": "2025-09-30T22:00:00.000Z"
          }
        ]
      },
      "PageOfPaymentConfigurationResponse": {
        "title": "PageOfPaymentConfigurationResponse",
        "required": [
          "items",
          "totalItems",
          "totalPages"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "description": "Payment configurations on a specific page",
            "readOnly": true,
            "items": {
              "$ref": "#/components/schemas/PaymentConfigurationResponse"
            },
            "examples": [
              [
                {
                  "accountName": "Entur Test",
                  "id": 1,
                  "merchantConfig": {
                    "someKey": {
                      "configParam": "configValue"
                    }
                  },
                  "paymentProvider": "NETAXEPT"
                }
              ]
            ]
          },
          "totalItems": {
            "type": "integer",
            "description": "Total number of payment configurations",
            "format": "int64",
            "readOnly": true,
            "examples": [
              72
            ]
          },
          "totalPages": {
            "type": "integer",
            "description": "Total number of pages available to browse",
            "format": "int64",
            "readOnly": true,
            "examples": [
              9
            ]
          }
        },
        "description": "Page displays a subset of a list of entities",
        "examples": [
          {
            "items": [
              {
                "accountName": "Entur Test",
                "id": 1,
                "merchantConfig": {
                  "someKey": {
                    "configParam": "configValue"
                  }
                },
                "paymentProvider": "NETAXEPT"
              }
            ],
            "totalItems": 1,
            "totalPages": 1
          }
        ]
      },
      "PageOfPaymentMethodResponse": {
        "title": "PageOfPaymentMethodResponse",
        "required": [
          "items",
          "totalItems",
          "totalPages"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "description": "Items on a specific page",
            "readOnly": true,
            "items": {
              "$ref": "#/components/schemas/PaymentMethodResponse"
            },
            "examples": [
              [
                {
                  "distributionChannelId": "ENT:DistributionChannel:Test",
                  "id": 1,
                  "paymentConfig": {
                    "accountName": "Entur Test",
                    "id": 1,
                    "merchantConfig": {
                      "someKey": {
                        "configParam": "configValue"
                      }
                    },
                    "paymentProvider": "NETAXEPT"
                  },
                  "paymentType": "VISA",
                  "paymentTypeFee": {
                    "amount": "450.00",
                    "currency": "NOK",
                    "name": "ENT:PaymentTypeFee:Collector",
                    "reason": "Walley Invoice",
                    "taxAmount": "25.00",
                    "taxCode": "3",
                    "taxRate": "25.00"
                  },
                  "paymentTypeGroup": "PAYMENTCARD"
                }
              ]
            ]
          },
          "totalItems": {
            "type": "integer",
            "description": "Total number of items",
            "format": "int64",
            "readOnly": true,
            "examples": [
              72
            ]
          },
          "totalPages": {
            "type": "integer",
            "description": "Total number of pages available to browse",
            "format": "int64",
            "readOnly": true,
            "examples": [
              9
            ]
          }
        },
        "description": "Page displays a subset of a list of entities",
        "examples": [
          {
            "items": [
              {
                "distributionChannelId": "ENT:DistributionChannel:Test",
                "id": 1,
                "paymentConfig": {
                  "accountName": "Entur Test",
                  "id": 1,
                  "merchantConfig": {
                    "someKey": {
                      "configParam": "configValue"
                    }
                  },
                  "paymentProvider": "NETAXEPT"
                },
                "paymentType": "VISA",
                "paymentTypeFee": {
                  "amount": "450.00",
                  "currency": "NOK",
                  "name": "ENT:PaymentTypeFee:Collector",
                  "reason": "Walley Invoice",
                  "taxAmount": "25.00",
                  "taxCode": "3",
                  "taxRate": "25.00"
                },
                "paymentTypeGroup": "PAYMENTCARD"
              }
            ],
            "totalItems": 1,
            "totalPages": 1
          }
        ]
      },
      "PaymentConfigurationRequest": {
        "title": "PaymentConfigurationRequest",
        "required": [
          "accountName",
          "paymentProvider"
        ],
        "type": "object",
        "properties": {
          "accountName": {
            "type": "string",
            "description": "Name describing the owner of the configuration. Usually the name of the client.",
            "examples": [
              "Entur Test"
            ]
          },
          "merchantConfig": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            },
            "description": "Key/value map of merchant configuration parameters needed for each merchant. See documentation for specific merchant on which parameters are required."
          },
          "paymentProvider": {
            "$ref": "#/components/schemas/PaymentProvider"
          }
        },
        "description": "Information used to create a PaymentConfiguration.",
        "examples": [
          {
            "accountName": "Entur Test",
            "merchantConfig": {
              "someKey": {
                "configParam": "configValue"
              }
            },
            "paymentProvider": "NETAXEPT"
          }
        ]
      },
      "ActiveSubscriptionKeyRequest": {
        "title": "ActiveSubscriptionKeyRequest",
        "required": [
          "activeSubscriptionKey"
        ],
        "type": "object",
        "properties": {
          "activeSubscriptionKey": {
            "type": "string",
            "description": "Which subscription key to use for calls to Vipps.",
            "enum": [
              "PRIMARY",
              "SECONDARY"
            ],
            "examples": [
              "SECONDARY"
            ]
          }
        },
        "description": "Sets the active Vipps subscription key on a payment configuration."
      },
      "WebhookRegistration": {
        "title": "WebhookRegistration",
        "required": [
          "events",
          "url"
        ],
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "The url of the endpoint that will receive the webhook events registered.",
            "examples": [
              "https://api.dev.entur.io/sales/payment-webhooks/v1/payments/authorized"
            ]
          },
          "events": {
            "type": "array",
            "description": "The events that will trigger the webhook.",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "AUTHORIZED"
              ]
            ]
          },
          "merchantSerialNumber": {
            "type": "string",
            "description": "Merchant serial number(msn) that webhook should be registered to.",
            "examples": [
              "1"
            ]
          }
        },
        "description": "Information used to register a webhook.",
        "examples": [
          {
            "url": "https://api.dev.entur.io/sales/payment-webhooks/v1/payments/authorized",
            "events": [
              "AUTHORIZED"
            ],
            "merchantSerialNumber": "1"
          }
        ]
      },
      "WebhookDeletion": {
        "title": "WebhookDeletion",
        "required": [
          "merchantSerialNumber",
          "webhookId"
        ],
        "type": "object",
        "properties": {
          "webhookId": {
            "type": "string",
            "description": "The UUID for the webhook registered in vipps and merchant configuration",
            "examples": [
              "7e89ab87-bd11-4e85-87e3-e26c1d719f92"
            ]
          },
          "merchantSerialNumber": {
            "type": "string",
            "description": "Merchant serial number(msn) that webhook should be registered to.",
            "examples": [
              "1"
            ]
          }
        },
        "description": "Information used to delete a webhook.",
        "examples": [
          {
            "webhookId": "7e89ab87-bd11-4e85-87e3-e26c1d719f92",
            "merchantSerialNumber": "1"
          }
        ]
      },
      "WebhookResponse": {
        "title": "WebhookResponse",
        "required": [
          "events",
          "id",
          "url"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The UUID for the webhook registered in vipps and merchant configuration",
            "examples": [
              "7e89ab87-bd11-4e85-87e3-e26c1d719f92"
            ]
          },
          "url": {
            "type": "string",
            "description": "The url of the endpoint that will receive the webhook events registered.",
            "examples": [
              "https://api.dev.entur.io/sales/payment-webhooks/v1/payments/authorized"
            ]
          },
          "events": {
            "type": "array",
            "description": "The events that will trigger the webhook.",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "AUTHORIZED"
              ]
            ]
          }
        },
        "description": "Information registered on webhook.",
        "examples": [
          {
            "id": "7e89ab87-bd11-4e85-87e3-e26c1d719f92",
            "url": "https://api.dev.entur.io/sales/payment-webhooks/v1/payments/authorized",
            "events": [
              "AUTHORIZED"
            ]
          }
        ]
      },
      "Webhooks": {
        "title": "Webhooks",
        "type": "array",
        "description": "List of webhooks.",
        "items": {
          "$ref": "#/components/schemas/WebhookResponse"
        },
        "examples": [
          [
            {
              "id": "7e89ab87-bd11-4e85-87e3-e26c1d719f92",
              "url": "https://api.dev.entur.io/sales/payment-webhooks/v1/payments/authorized",
              "events": [
                "AUTHORIZED"
              ]
            }
          ]
        ]
      },
      "PaymentMethodOptionsResponse": {
        "title": "PaymentMethodOptionsResponse",
        "required": [
          "distributionChannelId",
          "offers",
          "providers"
        ],
        "type": "object",
        "properties": {
          "distributionChannelId": {
            "type": "string",
            "examples": [
              "ENT:DistributionChannel:Web"
            ]
          },
          "offers": {
            "type": "array",
            "description": "Payment methods not yet set up on the distribution channel.",
            "items": {
              "$ref": "#/components/schemas/PaymentMethodOfferResponse"
            }
          },
          "providers": {
            "type": "array",
            "description": "Merchant config fields of the providers in the offers.",
            "items": {
              "$ref": "#/components/schemas/PaymentProviderFieldsResponse"
            }
          }
        },
        "description": "What can be set up on a distribution channel."
      },
      "PaymentMethodOfferResponse": {
        "title": "PaymentMethodOfferResponse",
        "required": [
          "onlyForCredits",
          "paymentConfiguration",
          "paymentTypeGroup"
        ],
        "type": "object",
        "properties": {
          "paymentTypeGroup": {
            "$ref": "#/components/schemas/PaymentTypeGroup"
          },
          "paymentType": {
            "$ref": "#/components/schemas/PaymentType"
          },
          "paymentProvider": {
            "$ref": "#/components/schemas/PaymentProvider"
          },
          "paymentConfiguration": {
            "type": "string",
            "description": "Whether the payment method needs a payment configuration of its provider.",
            "enum": [
              "REQUIRED",
              "OPTIONAL",
              "NONE"
            ]
          },
          "sharedPaymentConfigurationId": {
            "type": "integer",
            "description": "Set when the provider is already set up on the distribution channel: new payment methods of that provider then use this payment configuration.",
            "format": "int64"
          },
          "onlyForCredits": {
            "type": "boolean",
            "description": "The payment method can only be used to refund purchases."
          }
        },
        "description": "A payment method that can be set up on the distribution channel.",
        "examples": [
          {
            "paymentTypeGroup": "PAYMENTCARD",
            "paymentType": "VISA",
            "paymentProvider": "NETAXEPT",
            "paymentConfiguration": "REQUIRED",
            "onlyForCredits": false
          }
        ]
      },
      "PaymentProviderFieldsResponse": {
        "title": "PaymentProviderFieldsResponse",
        "required": [
          "defaults",
          "fields",
          "paymentProvider"
        ],
        "type": "object",
        "properties": {
          "paymentProvider": {
            "$ref": "#/components/schemas/PaymentProvider"
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MerchantConfigFieldResponse"
            }
          },
          "defaults": {
            "type": "object",
            "additionalProperties": {},
            "description": "Values a new payment configuration gets unless they are entered."
          }
        },
        "description": "The merchant config fields entered for a new payment configuration of a provider.",
        "examples": [
          {
            "paymentProvider": "NETAXEPT",
            "fields": [
              {
                "name": "merchantId",
                "type": "STRING",
                "required": true
              },
              {
                "name": "token",
                "type": "STRING",
                "required": true
              },
              {
                "name": "force3DSecure",
                "type": "BOOLEAN",
                "required": true
              }
            ],
            "defaults": {
              "force3DSecure": true
            }
          }
        ]
      },
      "MerchantConfigFieldResponse": {
        "title": "MerchantConfigFieldResponse",
        "required": [
          "name",
          "required",
          "type"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "examples": [
              "merchantId"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "STRING",
              "BOOLEAN",
              "ENUM"
            ]
          },
          "required": {
            "type": "boolean"
          },
          "values": {
            "type": "array",
            "description": "The allowed values of an ENUM field; empty for other types.",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "PRIMARY",
                "SECONDARY"
              ]
            ]
          }
        }
      },
      "PaymentMethodSetupRequest": {
        "title": "PaymentMethodSetupRequest",
        "required": [
          "distributionChannelId",
          "paymentMethods"
        ],
        "type": "object",
        "properties": {
          "distributionChannelId": {
            "type": "string",
            "examples": [
              "ENT:DistributionChannel:Web"
            ]
          },
          "paymentMethods": {
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentMethodSetupItem"
            }
          },
          "paymentConfiguration": {
            "$ref": "#/components/schemas/PaymentMethodSetupConfiguration"
          }
        },
        "description": "Payment methods paid through the same payment provider, and their payment configuration.",
        "examples": [
          {
            "distributionChannelId": "ENT:DistributionChannel:Web",
            "paymentMethods": [
              {
                "paymentTypeGroup": "PAYMENTCARD",
                "paymentType": "VISA"
              },
              {
                "paymentTypeGroup": "PAYMENTCARD",
                "paymentType": "MASTERCARD"
              }
            ],
            "paymentConfiguration": {
              "accountName": "Entur Web",
              "merchantConfig": {
                "merchantId": "12345678",
                "token": "secret"
              }
            }
          }
        ]
      },
      "PaymentMethodSetupItem": {
        "title": "PaymentMethodSetupItem",
        "required": [
          "paymentTypeGroup"
        ],
        "type": "object",
        "properties": {
          "paymentTypeGroup": {
            "$ref": "#/components/schemas/PaymentTypeGroup"
          },
          "paymentType": {
            "$ref": "#/components/schemas/PaymentType"
          }
        }
      },
      "PaymentMethodSetupConfiguration": {
        "title": "PaymentMethodSetupConfiguration",
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "examples": [
              1
            ]
          },
          "accountName": {
            "type": "string",
            "examples": [
              "Entur Web"
            ]
          },
          "merchantConfig": {
            "type": "object",
            "additionalProperties": {},
            "description": "Merchant config of a new payment configuration: string and boolean values, see the fields of the provider in the options."
          }
        },
        "description": "Either the id of an existing payment configuration, or the account name and merchant config of a new one. Leave out when the payment methods take no payment configuration."
      },
      "PaymentMethodSetupResponse": {
        "title": "PaymentMethodSetupResponse",
        "required": [
          "created",
          "restored"
        ],
        "type": "object",
        "properties": {
          "paymentConfigurationId": {
            "type": "integer",
            "format": "int64",
            "examples": [
              1
            ]
          },
          "created": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentMethodResponse"
            }
          },
          "restored": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentMethodResponse"
            }
          }
        }
      },
      "PaymentMethodRequest": {
        "title": "PaymentMethodRequest",
        "required": [
          "paymentTypeGroup"
        ],
        "type": "object",
        "properties": {
          "distributionChannelId": {
            "type": "string",
            "description": "Distribution Channels controls which organisations can sell, refund or inform on available products or salepoints.",
            "examples": [
              "ENT:DistributionChannel:Test"
            ]
          },
          "paymentConfigId": {
            "type": "integer",
            "description": "ID referring to the payment configuration associated with this payment method.",
            "format": "int64",
            "examples": [
              1
            ]
          },
          "paymentType": {
            "$ref": "#/components/schemas/PaymentType"
          },
          "paymentTypeFeeName": {
            "type": "string",
            "description": "Name of the fee that should be used for this payment type. If there exists a fee for the payment type, the fee will automatically be added to the order and transaction.",
            "examples": [
              "ENT:PaymentTypeFee:Collector"
            ]
          },
          "paymentTypeGroup": {
            "$ref": "#/components/schemas/PaymentTypeGroup"
          }
        },
        "description": "Information used to create a PaymentMethod.",
        "examples": [
          {
            "distributionChannelId": "ENT:DistributionChannel:Test",
            "paymentConfigId": 1,
            "paymentType": "VISA",
            "paymentTypeFeeName": "ENT:PaymentTypeFee:Collector",
            "paymentTypeGroup": "PAYMENTCARD"
          }
        ]
      },
      "RepairTransactionsRequest": {
        "title": "RepairTransactionsRequest",
        "type": "object",
        "properties": {
          "orderIds": {
            "type": "array",
            "description": "A list of orderIds where connected transactions should be repaired.",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "ABCD1234",
                "1234ABCD"
              ]
            ]
          },
          "paymentIds": {
            "type": "array",
            "description": "A list of paymentIds where connected transactions should be repaired.",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "examples": [
              [
                1,
                2,
                3
              ]
            ]
          },
          "transactionIds": {
            "type": "array",
            "description": "A list of transactionIds where the transactions should be repaired.",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "examples": [
              [
                1,
                2,
                3
              ]
            ]
          },
          "rrns": {
            "type": "array",
            "description": "A list of rrns where the connected transactions should be repaired.",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "000012345678",
                "000001234567"
              ]
            ]
          },
          "transactionStatusesThatCanBeCredited": {
            "type": "array",
            "description": "A list of transaction statuses that are eligible for repairing. In other words, if a transaction status is supplied in this list, transaction matching that status will be attempted repaired.",
            "items": {
              "$ref": "#/components/schemas/TransactionStatus"
            },
            "examples": [
              [
                "CREATED",
                "INITIATED"
              ]
            ]
          }
        },
        "description": "Request body used to repair a transaction where the status of our internal transaction has diverged from the status of the transaction in the payment providers system.",
        "examples": [
          {
            "orderIds": [
              "ABCD1234"
            ],
            "paymentIds": [
              1
            ],
            "transactionIds": [
              1
            ],
            "rrns": [
              "000000000001"
            ],
            "transactionStatusesThatCanBeCredited": [
              "CREATED",
              "INITIATED"
            ]
          }
        ]
      },
      "RepairTransactionsResponse": {
        "title": "RepairTransactionResponse",
        "required": [
          "references"
        ],
        "type": "object",
        "properties": {
          "references": {
            "type": "array",
            "description": "A list of repairTransactionOrderReferences that has been attempted repaired. This list contains objects where each transaction is grouped within its parent payment, and each payment is grouped within its connected order. Each transaction has a status, which is either credited, or something failed and then there's an error message explaining what happened.",
            "items": {
              "$ref": "#/components/schemas/RepairTransactionOrderReference"
            },
            "examples": [
              [
                {
                  "orderId": "ABCD1234",
                  "payments": [
                    {
                      "paymentId": 1,
                      "transactions": [
                        {
                          "transactionId": 1,
                          "rrn": "000123456123",
                          "status": "FAILED",
                          "message": "Unable to credit transaction. Remaining amount to credit was already 0.",
                          "sum": "210.00",
                          "originalTransactionDate": "2025-02-12T16:13:13Z",
                          "creditTransactionDate:": "2025-02-12T16:13:13Z",
                          "distributionChannelId": "ENT:DistributionChannel:Test"
                        }
                      ]
                    }
                  ]
                }
              ]
            ]
          }
        },
        "examples": [
          {
            "references": [
              {
                "orderId": "ABCD1234",
                "payments": [
                  {
                    "paymentId": 1,
                    "transactions": [
                      {
                        "transactionId": 1,
                        "rrn": "000123456123",
                        "status": "FAILED",
                        "message": "Unable to credit transaction. Remaining amount to credit was already 0.",
                        "sum": "210.00",
                        "originalTransactionDate": "2025-02-12T16:13:13Z",
                        "creditTransactionDate:": "2025-02-12T16:13:13Z",
                        "distributionChannelId": "ENT:DistributionChannel:Test"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      },
      "RepairTransactionOrderReference": {
        "required": [
          "orderId",
          "payments"
        ],
        "type": "object",
        "properties": {
          "orderId": {
            "type": "string",
            "description": "The id of an order.",
            "examples": [
              "ABCD1234"
            ]
          },
          "payments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RepairTransactionPaymentReference"
            }
          }
        },
        "description": "Data about an order that has payments with repaired transaction.",
        "examples": [
          {
            "orderId": "ABCD1234",
            "payments": [
              {
                "paymentId": 1,
                "transactions": [
                  {
                    "transactionId": 1,
                    "rrn": "000123456123",
                    "status": "FAILED",
                    "message": "Unable to credit transaction. Remaining amount to credit was already 0.",
                    "sum": "210.00",
                    "originalTransactionDate": "2025-02-12T16:13:13Z",
                    "creditTransactionDate:": "2025-02-12T16:13:13Z",
                    "distributionChannelId": "ENT:DistributionChannel:Test"
                  }
                ]
              }
            ]
          }
        ]
      },
      "RepairTransactionPaymentReference": {
        "required": [
          "paymentId",
          "transactions"
        ],
        "type": "object",
        "properties": {
          "paymentId": {
            "type": "integer",
            "description": "The id of a payment.",
            "format": "int64",
            "examples": [
              1
            ]
          },
          "transactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RepairedTransactionReference"
            },
            "examples": [
              [
                {
                  "transactionId": 1,
                  "rrn": "000123456123",
                  "status": "FAILED",
                  "message": "Unable to credit transaction. Remaining amount to credit was already 0.",
                  "sum": "210.00",
                  "originalTransactionDate": "2025-02-12T16:13:13Z",
                  "creditTransactionDate:": "2025-02-12T16:13:13Z",
                  "distributionChannelId": "ENT:DistributionChannel:Test"
                }
              ]
            ]
          }
        },
        "description": "Data about a payment that has transactions that has been repaired.",
        "examples": [
          {
            "paymentId": 1,
            "transactions": [
              {
                "transactionId": 1,
                "rrn": "000123456123",
                "status": "FAILED",
                "message": "Unable to credit transaction. Remaining amount to credit was already 0.",
                "sum": "210.00",
                "originalTransactionDate": "2025-02-12T16:13:13Z",
                "creditTransactionDate:": "2025-02-12T16:13:13Z",
                "distributionChannelId": "ENT:DistributionChannel:Test"
              }
            ]
          }
        ]
      },
      "RepairedTransactionReference": {
        "required": [
          "message",
          "rrn",
          "status",
          "transactionId"
        ],
        "type": "object",
        "properties": {
          "transactionId": {
            "type": "integer",
            "description": "The id of a transaction.",
            "format": "int64",
            "examples": [
              1
            ]
          },
          "rrn": {
            "type": "string",
            "description": "Reconciliation reference number used to track a transaction through different economy systems.",
            "examples": [
              "000012345678"
            ]
          },
          "status": {
            "type": "string",
            "description": "The result of the repair operation. Either CREDITED or FAILED.",
            "enum": [
              "CREDITED",
              "FAILED"
            ],
            "examples": [
              "FAILED"
            ]
          },
          "message": {
            "type": "string",
            "description": "A detailed message explaining what happened. Used mostly when the status is FAILED.",
            "examples": [
              "Unable to credit transaction. Remaining amount to credit was already 0."
            ]
          },
          "sum": {
            "type": "string",
            "description": "The amount value of the transaction repaired",
            "examples": [
              "210.00"
            ]
          },
          "originalTransactionDate": {
            "type": "string",
            "description": "When the transaction was created",
            "format": "date-time",
            "examples": [
              "2025-02-12T16:13:13Z"
            ]
          },
          "creditTransactionDate": {
            "type": "string",
            "description": "When the transaction was credited",
            "format": "date-time",
            "examples": [
              "2025-09-30T22:00:00Z"
            ]
          },
          "distributionChannelId": {
            "type": "string",
            "description": "The id of the distribution channel that created the transaction.",
            "examples": [
              "ENT:DistributionChannel:Test"
            ]
          }
        },
        "description": "Data about a transaction that has been repaired.",
        "examples": [
          {
            "transactionId": 1,
            "rrn": "000123456123",
            "status": "FAILED",
            "message": "Unable to credit transaction. Remaining amount to credit was already 0.",
            "sum": "210.00",
            "originalTransactionDate": "2025-02-12T16:13:13Z",
            "creditTransactionDate:": "2025-02-12T16:13:13Z",
            "distributionChannelId": "ENT:DistributionChannel:Test"
          }
        ]
      },
      "PaymentProviderTransactionResponse": {
        "type": "object",
        "properties": {
          "transactionId": {
            "type": "string",
            "description": "A unique identifier for the transaction.",
            "examples": [
              "1"
            ]
          },
          "merchant": {
            "$ref": "#/components/schemas/PaymentProviderTransactionMerchant"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentProviderTransactionError"
            },
            "examples": [
              [
                {
                  "code": "91",
                  "text": "Unable to process transaction.",
                  "source": "Card issuer"
                }
              ]
            ]
          },
          "status": {
            "type": "string",
            "description": "The current status of the transaction in the payment providers system.",
            "examples": [
              "Capture"
            ]
          },
          "transactionSummary": {
            "$ref": "#/components/schemas/PaymentProviderTransactionSummary"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Additional information about the transaction.",
            "examples": [
              {
                "someKey": "someValue"
              }
            ]
          }
        },
        "examples": [
          {
            "transactionId": "1",
            "merchant": {
              "merchantId": "7007070",
              "name": "Entur Test"
            },
            "errors": [
              {
                "code": "91",
                "text": "Unable to process transaction.",
                "source": "Card issuer"
              }
            ],
            "status": "Capture",
            "transactionSummary": {
              "authorizedAmount": {
                "currency": "NOK",
                "value": "450.00"
              },
              "cancelledAmount": {
                "currency": "NOK",
                "value": "0.00"
              },
              "capturedAmount": {
                "currency": "NOK",
                "value": "450.00"
              },
              "creditedAmount": {
                "currency": "NOK",
                "value": "450.00"
              }
            },
            "metadata": {
              "someKey": "someValue"
            }
          }
        ]
      },
      "PaymentProviderTransactionError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "The response code of the error. Can be looked up with the payment provider.",
            "examples": [
              "91"
            ]
          },
          "text": {
            "type": "string",
            "description": "A description of the error",
            "examples": [
              "Unable to process transaction."
            ]
          },
          "source": {
            "type": "string",
            "description": "Where the error comes from.",
            "examples": [
              "Card issuer"
            ]
          }
        },
        "description": "Errors that occurred while the payment provider tried to process the transaction.",
        "examples": [
          {
            "code": "91",
            "text": "Unable to process transaction.",
            "source": "Card issuer"
          }
        ]
      },
      "PaymentProviderTransactionAmount": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string",
            "description": "The currency of the payment.",
            "examples": [
              "NOK"
            ]
          },
          "value": {
            "type": "string",
            "description": "The amount value.",
            "examples": [
              "450.00"
            ]
          }
        },
        "description": "Information about a transactions amount (captured|authorized|credited|cancelled).",
        "examples": [
          {
            "currency": "NOK",
            "value": "450.00"
          }
        ]
      },
      "PaymentProviderTransactionSummary": {
        "type": "object",
        "properties": {
          "authorizedAmount": {
            "$ref": "#/components/schemas/PaymentProviderTransactionAmount"
          },
          "cancelledAmount": {
            "$ref": "#/components/schemas/PaymentProviderTransactionAmount"
          },
          "capturedAmount": {
            "$ref": "#/components/schemas/PaymentProviderTransactionAmount"
          },
          "creditedAmount": {
            "$ref": "#/components/schemas/PaymentProviderTransactionAmount"
          }
        },
        "description": "A summery showing authorized, cancelled, captured and credited amounts on a transaction.",
        "examples": [
          {
            "authorizedAmount": {
              "currency": "NOK",
              "value": "450.00"
            },
            "cancelledAmount": {
              "currency": "NOK",
              "value": "0.00"
            },
            "capturedAmount": {
              "currency": "NOK",
              "value": "450.00"
            },
            "creditedAmount": {
              "currency": "NOK",
              "value": "450.00"
            }
          }
        ]
      },
      "PaymentProviderTransactionMerchant": {
        "type": "object",
        "properties": {
          "merchantId": {
            "type": "string",
            "description": "The ID of the merchant.",
            "examples": [
              "7007070"
            ]
          },
          "name": {
            "type": "string",
            "description": "The name of the merchant.",
            "examples": [
              "Entur Test"
            ]
          }
        },
        "description": "Information about what merchant a transaction belongs to.",
        "examples": [
          {
            "merchantId": "7007070",
            "name": "Entur Test"
          }
        ]
      },
      "PaymentProvider": {
        "type": "string",
        "description": "The payment service provider this configuration is used for. This is not necessarily a 3rd party provider. This will control the way the API is used.",
        "enum": [
          "NETAXEPT",
          "NETS",
          "VIPPS",
          "XLEDGER"
        ],
        "examples": [
          "NETAXEPT"
        ]
      },
      "PartnerDetailResponse": {
        "required": [
          "codeSpace",
          "dciEntries",
          "legalName",
          "organisationId",
          "tradingName"
        ],
        "type": "object",
        "properties": {
          "organisationId": {
            "type": "integer",
            "format": "int64",
            "examples": [
              2
            ]
          },
          "codeSpace": {
            "type": "string",
            "examples": [
              "ENT"
            ]
          },
          "tradingName": {
            "type": "string",
            "examples": [
              "Entur"
            ]
          },
          "legalName": {
            "type": "string",
            "examples": [
              "ENTUR AS"
            ]
          },
          "dciEntries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DciEntry"
            }
          }
        }
      },
      "DciEntry": {
        "required": [
          "dci",
          "dciType",
          "entries"
        ],
        "type": "object",
        "properties": {
          "dci": {
            "type": "string",
            "description": "Full NeTEx distribution channel identifier.",
            "examples": [
              "ENT:DistributionChannel:App"
            ]
          },
          "dciType": {
            "type": "string",
            "description": "Short distribution channel name.",
            "examples": [
              "App"
            ]
          },
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentMethodEntry"
            }
          }
        }
      },
      "PaymentMethodEntry": {
        "required": [
          "cardType",
          "name",
          "paymentMethodId",
          "paymentType",
          "provider"
        ],
        "type": "object",
        "properties": {
          "paymentMethodId": {
            "type": "integer",
            "description": "ID of the PaymentMethod entity. Used to update payment method settings via the admin API.",
            "format": "int64",
            "examples": [
              42
            ]
          },
          "paymentConfigurationId": {
            "type": "integer",
            "description": "ID of the PaymentConfiguration entity. Used to update merchant configuration via the admin API. Null if no configuration is linked.",
            "format": "int64",
            "examples": [
              7
            ]
          },
          "paymentType": {
            "type": "string",
            "description": "Payment type group.",
            "examples": [
              "PAYMENTCARD"
            ]
          },
          "cardType": {
            "type": "string",
            "description": "Specific payment type.",
            "examples": [
              "VISA"
            ]
          },
          "provider": {
            "type": "string",
            "description": "Payment service provider.",
            "examples": [
              "NETAXEPT"
            ]
          },
          "name": {
            "type": "string",
            "description": "Account name from the payment configuration.",
            "examples": [
              "Entur App"
            ]
          },
          "config": {
            "description": "Typed merchant configuration. Sensitive fields are masked: non-empty values replaced with ***, empty or null values returned as-is. The active subtype is determined by the provider field.",
            "allOf": [
              {
                "$ref": "#/components/schemas/PartnerMerchantConfig"
              }
            ]
          }
        }
      },
      "PartnerMerchantConfig": {
        "required": [
          "provider"
        ],
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "description": "Identifies which subtype this config is.",
            "enum": [
              "VIPPS",
              "NETAXEPT",
              "NETS",
              "XLEDGER"
            ]
          }
        },
        "description": "Base type for provider-specific merchant configuration. Sensitive fields are masked: non-empty values become ***, empty or null values are returned as-is.",
        "discriminator": {
          "propertyName": "provider",
          "mapping": {
            "VIPPS": "#/components/schemas/VippsPartnerConfig",
            "NETAXEPT": "#/components/schemas/NetaxeptPartnerConfig",
            "NETS": "#/components/schemas/NetsPartnerConfig",
            "XLEDGER": "#/components/schemas/XledgerPartnerConfig"
          }
        }
      },
      "VippsPartnerConfig": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PartnerMerchantConfig"
          },
          {
            "type": "object",
            "properties": {
              "merchantSerialNumber": {
                "type": "string",
                "examples": [
                  "123456"
                ]
              },
              "clientId": {
                "type": "string",
                "examples": [
                  "my-client-id"
                ]
              },
              "clientSecret": {
                "type": "string",
                "description": "Masked. Non-empty values are replaced with ***.",
                "examples": [
                  "***"
                ]
              },
              "primarySubscriptionKey": {
                "type": "string",
                "description": "Masked. Non-empty values are replaced with ***.",
                "examples": [
                  "***"
                ]
              },
              "secondarySubscriptionKey": {
                "type": "string",
                "description": "Masked. Non-empty values are replaced with ***.",
                "examples": [
                  "***"
                ]
              },
              "activeSubscriptionKey": {
                "type": "string",
                "description": "Which subscription key is used for calls to Vipps.",
                "enum": [
                  "PRIMARY",
                  "SECONDARY"
                ],
                "examples": [
                  "PRIMARY"
                ]
              },
              "isApp": {
                "type": "boolean",
                "examples": [
                  true
                ]
              }
            }
          }
        ]
      },
      "NetaxeptPartnerConfig": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PartnerMerchantConfig"
          },
          {
            "type": "object",
            "properties": {
              "merchantId": {
                "type": "string",
                "examples": [
                  "12002714"
                ]
              },
              "token": {
                "type": "string",
                "description": "Masked. Non-empty values are replaced with ***.",
                "examples": [
                  "***"
                ]
              },
              "force3DSecure": {
                "type": "boolean",
                "examples": [
                  false
                ]
              }
            }
          }
        ]
      },
      "NetsPartnerConfig": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PartnerMerchantConfig"
          },
          {
            "type": "object",
            "properties": {
              "terminalType": {
                "type": "string",
                "examples": [
                  "ATTENDED"
                ]
              }
            }
          }
        ]
      },
      "XledgerPartnerConfig": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PartnerMerchantConfig"
          }
        ]
      },
      "PartnerResponse": {
        "required": [
          "codeSpace",
          "legalName",
          "organisationId",
          "tradingName"
        ],
        "type": "object",
        "properties": {
          "organisationId": {
            "type": "integer",
            "format": "int64",
            "examples": [
              2
            ]
          },
          "codeSpace": {
            "type": "string",
            "examples": [
              "NSB"
            ]
          },
          "tradingName": {
            "type": "string",
            "examples": [
              "Vy"
            ]
          },
          "legalName": {
            "type": "string",
            "examples": [
              "VY GROUP AS"
            ]
          }
        }
      },
      "CreatePartnerRequest": {
        "required": [
          "codeSpace",
          "legalName",
          "organisationId",
          "tradingName"
        ],
        "type": "object",
        "properties": {
          "organisationId": {
            "type": "integer",
            "format": "int64",
            "examples": [
              1
            ]
          },
          "codeSpace": {
            "maxLength": 50,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9-]+$",
            "type": "string",
            "examples": [
              "ENT"
            ]
          },
          "tradingName": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string",
            "examples": [
              "Entur"
            ]
          },
          "legalName": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string",
            "examples": [
              "ENTUR AS"
            ]
          }
        }
      },
      "CreditTransactionResponse": {
        "title": "CreditTransaction",
        "required": [
          "amount",
          "paymentId",
          "paymentTransactionId",
          "reimbursementTypeGroup"
        ],
        "type": "object",
        "properties": {
          "amount": {
            "type": "string",
            "description": "Amount to credit, represented in the standard currency. Maximum (totalDigits: 18, fractionDigits: 5) according to ISO 20022. The integer and fractional digits are separated by a dot.",
            "examples": [
              "450.00"
            ]
          },
          "createdAt": {
            "type": "string",
            "description": "Timestamp for when transaction was first created.",
            "format": "date-time",
            "readOnly": true
          },
          "creditedAt": {
            "type": "string",
            "description": "Time when credit was confirmed.",
            "format": "date-time",
            "examples": [
              "2025-01-12T16:13:13Z"
            ]
          },
          "currency": {
            "type": "string",
            "description": "3-letter ISO 4217 currency code. Default is NOK.",
            "examples": [
              "NOK"
            ]
          },
          "newGiftCardId": {
            "type": "string",
            "description": "Reference to the gift card id (contract uuid) the credited payment transaction belongs to. Note: This field will be set if the transaction was credited to a gift card.",
            "readOnly": true,
            "examples": [
              "0068a450-066f-442d-8117-1543fe2b1e0e"
            ]
          },
          "paymentId": {
            "type": "integer",
            "description": "Reference to the payment the credited payment transaction belongs to.",
            "format": "int64",
            "examples": [
              1
            ]
          },
          "paymentTransactionId": {
            "type": "integer",
            "description": "Reference to the transaction this credit transaction credits.",
            "format": "int64",
            "examples": [
              10
            ]
          },
          "reimbursementMethod": {
            "type": "string",
            "description": "Specific type of reimbursement method.",
            "examples": [
              "VISA"
            ]
          },
          "reimbursementTypeGroup": {
            "type": "string",
            "description": "General type of reimbursement method.",
            "examples": [
              "PAYMENTCARD"
            ]
          },
          "rrn": {
            "type": "string",
            "description": "Reconciliation reference number used to track a transaction through different economy systems.",
            "examples": [
              "000012345678"
            ]
          },
          "status": {
            "type": "string",
            "description": "Status of this credit transaction.",
            "enum": [
              "CREATED",
              "CREDITED"
            ],
            "examples": [
              "CREATED"
            ]
          },
          "transactionData": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Extra transaction data from external client. Only relevant for clients using the import flow.",
            "examples": [
              {
                "extraData": "any extra data you want to add"
              }
            ]
          },
          "updatedAt": {
            "type": "string",
            "description": "Timestamp for when transaction was last updated.",
            "format": "date-time",
            "readOnly": true,
            "examples": [
              "2025-01-12T16:13:13Z"
            ]
          }
        },
        "description": "Represents a credit transaction referring to a payment transaction.",
        "examples": [
          {
            "amount": "450.00",
            "createdAt": "2025-01-12T16:08:03Z",
            "creditedAt": "2025-01-12T16:13:13Z",
            "currency": "NOK",
            "newGiftCardId": "0068a450-066f-442d-8117-1543fe2b1e0e",
            "paymentId": 1,
            "paymentTransactionId": 10,
            "reimbursementMethod": "VISA",
            "reimbursementTypeGroup": "PAYMENTCARD",
            "rrn": "000123456123",
            "status": "CREATED",
            "transactionData": {
              "extraData": "any extra data you want to add"
            },
            "updatedAt": "2025-01-12T16:13:13Z"
          }
        ]
      },
      "CreditResponse": {
        "title": "Credit",
        "required": [
          "creditId",
          "creditTransactions",
          "orderId",
          "orderVersion",
          "totalCreditAmount"
        ],
        "type": "object",
        "properties": {
          "active": {
            "type": "boolean",
            "description": "If active is false, credit is considered uneditable. The only way to change this property is through an internal Admin endpoint or the mergePatch endpoint. Editable: true",
            "examples": [
              false
            ]
          },
          "creditId": {
            "type": "integer",
            "description": "Identification of this credit resource.",
            "format": "int64",
            "examples": [
              1
            ]
          },
          "creditTransactions": {
            "type": "array",
            "description": "List of individual transactions to credit.",
            "items": {
              "$ref": "#/components/schemas/CreditTransactionResponse"
            },
            "examples": [
              [
                {
                  "amount": "450.00",
                  "createdAt": "2025-01-12T16:08:03Z",
                  "creditedAt": "2025-01-12T16:13:13Z",
                  "currency": "NOK",
                  "newGiftCardId": "0068a450-066f-442d-8117-1543fe2b1e0e",
                  "paymentId": 1,
                  "paymentTransactionId": 10,
                  "reimbursementMethod": "VISA",
                  "reimbursementTypeGroup": "PAYMENTCARD",
                  "rrn": "000123456123",
                  "status": "CREATED",
                  "transactionData": {
                    "extraData": "any extra data you want to add"
                  },
                  "updatedAt": "2025-01-12T16:13:13Z"
                }
              ]
            ]
          },
          "currency": {
            "type": "string",
            "description": "The currency used for this credit.",
            "examples": [
              "NOK"
            ]
          },
          "customerNumber": {
            "type": "string",
            "description": "ID of the customer who owns this credit.",
            "examples": [
              "123456789"
            ]
          },
          "orderId": {
            "type": "string",
            "description": "ID of the order this payment belongs to.",
            "examples": [
              "HE8NDS7XY"
            ]
          },
          "orderVersion": {
            "type": "integer",
            "description": "Version of the order this credit belongs to.",
            "format": "int32",
            "examples": [
              1
            ]
          },
          "organisationId": {
            "type": "integer",
            "description": "ID of the organisation who created this credit.",
            "format": "int64",
            "examples": [
              1
            ]
          },
          "settlementId": {
            "type": "integer",
            "description": "Supplied to the client by an external system for handling settlements. For Internal Entur Clients this is Entur’s Electronic Journal.",
            "format": "int64"
          },
          "totalCreditAmount": {
            "type": "string",
            "description": "Total amount to credit, represented in the standard currency. Maximum (totalDigits: 18, fractionDigits: 5) according to ISO 20022. The integer and fractional digits are separated by a dot.",
            "examples": [
              "450.00"
            ]
          }
        },
        "description": "Information about credits performed on an order.",
        "examples": [
          {
            "active": true,
            "creditId": 1,
            "creditTransactions": [
              {
                "amount": "450.00",
                "createdAt": "2025-01-12T16:08:03Z",
                "creditedAt": "2025-01-12T16:13:13Z",
                "currency": "NOK",
                "newGiftCardId": "0068a450-066f-442d-8117-1543fe2b1e0e",
                "paymentId": 1,
                "paymentTransactionId": 10,
                "reimbursementMethod": "VISA",
                "reimbursementTypeGroup": "PAYMENTCARD",
                "rrn": "000123456123",
                "status": "CREATED",
                "transactionData": {
                  "extraData": "any extra data you want to add"
                },
                "updatedAt": "2025-01-12T16:13:13Z"
              }
            ],
            "currency": "NOK",
            "customerNumber": "123456789",
            "orderId": "ABCD1234",
            "orderVersion": 1,
            "organisationId": 1,
            "settlementId": 1245,
            "totalCreditAmount": "450.00"
          }
        ]
      },
      "PaymentError": {
        "title": "PaymentError",
        "required": [
          "error",
          "exception",
          "message",
          "path",
          "status",
          "timestamp"
        ],
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "The error that occurred.",
            "examples": [
              "Internal Server Error"
            ]
          },
          "exception": {
            "type": "string",
            "description": "What exception caused the error.",
            "examples": [
              "org.entur.payment.faulthandling.exceptions.psp.InternalPSPFailureException"
            ]
          },
          "message": {
            "type": "string",
            "description": "A message detailing the error.",
            "examples": [
              "An internal error occurred in the PSP. message='Unable to sale', errorCode='99', errorSource='Netaxept', errorText='Internal failure'"
            ]
          },
          "path": {
            "type": "string",
            "description": "The url path that was accessed when the error happenened.",
            "examples": [
              "/v1/payments/1/transactions/1/capture"
            ]
          },
          "status": {
            "type": "integer",
            "description": "The http status of the response.",
            "format": "int32",
            "examples": [
              500
            ]
          },
          "timestamp": {
            "type": "string",
            "description": "When the error occurred",
            "format": "date-time",
            "examples": [
              "2025-01-12T16:13:13Z"
            ]
          },
          "errorReason": {
            "type": "string",
            "description": "Populated when the client is expected to act on the error. Possible values:\n\n- `SOFT_DECLINE`: payments by card or PayPal. The issuer requires strong customer authentication (3-D Secure), or PayPal could not complete the payment. Let the customer go through the payment flow again and authenticate.\n- `REFUSED_BY_ISSUER`: payments and credits by card or PayPal. The issuer or PayPal refused the transaction. Retrying will not help.\n- `ISSUER_UNAVAILABLE`: payments and credits by card. The issuer was temporarily unavailable and the transaction was not processed. Retry later.\n- `RESOURCE_BUSY`: credits of invoice payments. The invoice is being processed by another request. Retry later.\n- `USER_ERROR`: payments by card. The card was declined for a reason the customer can fix, such as insufficient funds, wrong CVC or an expired card. Ask the customer to correct it or use another card.\n- `COMPLIANCE_CHECK_FAILED`: recurring card payments. The agreement was created without strong customer authentication. Create a new agreement where the customer authenticates.\n- `PARTIALLY_CREDITED`: only `POST /v1/credits/{creditId}/execute`. Some, but not all, payment transactions in the credit were credited; the message lists them. Execute the credit again to credit the rest.",
            "examples": [
              "SOFT_DECLINE"
            ]
          }
        },
        "x-examples": {},
        "examples": [
          {
            "error": "Internal Server Error",
            "exception": "org.entur.payment.faulthandling.exceptions.psp.InternalPSPFailureException",
            "message": "An internal error occurred in the PSP. message='Unable to sale', errorCode='99', errorSource='Netaxept', errorText='Internal failure'",
            "path": "/v1/payments/1/transactions/1/capture",
            "status": 500,
            "timestamp": "2025-08-24T14:15:22Z"
          }
        ]
      },
      "PaymentConfigurationResponse": {
        "title": "PaymentConfigurationResponse",
        "required": [
          "accountName",
          "id",
          "paymentProvider"
        ],
        "type": "object",
        "properties": {
          "accountName": {
            "type": "string",
            "description": "Name describing the owner of the configuration. Usually the name of the client.",
            "examples": [
              "Entur Test"
            ]
          },
          "id": {
            "type": "integer",
            "description": "Unique identifier of this payment configuration.",
            "format": "int64",
            "examples": [
              1
            ]
          },
          "merchantConfig": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            },
            "description": "Key/value map of merchant configuration parameters needed for each merchant. See documentation for specific merchant on which parameters are required.",
            "examples": [
              {
                "someKey": {
                  "configParam": "configValue"
                }
              }
            ]
          },
          "paymentProvider": {
            "type": "string",
            "description": "The payment service provider this configuration is used for. This is not necessarily a 3rd party provider. This will control the way the API is used.",
            "examples": [
              "NETAXEPT"
            ]
          }
        },
        "description": "Current payment configuration set up for psp-client relationship.",
        "examples": [
          {
            "accountName": "Entur Test",
            "id": 1,
            "merchantConfig": {
              "someKey": {
                "configParam": "configValue"
              }
            },
            "paymentProvider": "NETAXEPT"
          }
        ]
      },
      "Operation": {
        "type": "string",
        "description": "A transaction has a list of operations performed on a transaction. These operations can have one of the values in this enum.",
        "enum": [
          "AUTHENTICATE",
          "CANCEL",
          "CAPTURE",
          "CREATE",
          "CREDIT",
          "IMPORT",
          "INITIATE",
          "REJECT",
          "SOFT_DECLINE",
          "ON_HOLD",
          "AUTHORIZE",
          "AUTHORIZE_INCREMENT",
          "AUTHORIZE_REVERSE"
        ],
        "examples": [
          "CREATE"
        ]
      },
      "ErrorResponse": {
        "title": "Error",
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "The error code. Used in combination with the error source to find more information about the error.",
            "examples": [
              "25"
            ]
          },
          "source": {
            "type": "string",
            "description": "Where the error originates from.",
            "examples": [
              "Netaxept"
            ]
          },
          "message": {
            "type": "string",
            "description": "A description of the error that occurred.",
            "examples": [
              "Transaction not found."
            ]
          }
        },
        "description": "Information about an error that occurred.",
        "examples": [
          {
            "code": "25",
            "source": "Netaxept",
            "message": "Transaction not found."
          }
        ]
      },
      "TransactionOperationResponse": {
        "title": "TransactionOperation",
        "required": [
          "amount",
          "operation",
          "pos",
          "timestamp"
        ],
        "type": "object",
        "properties": {
          "amount": {
            "type": "string",
            "description": "Amount for this operation, represented in the standard currency. Maximum (totalDigits: 18, fractionDigits: 5) according to ISO 20022. The integer and fractional digits are separated by a dot.  ",
            "examples": [
              "450.00"
            ]
          },
          "distributionChannelId": {
            "type": "string",
            "description": "Distribution Channels controls which organisations can sell, refund or inform on available products or salepoints. The distribution channel id represents a specific distribution channel.",
            "examples": [
              "ENT:DistributionChannel:Test"
            ]
          },
          "operation": {
            "$ref": "#/components/schemas/Operation"
          },
          "pos": {
            "type": "string",
            "description": "Point-of-sale id which performed this operation.",
            "examples": [
              "18930345"
            ]
          },
          "timestamp": {
            "type": "string",
            "description": "Time when operation was completed. A date without a time zone in the ISO 8601 calendar system.",
            "format": "date-time",
            "examples": [
              "2025-01-12T16:13:13Z"
            ]
          },
          "error": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        },
        "description": "Describes an operation performed on a transaction.",
        "examples": [
          {
            "amount": "450.00",
            "distributionChannelId": "ENT:DistributionChannel:Test",
            "operation": "CREATE",
            "pos": "18930345",
            "timestamp": "2025-08-24T14:15:22Z",
            "error": {
              "code": "25",
              "source": "Netaxept",
              "message": "Transaction not found."
            }
          }
        ]
      },
      "PaymentType": {
        "type": "string",
        "description": "The actual type of payment.",
        "enum": [
          "AMEX",
          "BANKAXEPT",
          "COLLECTOR",
          "GIFTCARD",
          "MASTERCARD",
          "PAYPAL",
          "VIPPS",
          "VISA",
          "XLEDGER",
          "COLLECTOR_B2B",
          "TWO_B2B",
          "TWO_B2B_CONSOLIDATED"
        ],
        "examples": [
          "VISA"
        ]
      },
      "PaymentTypeFee": {
        "title": "PaymentTypeFee",
        "required": [
          "amount",
          "currency",
          "name",
          "taxAmount"
        ],
        "type": "object",
        "properties": {
          "amount": {
            "maxLength": 19,
            "pattern": "^[1-9][0-9]{0,17}\\.[0-9]{1,5}$|^([1-9])[0-9]{0,17}$|^[0]\\.[1-9][0-9]{1,5}$",
            "type": "string",
            "description": "Total amount including taxes",
            "examples": [
              "100.00"
            ]
          },
          "currency": {
            "type": "string",
            "description": "The currency in 3-letter ISO-4217 standard codes",
            "default": "NOK",
            "examples": [
              "NOK"
            ]
          },
          "name": {
            "pattern": "[A-Z]{3}:[^:]+:[^:]+",
            "type": "string",
            "description": "Name of the fee in NeTEX format identifying a fee.",
            "examples": [
              "ENT:PaymentTypeFee:Collector"
            ]
          },
          "reason": {
            "type": "string",
            "description": "The reason for the fee, if applicable.",
            "examples": [
              "Walley Invoice"
            ]
          },
          "taxAmount": {
            "type": "string",
            "description": "The total amount of taxes this fee consists of",
            "examples": [
              "25.00"
            ]
          },
          "taxCode": {
            "type": "string",
            "description": "The tax code for the tax rate, if applicable",
            "examples": [
              "3"
            ]
          },
          "taxRate": {
            "type": "string",
            "description": "The tax rate of this fee, if applicable",
            "examples": [
              "25.00"
            ]
          }
        },
        "description": "Fee related to a payment method.",
        "deprecated": true,
        "examples": [
          {
            "amount": "450.00",
            "currency": "NOK",
            "name": "ENT:PaymentTypeFee:Collector",
            "reason": "Walley Invoice",
            "taxAmount": "25.00",
            "taxCode": "3",
            "taxRate": "25.00"
          }
        ]
      },
      "PaymentTypeGroup": {
        "type": "string",
        "description": "A PaymentTypeGroup used to override which kind of method to use for reimbursement, instead of using same as used for the payment transaction.This will only take effect if the payment method on the payment transaction allows for overriding.",
        "enum": [
          "AGENT",
          "CASH",
          "ECARD",
          "GIFTCARD",
          "INVOICE",
          "MOBILE",
          "PAYMENTCARD",
          "PAYPAL",
          "REMITTED",
          "REQUISITION"
        ],
        "examples": [
          "CASH"
        ]
      },
      "TransactionStatus": {
        "type": "string",
        "description": "Current state of the transaction.",
        "enum": [
          "CANCELLED",
          "CAPTURED",
          "CREATED",
          "CREDITED",
          "INITIATED",
          "REJECTED"
        ],
        "examples": [
          "CREATED"
        ]
      },
      "TransactionSummary": {
        "title": "TransactionSummary",
        "required": [
          "capturedAmount",
          "creditedAmount",
          "remainingAmountToCapture",
          "remainingAmountToCredit"
        ],
        "type": "object",
        "properties": {
          "capturedAmount": {
            "type": "string",
            "description": "Captured amount, represented in the standard currency. Maximum (totalDigits: 18, fractionDigits: 5) according to ISO 20022. The integer and fractional digits are separated by a dot.  ",
            "examples": [
              "450.00"
            ]
          },
          "creditedAmount": {
            "type": "string",
            "description": "Credited amount, represented in the standard currency. Maximum (totalDigits: 18, fractionDigits: 5) according to ISO 20022. The integer and fractional digits are separated by a dot.  ",
            "examples": [
              "450.00"
            ]
          },
          "remainingAmountToCapture": {
            "type": "string",
            "description": "Remaining amount to capture, represented in the standard currency. Maximum (totalDigits: 18, fractionDigits: 5) according to ISO 20022. The integer and fractional digits are separated by a dot.  ",
            "examples": [
              "450.00"
            ]
          },
          "remainingAmountToCredit": {
            "type": "string",
            "description": "Remaining amount to credit, represented in the standard currency. Maximum (totalDigits: 18, fractionDigits: 5) according to ISO 20022. The integer and fractional digits are separated by a dot.  ",
            "examples": [
              "450.00"
            ]
          }
        },
        "description": "Aggregated summary of amounts on a transaction.",
        "examples": [
          {
            "capturedAmount": "450.00",
            "creditedAmount": "450.00",
            "remainingAmountToCapture": "0.00",
            "remainingAmountToCredit": "0.00"
          }
        ]
      },
      "TransactionResponse": {
        "title": "Transaction",
        "required": [
          "amount",
          "createdAt",
          "currency",
          "status",
          "transactionId"
        ],
        "type": "object",
        "properties": {
          "amount": {
            "type": "string",
            "description": "Amount to pay, represented in the standard currency unit. Maximum (totalDigits: 18, fractionDigits: 5) according to ISO 20022. The integer and fractional digits are separated by a dot. Deprecated and will be removed in next version of API. Use summary instead.",
            "examples": [
              "450.00"
            ]
          },
          "cardNumber": {
            "type": "string",
            "description": "Last 4 digits in card number (PAN - Personal Account Number)",
            "examples": [
              "0004"
            ]
          },
          "createdAt": {
            "type": "string",
            "description": "Timestamp for when transaction was first created.",
            "format": "date-time",
            "readOnly": true,
            "examples": [
              "2025-09-30T22:00:00Z"
            ]
          },
          "currency": {
            "type": "string",
            "description": "3-letter currency code. (ISO 4217)",
            "default": "NOK",
            "examples": [
              "NOK"
            ]
          },
          "operationLog": {
            "type": "array",
            "description": "Log of each successful operation made on the transaction. Failing operations will not be included.",
            "items": {
              "$ref": "#/components/schemas/TransactionOperationResponse"
            },
            "examples": [
              [
                {
                  "amount": "450.00",
                  "distributionChannelId": "ENT:DistributionChannel:Test",
                  "operation": "CREATE",
                  "pos": "18930345",
                  "timestamp": "2025-08-24T14:15:22Z",
                  "error": {
                    "code": "25",
                    "source": "Netaxept",
                    "message": "Transaction not found."
                  }
                }
              ]
            ]
          },
          "paymentType": {
            "$ref": "#/components/schemas/PaymentType"
          },
          "paymentTypeFee": {
            "deprecated": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentTypeFee"
              }
            ]
          },
          "paymentTypeGroup": {
            "$ref": "#/components/schemas/PaymentTypeGroup"
          },
          "paymentId": {
            "type": "integer",
            "description": "ID of the payment this transaction belongs to.",
            "format": "int64",
            "examples": [
              42
            ]
          },
          "paymentAgreementId": {
            "type": "integer",
            "description": "ID of the payment agreement associated with this transaction, if any.",
            "format": "int64",
            "examples": [
              456
            ]
          },
          "recurringPaymentId": {
            "type": "integer",
            "description": "Reference to the saved payment agreement this transaction will use, if any was specified.",
            "format": "int64",
            "examples": [
              123
            ]
          },
          "rrn": {
            "type": "string",
            "description": "Reconciliation reference number used to track a transaction through different economy systems.",
            "examples": [
              "000012345678"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/TransactionStatus"
          },
          "summary": {
            "$ref": "#/components/schemas/TransactionSummary"
          },
          "transactionData": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Extra transaction data from external client. Only relevant for clients using the import flow.",
            "examples": [
              {
                "extraData": "any extra data you want to add"
              }
            ]
          },
          "transactionId": {
            "type": "integer",
            "description": "ID of the specific transaction.",
            "format": "int64",
            "examples": [
              1
            ]
          },
          "updatedAt": {
            "type": "string",
            "description": "Timestamp for when transaction was last updated.",
            "format": "date-time",
            "readOnly": true,
            "examples": [
              "2025-09-30T22:00:00Z"
            ]
          }
        },
        "description": "Payment transaction information",
        "examples": [
          {
            "amount": "450.00",
            "cardNumber": "0004",
            "createdAt": "2025-01-12T16:08:03Z",
            "currency": "NOK",
            "operationLog": [
              {
                "amount": "450.00",
                "distributionChannelId": "ENT:DistributionChannel:Test",
                "operation": "CREATE",
                "pos": "18930345",
                "timestamp": "2025-08-24T14:15:22Z",
                "error": {
                  "code": "25",
                  "source": "Netaxept",
                  "message": "Transaction not found."
                }
              }
            ],
            "paymentType": "VISA",
            "paymentTypeFee": {
              "amount": "450.00",
              "currency": "NOK",
              "name": "ENT:PaymentTypeFee:Collector",
              "reason": "Walley Invoice",
              "taxAmount": "25.00",
              "taxCode": "3",
              "taxRate": "25.00"
            },
            "paymentTypeGroup": "PAYMENTCARD",
            "paymentId": 42,
            "recurringPaymentId": 1,
            "rrn": "000123456123",
            "status": "CREATED",
            "summary": {
              "capturedAmount": "450.00",
              "creditedAmount": "450.00",
              "remainingAmountToCapture": "0.00",
              "remainingAmountToCredit": "0.00"
            },
            "transactionData": {
              "extraData": "any extra data you want to add"
            },
            "transactionId": 10,
            "updatedAt": "2025-01-12T16:13:13Z"
          }
        ]
      },
      "PaymentResponse": {
        "title": "Payment",
        "required": [
          "createdAt",
          "currency",
          "orderId",
          "orderVersion",
          "organisationId",
          "paymentId",
          "totalAmount"
        ],
        "type": "object",
        "properties": {
          "active": {
            "type": "boolean",
            "description": "This is to block any transactions after the corresponding order version is reset. Clients importing transactions need to either cancel or credit each transaction externally, and the credit the transaction directly using the transaction's credit endpoint. To continue using the same order id, the payment has to be reactivated with the correct total amount before any new actions can be made to this payment. Editable: true",
            "examples": [
              false
            ]
          },
          "createdAt": {
            "type": "string",
            "description": "Timestamp for when payment was created.",
            "format": "date-time",
            "examples": [
              "2025-01-12T16:13:13Z"
            ]
          },
          "currency": {
            "type": "string",
            "description": "3-letter ISO 4217 currency code. Default is NOK.",
            "default": "NOK",
            "examples": [
              "NOK"
            ]
          },
          "customerNumber": {
            "type": "string",
            "description": "ID of the customer who owns this payment.",
            "examples": [
              "123456789"
            ]
          },
          "orderId": {
            "type": "string",
            "description": "Id of the order this payment belongs to.",
            "examples": [
              "HE8NDS7XY"
            ]
          },
          "orderVersion": {
            "type": "integer",
            "description": "Version of the order this payment belongs to.",
            "format": "int32",
            "examples": [
              1
            ]
          },
          "organisationId": {
            "type": "integer",
            "description": "Id of the organisation who created this payment.",
            "format": "int64",
            "examples": [
              1
            ]
          },
          "paymentId": {
            "type": "integer",
            "description": "Id of payment",
            "format": "int64",
            "examples": [
              123
            ]
          },
          "settlementId": {
            "type": "integer",
            "description": "Supplied to the client by an external system for handling settlements. For Internal Entur Clients this is Entur’s Electronic Journal.",
            "format": "int64",
            "examples": [
              18234
            ]
          },
          "totalAmount": {
            "type": "string",
            "description": "Amount to pay, represented in the standard currency. Maximum (totalDigits: 18, fractionDigits: 5) according to ISO 20022. The integer and fractional digits are separated by a dot. Editable: true",
            "examples": [
              "450.00"
            ]
          },
          "transactionHistory": {
            "type": "array",
            "description": "List of all transactions belonging to this payment.",
            "items": {
              "$ref": "#/components/schemas/TransactionResponse"
            },
            "examples": [
              [
                {
                  "amount": "450.00",
                  "cardNumber": "0004",
                  "createdAt": "2025-01-12T16:08:03Z",
                  "currency": "NOK",
                  "operationLog": [
                    {
                      "amount": "450.00",
                      "distributionChannelId": "ENT:DistributionChannel:Test",
                      "operation": "CREATE",
                      "pos": "18930345",
                      "timestamp": "2025-08-24T14:15:22Z",
                      "error": {
                        "code": "25",
                        "source": "Netaxept",
                        "message": "Transaction not found."
                      }
                    }
                  ],
                  "paymentType": "VISA",
                  "paymentTypeFee": {
                    "amount": "450.00",
                    "currency": "NOK",
                    "name": "ENT:PaymentTypeFee:Collector",
                    "reason": "Walley Invoice",
                    "taxAmount": "25.00",
                    "taxCode": "3",
                    "taxRate": "25.00"
                  },
                  "paymentTypeGroup": "PAYMENTCARD",
                  "recurringPaymentId": 1,
                  "rrn": "000123456123",
                  "status": "CREATED",
                  "summary": {
                    "capturedAmount": "450.00",
                    "creditedAmount": "450.00",
                    "remainingAmountToCapture": "0.00",
                    "remainingAmountToCredit": "0.00"
                  },
                  "transactionData": {
                    "extraData": "any extra data you want to add"
                  },
                  "transactionId": 10,
                  "updatedAt": "2025-01-12T16:13:13Z"
                }
              ]
            ]
          },
          "updatedAt": {
            "type": "string",
            "description": "Timestamp for when payment was last updated.",
            "format": "date-time",
            "examples": [
              "2025-01-12T16:13:13Z"
            ]
          }
        },
        "description": "Information about an order's payment.",
        "examples": [
          {
            "active": true,
            "createdAt": "2025-01-12T16:08:03Z",
            "currency": "NOK",
            "customerNumber": "123456789",
            "orderId": "ABCD1234",
            "orderVersion": 1,
            "organisationId": 1,
            "paymentId": 1,
            "settlementId": 1245,
            "totalAmount": "450.00",
            "transactionHistory": [
              {
                "amount": "450.00",
                "cardNumber": "0004",
                "createdAt": "2025-01-12T16:08:03Z",
                "currency": "NOK",
                "operationLog": [
                  {
                    "amount": "450.00",
                    "distributionChannelId": "ENT:DistributionChannel:Test",
                    "operation": "CREATE",
                    "pos": "18930345",
                    "timestamp": "2025-08-24T14:15:22Z",
                    "error": {
                      "code": "25",
                      "source": "Netaxept",
                      "message": "Transaction not found."
                    }
                  }
                ],
                "paymentType": "VISA",
                "paymentTypeFee": {
                  "amount": "450.00",
                  "currency": "NOK",
                  "name": "ENT:PaymentTypeFee:Collector",
                  "reason": "Walley Invoice",
                  "taxAmount": "25.00",
                  "taxCode": "3",
                  "taxRate": "25.00"
                },
                "paymentTypeGroup": "PAYMENTCARD",
                "recurringPaymentId": 1,
                "rrn": "000123456123",
                "status": "CREATED",
                "summary": {
                  "capturedAmount": "450.00",
                  "creditedAmount": "450.00",
                  "remainingAmountToCapture": "0.00",
                  "remainingAmountToCredit": "0.00"
                },
                "transactionData": {
                  "extraData": "any extra data you want to add"
                },
                "transactionId": 10,
                "updatedAt": "2025-01-12T16:13:13Z"
              }
            ],
            "updatedAt": "2025-01-12T16:13:13Z"
          }
        ]
      },
      "PaymentMethodResponse": {
        "title": "PaymentMethodResponse",
        "required": [
          "distributionChannelId",
          "id",
          "paymentTypeGroup"
        ],
        "type": "object",
        "properties": {
          "distributionChannelId": {
            "type": "string",
            "description": "Distribution Channels controls which organisations can sell, refund or inform on available products or salepoints.",
            "examples": [
              "ENT:DistributionChannel:Test"
            ]
          },
          "id": {
            "type": "integer",
            "description": "Unique identifier for a payment method.",
            "format": "int64",
            "examples": [
              1
            ]
          },
          "paymentConfig": {
            "$ref": "#/components/schemas/PaymentConfigurationResponse"
          },
          "paymentType": {
            "type": "string",
            "description": "The actual type of payment.",
            "examples": [
              "VISA"
            ]
          },
          "paymentTypeFee": {
            "deprecated": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentTypeFee"
              }
            ]
          },
          "paymentTypeGroup": {
            "type": "string",
            "description": "Group for the payment type. Payment types which are payment cards is in the PAYMENTCARD group.",
            "examples": [
              "PAYMENTCARD"
            ]
          }
        },
        "description": "Result from creating a PaymentMethod.",
        "examples": [
          {
            "distributionChannelId": "ENT:DistributionChannel:Test",
            "id": 1,
            "paymentConfig": {
              "accountName": "Entur Test",
              "id": 1,
              "merchantConfig": {
                "someKey": {
                  "configParam": "configValue"
                }
              },
              "paymentProvider": "NETAXEPT"
            },
            "paymentType": "VISA",
            "paymentTypeFee": {
              "amount": "450.00",
              "currency": "NOK",
              "name": "ENT:PaymentTypeFee:Collector",
              "reason": "Walley Invoice",
              "taxAmount": "25.00",
              "taxCode": "3",
              "taxRate": "25.00"
            },
            "paymentTypeGroup": "PAYMENTCARD"
          }
        ]
      },
      "PageOfPayment": {
        "title": "PageOfPayment",
        "required": [
          "items",
          "totalItems",
          "totalPages"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "description": "Items on a specific page",
            "readOnly": true,
            "items": {
              "$ref": "#/components/schemas/PaymentResponse"
            }
          },
          "totalItems": {
            "type": "integer",
            "description": "Total number of items",
            "format": "int64",
            "readOnly": true,
            "examples": [
              72
            ]
          },
          "totalPages": {
            "type": "integer",
            "description": "Total number of pages available to browse",
            "format": "int64",
            "readOnly": true,
            "examples": [
              9
            ]
          }
        },
        "description": "Page displays a subset of a list of entities",
        "examples": [
          {
            "items": [
              {
                "active": true,
                "createdAt": "2025-01-12T16:08:03Z",
                "currency": "NOK",
                "customerNumber": "123456789",
                "orderId": "ABCD1234",
                "orderVersion": 1,
                "organisationId": 1,
                "paymentId": 1,
                "settlementId": 1245,
                "totalAmount": "450.00",
                "transactionHistory": [
                  {
                    "amount": "450.00",
                    "cardNumber": "0004",
                    "createdAt": "2025-01-12T16:08:03Z",
                    "currency": "NOK",
                    "operationLog": [
                      {
                        "amount": "450.00",
                        "distributionChannelId": "ENT:DistributionChannel:Test",
                        "operation": "CREATE",
                        "pos": "18930345",
                        "timestamp": "2025-08-24T14:15:22Z",
                        "error": {
                          "code": "25",
                          "source": "Netaxept",
                          "message": "Transaction not found."
                        }
                      }
                    ],
                    "paymentType": "VISA",
                    "paymentTypeFee": {
                      "amount": "450.00",
                      "currency": "NOK",
                      "name": "ENT:PaymentTypeFee:Collector",
                      "reason": "Walley Invoice",
                      "taxAmount": "25.00",
                      "taxCode": "3",
                      "taxRate": "25.00"
                    },
                    "paymentTypeGroup": "PAYMENTCARD",
                    "recurringPaymentId": 1,
                    "rrn": "000123456123",
                    "status": "CREATED",
                    "summary": {
                      "capturedAmount": "450.00",
                      "creditedAmount": "450.00",
                      "remainingAmountToCapture": "0.00",
                      "remainingAmountToCredit": "0.00"
                    },
                    "transactionData": {
                      "extraData": "any extra data you want to add"
                    },
                    "transactionId": 10,
                    "updatedAt": "2025-01-12T16:13:13Z"
                  }
                ],
                "updatedAt": "2025-01-12T16:13:13Z"
              }
            ],
            "totalItems": 1,
            "totalPages": 1
          }
        ]
      },
      "PageOfCredit": {
        "title": "PageOfCredit",
        "required": [
          "items",
          "totalItems",
          "totalPages"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "description": "Items on a specific page",
            "readOnly": true,
            "items": {
              "$ref": "#/components/schemas/CreditResponse"
            },
            "examples": [
              [
                {
                  "active": true,
                  "creditId": 1,
                  "creditTransactions": [
                    {
                      "amount": "450.00",
                      "createdAt": "2025-01-12T16:08:03Z",
                      "creditedAt": "2025-01-12T16:13:13Z",
                      "currency": "NOK",
                      "newGiftCardId": "0068a450-066f-442d-8117-1543fe2b1e0e",
                      "paymentId": 1,
                      "paymentTransactionId": 10,
                      "reimbursementMethod": "VISA",
                      "reimbursementTypeGroup": "PAYMENTCARD",
                      "rrn": "000123456123",
                      "status": "CREATED",
                      "transactionData": {
                        "extraData": "any extra data you want to add"
                      },
                      "updatedAt": "2025-01-12T16:13:13Z"
                    }
                  ],
                  "currency": "NOK",
                  "customerNumber": "123456789",
                  "orderId": "ABCD1234",
                  "orderVersion": 1,
                  "organisationId": 1,
                  "settlementId": 1245,
                  "totalCreditAmount": "450.00"
                }
              ]
            ]
          },
          "totalItems": {
            "type": "integer",
            "description": "Total number of items",
            "format": "int64",
            "readOnly": true,
            "examples": [
              72
            ]
          },
          "totalPages": {
            "type": "integer",
            "description": "Total number of pages available to browse",
            "format": "int64",
            "readOnly": true,
            "examples": [
              9
            ]
          }
        },
        "description": "Page displays a subset of a list of entities",
        "examples": [
          {
            "items": [
              {
                "active": true,
                "creditId": 1,
                "creditTransactions": [
                  {
                    "amount": "450.00",
                    "createdAt": "2025-01-12T16:08:03Z",
                    "creditedAt": "2025-01-12T16:13:13Z",
                    "currency": "NOK",
                    "newGiftCardId": "0068a450-066f-442d-8117-1543fe2b1e0e",
                    "paymentId": 1,
                    "paymentTransactionId": 10,
                    "reimbursementMethod": "VISA",
                    "reimbursementTypeGroup": "PAYMENTCARD",
                    "rrn": "000123456123",
                    "status": "CREATED",
                    "transactionData": {
                      "extraData": "any extra data you want to add"
                    },
                    "updatedAt": "2025-01-12T16:13:13Z"
                  }
                ],
                "currency": "NOK",
                "customerNumber": "123456789",
                "orderId": "ABCD1234",
                "orderVersion": 1,
                "organisationId": 1,
                "settlementId": 1245,
                "totalCreditAmount": "450.00"
              }
            ],
            "totalItems": 1,
            "totalPages": 1
          }
        ]
      },
      "PageOfTransactionResponse": {
        "title": "PageOfTransactionResponse",
        "required": [
          "items",
          "totalItems",
          "totalPages"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "description": "Items on a specific page",
            "readOnly": true,
            "items": {
              "$ref": "#/components/schemas/TransactionResponse"
            }
          },
          "totalItems": {
            "type": "integer",
            "description": "Total number of items",
            "format": "int64",
            "readOnly": true,
            "examples": [
              72
            ]
          },
          "totalPages": {
            "type": "integer",
            "description": "Total number of pages available to browse",
            "format": "int64",
            "readOnly": true,
            "examples": [
              9
            ]
          }
        },
        "description": "Page displays a subset of a list of entities",
        "examples": [
          {
            "items": [
              {
                "amount": "450.00",
                "cardNumber": "0004",
                "createdAt": "2025-01-12T16:08:03Z",
                "currency": "NOK",
                "paymentType": "VISA",
                "paymentTypeGroup": "PAYMENTCARD",
                "recurringPaymentId": 1,
                "rrn": "000123456123",
                "status": "CREATED",
                "summary": {
                  "capturedAmount": "450.00",
                  "creditedAmount": "450.00",
                  "remainingAmountToCapture": "0.00",
                  "remainingAmountToCredit": "0.00"
                },
                "transactionId": 10,
                "updatedAt": "2025-01-12T16:13:13Z"
              }
            ],
            "totalItems": 1,
            "totalPages": 1
          }
        ]
      }
    },
    "responses": {
      "noContent": {
        "description": "No Content"
      },
      "notFound": {
        "description": "Not Found",
        "content": {
          "application/hal+json": {
            "schema": {
              "$ref": "#/components/schemas/PaymentError"
            }
          }
        }
      },
      "internalServerError": {
        "description": "Internal Server Error",
        "content": {
          "application/hal+json": {
            "schema": {
              "$ref": "#/components/schemas/PaymentError"
            }
          }
        }
      },
      "badRequest": {
        "description": "Bad Request",
        "content": {
          "application/hal+json": {
            "schema": {
              "$ref": "#/components/schemas/PaymentError"
            }
          }
        }
      },
      "conflict": {
        "description": "Conflict",
        "content": {
          "application/hal+json": {
            "schema": {
              "$ref": "#/components/schemas/PaymentError"
            }
          }
        }
      },
      "notImplemented": {
        "description": "Not Implemented",
        "content": {
          "application/hal+json": {
            "schema": {
              "$ref": "#/components/schemas/PaymentError"
            }
          }
        }
      }
    },
    "parameters": {
      "kafkaErrorPathParam": {
        "name": "id",
        "in": "path",
        "description": "Kafka error id",
        "required": true,
        "style": "simple",
        "explode": false,
        "schema": {
          "type": "integer",
          "format": "int64"
        }
      },
      "paymentConfigurationIdPathParam": {
        "name": "id",
        "in": "path",
        "description": "Payment configuration id",
        "required": true,
        "style": "simple",
        "explode": false,
        "schema": {
          "type": "integer",
          "format": "int64"
        }
      },
      "paymentMethodIdPathParam": {
        "name": "id",
        "in": "path",
        "description": "Payment method id",
        "required": true,
        "style": "simple",
        "explode": false,
        "schema": {
          "type": "integer",
          "format": "int64"
        }
      },
      "dciHeader": {
        "name": "Entur-Distribution-Channel",
        "in": "header",
        "description": "Distribution channel identifier.",
        "required": true,
        "style": "simple",
        "explode": false,
        "schema": {
          "type": "string"
        }
      },
      "posHeader": {
        "name": "Entur-POS",
        "in": "header",
        "description": "Point-of-sale identifier.",
        "required": true,
        "style": "simple",
        "explode": false,
        "schema": {
          "type": "string"
        }
      },
      "creditIdPathParam": {
        "name": "creditId",
        "in": "path",
        "description": "creditId",
        "required": true,
        "style": "simple",
        "explode": false,
        "schema": {
          "type": "integer",
          "format": "int64"
        }
      },
      "transactionIdPathParam": {
        "name": "transactionId",
        "in": "path",
        "description": "transactionId",
        "required": true,
        "style": "simple",
        "explode": false,
        "schema": {
          "type": "integer",
          "format": "int64"
        }
      },
      "paymentIdPathParam": {
        "name": "paymentId",
        "in": "path",
        "description": "paymentId",
        "required": true,
        "style": "simple",
        "explode": false,
        "schema": {
          "type": "integer",
          "format": "int64"
        }
      },
      "paginationPageParam": {
        "name": "page",
        "in": "query",
        "description": "Selects a specific page in the collection",
        "required": false,
        "style": "form",
        "explode": true,
        "schema": {
          "type": "integer",
          "format": "int32",
          "default": 1
        }
      },
      "paginationPerPageParam": {
        "name": "perPage",
        "in": "query",
        "description": "Selects the number of elements per page",
        "required": false,
        "style": "form",
        "explode": true,
        "schema": {
          "type": "integer",
          "format": "int32",
          "default": 30
        }
      },
      "ET-Client-Name": {
        "name": "ET-Client-Name",
        "in": "header",
        "description": "Entur Client Header.\nIt is required that all consumers identify themselves by using this header.\nEntur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers.\nThe structure of ET-Client-Name should be: `<company>-<application>`.",
        "required": false,
        "style": "simple",
        "explode": false,
        "schema": {
          "type": "string"
        }
      },
      "X-Correlation-Id": {
        "name": "X-Correlation-Id",
        "in": "header",
        "description": "Correlation id",
        "required": false,
        "style": "simple",
        "explode": false,
        "schema": {
          "type": "string"
        }
      }
    },
    "securitySchemes": {
      "jwt": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  }
}