{
  "openapi": "3.1.0",
  "info": {
    "title": "Backstop Local Sandbox API",
    "version": "0.1.0",
    "description": "Lokale Testguthaben. Vorprovisionierte opaque Bearer-Sitzungen; keine echte Exchange oder Blockchain. Kein öffentlicher Login."
  },
  "servers": [
    {
      "url": "http://127.0.0.1:3000"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerSession": {
        "type": "http",
        "scheme": "bearer",
        "description": "Kurzlebiges vorprovisioniertes 256-Bit-Sitzungstoken. Kein JWT."
      }
    }
  },
  "paths": {
    "/v1/health": {
      "get": {
        "operationId": "health",
        "summary": "health",
        "description": "Zusätzlich gelten Objektzuständigkeit und aktueller Zustand. Siehe CPP-API.md für Rollen, Grenzen und Wiederholungsregeln.",
        "x-roles": [],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Erfolgreiche Aktion; für dieselbe Kennung identische gespeicherte Antwort"
          },
          "400": {
            "description": "Ungültige Eingabe"
          },
          "401": {
            "description": "Keine gültige Sitzung"
          },
          "403": {
            "description": "Aktion oder Signatur nicht erlaubt"
          },
          "404": {
            "description": "Unbekanntes oder nicht sichtbares Objekt"
          },
          "409": {
            "description": "Zustand, Annahmeregel oder Idempotenzkonflikt"
          },
          "413": {
            "description": "Nachricht zu groß"
          },
          "415": {
            "description": "Nicht unterstützter Inhaltstyp"
          },
          "429": {
            "description": "Anfragelimit"
          },
          "500": {
            "description": "Interner Fehler"
          }
        }
      }
    },
    "/v1/openapi.json": {
      "get": {
        "operationId": "specification",
        "summary": "specification",
        "description": "Zusätzlich gelten Objektzuständigkeit und aktueller Zustand. Siehe CPP-API.md für Rollen, Grenzen und Wiederholungsregeln.",
        "x-roles": [],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Erfolgreiche Aktion; für dieselbe Kennung identische gespeicherte Antwort"
          },
          "400": {
            "description": "Ungültige Eingabe"
          },
          "401": {
            "description": "Keine gültige Sitzung"
          },
          "403": {
            "description": "Aktion oder Signatur nicht erlaubt"
          },
          "404": {
            "description": "Unbekanntes oder nicht sichtbares Objekt"
          },
          "409": {
            "description": "Zustand, Annahmeregel oder Idempotenzkonflikt"
          },
          "413": {
            "description": "Nachricht zu groß"
          },
          "415": {
            "description": "Nicht unterstützter Inhaltstyp"
          },
          "429": {
            "description": "Anfragelimit"
          },
          "500": {
            "description": "Interner Fehler"
          }
        }
      }
    },
    "/v1/me": {
      "get": {
        "operationId": "me",
        "summary": "me",
        "description": "Zusätzlich gelten Objektzuständigkeit und aktueller Zustand. Siehe CPP-API.md für Rollen, Grenzen und Wiederholungsregeln.",
        "x-roles": [],
        "security": [
          {
            "bearerSession": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Erfolgreiche Aktion; für dieselbe Kennung identische gespeicherte Antwort"
          },
          "400": {
            "description": "Ungültige Eingabe"
          },
          "401": {
            "description": "Keine gültige Sitzung"
          },
          "403": {
            "description": "Aktion oder Signatur nicht erlaubt"
          },
          "404": {
            "description": "Unbekanntes oder nicht sichtbares Objekt"
          },
          "409": {
            "description": "Zustand, Annahmeregel oder Idempotenzkonflikt"
          },
          "413": {
            "description": "Nachricht zu groß"
          },
          "415": {
            "description": "Nicht unterstützter Inhaltstyp"
          },
          "429": {
            "description": "Anfragelimit"
          },
          "500": {
            "description": "Interner Fehler"
          }
        }
      }
    },
    "/v1/me/balance": {
      "get": {
        "operationId": "balance",
        "summary": "balance",
        "description": "Zusätzlich gelten Objektzuständigkeit und aktueller Zustand. Siehe CPP-API.md für Rollen, Grenzen und Wiederholungsregeln.",
        "x-roles": [
          "buyer",
          "merchant"
        ],
        "security": [
          {
            "bearerSession": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Erfolgreiche Aktion; für dieselbe Kennung identische gespeicherte Antwort"
          },
          "400": {
            "description": "Ungültige Eingabe"
          },
          "401": {
            "description": "Keine gültige Sitzung"
          },
          "403": {
            "description": "Aktion oder Signatur nicht erlaubt"
          },
          "404": {
            "description": "Unbekanntes oder nicht sichtbares Objekt"
          },
          "409": {
            "description": "Zustand, Annahmeregel oder Idempotenzkonflikt"
          },
          "413": {
            "description": "Nachricht zu groß"
          },
          "415": {
            "description": "Nicht unterstützter Inhaltstyp"
          },
          "429": {
            "description": "Anfragelimit"
          },
          "500": {
            "description": "Interner Fehler"
          }
        }
      }
    },
    "/v1/reconciliation": {
      "get": {
        "operationId": "reconciliation",
        "summary": "reconciliation",
        "description": "Zusätzlich gelten Objektzuständigkeit und aktueller Zustand. Siehe CPP-API.md für Rollen, Grenzen und Wiederholungsregeln.",
        "x-roles": [
          "pool-operator"
        ],
        "security": [
          {
            "bearerSession": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Erfolgreiche Aktion; für dieselbe Kennung identische gespeicherte Antwort"
          },
          "400": {
            "description": "Ungültige Eingabe"
          },
          "401": {
            "description": "Keine gültige Sitzung"
          },
          "403": {
            "description": "Aktion oder Signatur nicht erlaubt"
          },
          "404": {
            "description": "Unbekanntes oder nicht sichtbares Objekt"
          },
          "409": {
            "description": "Zustand, Annahmeregel oder Idempotenzkonflikt"
          },
          "413": {
            "description": "Nachricht zu groß"
          },
          "415": {
            "description": "Nicht unterstützter Inhaltstyp"
          },
          "429": {
            "description": "Anfragelimit"
          },
          "500": {
            "description": "Interner Fehler"
          }
        }
      }
    },
    "/v1/payments": {
      "post": {
        "operationId": "offer",
        "summary": "offer",
        "description": "Zusätzlich gelten Objektzuständigkeit und aktueller Zustand. Siehe CPP-API.md für Rollen, Grenzen und Wiederholungsregeln.",
        "x-roles": [
          "provider"
        ],
        "security": [
          {
            "bearerSession": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{7,127}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9-]{0,63}$",
                    "maxLength": 64
                  },
                  "poolId": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9-]{0,63}$",
                    "maxLength": 64
                  },
                  "amountMinor": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  },
                  "buyerId": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9-]{0,63}$",
                    "maxLength": 64
                  },
                  "sellerId": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9-]{0,63}$",
                    "maxLength": 64
                  }
                },
                "required": [
                  "id",
                  "poolId",
                  "amountMinor",
                  "buyerId",
                  "sellerId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Erfolgreiche Aktion; für dieselbe Kennung identische gespeicherte Antwort"
          },
          "400": {
            "description": "Ungültige Eingabe"
          },
          "401": {
            "description": "Keine gültige Sitzung"
          },
          "403": {
            "description": "Aktion oder Signatur nicht erlaubt"
          },
          "404": {
            "description": "Unbekanntes oder nicht sichtbares Objekt"
          },
          "409": {
            "description": "Zustand, Annahmeregel oder Idempotenzkonflikt"
          },
          "413": {
            "description": "Nachricht zu groß"
          },
          "415": {
            "description": "Nicht unterstützter Inhaltstyp"
          },
          "429": {
            "description": "Anfragelimit"
          },
          "500": {
            "description": "Interner Fehler"
          }
        }
      }
    },
    "/v1/payments/{id}": {
      "get": {
        "operationId": "payment",
        "summary": "payment",
        "description": "Zusätzlich gelten Objektzuständigkeit und aktueller Zustand. Siehe CPP-API.md für Rollen, Grenzen und Wiederholungsregeln.",
        "x-roles": [
          "buyer",
          "merchant",
          "provider",
          "support",
          "reviewer"
        ],
        "security": [
          {
            "bearerSession": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,63}$",
              "maxLength": 64
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Erfolgreiche Aktion; für dieselbe Kennung identische gespeicherte Antwort"
          },
          "400": {
            "description": "Ungültige Eingabe"
          },
          "401": {
            "description": "Keine gültige Sitzung"
          },
          "403": {
            "description": "Aktion oder Signatur nicht erlaubt"
          },
          "404": {
            "description": "Unbekanntes oder nicht sichtbares Objekt"
          },
          "409": {
            "description": "Zustand, Annahmeregel oder Idempotenzkonflikt"
          },
          "413": {
            "description": "Nachricht zu groß"
          },
          "415": {
            "description": "Nicht unterstützter Inhaltstyp"
          },
          "429": {
            "description": "Anfragelimit"
          },
          "500": {
            "description": "Interner Fehler"
          }
        }
      }
    },
    "/v1/payments/{id}/accept": {
      "post": {
        "operationId": "accept",
        "summary": "accept",
        "description": "Zusätzlich gelten Objektzuständigkeit und aktueller Zustand. Siehe CPP-API.md für Rollen, Grenzen und Wiederholungsregeln.",
        "x-roles": [
          "buyer",
          "merchant"
        ],
        "security": [
          {
            "bearerSession": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,63}$",
              "maxLength": 64
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{7,127}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "termsHash": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  }
                },
                "required": [
                  "termsHash"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Erfolgreiche Aktion; für dieselbe Kennung identische gespeicherte Antwort"
          },
          "400": {
            "description": "Ungültige Eingabe"
          },
          "401": {
            "description": "Keine gültige Sitzung"
          },
          "403": {
            "description": "Aktion oder Signatur nicht erlaubt"
          },
          "404": {
            "description": "Unbekanntes oder nicht sichtbares Objekt"
          },
          "409": {
            "description": "Zustand, Annahmeregel oder Idempotenzkonflikt"
          },
          "413": {
            "description": "Nachricht zu groß"
          },
          "415": {
            "description": "Nicht unterstützter Inhaltstyp"
          },
          "429": {
            "description": "Anfragelimit"
          },
          "500": {
            "description": "Interner Fehler"
          }
        }
      }
    },
    "/v1/payments/{id}/authorize": {
      "post": {
        "operationId": "authorize",
        "summary": "authorize",
        "description": "Zusätzlich gelten Objektzuständigkeit und aktueller Zustand. Siehe CPP-API.md für Rollen, Grenzen und Wiederholungsregeln.",
        "x-roles": [
          "buyer"
        ],
        "security": [
          {
            "bearerSession": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,63}$",
              "maxLength": 64
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{7,127}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "termsHash": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  }
                },
                "required": [
                  "termsHash"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Erfolgreiche Aktion; für dieselbe Kennung identische gespeicherte Antwort"
          },
          "400": {
            "description": "Ungültige Eingabe"
          },
          "401": {
            "description": "Keine gültige Sitzung"
          },
          "403": {
            "description": "Aktion oder Signatur nicht erlaubt"
          },
          "404": {
            "description": "Unbekanntes oder nicht sichtbares Objekt"
          },
          "409": {
            "description": "Zustand, Annahmeregel oder Idempotenzkonflikt"
          },
          "413": {
            "description": "Nachricht zu groß"
          },
          "415": {
            "description": "Nicht unterstützter Inhaltstyp"
          },
          "429": {
            "description": "Anfragelimit"
          },
          "500": {
            "description": "Interner Fehler"
          }
        }
      }
    },
    "/v1/payments/{id}/reserve": {
      "post": {
        "operationId": "reserve",
        "summary": "reserve",
        "description": "Zusätzlich gelten Objektzuständigkeit und aktueller Zustand. Siehe CPP-API.md für Rollen, Grenzen und Wiederholungsregeln.",
        "x-roles": [
          "provider"
        ],
        "security": [
          {
            "bearerSession": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,63}$",
              "maxLength": 64
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{7,127}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Erfolgreiche Aktion; für dieselbe Kennung identische gespeicherte Antwort"
          },
          "400": {
            "description": "Ungültige Eingabe"
          },
          "401": {
            "description": "Keine gültige Sitzung"
          },
          "403": {
            "description": "Aktion oder Signatur nicht erlaubt"
          },
          "404": {
            "description": "Unbekanntes oder nicht sichtbares Objekt"
          },
          "409": {
            "description": "Zustand, Annahmeregel oder Idempotenzkonflikt"
          },
          "413": {
            "description": "Nachricht zu groß"
          },
          "415": {
            "description": "Nicht unterstützter Inhaltstyp"
          },
          "429": {
            "description": "Anfragelimit"
          },
          "500": {
            "description": "Interner Fehler"
          }
        }
      }
    },
    "/v1/provider-messages": {
      "post": {
        "operationId": "providerMessage",
        "summary": "providerMessage",
        "description": "Zusätzlich gelten Objektzuständigkeit und aktueller Zustand. Siehe CPP-API.md für Rollen, Grenzen und Wiederholungsregeln.",
        "x-roles": [
          "provider"
        ],
        "security": [
          {
            "bearerSession": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{7,127}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "version": {
                            "const": 1
                          },
                          "networkId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                            "maxLength": 128
                          },
                          "providerId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                            "maxLength": 128
                          },
                          "keyId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                            "maxLength": 128
                          },
                          "issuedAt": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "expiresAt": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "domain": {
                            "const": "cpp.provider-message.v1"
                          },
                          "messageId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                            "maxLength": 128
                          },
                          "paymentId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                            "maxLength": 128
                          },
                          "termsHash": {
                            "type": "string",
                            "pattern": "^[a-f0-9]{64}$"
                          },
                          "amountMinor": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 9007199254740991
                          },
                          "asset": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                            "maxLength": 128
                          },
                          "buyerId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                            "maxLength": 128
                          },
                          "sellerId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                            "maxLength": 128
                          },
                          "fromProviderId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                            "maxLength": 128
                          },
                          "toProviderId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                            "maxLength": 128
                          },
                          "settlementKind": {
                            "const": "simulated-ledger"
                          },
                          "type": {
                            "const": "payment.confirmed"
                          },
                          "settlementReference": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                            "maxLength": 128
                          }
                        },
                        "required": [
                          "version",
                          "networkId",
                          "providerId",
                          "keyId",
                          "issuedAt",
                          "expiresAt",
                          "domain",
                          "messageId",
                          "paymentId",
                          "termsHash",
                          "amountMinor",
                          "asset",
                          "buyerId",
                          "sellerId",
                          "fromProviderId",
                          "toProviderId",
                          "settlementKind",
                          "type",
                          "settlementReference"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "version": {
                            "const": 1
                          },
                          "networkId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                            "maxLength": 128
                          },
                          "providerId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                            "maxLength": 128
                          },
                          "keyId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                            "maxLength": 128
                          },
                          "issuedAt": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "expiresAt": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "domain": {
                            "const": "cpp.provider-message.v1"
                          },
                          "messageId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                            "maxLength": 128
                          },
                          "paymentId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                            "maxLength": 128
                          },
                          "termsHash": {
                            "type": "string",
                            "pattern": "^[a-f0-9]{64}$"
                          },
                          "amountMinor": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 9007199254740991
                          },
                          "asset": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                            "maxLength": 128
                          },
                          "buyerId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                            "maxLength": 128
                          },
                          "sellerId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                            "maxLength": 128
                          },
                          "fromProviderId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                            "maxLength": 128
                          },
                          "toProviderId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                            "maxLength": 128
                          },
                          "settlementKind": {
                            "const": "simulated-ledger"
                          },
                          "type": {
                            "enum": [
                              "payment.unknown",
                              "payment.cancelled"
                            ]
                          },
                          "settlementReference": {
                            "const": null
                          }
                        },
                        "required": [
                          "version",
                          "networkId",
                          "providerId",
                          "keyId",
                          "issuedAt",
                          "expiresAt",
                          "domain",
                          "messageId",
                          "paymentId",
                          "termsHash",
                          "amountMinor",
                          "asset",
                          "buyerId",
                          "sellerId",
                          "fromProviderId",
                          "toProviderId",
                          "settlementKind",
                          "type",
                          "settlementReference"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "signature": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{86}$"
                  }
                },
                "required": [
                  "body",
                  "signature"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Erfolgreiche Aktion; für dieselbe Kennung identische gespeicherte Antwort"
          },
          "400": {
            "description": "Ungültige Eingabe"
          },
          "401": {
            "description": "Keine gültige Sitzung"
          },
          "403": {
            "description": "Aktion oder Signatur nicht erlaubt"
          },
          "404": {
            "description": "Unbekanntes oder nicht sichtbares Objekt"
          },
          "409": {
            "description": "Zustand, Annahmeregel oder Idempotenzkonflikt"
          },
          "413": {
            "description": "Nachricht zu groß"
          },
          "415": {
            "description": "Nicht unterstützter Inhaltstyp"
          },
          "429": {
            "description": "Anfragelimit"
          },
          "500": {
            "description": "Interner Fehler"
          }
        }
      }
    },
    "/v1/provider-key-commands": {
      "post": {
        "operationId": "keyCommand",
        "summary": "keyCommand",
        "description": "Zusätzlich gelten Objektzuständigkeit und aktueller Zustand. Siehe CPP-API.md für Rollen, Grenzen und Wiederholungsregeln.",
        "x-roles": [
          "registry-admin"
        ],
        "security": [
          {
            "bearerSession": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{7,127}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "version": {
                            "const": 1
                          },
                          "networkId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                            "maxLength": 128
                          },
                          "providerId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                            "maxLength": 128
                          },
                          "keyId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                            "maxLength": 128
                          },
                          "issuedAt": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "expiresAt": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "domain": {
                            "const": "cpp.admin-command.v1"
                          },
                          "commandId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                            "maxLength": 128
                          },
                          "action": {
                            "const": "provider.key.register"
                          },
                          "publicKeyPem": {
                            "type": "string",
                            "maxLength": 256
                          },
                          "validUntilAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              {
                                "const": null
                              }
                            ]
                          }
                        },
                        "required": [
                          "version",
                          "networkId",
                          "providerId",
                          "keyId",
                          "issuedAt",
                          "expiresAt",
                          "domain",
                          "commandId",
                          "action",
                          "publicKeyPem",
                          "validUntilAt"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "version": {
                            "const": 1
                          },
                          "networkId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                            "maxLength": 128
                          },
                          "providerId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                            "maxLength": 128
                          },
                          "keyId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                            "maxLength": 128
                          },
                          "issuedAt": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "expiresAt": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "domain": {
                            "const": "cpp.admin-command.v1"
                          },
                          "commandId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
                            "maxLength": 128
                          },
                          "action": {
                            "const": "provider.key.revoke"
                          },
                          "publicKeyPem": {
                            "const": null
                          },
                          "validUntilAt": {
                            "const": null
                          }
                        },
                        "required": [
                          "version",
                          "networkId",
                          "providerId",
                          "keyId",
                          "issuedAt",
                          "expiresAt",
                          "domain",
                          "commandId",
                          "action",
                          "publicKeyPem",
                          "validUntilAt"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "signature": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{86}$"
                  }
                },
                "required": [
                  "body",
                  "signature"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Erfolgreiche Aktion; für dieselbe Kennung identische gespeicherte Antwort"
          },
          "400": {
            "description": "Ungültige Eingabe"
          },
          "401": {
            "description": "Keine gültige Sitzung"
          },
          "403": {
            "description": "Aktion oder Signatur nicht erlaubt"
          },
          "404": {
            "description": "Unbekanntes oder nicht sichtbares Objekt"
          },
          "409": {
            "description": "Zustand, Annahmeregel oder Idempotenzkonflikt"
          },
          "413": {
            "description": "Nachricht zu groß"
          },
          "415": {
            "description": "Nicht unterstützter Inhaltstyp"
          },
          "429": {
            "description": "Anfragelimit"
          },
          "500": {
            "description": "Interner Fehler"
          }
        }
      }
    },
    "/v1/withdrawals": {
      "post": {
        "operationId": "withdraw",
        "summary": "withdraw",
        "description": "Zusätzlich gelten Objektzuständigkeit und aktueller Zustand. Siehe CPP-API.md für Rollen, Grenzen und Wiederholungsregeln.",
        "x-roles": [
          "merchant"
        ],
        "security": [
          {
            "bearerSession": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{7,127}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "amountMinor": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "amountMinor"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Erfolgreiche Aktion; für dieselbe Kennung identische gespeicherte Antwort"
          },
          "400": {
            "description": "Ungültige Eingabe"
          },
          "401": {
            "description": "Keine gültige Sitzung"
          },
          "403": {
            "description": "Aktion oder Signatur nicht erlaubt"
          },
          "404": {
            "description": "Unbekanntes oder nicht sichtbares Objekt"
          },
          "409": {
            "description": "Zustand, Annahmeregel oder Idempotenzkonflikt"
          },
          "413": {
            "description": "Nachricht zu groß"
          },
          "415": {
            "description": "Nicht unterstützter Inhaltstyp"
          },
          "429": {
            "description": "Anfragelimit"
          },
          "500": {
            "description": "Interner Fehler"
          }
        }
      }
    },
    "/v1/payments/{id}/claims": {
      "post": {
        "operationId": "complain",
        "summary": "complain",
        "description": "Zusätzlich gelten Objektzuständigkeit und aktueller Zustand. Siehe CPP-API.md für Rollen, Grenzen und Wiederholungsregeln.",
        "x-roles": [
          "buyer"
        ],
        "security": [
          {
            "bearerSession": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,63}$",
              "maxLength": 64
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{7,127}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "const": "non_delivery"
                  },
                  "evidence": {
                    "type": "string",
                    "minLength": 20,
                    "maxLength": 2000
                  }
                },
                "required": [
                  "reason",
                  "evidence"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Erfolgreiche Aktion; für dieselbe Kennung identische gespeicherte Antwort"
          },
          "400": {
            "description": "Ungültige Eingabe"
          },
          "401": {
            "description": "Keine gültige Sitzung"
          },
          "403": {
            "description": "Aktion oder Signatur nicht erlaubt"
          },
          "404": {
            "description": "Unbekanntes oder nicht sichtbares Objekt"
          },
          "409": {
            "description": "Zustand, Annahmeregel oder Idempotenzkonflikt"
          },
          "413": {
            "description": "Nachricht zu groß"
          },
          "415": {
            "description": "Nicht unterstützter Inhaltstyp"
          },
          "429": {
            "description": "Anfragelimit"
          },
          "500": {
            "description": "Interner Fehler"
          }
        }
      }
    },
    "/v1/payments/{id}/claim": {
      "get": {
        "operationId": "claim",
        "summary": "claim",
        "description": "Zusätzlich gelten Objektzuständigkeit und aktueller Zustand. Siehe CPP-API.md für Rollen, Grenzen und Wiederholungsregeln.",
        "x-roles": [
          "buyer",
          "merchant",
          "support",
          "reviewer"
        ],
        "security": [
          {
            "bearerSession": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,63}$",
              "maxLength": 64
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Erfolgreiche Aktion; für dieselbe Kennung identische gespeicherte Antwort"
          },
          "400": {
            "description": "Ungültige Eingabe"
          },
          "401": {
            "description": "Keine gültige Sitzung"
          },
          "403": {
            "description": "Aktion oder Signatur nicht erlaubt"
          },
          "404": {
            "description": "Unbekanntes oder nicht sichtbares Objekt"
          },
          "409": {
            "description": "Zustand, Annahmeregel oder Idempotenzkonflikt"
          },
          "413": {
            "description": "Nachricht zu groß"
          },
          "415": {
            "description": "Nicht unterstützter Inhaltstyp"
          },
          "429": {
            "description": "Anfragelimit"
          },
          "500": {
            "description": "Interner Fehler"
          }
        }
      }
    },
    "/v1/payments/{id}/claim/response": {
      "post": {
        "operationId": "respond",
        "summary": "respond",
        "description": "Zusätzlich gelten Objektzuständigkeit und aktueller Zustand. Siehe CPP-API.md für Rollen, Grenzen und Wiederholungsregeln.",
        "x-roles": [
          "merchant"
        ],
        "security": [
          {
            "bearerSession": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,63}$",
              "maxLength": 64
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{7,127}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "evidence": {
                    "type": "string",
                    "minLength": 20,
                    "maxLength": 2000
                  }
                },
                "required": [
                  "evidence"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Erfolgreiche Aktion; für dieselbe Kennung identische gespeicherte Antwort"
          },
          "400": {
            "description": "Ungültige Eingabe"
          },
          "401": {
            "description": "Keine gültige Sitzung"
          },
          "403": {
            "description": "Aktion oder Signatur nicht erlaubt"
          },
          "404": {
            "description": "Unbekanntes oder nicht sichtbares Objekt"
          },
          "409": {
            "description": "Zustand, Annahmeregel oder Idempotenzkonflikt"
          },
          "413": {
            "description": "Nachricht zu groß"
          },
          "415": {
            "description": "Nicht unterstützter Inhaltstyp"
          },
          "429": {
            "description": "Anfragelimit"
          },
          "500": {
            "description": "Interner Fehler"
          }
        }
      }
    },
    "/v1/payments/{id}/claim/assignments": {
      "post": {
        "operationId": "assign",
        "summary": "assign",
        "description": "Zusätzlich gelten Objektzuständigkeit und aktueller Zustand. Siehe CPP-API.md für Rollen, Grenzen und Wiederholungsregeln.",
        "x-roles": [
          "support"
        ],
        "security": [
          {
            "bearerSession": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,63}$",
              "maxLength": 64
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{7,127}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "phase": {
                    "enum": [
                      "triage",
                      "initial",
                      "appeal"
                    ]
                  },
                  "reviewerSubjects": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[a-z][a-z0-9-]{0,63}$",
                      "maxLength": 64
                    },
                    "minItems": 1,
                    "maxItems": 4,
                    "uniqueItems": true
                  }
                },
                "required": [
                  "phase",
                  "reviewerSubjects"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Erfolgreiche Aktion; für dieselbe Kennung identische gespeicherte Antwort"
          },
          "400": {
            "description": "Ungültige Eingabe"
          },
          "401": {
            "description": "Keine gültige Sitzung"
          },
          "403": {
            "description": "Aktion oder Signatur nicht erlaubt"
          },
          "404": {
            "description": "Unbekanntes oder nicht sichtbares Objekt"
          },
          "409": {
            "description": "Zustand, Annahmeregel oder Idempotenzkonflikt"
          },
          "413": {
            "description": "Nachricht zu groß"
          },
          "415": {
            "description": "Nicht unterstützter Inhaltstyp"
          },
          "429": {
            "description": "Anfragelimit"
          },
          "500": {
            "description": "Interner Fehler"
          }
        }
      }
    },
    "/v1/payments/{id}/claim/triage": {
      "post": {
        "operationId": "triage",
        "summary": "triage",
        "description": "Zusätzlich gelten Objektzuständigkeit und aktueller Zustand. Siehe CPP-API.md für Rollen, Grenzen und Wiederholungsregeln.",
        "x-roles": [
          "reviewer"
        ],
        "security": [
          {
            "bearerSession": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,63}$",
              "maxLength": 64
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{7,127}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "admit": {
                    "type": "boolean"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 10,
                    "maxLength": 2000
                  }
                },
                "required": [
                  "admit",
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Erfolgreiche Aktion; für dieselbe Kennung identische gespeicherte Antwort"
          },
          "400": {
            "description": "Ungültige Eingabe"
          },
          "401": {
            "description": "Keine gültige Sitzung"
          },
          "403": {
            "description": "Aktion oder Signatur nicht erlaubt"
          },
          "404": {
            "description": "Unbekanntes oder nicht sichtbares Objekt"
          },
          "409": {
            "description": "Zustand, Annahmeregel oder Idempotenzkonflikt"
          },
          "413": {
            "description": "Nachricht zu groß"
          },
          "415": {
            "description": "Nicht unterstützter Inhaltstyp"
          },
          "429": {
            "description": "Anfragelimit"
          },
          "500": {
            "description": "Interner Fehler"
          }
        }
      }
    },
    "/v1/payments/{id}/claim/votes": {
      "post": {
        "operationId": "vote",
        "summary": "vote",
        "description": "Zusätzlich gelten Objektzuständigkeit und aktueller Zustand. Siehe CPP-API.md für Rollen, Grenzen und Wiederholungsregeln.",
        "x-roles": [
          "reviewer"
        ],
        "security": [
          {
            "bearerSession": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,63}$",
              "maxLength": 64
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{7,127}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "outcome": {
                    "enum": [
                      "refund",
                      "deny"
                    ]
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 10,
                    "maxLength": 2000
                  }
                },
                "required": [
                  "outcome",
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Erfolgreiche Aktion; für dieselbe Kennung identische gespeicherte Antwort"
          },
          "400": {
            "description": "Ungültige Eingabe"
          },
          "401": {
            "description": "Keine gültige Sitzung"
          },
          "403": {
            "description": "Aktion oder Signatur nicht erlaubt"
          },
          "404": {
            "description": "Unbekanntes oder nicht sichtbares Objekt"
          },
          "409": {
            "description": "Zustand, Annahmeregel oder Idempotenzkonflikt"
          },
          "413": {
            "description": "Nachricht zu groß"
          },
          "415": {
            "description": "Nicht unterstützter Inhaltstyp"
          },
          "429": {
            "description": "Anfragelimit"
          },
          "500": {
            "description": "Interner Fehler"
          }
        }
      }
    },
    "/v1/payments/{id}/claim/appeal": {
      "post": {
        "operationId": "appeal",
        "summary": "appeal",
        "description": "Zusätzlich gelten Objektzuständigkeit und aktueller Zustand. Siehe CPP-API.md für Rollen, Grenzen und Wiederholungsregeln.",
        "x-roles": [
          "buyer",
          "merchant"
        ],
        "security": [
          {
            "bearerSession": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,63}$",
              "maxLength": 64
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{7,127}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "evidence": {
                    "type": "string",
                    "minLength": 20,
                    "maxLength": 2000
                  }
                },
                "required": [
                  "evidence"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Erfolgreiche Aktion; für dieselbe Kennung identische gespeicherte Antwort"
          },
          "400": {
            "description": "Ungültige Eingabe"
          },
          "401": {
            "description": "Keine gültige Sitzung"
          },
          "403": {
            "description": "Aktion oder Signatur nicht erlaubt"
          },
          "404": {
            "description": "Unbekanntes oder nicht sichtbares Objekt"
          },
          "409": {
            "description": "Zustand, Annahmeregel oder Idempotenzkonflikt"
          },
          "413": {
            "description": "Nachricht zu groß"
          },
          "415": {
            "description": "Nicht unterstützter Inhaltstyp"
          },
          "429": {
            "description": "Anfragelimit"
          },
          "500": {
            "description": "Interner Fehler"
          }
        }
      }
    },
    "/v1/pools/{id}": {
      "get": {
        "operationId": "pool",
        "summary": "pool",
        "description": "Zusätzlich gelten Objektzuständigkeit und aktueller Zustand. Siehe CPP-API.md für Rollen, Grenzen und Wiederholungsregeln.",
        "x-roles": [
          "pool-operator"
        ],
        "security": [
          {
            "bearerSession": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,63}$",
              "maxLength": 64
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Erfolgreiche Aktion; für dieselbe Kennung identische gespeicherte Antwort"
          },
          "400": {
            "description": "Ungültige Eingabe"
          },
          "401": {
            "description": "Keine gültige Sitzung"
          },
          "403": {
            "description": "Aktion oder Signatur nicht erlaubt"
          },
          "404": {
            "description": "Unbekanntes oder nicht sichtbares Objekt"
          },
          "409": {
            "description": "Zustand, Annahmeregel oder Idempotenzkonflikt"
          },
          "413": {
            "description": "Nachricht zu groß"
          },
          "415": {
            "description": "Nicht unterstützter Inhaltstyp"
          },
          "429": {
            "description": "Anfragelimit"
          },
          "500": {
            "description": "Interner Fehler"
          }
        }
      }
    }
  }
}
