{
  "openapi": "3.0.3",
  "info": {
    "title": "WebVola Merchant Financial Product APIs",
    "version": "1.0.0",
    "description": "Merchant product credentials are scoped to a single product and environment. Recovery, intents, workflows and commercial intelligence use Universal Payment as the canonical payment source. Financial Events access requires a revocable organizer grant."
  },
  "servers": [
    {
      "url": "https://webvola.com/api/v1"
    }
  ],
  "security": [
    {
      "Bearer": []
    }
  ],
  "tags": [
    {
      "name": "Payment Recovery"
    },
    {
      "name": "Financial Events"
    },
    {
      "name": "Smart Payment Intent"
    },
    {
      "name": "Commerce Workflow"
    },
    {
      "name": "Financial Intelligence"
    }
  ],
  "paths": {
    "/prizes/payments": {
      "get": {
        "tags": [
          "Prize API"
        ],
        "operationId": "listPrizePayments",
        "summary": "List merchant Prize payments",
        "description": "Uses a merchant-scoped Prize credential. Read or write scope is required.",
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Record unavailable"
          },
          "409": {
            "description": "Conflicting operation"
          },
          "422": {
            "description": "Invalid input"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Unavailable"
          }
        },
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "through",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ]
      }
    },
    "/prizes/payments/{purchase}/refunds/{refund}": {
      "get": {
        "tags": [
          "Prize API"
        ],
        "operationId": "getPrizeRefund",
        "summary": "Read a confirmed refund or review status",
        "description": "Uses a merchant-scoped Prize credential. Read or write scope is required.",
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Record unavailable"
          },
          "409": {
            "description": "Conflicting operation"
          },
          "422": {
            "description": "Invalid input"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Unavailable"
          }
        },
        "parameters": [
          {
            "name": "purchase",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "refund",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/prizes/campaigns/{campaign}/performance": {
      "get": {
        "tags": [
          "Prize API"
        ],
        "operationId": "getPrizeCampaignPerformance",
        "summary": "Read tenant-scoped campaign performance",
        "description": "Uses a merchant-scoped Prize credential. Read or write scope is required.",
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Record unavailable"
          },
          "409": {
            "description": "Conflicting operation"
          },
          "422": {
            "description": "Invalid input"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Unavailable"
          }
        },
        "parameters": [
          {
            "name": "campaign",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "through",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ]
      }
    },
    "/prizes/webhooks/deliveries": {
      "get": {
        "tags": [
          "Prize API"
        ],
        "operationId": "listPrizeWebhookDeliveries",
        "summary": "List merchant Prize webhook deliveries",
        "description": "Uses a merchant-scoped Prize credential. Read or write scope is required.",
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Record unavailable"
          },
          "409": {
            "description": "Conflicting operation"
          },
          "422": {
            "description": "Invalid input"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Unavailable"
          }
        }
      }
    },
    "/prizes/webhooks/deliveries/{delivery}/redeliver": {
      "post": {
        "tags": [
          "Prize API"
        ],
        "operationId": "requeuePrizeWebhookDelivery",
        "summary": "Queue authorized redelivery of a failed merchant Prize webhook",
        "description": "Uses a merchant-scoped Prize credential. Write scope is required.",
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Record unavailable"
          },
          "409": {
            "description": "Conflicting operation"
          },
          "422": {
            "description": "Invalid input"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Unavailable"
          }
        },
        "parameters": [
          {
            "name": "delivery",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/prizes/checkout/{token}": {
      "get": {
        "tags": [
          "Prize API"
        ],
        "operationId": "getPrizeCheckoutMethods",
        "summary": "Read the hosted checkout method inventory",
        "security": [],
        "description": "WebVola hosted origin. Customer identity comes from the web session cookie. POST also requires the normal session CSRF token. Merchant credentials do not identify the customer.",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "examples": {
                  "ordinary": {
                    "value": {
                      "data": {
                        "methods": [
                          {
                            "code": "sandbox_card"
                          }
                        ],
                        "currency": "MGA",
                        "environment": "sandbox"
                      },
                      "request_id": "example"
                    }
                  },
                  "winner": {
                    "value": {
                      "data": {
                        "methods": [
                          {
                            "code": "sandbox_card"
                          },
                          {
                            "code": "prize",
                            "label": "Pay with WebVola Prize",
                            "options": [
                              {
                                "id": 101,
                                "campaign": "Prize Week",
                                "tier": "Fixed",
                                "quote": {
                                  "purchase": 300,
                                  "discount": 200,
                                  "customer": 100
                                }
                              }
                            ]
                          }
                        ],
                        "currency": "MGA",
                        "environment": "sandbox"
                      },
                      "request_id": "example"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Verified customer required"
          },
          "404": {
            "description": "Checkout unavailable"
          },
          "409": {
            "description": "Prize unavailable or changed"
          },
          "419": {
            "description": "CSRF session expired"
          },
          "422": {
            "description": "Invalid input"
          },
          "429": {
            "description": "Rate limited"
          }
        }
      }
    },
    "/prizes/checkout/{token}/authorize": {
      "post": {
        "tags": [
          "Prize API"
        ],
        "operationId": "authorizeHostedPrize",
        "summary": "Authorize an eligible prize with a WebVola customer session",
        "security": [],
        "description": "WebVola hosted origin. Customer identity comes from the web session cookie. POST also requires the normal session CSRF token. Merchant credentials do not identify the customer.",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          },
          {
            "name": "X-CSRF-TOKEN",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "403": {
            "description": "Verified customer required"
          },
          "404": {
            "description": "Checkout unavailable"
          },
          "409": {
            "description": "Prize unavailable or changed"
          },
          "419": {
            "description": "CSRF session expired"
          },
          "422": {
            "description": "Invalid input"
          },
          "429": {
            "description": "Rate limited"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "prize",
                  "fingerprint"
                ],
                "properties": {
                  "prize": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "fingerprint": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "method": {
                    "type": "string",
                    "nullable": true
                  },
                  "defer": {
                    "type": "boolean",
                    "default": false
                  }
                }
              }
            }
          }
        }
      }
    },
    "/prizes/checkout/{token}/resolve": {
      "post": {
        "tags": [
          "Prize API"
        ],
        "operationId": "resolveSandboxPrizeReservation",
        "summary": "Resolve a sandbox Prize reservation",
        "security": [],
        "description": "WebVola hosted origin. Customer identity comes from the web session cookie. POST also requires the normal session CSRF token. Merchant credentials do not identify the customer.",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          },
          {
            "name": "X-CSRF-TOKEN",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "403": {
            "description": "Verified customer required"
          },
          "404": {
            "description": "Checkout unavailable"
          },
          "409": {
            "description": "Prize unavailable or changed"
          },
          "419": {
            "description": "CSRF session expired"
          },
          "422": {
            "description": "Invalid input"
          },
          "429": {
            "description": "Rate limited"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "outcome"
                ],
                "properties": {
                  "outcome": {
                    "type": "string",
                    "enum": [
                      "paid",
                      "failed",
                      "cancelled"
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/prizes/competition/submissions": {
      "post": {
        "tags": [
          "Prize API"
        ],
        "operationId": "submitPrizeCompetitionResults",
        "summary": "Stage campaign-bound competition results for administrative review",
        "description": "Requires the campaign-specific pcr_ bearer credential. Submission does not approve or issue prizes.",
        "responses": {
          "200": {
            "description": "Submission stage and errors"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Submission not owned"
          },
          "409": {
            "description": "State or key conflict"
          },
          "422": {
            "description": "Invalid request"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Competition integration inactive"
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 12,
              "maxLength": 100
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rows": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 100,
                    "items": {
                      "type": "object",
                      "properties": {
                        "reference": {
                          "type": "string"
                        },
                        "participant": {
                          "type": "string"
                        },
                        "tier_id": {
                          "type": "integer"
                        },
                        "email": {
                          "type": "string"
                        },
                        "phone": {
                          "type": "string"
                        },
                        "notes": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "reference",
                        "participant",
                        "tier_id"
                      ]
                    }
                  }
                },
                "required": [
                  "rows"
                ]
              }
            }
          }
        }
      }
    },
    "/prizes/competition/submissions/{submission}": {
      "get": {
        "tags": [
          "Prize API"
        ],
        "operationId": "getPrizeCompetitionSubmission",
        "summary": "Read the submitting credential’s batch and validation errors",
        "description": "Requires the campaign-specific pcr_ bearer credential. Submission does not approve or issue prizes.",
        "responses": {
          "200": {
            "description": "Submission stage and errors"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Submission not owned"
          },
          "409": {
            "description": "State or key conflict"
          },
          "422": {
            "description": "Invalid request"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Competition integration inactive"
          }
        },
        "parameters": [
          {
            "name": "submission",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/prizes/campaigns": {
      "get": {
        "tags": [
          "Prize API"
        ],
        "operationId": "listPrizeCampaigns",
        "summary": "List merchant campaign collaborations",
        "description": "Uses a merchant-scoped Prize credential. Read or write scope is required.",
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Record unavailable"
          },
          "409": {
            "description": "Conflicting operation"
          },
          "422": {
            "description": "Invalid input"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          }
        }
      }
    },
    "/prizes/campaigns/{campaign}": {
      "get": {
        "tags": [
          "Prize API"
        ],
        "operationId": "getPrizeCampaign",
        "summary": "Read campaign collaboration and agreement",
        "description": "Uses a merchant-scoped Prize credential. Read or write scope is required.",
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Record unavailable"
          },
          "409": {
            "description": "Conflicting operation"
          },
          "422": {
            "description": "Invalid input"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          }
        },
        "parameters": [
          {
            "name": "campaign",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "post": {
        "tags": [
          "Prize API"
        ],
        "operationId": "respondToPrizeCampaign",
        "summary": "Accept or reject a versioned collaboration agreement",
        "description": "Uses a merchant-scoped Prize credential. Write scope is required.",
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Record unavailable"
          },
          "409": {
            "description": "Conflicting operation"
          },
          "422": {
            "description": "Invalid input"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          }
        },
        "parameters": [
          {
            "name": "campaign",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "status",
                  "version"
                ],
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "accepted",
                      "rejected"
                    ]
                  },
                  "version": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              }
            }
          }
        }
      }
    },
    "/prizes/payments/{purchase}": {
      "get": {
        "tags": [
          "Prize API"
        ],
        "operationId": "getPrizePayment",
        "summary": "Read Prize settlement and refunds",
        "description": "Uses a merchant-scoped Prize credential. Read or write scope is required.",
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Record unavailable"
          },
          "409": {
            "description": "Conflicting operation"
          },
          "422": {
            "description": "Invalid input"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          }
        },
        "parameters": [
          {
            "name": "purchase",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/prizes/payments/{purchase}/refunds": {
      "post": {
        "tags": [
          "Prize API"
        ],
        "operationId": "refundPrizePayment",
        "summary": "Request a Prize refund",
        "description": "Uses a merchant-scoped Prize credential. Write scope is required.",
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Record unavailable"
          },
          "409": {
            "description": "Conflicting operation"
          },
          "422": {
            "description": "Invalid input"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          }
        },
        "parameters": [
          {
            "name": "purchase",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 12,
              "maxLength": 100
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "amount"
                ],
                "properties": {
                  "amount": {
                    "type": "integer",
                    "minimum": 1,
                    "description": "Original purchase minor units"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/payment-recovery": {
      "get": {
        "tags": [
          "Payment Recovery"
        ],
        "summary": "List recovery sessions",
        "description": "Requires payment-recovery:read or write. Limits are 120 requests per minute per merchant and per IP route group.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Generated request correlation ID."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Credential or scope unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Operation conflicts with current state or idempotency record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Product, environment, or dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/payment-recovery/analytics": {
      "get": {
        "tags": [
          "Payment Recovery"
        ],
        "summary": "Count recovery sessions by last synchronized status",
        "description": "Requires payment-recovery:read or write. Limits are 120 requests per minute per merchant and per IP route group.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Generated request correlation ID."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "integer"
                      }
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Credential or scope unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Operation conflicts with current state or idempotency record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Product, environment, or dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/payment-recovery/webhook-deliveries": {
      "get": {
        "tags": [
          "Payment Recovery"
        ],
        "summary": "List recovery webhook deliveries",
        "description": "Requires payment-recovery:read or write. Limits are 120 requests per minute per merchant and per IP route group.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Generated request correlation ID."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Credential or scope unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Operation conflicts with current state or idempotency record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Product, environment, or dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/payment-recovery/purchases/{id}/eligibility": {
      "get": {
        "tags": [
          "Payment Recovery"
        ],
        "summary": "Check recovery eligibility",
        "description": "Requires payment-recovery:read or write. Limits are 120 requests per minute per merchant and per IP route group.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Purchase"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Generated request correlation ID."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Recovery"
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                },
                "example": {
                  "data": {
                    "id": null,
                    "status": "eligible",
                    "expires_at": null,
                    "failure_category": null,
                    "purchase": {
                      "id": "93c9fb18-ca68-48bb-b6d7-c9889fe79249",
                      "amount": 200000,
                      "confirmed": 130000,
                      "remaining": 70000,
                      "pending": 0,
                      "reference": "order-103",
                      "status": "partially_funded",
                      "currency": "MGA",
                      "scale": 0,
                      "mode": "sandbox"
                    },
                    "options": [
                      {
                        "code": "resume",
                        "availability": "recommended",
                        "reason": "Resume the original purchase using its eligible methods.",
                        "methods": [
                          "sandbox_card"
                        ]
                      }
                    ]
                  },
                  "request_id": "c1b96a9c-d80f-4df3-b66e-f6f848e33984"
                }
              }
            }
          },
          "401": {
            "description": "Credential or scope unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Operation conflicts with current state or idempotency record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Product, environment, or dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/payment-recovery/purchases/{id}/session": {
      "get": {
        "tags": [
          "Payment Recovery"
        ],
        "summary": "Retrieve recovery session",
        "description": "Requires payment-recovery:read or write. Limits are 120 requests per minute per merchant and per IP route group.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Purchase"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Generated request correlation ID."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Recovery"
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Credential or scope unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Operation conflicts with current state or idempotency record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Product, environment, or dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Payment Recovery"
        ],
        "summary": "Create recovery session",
        "description": "Requires payment-recovery:write. Limits are 120 requests per minute per merchant and per IP route group.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Purchase"
          },
          {
            "$ref": "#/components/parameters/Idempotency"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Generated request correlation ID."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Recovery"
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid idempotency key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Credential or scope unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Operation conflicts with current state or idempotency record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Parameter validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Product, environment, or dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/payment-recovery/purchases/{id}/options": {
      "get": {
        "tags": [
          "Payment Recovery"
        ],
        "summary": "List recovery options",
        "description": "Requires payment-recovery:read or write. Limits are 120 requests per minute per merchant and per IP route group.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Purchase"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Generated request correlation ID."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Recovery"
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Credential or scope unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Operation conflicts with current state or idempotency record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Product, environment, or dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/payment-recovery/purchases/{id}/reconciliation": {
      "get": {
        "tags": [
          "Payment Recovery"
        ],
        "summary": "Retrieve reconciliation status",
        "description": "Requires payment-recovery:read or write. Limits are 120 requests per minute per merchant and per IP route group.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Purchase"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Generated request correlation ID."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "purchase_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "status": {
                          "type": "string"
                        },
                        "reviews": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "reason": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "unresolved_attempts": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "source": {
                                "type": "string"
                              },
                              "amount": {
                                "type": "integer"
                              },
                              "status": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Credential or scope unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Operation conflicts with current state or idempotency record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Product, environment, or dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/payment-recovery/purchases/{id}/links": {
      "post": {
        "tags": [
          "Payment Recovery"
        ],
        "summary": "Issue customer-bound checkout link",
        "description": "Requires payment-recovery:write. Limits are 120 requests per minute per merchant and per IP route group.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Purchase"
          },
          {
            "$ref": "#/components/parameters/Idempotency"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Generated request correlation ID."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Recovery"
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid idempotency key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Credential or scope unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Operation conflicts with current state or idempotency record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Parameter validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Product, environment, or dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/payment-recovery/purchases/{id}/cancel": {
      "post": {
        "tags": [
          "Payment Recovery"
        ],
        "summary": "Cancel recovery session",
        "description": "Requires payment-recovery:write. Limits are 120 requests per minute per merchant and per IP route group.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Purchase"
          },
          {
            "$ref": "#/components/parameters/Idempotency"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Generated request correlation ID."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Recovery"
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid idempotency key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Credential or scope unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Operation conflicts with current state or idempotency record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Parameter validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Product, environment, or dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/financial-events": {
      "get": {
        "tags": [
          "Financial Events"
        ],
        "summary": "List organizer grants",
        "description": "Requires financial-events:read or write. Limits are 120 requests per minute per merchant and per IP route group.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Generated request correlation ID."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Credential or scope unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Operation conflicts with current state or idempotency record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Product, environment, or dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/financial-events/types": {
      "get": {
        "tags": [
          "Financial Events"
        ],
        "summary": "List approved public Traditional Event types",
        "description": "Requires financial-events:read or write. Limits are 120 requests per minute per merchant and per IP route group.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Generated request correlation ID."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "slug": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Credential or scope unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Operation conflicts with current state or idempotency record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Product, environment, or dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/financial-events/invitation-templates": {
      "get": {
        "tags": [
          "Financial Events"
        ],
        "summary": "List configured Traditional invitation template labels",
        "description": "Requires financial-events:read or write. Limits are 120 requests per minute per merchant and per IP route group.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Generated request correlation ID."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "event_type": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Credential or scope unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Operation conflicts with current state or idempotency record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Product, environment, or dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/financial-events/{id}": {
      "get": {
        "tags": [
          "Financial Events"
        ],
        "summary": "Read a linked event",
        "description": "Requires financial-events:read or write. Limits are 120 requests per minute per merchant and per IP route group.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Grant"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Generated request correlation ID."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/EventSummary"
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Credential or scope unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Operation conflicts with current state or idempotency record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Product, environment, or dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Financial Events"
        ],
        "summary": "Update event metadata with organizer consent",
        "description": "Requires financial-events:write. Limits are 120 requests per minute per merchant and per IP route group.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "$ref": "#/components/parameters/Idempotency"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Generated request correlation ID."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string",
                          "nullable": true
                        }
                      }
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid idempotency key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Credential or scope unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Operation conflicts with current state or idempotency record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Parameter validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Product, environment, or dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "description": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 2000
                  }
                },
                "minProperties": 1,
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/financial-events/{id}/summary": {
      "get": {
        "tags": [
          "Financial Events"
        ],
        "summary": "Read confirmed contribution totals",
        "description": "Requires financial-events:read or write. Limits are 120 requests per minute per merchant and per IP route group.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Grant"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Generated request correlation ID."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/EventSummary"
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                },
                "example": {
                  "data": {
                    "name": "Family celebration",
                    "event_type": "rom-patsa",
                    "currency": "MGA",
                    "confirmed_contribution_count": 3,
                    "confirmed_contributions": "130000.00000000",
                    "target": "200000.00000000",
                    "outstanding_target": "70000.00000000"
                  },
                  "request_id": "c1b96a9c-d80f-4df3-b66e-f6f848e33984"
                }
              }
            }
          },
          "401": {
            "description": "Credential or scope unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Operation conflicts with current state or idempotency record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Product, environment, or dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/financial-events/{id}/offline-status": {
      "get": {
        "tags": [
          "Financial Events"
        ],
        "summary": "Read offline collection status with organizer consent",
        "description": "Requires financial-events:read or write. Limits are 120 requests per minute per merchant and per IP route group.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Grant"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Generated request correlation ID."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "reference": {
                          "type": "string",
                          "nullable": true
                        },
                        "confirmed_receipts": {
                          "type": "integer"
                        },
                        "other_receipts": {
                          "type": "integer"
                        }
                      }
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Credential or scope unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Operation conflicts with current state or idempotency record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Product, environment, or dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/financial-events/{id}/voucher-status": {
      "get": {
        "tags": [
          "Financial Events"
        ],
        "summary": "Read masked voucher status with organizer consent",
        "description": "Requires financial-events:read or write. Limits are 120 requests per minute per merchant and per IP route group.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Grant"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Generated request correlation ID."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string"
                        },
                        "masked_reference": {
                          "type": "string",
                          "nullable": true
                        },
                        "design": {
                          "type": "string",
                          "nullable": true
                        }
                      }
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Credential or scope unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Operation conflicts with current state or idempotency record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Product, environment, or dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/payment-recovery/purchases/{id}/progressive": {
      "post": {
        "tags": [
          "Payment Recovery"
        ],
        "summary": "Continue funding a purchase that already permits progressive funding",
        "description": "Requires payment-recovery:write. Limits are 120 requests per minute per merchant and per IP route group.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Purchase"
          },
          {
            "$ref": "#/components/parameters/Idempotency"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Generated request correlation ID."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Recovery"
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid idempotency key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Credential or scope unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Operation conflicts with current state or idempotency record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Parameter validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Product, environment, or dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/financial-events/{id}/contribution-sessions": {
      "post": {
        "tags": [
          "Financial Events"
        ],
        "summary": "Create a hosted contribution session",
        "description": "Requires a live write credential and organizer consent for contribution sessions. The contributor must sign in and confirm. Production wallet posting has a separate release gate.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "amount",
                  "currency"
                ],
                "properties": {
                  "amount": {
                    "type": "string",
                    "example": "2500.00"
                  },
                  "currency": {
                    "type": "string",
                    "example": "MGA"
                  },
                  "anonymous": {
                    "type": "boolean",
                    "default": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Contribution session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/EventContributionSession"
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid idempotency key"
          },
          "422": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Credential or scope rejected"
          },
          "404": {
            "description": "Grant or session unavailable"
          },
          "409": {
            "description": "Event, currency, or idempotency conflict"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Product unavailable"
          }
        }
      }
    },
    "/financial-events/{id}/contribution-sessions/{session}": {
      "get": {
        "tags": [
          "Financial Events"
        ],
        "summary": "Read a contribution session status",
        "description": "Requires an active organizer grant with contribution session permission.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "name": "session",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Contribution session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/EventContributionSession"
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Credential or scope rejected"
          },
          "404": {
            "description": "Grant or session unavailable"
          },
          "409": {
            "description": "Event, currency, or idempotency conflict"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Product unavailable"
          }
        }
      }
    },
    "/payment-intents": {
      "get": {
        "tags": [
          "Smart Payment Intent"
        ],
        "operationId": "intent_index",
        "summary": "Index",
        "description": "Requires a payment-intents scoped credential over HTTPS. Limit of 120 requests per minute per merchant and IP route group.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient scope"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Smart Payment Intent"
        ],
        "operationId": "intent_create",
        "summary": "Create",
        "description": "Requires a payment-intents scoped credential over HTTPS. Limit of 120 requests per minute per merchant and IP route group.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.-]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient scope"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          },
          "400": {
            "description": "Missing or invalid idempotency key"
          },
          "409": {
            "description": "State or idempotency conflict"
          },
          "422": {
            "description": "Validation failed"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "purpose": "invoice",
                "terms": {
                  "reference": "invoice-demo-1",
                  "description": "Demo invoice",
                  "currency": "MGA",
                  "unit_amount": 600,
                  "methods": [
                    "sandbox_card"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/payment-intents/{id}": {
      "get": {
        "tags": [
          "Smart Payment Intent"
        ],
        "operationId": "intent_show",
        "summary": "Show",
        "description": "Requires a payment-intents scoped credential over HTTPS. Limit of 120 requests per minute per merchant and IP route group.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient scope"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "Smart Payment Intent"
        ],
        "operationId": "intent_update",
        "summary": "Update",
        "description": "Requires a payment-intents scoped credential over HTTPS. Limit of 120 requests per minute per merchant and IP route group.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.-]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient scope"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          },
          "400": {
            "description": "Missing or invalid idempotency key"
          },
          "409": {
            "description": "State or idempotency conflict"
          },
          "422": {
            "description": "Validation failed"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "purpose": "invoice",
                "terms": {
                  "reference": "invoice-demo-1",
                  "description": "Demo invoice",
                  "currency": "MGA",
                  "unit_amount": 600,
                  "methods": [
                    "sandbox_card"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/payment-intents/{id}/authorize": {
      "post": {
        "tags": [
          "Smart Payment Intent"
        ],
        "operationId": "intent_authorize",
        "summary": "Authorize",
        "description": "Requires a payment-intents scoped credential over HTTPS. Limit of 120 requests per minute per merchant and IP route group.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.-]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient scope"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          },
          "400": {
            "description": "Missing or invalid idempotency key"
          },
          "409": {
            "description": "State or idempotency conflict"
          },
          "422": {
            "description": "Validation failed"
          }
        }
      }
    },
    "/payment-intents/{id}/funding-options": {
      "get": {
        "tags": [
          "Smart Payment Intent"
        ],
        "operationId": "intent_funding_options",
        "summary": "Funding options",
        "description": "Requires a payment-intents scoped credential over HTTPS. Limit of 120 requests per minute per merchant and IP route group.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient scope"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          }
        }
      }
    },
    "/payment-intents/{id}/history": {
      "get": {
        "tags": [
          "Smart Payment Intent"
        ],
        "operationId": "intent_history",
        "summary": "History",
        "description": "Requires a payment-intents scoped credential over HTTPS. Limit of 120 requests per minute per merchant and IP route group.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient scope"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          }
        }
      }
    },
    "/payment-intents/{id}/attempts": {
      "get": {
        "tags": [
          "Smart Payment Intent"
        ],
        "operationId": "intent_attempts",
        "summary": "Attempts",
        "description": "Requires a payment-intents scoped credential over HTTPS. Limit of 120 requests per minute per merchant and IP route group.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient scope"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          }
        }
      }
    },
    "/payment-intents/{id}/links": {
      "post": {
        "tags": [
          "Smart Payment Intent"
        ],
        "operationId": "intent_link",
        "summary": "Link",
        "description": "Requires a payment-intents scoped credential over HTTPS. Limit of 120 requests per minute per merchant and IP route group.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.-]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient scope"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          },
          "400": {
            "description": "Missing or invalid idempotency key"
          },
          "409": {
            "description": "State or idempotency conflict"
          },
          "422": {
            "description": "Validation failed"
          }
        }
      }
    },
    "/payment-intents/{id}/revoke-link": {
      "post": {
        "tags": [
          "Smart Payment Intent"
        ],
        "operationId": "intent_revoke_link",
        "summary": "Revoke link",
        "description": "Requires a payment-intents scoped credential over HTTPS. Limit of 120 requests per minute per merchant and IP route group.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.-]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient scope"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          },
          "400": {
            "description": "Missing or invalid idempotency key"
          },
          "409": {
            "description": "State or idempotency conflict"
          },
          "422": {
            "description": "Validation failed"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "link": 1
              }
            }
          }
        }
      }
    },
    "/payment-intents/{id}/cancel": {
      "post": {
        "tags": [
          "Smart Payment Intent"
        ],
        "operationId": "intent_cancel",
        "summary": "Cancel",
        "description": "Requires a payment-intents scoped credential over HTTPS. Limit of 120 requests per minute per merchant and IP route group.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.-]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient scope"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          },
          "400": {
            "description": "Missing or invalid idempotency key"
          },
          "409": {
            "description": "State or idempotency conflict"
          },
          "422": {
            "description": "Validation failed"
          }
        }
      }
    },
    "/commerce-workflows/templates": {
      "get": {
        "tags": [
          "Commerce Workflow"
        ],
        "operationId": "workflow_templates",
        "summary": "Templates",
        "description": "Requires a commerce-workflows scoped credential over HTTPS. Limit of 120 requests per minute per merchant and IP route group.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient scope"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          }
        }
      }
    },
    "/commerce-workflows": {
      "get": {
        "tags": [
          "Commerce Workflow"
        ],
        "operationId": "workflow_index",
        "summary": "Index",
        "description": "Requires a commerce-workflows scoped credential over HTTPS. Limit of 120 requests per minute per merchant and IP route group.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient scope"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Commerce Workflow"
        ],
        "operationId": "workflow_create",
        "summary": "Create",
        "description": "Requires a commerce-workflows scoped credential over HTTPS. Limit of 120 requests per minute per merchant and IP route group.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.-]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient scope"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          },
          "400": {
            "description": "Missing or invalid idempotency key"
          },
          "409": {
            "description": "State or idempotency conflict"
          },
          "422": {
            "description": "Validation failed"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "reference": "order-demo-1",
                "customer_id": 1,
                "template": "product-sale",
                "purchase_id": "113e4567-e89b-12d3-a456-426614174000"
              }
            }
          }
        }
      }
    },
    "/commerce-workflows/{id}": {
      "get": {
        "tags": [
          "Commerce Workflow"
        ],
        "operationId": "workflow_show",
        "summary": "Show",
        "description": "Requires a commerce-workflows scoped credential over HTTPS. Limit of 120 requests per minute per merchant and IP route group.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient scope"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          }
        }
      }
    },
    "/commerce-workflows/{id}/history": {
      "get": {
        "tags": [
          "Commerce Workflow"
        ],
        "operationId": "workflow_history",
        "summary": "History",
        "description": "Requires a commerce-workflows scoped credential over HTTPS. Limit of 120 requests per minute per merchant and IP route group.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient scope"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          }
        }
      }
    },
    "/commerce-workflows/{id}/confirm-payment": {
      "post": {
        "tags": [
          "Commerce Workflow"
        ],
        "operationId": "workflow_confirm_payment",
        "summary": "Confirm payment",
        "description": "Requires a commerce-workflows scoped credential over HTTPS. Limit of 120 requests per minute per merchant and IP route group.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.-]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient scope"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          },
          "400": {
            "description": "Missing or invalid idempotency key"
          },
          "409": {
            "description": "State or idempotency conflict"
          },
          "422": {
            "description": "Validation failed"
          }
        }
      }
    },
    "/commerce-workflows/{id}/fulfill-order": {
      "post": {
        "tags": [
          "Commerce Workflow"
        ],
        "operationId": "workflow_fulfill_order",
        "summary": "Fulfill order",
        "description": "Requires a commerce-workflows scoped credential over HTTPS. Limit of 120 requests per minute per merchant and IP route group.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.-]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient scope"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          },
          "400": {
            "description": "Missing or invalid idempotency key"
          },
          "409": {
            "description": "State or idempotency conflict"
          },
          "422": {
            "description": "Validation failed"
          }
        }
      }
    },
    "/commerce-workflows/{id}/perform-service": {
      "post": {
        "tags": [
          "Commerce Workflow"
        ],
        "operationId": "workflow_perform_service",
        "summary": "Perform service",
        "description": "Requires a commerce-workflows scoped credential over HTTPS. Limit of 120 requests per minute per merchant and IP route group.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.-]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient scope"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          },
          "400": {
            "description": "Missing or invalid idempotency key"
          },
          "409": {
            "description": "State or idempotency conflict"
          },
          "422": {
            "description": "Validation failed"
          }
        }
      }
    },
    "/commerce-workflows/{id}/confirm-booking": {
      "post": {
        "tags": [
          "Commerce Workflow"
        ],
        "operationId": "workflow_confirm_booking",
        "summary": "Confirm booking",
        "description": "Requires a commerce-workflows scoped credential over HTTPS. Limit of 120 requests per minute per merchant and IP route group.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.-]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient scope"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          },
          "400": {
            "description": "Missing or invalid idempotency key"
          },
          "409": {
            "description": "State or idempotency conflict"
          },
          "422": {
            "description": "Validation failed"
          }
        }
      }
    },
    "/commerce-workflows/{id}/cancel": {
      "post": {
        "tags": [
          "Commerce Workflow"
        ],
        "operationId": "workflow_cancel",
        "summary": "Cancel",
        "description": "Requires a commerce-workflows scoped credential over HTTPS. Limit of 120 requests per minute per merchant and IP route group.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.-]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient scope"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          },
          "400": {
            "description": "Missing or invalid idempotency key"
          },
          "409": {
            "description": "State or idempotency conflict"
          },
          "422": {
            "description": "Validation failed"
          }
        }
      }
    },
    "/financial-intelligence/revenue": {
      "get": {
        "tags": [
          "Financial Intelligence"
        ],
        "operationId": "intelligence_revenue",
        "summary": "Revenue",
        "description": "Requires a financial-intelligence scoped credential over HTTPS. Limit of 120 requests per minute per merchant and IP route group.",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "through",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[A-Z]{3}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient scope"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          }
        }
      }
    },
    "/financial-intelligence/performance": {
      "get": {
        "tags": [
          "Financial Intelligence"
        ],
        "operationId": "intelligence_performance",
        "summary": "Performance",
        "description": "Requires a financial-intelligence scoped credential over HTTPS. Limit of 120 requests per minute per merchant and IP route group.",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "through",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[A-Z]{3}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient scope"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          }
        }
      }
    },
    "/financial-intelligence/recovery": {
      "get": {
        "tags": [
          "Financial Intelligence"
        ],
        "operationId": "intelligence_recovery",
        "summary": "Recovery",
        "description": "Requires a financial-intelligence scoped credential over HTTPS. Limit of 120 requests per minute per merchant and IP route group.",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "through",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[A-Z]{3}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient scope"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          }
        }
      }
    },
    "/financial-intelligence/reconciliation": {
      "get": {
        "tags": [
          "Financial Intelligence"
        ],
        "operationId": "intelligence_reconciliation",
        "summary": "Reconciliation",
        "description": "Requires a financial-intelligence scoped credential over HTTPS. Limit of 120 requests per minute per merchant and IP route group.",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "through",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[A-Z]{3}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient scope"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          }
        }
      }
    },
    "/financial-intelligence/workflows": {
      "get": {
        "tags": [
          "Financial Intelligence"
        ],
        "operationId": "intelligence_workflows",
        "summary": "Workflows",
        "description": "Requires a financial-intelligence scoped credential over HTTPS. Limit of 120 requests per minute per merchant and IP route group.",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "through",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient scope"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          }
        }
      }
    },
    "/commerce-workflows/{id}/open-dispute": {
      "post": {
        "tags": [
          "Commerce Workflow"
        ],
        "operationId": "workflow_open_dispute",
        "summary": "Open a dispute",
        "description": "Requires a commerce-workflows scoped credential over HTTPS. Limit of 120 requests per minute per merchant and IP route group.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.-]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient scope"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Product or environment unavailable"
          },
          "400": {
            "description": "Missing or invalid idempotency key"
          },
          "409": {
            "description": "State or idempotency conflict"
          },
          "422": {
            "description": "Validation failed"
          }
        }
      }
    },
    "/payment-recovery/candidates": {
      "get": {
        "tags": [
          "Payment Recovery"
        ],
        "summary": "List inactive checkout candidates",
        "description": "Requires payment-recovery:read or write. Limits are 120 requests per minute per merchant and per IP route group.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": "Generated request correlation ID."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Credential or scope unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Record unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Operation conflicts with current state or idempotency record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Product, environment, or dependency unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "operationId": "recovery_candidates"
      }
    },
    "/payment-recovery/campaign-performance": {
      "get": {
        "tags": [
          "Payment Recovery"
        ],
        "summary": "Read reminder outcomes for the credential environment",
        "operationId": "recovery_campaign_performance",
        "description": "Requires a payment-recovery scoped credential over HTTPS.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {},
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid idempotency key"
          },
          "401": {
            "description": "Authentication or scope rejected"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "409": {
            "description": "Conflicting state or request"
          },
          "422": {
            "description": "Validation failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Product unavailable"
          }
        }
      }
    },
    "/financial-events/{id}/invitations": {
      "post": {
        "tags": [
          "Financial Events"
        ],
        "summary": "Create an organizer-granted account-bound invitation with a card",
        "operationId": "financial_events_invitation_create",
        "description": "Requires a financial-events scoped credential over HTTPS.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {},
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid idempotency key"
          },
          "401": {
            "description": "Authentication or scope rejected"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "409": {
            "description": "Conflicting state or request"
          },
          "422": {
            "description": "Validation failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Product unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "recipient_account": 42,
                "message": "Family ceremony"
              }
            }
          }
        }
      }
    },
    "/financial-events/{id}/invitations/{invitation}": {
      "get": {
        "tags": [
          "Financial Events"
        ],
        "summary": "Read an application invitation status",
        "operationId": "financial_events_invitation_show",
        "description": "Requires a financial-events scoped credential over HTTPS.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "invitation",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {},
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid idempotency key"
          },
          "401": {
            "description": "Authentication or scope rejected"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "409": {
            "description": "Conflicting state or request"
          },
          "422": {
            "description": "Validation failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Product unavailable"
          }
        }
      }
    },
    "/financial-events/{id}/invitations/{invitation}/revoke": {
      "post": {
        "tags": [
          "Financial Events"
        ],
        "summary": "Revoke an unaccepted application invitation",
        "operationId": "financial_events_invitation_revoke",
        "description": "Requires a financial-events scoped credential over HTTPS.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "invitation",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {},
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid idempotency key"
          },
          "401": {
            "description": "Authentication or scope rejected"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "409": {
            "description": "Conflicting state or request"
          },
          "422": {
            "description": "Validation failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Product unavailable"
          }
        }
      }
    },
    "/payment-intents/templates": {
      "get": {
        "tags": [
          "Smart Payment Intent"
        ],
        "summary": "List merchant intent templates",
        "operationId": "intent_template_index",
        "description": "Requires a payment-intents scoped credential over HTTPS.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {},
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid idempotency key"
          },
          "401": {
            "description": "Authentication or scope rejected"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "409": {
            "description": "Conflicting state or request"
          },
          "422": {
            "description": "Validation failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Product unavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Smart Payment Intent"
        ],
        "summary": "Create a versioned intent template",
        "operationId": "intent_template_create",
        "description": "Requires a payment-intents scoped credential over HTTPS.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {},
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid idempotency key"
          },
          "401": {
            "description": "Authentication or scope rejected"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "409": {
            "description": "Conflicting state or request"
          },
          "422": {
            "description": "Validation failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Product unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "name": "Service invoice",
                "valid_hours": 24,
                "purpose": "invoice",
                "terms": {
                  "description": "Service invoice",
                  "currency": "MGA",
                  "unit_amount": 150000,
                  "methods": [
                    "sandbox_card"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/payment-intents/templates/{id}": {
      "get": {
        "tags": [
          "Smart Payment Intent"
        ],
        "summary": "Read a template and optionally select an older version",
        "operationId": "intent_template_show",
        "description": "Requires a payment-intents scoped credential over HTTPS.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "version",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {},
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid idempotency key"
          },
          "401": {
            "description": "Authentication or scope rejected"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "409": {
            "description": "Conflicting state or request"
          },
          "422": {
            "description": "Validation failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Product unavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "Smart Payment Intent"
        ],
        "summary": "Publish the next version of a template",
        "operationId": "intent_template_update",
        "description": "Requires a payment-intents scoped credential over HTTPS.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {},
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid idempotency key"
          },
          "401": {
            "description": "Authentication or scope rejected"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "409": {
            "description": "Conflicting state or request"
          },
          "422": {
            "description": "Validation failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Product unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "name": "Service invoice",
                "valid_hours": 24,
                "purpose": "invoice",
                "terms": {
                  "description": "Service invoice",
                  "currency": "MGA",
                  "unit_amount": 150000,
                  "methods": [
                    "sandbox_card"
                  ]
                },
                "expected_version": 1
              }
            }
          }
        }
      }
    },
    "/payment-intents/templates/{id}/intents": {
      "post": {
        "tags": [
          "Smart Payment Intent"
        ],
        "summary": "Create a canonical draft from a template version",
        "operationId": "intent_template_instantiate",
        "description": "Requires a payment-intents scoped credential over HTTPS.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {},
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid idempotency key"
          },
          "401": {
            "description": "Authentication or scope rejected"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "409": {
            "description": "Conflicting state or request"
          },
          "422": {
            "description": "Validation failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Product unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "version": 1,
                "reference": "invoice-demo-42"
              }
            }
          }
        }
      }
    },
    "/commerce-workflows/{id}/evidence": {
      "get": {
        "tags": [
          "Commerce Workflow"
        ],
        "summary": "List authorized workflow evidence",
        "operationId": "workflow_evidence_list",
        "description": "Requires a commerce-workflows scoped credential over HTTPS.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {},
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid idempotency key"
          },
          "401": {
            "description": "Authentication or scope rejected"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "409": {
            "description": "Conflicting state or request"
          },
          "422": {
            "description": "Validation failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Product unavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Commerce Workflow"
        ],
        "summary": "Submit evidence using multipart form data",
        "operationId": "workflow_evidence_upload",
        "description": "Requires a commerce-workflows scoped credential over HTTPS.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {},
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid idempotency key"
          },
          "401": {
            "description": "Authentication or scope rejected"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "409": {
            "description": "Conflicting state or request"
          },
          "422": {
            "description": "Validation failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Product unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "evidence_file"
                ],
                "properties": {
                  "evidence_file": {
                    "type": "string",
                    "format": "binary",
                    "description": "PDF, PNG or JPEG, maximum 2 MiB"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/commerce-workflows/{id}/evidence/{evidence}": {
      "get": {
        "tags": [
          "Commerce Workflow"
        ],
        "summary": "Download private evidence as an attachment",
        "operationId": "workflow_evidence_download",
        "description": "Requires a commerce-workflows scoped credential over HTTPS.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "evidence",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid idempotency key"
          },
          "401": {
            "description": "Authentication or scope rejected"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "409": {
            "description": "Conflicting state or request"
          },
          "422": {
            "description": "Validation failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Product unavailable"
          }
        }
      }
    },
    "/commerce-workflows/{id}/evidence/{evidence}/review": {
      "post": {
        "tags": [
          "Commerce Workflow"
        ],
        "summary": "Record a counterparty evidence review",
        "operationId": "workflow_evidence_review",
        "description": "Requires a commerce-workflows scoped credential over HTTPS.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "evidence",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {},
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid idempotency key"
          },
          "401": {
            "description": "Authentication or scope rejected"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "409": {
            "description": "Conflicting state or request"
          },
          "422": {
            "description": "Validation failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Product unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "decision": "approved"
              }
            }
          }
        }
      }
    },
    "/commerce-workflows/{id}/milestones": {
      "get": {
        "tags": [
          "Commerce Workflow"
        ],
        "summary": "Read staged payment milestones",
        "operationId": "workflow_milestone_list",
        "description": "Requires a commerce-workflows scoped credential over HTTPS.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {},
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid idempotency key"
          },
          "401": {
            "description": "Authentication or scope rejected"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "409": {
            "description": "Conflicting state or request"
          },
          "422": {
            "description": "Validation failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Product unavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Commerce Workflow"
        ],
        "summary": "Attach an existing draft to a workflow milestone",
        "operationId": "workflow_milestone_add",
        "description": "Requires a commerce-workflows scoped credential over HTTPS.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {},
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid idempotency key"
          },
          "401": {
            "description": "Authentication or scope rejected"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "409": {
            "description": "Conflicting state or request"
          },
          "422": {
            "description": "Validation failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Product unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "purchase_id": "113e4567-e89b-12d3-a456-426614174000",
                "requires_evidence": true
              }
            }
          }
        }
      }
    },
    "/commerce-workflows/{id}/milestones/{milestone}/confirm": {
      "post": {
        "tags": [
          "Commerce Workflow"
        ],
        "summary": "Confirm a milestone from canonical settlement",
        "operationId": "workflow_milestone_confirm",
        "description": "Requires a commerce-workflows scoped credential over HTTPS.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "milestone",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {},
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid idempotency key"
          },
          "401": {
            "description": "Authentication or scope rejected"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "409": {
            "description": "Conflicting state or request"
          },
          "422": {
            "description": "Validation failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Product unavailable"
          }
        }
      }
    },
    "/financial-intelligence/revenue.csv": {
      "get": {
        "tags": [
          "Financial Intelligence"
        ],
        "summary": "Download a revenue CSV report",
        "operationId": "intelligence_revenue_csv",
        "description": "Requires a financial-intelligence scoped credential over HTTPS.",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "through",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[A-Z]{3}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid idempotency key"
          },
          "401": {
            "description": "Authentication or scope rejected"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "409": {
            "description": "Conflicting state or request"
          },
          "422": {
            "description": "Validation failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Product unavailable"
          }
        }
      }
    },
    "/financial-intelligence/revenue.pdf": {
      "get": {
        "tags": [
          "Financial Intelligence"
        ],
        "summary": "Download a revenue PDF report",
        "operationId": "intelligence_revenue_pdf",
        "description": "Requires a financial-intelligence scoped credential over HTTPS.",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "through",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[A-Z]{3}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid idempotency key"
          },
          "401": {
            "description": "Authentication or scope rejected"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "409": {
            "description": "Conflicting state or request"
          },
          "422": {
            "description": "Validation failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Product unavailable"
          }
        }
      }
    },
    "/financial-intelligence/forecast": {
      "get": {
        "tags": [
          "Financial Intelligence"
        ],
        "summary": "Project seven-day gross revenue using a historical daily mean",
        "operationId": "intelligence_forecast",
        "description": "Requires a financial-intelligence scoped credential over HTTPS.",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "through",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[A-Z]{3}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {},
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid idempotency key"
          },
          "401": {
            "description": "Authentication or scope rejected"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "409": {
            "description": "Conflicting state or request"
          },
          "422": {
            "description": "Validation failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Product unavailable"
          }
        }
      }
    },
    "/financial-intelligence/alerts": {
      "get": {
        "tags": [
          "Financial Intelligence"
        ],
        "summary": "List merchant alert rules",
        "operationId": "intelligence_alert_list",
        "description": "Requires a financial-intelligence scoped credential over HTTPS.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {},
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid idempotency key"
          },
          "401": {
            "description": "Authentication or scope rejected"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "409": {
            "description": "Conflicting state or request"
          },
          "422": {
            "description": "Validation failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Product unavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Financial Intelligence"
        ],
        "summary": "Create or retrieve a matching merchant alert rule",
        "operationId": "intelligence_alert_create",
        "description": "Requires a financial-intelligence scoped credential over HTTPS.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {},
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid idempotency key"
          },
          "401": {
            "description": "Authentication or scope rejected"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "409": {
            "description": "Conflicting state or request"
          },
          "422": {
            "description": "Validation failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Product unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "currency": "MGA",
                "threshold": "10000",
                "cooldown_hours": 24
              }
            }
          }
        }
      }
    },
    "/financial-intelligence/alerts/history": {
      "get": {
        "tags": [
          "Financial Intelligence"
        ],
        "summary": "Read in-app alerts",
        "operationId": "intelligence_alert_history",
        "description": "Requires a financial-intelligence scoped credential over HTTPS.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {},
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid idempotency key"
          },
          "401": {
            "description": "Authentication or scope rejected"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "409": {
            "description": "Conflicting state or request"
          },
          "422": {
            "description": "Validation failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Product unavailable"
          }
        }
      }
    },
    "/financial-intelligence/alerts/{id}/acknowledge": {
      "post": {
        "tags": [
          "Financial Intelligence"
        ],
        "summary": "Acknowledge a notification",
        "operationId": "intelligence_alert_acknowledge",
        "description": "Requires a financial-intelligence scoped credential over HTTPS.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {},
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid idempotency key"
          },
          "401": {
            "description": "Authentication or scope rejected"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "409": {
            "description": "Conflicting state or request"
          },
          "422": {
            "description": "Validation failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Product unavailable"
          }
        }
      }
    },
    "/financial-intelligence/alerts/{id}/revoke": {
      "post": {
        "tags": [
          "Financial Intelligence"
        ],
        "summary": "Revoke a threshold rule",
        "operationId": "intelligence_alert_revoke",
        "description": "Requires a financial-intelligence scoped credential over HTTPS.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {},
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid idempotency key"
          },
          "401": {
            "description": "Authentication or scope rejected"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "409": {
            "description": "Conflicting state or request"
          },
          "422": {
            "description": "Validation failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Product unavailable"
          }
        }
      }
    },
    "/financial-intelligence/anomalies": {
      "get": {
        "tags": [
          "Financial Intelligence"
        ],
        "operationId": "intelligence_anomalies",
        "summary": "Explain long-pending and unmatched payment attempts",
        "description": "Requires a Financial Intelligence read or write credential. Aggregates are scoped to the credential merchant and environment.",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "through",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[A-Z]{3}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication or scope rejected"
          },
          "422": {
            "description": "Invalid report period"
          },
          "503": {
            "description": "Product unavailable"
          }
        }
      }
    },
    "/financial-intelligence/recommendations": {
      "get": {
        "tags": [
          "Financial Intelligence"
        ],
        "operationId": "intelligence_recommendations",
        "summary": "Read evidence-based reconciliation and payment method recommendations",
        "description": "Requires a Financial Intelligence read or write credential. Aggregates are scoped to the credential merchant and environment.",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "through",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[A-Z]{3}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "request_id"
                  ],
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication or scope rejected"
          },
          "422": {
            "description": "Invalid report period"
          },
          "503": {
            "description": "Product unavailable"
          }
        }
      }
    },
    "/financial-events/{id}/pledges": {
      "get": {
        "summary": "Index external pledge request",
        "operationId": "event_pledge_index",
        "tags": [
          "Financial Events"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Grant"
          }
        ],
        "responses": {
          "200": {
            "description": "Current pledge status or account-bound approval link"
          },
          "401": {
            "description": "Invalid credential scope"
          },
          "404": {
            "description": "Organizer grant or pledge not accessible"
          },
          "409": {
            "description": "Conflicting or closed request"
          },
          "422": {
            "description": "Invalid request terms"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Integration unavailable"
          }
        }
      },
      "post": {
        "summary": "Create external pledge request",
        "operationId": "event_pledge_create",
        "tags": [
          "Financial Events"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current pledge status or account-bound approval link"
          },
          "401": {
            "description": "Invalid credential scope"
          },
          "404": {
            "description": "Organizer grant or pledge not accessible"
          },
          "409": {
            "description": "Conflicting or closed request"
          },
          "422": {
            "description": "Invalid request terms"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Integration unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "string",
                    "example": "2500.00"
                  },
                  "due_on": {
                    "type": "string",
                    "format": "date"
                  },
                  "message": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "contributor_account": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "amount",
                  "due_on",
                  "contributor_account"
                ]
              }
            }
          }
        }
      }
    },
    "/financial-events/{id}/pledges/{pledge}": {
      "get": {
        "summary": "Show external pledge request",
        "operationId": "event_pledge_show",
        "tags": [
          "Financial Events"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "name": "pledge",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current pledge status or account-bound approval link"
          },
          "401": {
            "description": "Invalid credential scope"
          },
          "404": {
            "description": "Organizer grant or pledge not accessible"
          },
          "409": {
            "description": "Conflicting or closed request"
          },
          "422": {
            "description": "Invalid request terms"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Integration unavailable"
          }
        }
      },
      "patch": {
        "summary": "Update external pledge request",
        "operationId": "event_pledge_update",
        "tags": [
          "Financial Events"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "name": "pledge",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current pledge status or account-bound approval link"
          },
          "401": {
            "description": "Invalid credential scope"
          },
          "404": {
            "description": "Organizer grant or pledge not accessible"
          },
          "409": {
            "description": "Conflicting or closed request"
          },
          "422": {
            "description": "Invalid request terms"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Integration unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "string",
                    "example": "2500.00"
                  },
                  "due_on": {
                    "type": "string",
                    "format": "date"
                  },
                  "message": {
                    "type": "string",
                    "maxLength": 500
                  }
                },
                "required": [
                  "amount",
                  "due_on"
                ]
              }
            }
          }
        }
      }
    },
    "/financial-events/{id}/pledges/{pledge}/cancel": {
      "post": {
        "summary": "Cancel external pledge request",
        "operationId": "event_pledge_cancel",
        "tags": [
          "Financial Events"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Grant"
          },
          {
            "name": "pledge",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current pledge status or account-bound approval link"
          },
          "401": {
            "description": "Invalid credential scope"
          },
          "404": {
            "description": "Organizer grant or pledge not accessible"
          },
          "409": {
            "description": "Conflicting or closed request"
          },
          "422": {
            "description": "Invalid request terms"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Integration unavailable"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "WebVola scoped token"
      }
    },
    "parameters": {
      "Purchase": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        },
        "description": "Original Universal Payment purchase UUID."
      },
      "Grant": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        },
        "description": "Organizer grant UUID from the linked event list."
      },
      "Idempotency": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_.-]{16,128}$"
        },
        "description": "Reuse this key for retries of the identical request."
      },
      "Page": {
        "name": "page",
        "in": "query",
        "schema": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              }
            }
          },
          "request_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "Recovery": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "status": {
            "type": "string"
          },
          "expires_at": {
            "type": "string",
            "nullable": true
          },
          "failure_category": {
            "type": "string",
            "nullable": true,
            "description": "Recorded payment evidence. A failed attempt without an adapter-verified reason is provider_failure_unspecified."
          },
          "purchase": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "reference": {
                "type": "string"
              },
              "amount": {
                "type": "integer"
              },
              "confirmed": {
                "type": "integer"
              },
              "remaining": {
                "type": "integer"
              },
              "pending": {
                "type": "integer"
              },
              "status": {
                "type": "string"
              },
              "currency": {
                "type": "string"
              },
              "scale": {
                "type": "integer"
              },
              "mode": {
                "type": "string"
              }
            }
          },
          "options": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "availability": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                },
                "methods": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "checkout_url": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "EventSummary": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "event_type": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "confirmed_contribution_count": {
            "type": "integer"
          },
          "confirmed_contributions": {
            "type": "string",
            "pattern": "^-?\\d+(\\.\\d+)?$"
          },
          "target": {
            "type": "string",
            "pattern": "^-?\\d+(\\.\\d+)?$"
          },
          "outstanding_target": {
            "type": "string",
            "pattern": "^-?\\d+(\\.\\d+)?$"
          }
        }
      },
      "Page": {
        "type": "object",
        "properties": {
          "current_page": {
            "type": "integer"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "last_page": {
            "type": "integer"
          },
          "per_page": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          }
        }
      },
      "EventContributionSession": {
        "type": "object",
        "required": [
          "id",
          "amount",
          "currency",
          "status",
          "expires_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "amount": {
            "type": "string",
            "example": "2500.00"
          },
          "currency": {
            "type": "string",
            "example": "MGA"
          },
          "status": {
            "type": "string",
            "enum": [
              "awaiting_contributor",
              "expired",
              "confirmed",
              "requires_reconciliation"
            ]
          },
          "expires_at": {
            "type": "string"
          },
          "checkout_url": {
            "type": "string",
            "format": "uri",
            "description": "Returned during session creation."
          }
        }
      }
    }
  },
  "x-webvola-webhooks": {
    "payment-recovery": {
      "environment": "live",
      "algorithm": "HMAC-SHA256 of timestamp.eventId.rawBody",
      "headers": [
        "X-WebVola-Time",
        "X-WebVola-Event",
        "X-WebVola-Signature"
      ],
      "receiver": "Verify the timestamp and signature before parsing, and deduplicate by event ID.",
      "events": [
        "recovery.created",
        "recovery.started",
        "recovery.partially_funded",
        "recovery.reconciliation_required",
        "recovery.completed",
        "recovery.expired",
        "recovery.cancelled"
      ]
    }
  },
  "x-lifecycle-webhooks": {
    "delivery": "Admin-approved HTTPS Universal Payment destination. Live subscriptions and merchant scope are rechecked on every attempt.",
    "headers": {
      "X-WebVola-Event": "Stable event identifier. Persist receipt identifiers to deduplicate.",
      "X-WebVola-Time": "Unix seconds for the current attempt. Verify freshness.",
      "X-WebVola-Signature": "sha256=<HMAC-SHA256(timestamp.event_id.raw_body)>."
    },
    "events": {
      "payment-intents": [
        "intent.created",
        "intent.authorized",
        "intent.partially_funded",
        "intent.fully_funded",
        "intent.completed",
        "intent.expired",
        "intent.cancelled",
        "intent.buyer_revoked"
      ],
      "commerce-workflows": [
        "workflow.created",
        "workflow.started",
        "workflow.step_completed",
        "workflow.payment_confirmed",
        "workflow.exception_created",
        "workflow.completed",
        "workflow.cancelled"
      ],
      "financial-events": [
        "event.updated",
        "event.contribution_confirmed",
        "event.invitation_accepted",
        "event.pledge_created",
        "event.pledge_updated",
        "event.pledge_cancelled",
        "event.pledge_fulfilled"
      ]
    }
  }
}
