{
  "components": {
    "schemas": {
      "AgentCheckout": {
        "additionalProperties": false,
        "properties": {
          "pay_url": {
            "title": "Pay Url",
            "type": "string"
          }
        },
        "required": [
          "pay_url"
        ],
        "title": "AgentCheckout",
        "type": "object"
      },
      "AgentMandate": {
        "additionalProperties": false,
        "description": "A payer's grant to an AI agent. It never moves money.",
        "properties": {
          "allowed_merchants": {
            "items": {
              "pattern": "^mer_\\d{6,}$",
              "type": "string"
            },
            "title": "Allowed Merchants",
            "type": "array"
          },
          "committed_clp": {
            "minimum": 0,
            "title": "Committed Clp",
            "type": "integer"
          },
          "confirm_above_clp": {
            "minimum": 0,
            "title": "Confirm Above Clp",
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
            "title": "Created At",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
            "title": "Expires At",
            "type": "string"
          },
          "id": {
            "pattern": "^mdt_\\d{6,}$",
            "title": "Id",
            "type": "string"
          },
          "label": {
            "maxLength": 80,
            "minLength": 1,
            "title": "Label",
            "type": "string"
          },
          "mode": {
            "const": "test",
            "title": "Mode",
            "type": "string"
          },
          "object": {
            "const": "agent_mandate",
            "title": "Object",
            "type": "string"
          },
          "per_payment_limit_clp": {
            "minimum": 0,
            "title": "Per Payment Limit Clp",
            "type": "integer"
          },
          "revoked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "total_limit_clp": {
            "minimum": 0,
            "title": "Total Limit Clp",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "object",
          "mode",
          "label",
          "allowed_merchants",
          "per_payment_limit_clp",
          "total_limit_clp",
          "confirm_above_clp",
          "committed_clp",
          "created_at",
          "expires_at",
          "revoked_at"
        ],
        "title": "AgentMandate",
        "type": "object"
      },
      "AgentMandateCreated": {
        "additionalProperties": false,
        "description": "Returned once, at creation: only the tokens' hashes are kept.",
        "properties": {
          "agent_token": {
            "pattern": "^agt_test_[A-Za-z0-9_-]{43}$",
            "title": "Agent Token",
            "type": "string"
          },
          "allowed_merchants": {
            "items": {
              "pattern": "^mer_\\d{6,}$",
              "type": "string"
            },
            "title": "Allowed Merchants",
            "type": "array"
          },
          "committed_clp": {
            "minimum": 0,
            "title": "Committed Clp",
            "type": "integer"
          },
          "confirm_above_clp": {
            "minimum": 0,
            "title": "Confirm Above Clp",
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
            "title": "Created At",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
            "title": "Expires At",
            "type": "string"
          },
          "holder_token": {
            "pattern": "^hld_test_[A-Za-z0-9_-]{43}$",
            "title": "Holder Token",
            "type": "string"
          },
          "id": {
            "pattern": "^mdt_\\d{6,}$",
            "title": "Id",
            "type": "string"
          },
          "label": {
            "maxLength": 80,
            "minLength": 1,
            "title": "Label",
            "type": "string"
          },
          "mode": {
            "const": "test",
            "title": "Mode",
            "type": "string"
          },
          "object": {
            "const": "agent_mandate",
            "title": "Object",
            "type": "string"
          },
          "per_payment_limit_clp": {
            "minimum": 0,
            "title": "Per Payment Limit Clp",
            "type": "integer"
          },
          "revoked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "total_limit_clp": {
            "minimum": 0,
            "title": "Total Limit Clp",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "object",
          "mode",
          "label",
          "allowed_merchants",
          "per_payment_limit_clp",
          "total_limit_clp",
          "confirm_above_clp",
          "committed_clp",
          "created_at",
          "expires_at",
          "revoked_at",
          "agent_token",
          "holder_token"
        ],
        "title": "AgentMandateCreated",
        "type": "object"
      },
      "AgentMerchant": {
        "additionalProperties": false,
        "properties": {
          "display_name": {
            "title": "Display Name",
            "type": "string"
          },
          "id": {
            "pattern": "^mer_\\d{6,}$",
            "title": "Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "display_name"
        ],
        "title": "AgentMerchant",
        "type": "object"
      },
      "AgentPaymentRequest": {
        "additionalProperties": false,
        "description": "An agent's request to prepare one checkout; ``checkout`` only when approved.",
        "properties": {
          "amount_clp": {
            "minimum": 0,
            "title": "Amount Clp",
            "type": "integer"
          },
          "checkout": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AgentCheckout"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
            "title": "Created At",
            "type": "string"
          },
          "decided_at": {
            "anyOf": [
              {
                "format": "date-time",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Decided At"
          },
          "id": {
            "pattern": "^apr_\\d{6,}$",
            "title": "Id",
            "type": "string"
          },
          "mandate_id": {
            "pattern": "^mdt_\\d{6,}$",
            "title": "Mandate Id",
            "type": "string"
          },
          "merchant": {
            "$ref": "#/components/schemas/AgentMerchant"
          },
          "mode": {
            "const": "test",
            "title": "Mode",
            "type": "string"
          },
          "object": {
            "const": "agent_payment_request",
            "title": "Object",
            "type": "string"
          },
          "reason": {
            "anyOf": [
              {
                "enum": [
                  "mandate_revoked",
                  "mandate_expired",
                  "merchant_not_allowed",
                  "payment_not_open",
                  "over_per_payment_limit",
                  "over_total_limit"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "reference": {
            "pattern": "^[A-Za-z0-9._-]{1,64}$",
            "title": "Reference",
            "type": "string"
          },
          "state": {
            "enum": [
              "approved",
              "pending_approval",
              "refused",
              "rejected"
            ],
            "title": "State",
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "mode",
          "mandate_id",
          "state",
          "reason",
          "amount_clp",
          "merchant",
          "reference",
          "created_at",
          "decided_at",
          "checkout"
        ],
        "title": "AgentPaymentRequest",
        "type": "object"
      },
      "AgentPaymentRequestList": {
        "additionalProperties": false,
        "description": "``GET /v1/agent/approvals``; ``state=pending_approval`` is the holder's inbox.",
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/AgentPaymentRequest"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "object": {
            "const": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "object",
          "data",
          "has_more"
        ],
        "title": "AgentPaymentRequestList",
        "type": "object"
      },
      "AgentRequestIn": {
        "additionalProperties": false,
        "properties": {
          "checkout_token": {
            "pattern": "^[A-Za-z0-9_-]{32}$",
            "title": "Checkout Token",
            "type": "string"
          }
        },
        "required": [
          "checkout_token"
        ],
        "title": "AgentRequestIn",
        "type": "object"
      },
      "ApiError": {
        "additionalProperties": false,
        "description": "Every refusal: a Spanish ``detail`` and a stable ``code``; it never echoes the input.\n\n``request_id`` is also the ``X-Request-Id`` header, and ``doc_url`` explains the code.",
        "properties": {
          "code": {
            "enum": [
              "idempotency_key_required",
              "invalid_api_key",
              "forbidden_scope",
              "not_found",
              "idempotency_key_reused",
              "unique_amount_unavailable",
              "invalid_state",
              "amount_mismatch",
              "request_too_large",
              "invalid_request",
              "invalid_json",
              "invalid_rut",
              "limit_reached",
              "state_unverified",
              "bank_unavailable",
              "invalid_token",
              "rate_limited",
              "session_required",
              "session_expired",
              "invalid_bank_login",
              "bank_access_consent_required",
              "bank_authorization_unrecognized",
              "bank_connector_unavailable",
              "bank_channel_unavailable"
            ],
            "title": "Code",
            "type": "string"
          },
          "detail": {
            "title": "Detail",
            "type": "string"
          },
          "doc_url": {
            "pattern": "^https://docs\\.axiomic\\.cl/errores#[a-z_]+$",
            "title": "Doc Url",
            "type": "string"
          },
          "request_id": {
            "pattern": "^req_[0-9a-f]{24}$",
            "title": "Request Id",
            "type": "string"
          }
        },
        "required": [
          "detail",
          "code",
          "request_id",
          "doc_url"
        ],
        "title": "ApiError",
        "type": "object"
      },
      "ApiValidationError": {
        "additionalProperties": false,
        "description": "422 for a body or query that fails validation; ``fields`` never repeats a value.",
        "properties": {
          "code": {
            "const": "invalid_request",
            "title": "Code",
            "type": "string"
          },
          "detail": {
            "title": "Detail",
            "type": "string"
          },
          "doc_url": {
            "pattern": "^https://docs\\.axiomic\\.cl/errores#[a-z_]+$",
            "title": "Doc Url",
            "type": "string"
          },
          "fields": {
            "items": {
              "$ref": "#/components/schemas/FieldError"
            },
            "title": "Fields",
            "type": "array"
          },
          "request_id": {
            "pattern": "^req_[0-9a-f]{24}$",
            "title": "Request Id",
            "type": "string"
          }
        },
        "required": [
          "detail",
          "code",
          "request_id",
          "doc_url",
          "fields"
        ],
        "title": "ApiValidationError",
        "type": "object"
      },
      "AttemptCreated": {
        "description": "``POST /v1/checkout/sessions/{token}/attempts``, told apart by ``connector``.\n\nA root model cannot forbid extra keys itself; each of its members does.",
        "discriminator": {
          "mapping": {
            "assisted": "#/components/schemas/PaymentAttemptCreated",
            "direct": "#/components/schemas/DirectAttemptCreated",
            "sim": "#/components/schemas/PaymentAttemptCreated"
          },
          "propertyName": "connector"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/PaymentAttemptCreated"
          },
          {
            "$ref": "#/components/schemas/DirectAttemptCreated"
          }
        ],
        "title": "AttemptCreated"
      },
      "AttemptIn": {
        "additionalProperties": false,
        "properties": {
          "bank_id": {
            "pattern": "^[a-z0-9_]{2,40}$",
            "title": "Bank Id",
            "type": "string"
          },
          "connector": {
            "default": "assisted",
            "enum": [
              "sim",
              "assisted",
              "direct"
            ],
            "title": "Connector",
            "type": "string"
          }
        },
        "required": [
          "bank_id"
        ],
        "title": "AttemptIn",
        "type": "object"
      },
      "Bank": {
        "additionalProperties": false,
        "properties": {
          "available": {
            "title": "Available",
            "type": "boolean"
          },
          "connectors": {
            "items": {
              "enum": [
                "sim",
                "assisted",
                "direct"
              ],
              "type": "string"
            },
            "title": "Connectors",
            "type": "array"
          },
          "direct": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DirectAvailability"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "pattern": "^[a-z0-9_]{2,40}$",
            "title": "Id",
            "type": "string"
          },
          "mode": {
            "const": "test",
            "title": "Mode",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "notice": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notice"
          },
          "object": {
            "const": "bank",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "mode",
          "name",
          "available",
          "connectors",
          "direct",
          "notice"
        ],
        "title": "Bank",
        "type": "object"
      },
      "BankAccountIn": {
        "additionalProperties": false,
        "properties": {
          "reference": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Reference",
            "type": "string"
          }
        },
        "required": [
          "reference"
        ],
        "title": "BankAccountIn",
        "type": "object"
      },
      "BankAuthorizeIn": {
        "additionalProperties": false,
        "properties": {
          "challenge_id": {
            "maxLength": 160,
            "minLength": 1,
            "title": "Challenge Id",
            "type": "string"
          },
          "code": {
            "anyOf": [
              {
                "maxLength": 16,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code"
          }
        },
        "required": [
          "challenge_id",
          "code"
        ],
        "title": "BankAuthorizeIn",
        "type": "object"
      },
      "BankChallenge": {
        "additionalProperties": false,
        "properties": {
          "code_length": {
            "anyOf": [
              {
                "maximum": 12,
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code Length"
          },
          "expires_at": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
            "title": "Expires At",
            "type": "string"
          },
          "id": {
            "maxLength": 128,
            "title": "Id",
            "type": "string"
          },
          "prompt": {
            "title": "Prompt",
            "type": "string"
          },
          "type": {
            "enum": [
              "otp",
              "bank_app",
              "unrecognized"
            ],
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "prompt",
          "expires_at",
          "code_length"
        ],
        "title": "BankChallenge",
        "type": "object"
      },
      "BankCheckout": {
        "additionalProperties": false,
        "description": "A direct attempt's bank session as the page shows it. ``submitted`` is not paid: only\n``checkout_state: succeeded`` says the credit arrived.",
        "properties": {
          "accounts": {
            "items": {
              "$ref": "#/components/schemas/BankSourceAccount"
            },
            "title": "Accounts",
            "type": "array"
          },
          "amount_clp": {
            "minimum": 0,
            "title": "Amount Clp",
            "type": "integer"
          },
          "attempt_id": {
            "pattern": "^pa_\\d{6,}$",
            "title": "Attempt Id",
            "type": "string"
          },
          "bank_id": {
            "pattern": "^[a-z0-9_]{2,40}$",
            "title": "Bank Id",
            "type": "string"
          },
          "bank_name": {
            "title": "Bank Name",
            "type": "string"
          },
          "can_submit": {
            "title": "Can Submit",
            "type": "boolean"
          },
          "challenge": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BankChallenge"
              },
              {
                "type": "null"
              }
            ]
          },
          "checkout_state": {
            "enum": [
              "created",
              "awaiting_customer",
              "awaiting_confirmation",
              "succeeded",
              "failed",
              "review"
            ],
            "title": "Checkout State",
            "type": "string"
          },
          "currency": {
            "const": "CLP",
            "title": "Currency",
            "type": "string"
          },
          "error_code": {
            "anyOf": [
              {
                "enum": [
                  "bank_access_unverified",
                  "outcome_unknown",
                  "challenge_unrecognized"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Code"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "fingerprint": {
            "anyOf": [
              {
                "maxLength": 128,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fingerprint"
          },
          "merchant": {
            "$ref": "#/components/schemas/CheckoutMerchant"
          },
          "object": {
            "const": "bank_checkout",
            "title": "Object",
            "type": "string"
          },
          "receiver": {
            "$ref": "#/components/schemas/BankReceiver"
          },
          "selected_account": {
            "anyOf": [
              {
                "maxLength": 128,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Selected Account"
          },
          "server_time": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
            "title": "Server Time",
            "type": "string"
          },
          "state": {
            "enum": [
              "authentication_required",
              "authenticating",
              "account_selection",
              "review_required",
              "challenge_required",
              "submitted",
              "outcome_unknown",
              "failed",
              "expired"
            ],
            "title": "State",
            "type": "string"
          }
        },
        "required": [
          "object",
          "attempt_id",
          "state",
          "bank_id",
          "bank_name",
          "amount_clp",
          "currency",
          "merchant",
          "receiver",
          "accounts",
          "selected_account",
          "fingerprint",
          "challenge",
          "can_submit",
          "expires_at",
          "server_time",
          "checkout_state",
          "error_code"
        ],
        "title": "BankCheckout",
        "type": "object"
      },
      "BankList": {
        "additionalProperties": false,
        "description": "``GET /v1/banks``: the test-mode catalog, one bank unavailable on purpose.",
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Bank"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "object": {
            "const": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "object",
          "data",
          "has_more"
        ],
        "title": "BankList",
        "type": "object"
      },
      "BankLoginIn": {
        "additionalProperties": false,
        "description": "Login values live only inside this request; the validation error never repeats them.",
        "properties": {
          "access_consent_version": {
            "maxLength": 32,
            "title": "Access Consent Version",
            "type": "string"
          },
          "password": {
            "maxLength": 64,
            "minLength": 1,
            "title": "Password",
            "type": "string"
          },
          "rut": {
            "maxLength": 16,
            "minLength": 3,
            "title": "Rut",
            "type": "string"
          }
        },
        "required": [
          "rut",
          "password",
          "access_consent_version"
        ],
        "title": "BankLoginIn",
        "type": "object"
      },
      "BankPrepareIn": {
        "additionalProperties": false,
        "properties": {
          "consent_version": {
            "maxLength": 32,
            "title": "Consent Version",
            "type": "string"
          },
          "fingerprint": {
            "maxLength": 128,
            "title": "Fingerprint",
            "type": "string"
          }
        },
        "required": [
          "consent_version",
          "fingerprint"
        ],
        "title": "BankPrepareIn",
        "type": "object"
      },
      "BankReceiver": {
        "additionalProperties": false,
        "properties": {
          "bank": {
            "title": "Bank",
            "type": "string"
          },
          "display_name": {
            "title": "Display Name",
            "type": "string"
          },
          "masked_account": {
            "pattern": "^\\*{4}[0-9]{0,4}$",
            "title": "Masked Account",
            "type": "string"
          }
        },
        "required": [
          "display_name",
          "bank",
          "masked_account"
        ],
        "title": "BankReceiver",
        "type": "object"
      },
      "BankSourceAccount": {
        "additionalProperties": false,
        "properties": {
          "masked_number": {
            "pattern": "^\\*{3,12}[0-9]{0,4}$",
            "title": "Masked Number",
            "type": "string"
          },
          "reference": {
            "maxLength": 128,
            "title": "Reference",
            "type": "string"
          }
        },
        "required": [
          "reference",
          "masked_number"
        ],
        "title": "BankSourceAccount",
        "type": "object"
      },
      "CheckoutMerchant": {
        "additionalProperties": false,
        "properties": {
          "display_name": {
            "title": "Display Name",
            "type": "string"
          }
        },
        "required": [
          "display_name"
        ],
        "title": "CheckoutMerchant",
        "type": "object"
      },
      "CheckoutSession": {
        "additionalProperties": false,
        "description": "The pay page. Its amount is the exact final amount; never a discount or payer data.",
        "properties": {
          "allowed_origins": {
            "items": {
              "pattern": "^https?://[a-z0-9.-]+(:\\d{1,5})?$",
              "type": "string"
            },
            "maxItems": 10,
            "title": "Allowed Origins",
            "type": "array"
          },
          "amount_clp": {
            "minimum": 0,
            "title": "Amount Clp",
            "type": "integer"
          },
          "cancel_url": {
            "anyOf": [
              {
                "maxLength": 2000,
                "minLength": 10,
                "pattern": "^https?://",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cancel Url"
          },
          "checkout_state": {
            "enum": [
              "created",
              "awaiting_customer",
              "awaiting_confirmation",
              "succeeded",
              "failed",
              "review"
            ],
            "title": "Checkout State",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 140,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "expires_at": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
            "title": "Expires At",
            "type": "string"
          },
          "last_attempt": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaymentAttempt"
              },
              {
                "type": "null"
              }
            ]
          },
          "merchant": {
            "$ref": "#/components/schemas/CheckoutMerchant"
          },
          "mode": {
            "const": "test",
            "title": "Mode",
            "type": "string"
          },
          "object": {
            "const": "checkout_session",
            "title": "Object",
            "type": "string"
          },
          "payer_restricted": {
            "title": "Payer Restricted",
            "type": "boolean"
          },
          "receipt": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Receipt"
              },
              {
                "type": "null"
              }
            ]
          },
          "reference": {
            "pattern": "^[A-Za-z0-9._-]{1,64}$",
            "title": "Reference",
            "type": "string"
          },
          "return_url": {
            "anyOf": [
              {
                "maxLength": 2000,
                "minLength": 10,
                "pattern": "^https?://",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Return Url"
          },
          "revision": {
            "minimum": 1,
            "title": "Revision",
            "type": "integer"
          },
          "server_time": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
            "title": "Server Time",
            "type": "string"
          },
          "status": {
            "enum": [
              "open",
              "paid",
              "expired",
              "cancelled"
            ],
            "title": "Status",
            "type": "string"
          },
          "transfer_to": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TransferTo"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "object",
          "mode",
          "status",
          "checkout_state",
          "last_attempt",
          "revision",
          "merchant",
          "amount_clp",
          "reference",
          "description",
          "expires_at",
          "server_time",
          "payer_restricted",
          "return_url",
          "cancel_url",
          "allowed_origins",
          "transfer_to",
          "receipt"
        ],
        "title": "CheckoutSession",
        "type": "object"
      },
      "CheckoutSettings": {
        "additionalProperties": false,
        "description": "The mode's pay page settings: the origins that may embed it, normalized.",
        "properties": {
          "allowed_origins": {
            "items": {
              "pattern": "^https?://[a-z0-9.-]+(:\\d{1,5})?$",
              "type": "string"
            },
            "maxItems": 10,
            "title": "Allowed Origins",
            "type": "array"
          },
          "mode": {
            "const": "test",
            "title": "Mode",
            "type": "string"
          },
          "object": {
            "const": "checkout_settings",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "object",
          "mode",
          "allowed_origins"
        ],
        "title": "CheckoutSettings",
        "type": "object"
      },
      "CheckoutSettingsIn": {
        "additionalProperties": false,
        "properties": {
          "allowed_origins": {
            "items": {
              "maxLength": 300,
              "minLength": 10,
              "type": "string"
            },
            "maxItems": 10,
            "title": "Allowed Origins",
            "type": "array"
          }
        },
        "required": [
          "allowed_origins"
        ],
        "title": "CheckoutSettingsIn",
        "type": "object"
      },
      "CheckoutStatus": {
        "additionalProperties": false,
        "description": "The pay page's poll, with an ETag over everything but ``server_time``.",
        "properties": {
          "checkout_state": {
            "enum": [
              "created",
              "awaiting_customer",
              "awaiting_confirmation",
              "succeeded",
              "failed",
              "review"
            ],
            "title": "Checkout State",
            "type": "string"
          },
          "last_attempt": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaymentAttempt"
              },
              {
                "type": "null"
              }
            ]
          },
          "object": {
            "const": "checkout_status",
            "title": "Object",
            "type": "string"
          },
          "poll_after_ms": {
            "minimum": 0,
            "title": "Poll After Ms",
            "type": "integer"
          },
          "revision": {
            "minimum": 1,
            "title": "Revision",
            "type": "integer"
          },
          "server_time": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
            "title": "Server Time",
            "type": "string"
          },
          "status": {
            "enum": [
              "open",
              "paid",
              "expired",
              "cancelled"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "object",
          "status",
          "checkout_state",
          "last_attempt",
          "revision",
          "server_time",
          "poll_after_ms"
        ],
        "title": "CheckoutStatus",
        "type": "object"
      },
      "CreateIn": {
        "additionalProperties": false,
        "properties": {
          "amount_clp": {
            "maximum": 50000000,
            "minimum": 100,
            "title": "Amount Clp",
            "type": "integer"
          },
          "cancel_url": {
            "anyOf": [
              {
                "maxLength": 2000,
                "minLength": 10,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cancel Url"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 140,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "expected_payer_rut": {
            "anyOf": [
              {
                "maxLength": 16,
                "minLength": 3,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Payer Rut"
          },
          "expires_in_seconds": {
            "default": 3600,
            "maximum": 2592000,
            "minimum": 300,
            "title": "Expires In Seconds",
            "type": "integer"
          },
          "reference": {
            "pattern": "^[A-Za-z0-9._-]{1,64}$",
            "title": "Reference",
            "type": "string"
          },
          "return_url": {
            "anyOf": [
              {
                "maxLength": 2000,
                "minLength": 10,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Return Url"
          }
        },
        "required": [
          "amount_clp",
          "reference"
        ],
        "title": "CreateIn",
        "type": "object"
      },
      "DirectAttemptCreated": {
        "additionalProperties": false,
        "description": "A ``direct`` attempt: its first bank view and, this once, the browser's bank guard.",
        "properties": {
          "bank_checkout": {
            "$ref": "#/components/schemas/BankCheckout"
          },
          "bank_id": {
            "pattern": "^[a-z0-9_]{2,40}$",
            "title": "Bank Id",
            "type": "string"
          },
          "bank_session_token": {
            "pattern": "^[A-Za-z0-9_-]{43}$",
            "title": "Bank Session Token",
            "type": "string"
          },
          "bank_state": {
            "anyOf": [
              {
                "enum": [
                  "authentication_required",
                  "authenticating",
                  "account_selection",
                  "review_required",
                  "challenge_required",
                  "submitted",
                  "outcome_unknown",
                  "failed",
                  "expired"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bank State"
          },
          "connector": {
            "const": "direct",
            "title": "Connector",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
            "title": "Created At",
            "type": "string"
          },
          "failure_reason": {
            "anyOf": [
              {
                "enum": [
                  "superseded",
                  "declined_by_bank",
                  "bank_session_expired",
                  "bank_access_unverified",
                  "closed_by_payer"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failure Reason"
          },
          "id": {
            "pattern": "^pa_\\d{6,}$",
            "title": "Id",
            "type": "string"
          },
          "instructions": {
            "$ref": "#/components/schemas/DirectPayment"
          },
          "object": {
            "const": "payment_attempt",
            "title": "Object",
            "type": "string"
          },
          "state": {
            "enum": [
              "bank_selected",
              "confirmed",
              "authorized",
              "submitted",
              "outcome_unknown",
              "failed"
            ],
            "title": "State",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "bank_id",
          "connector",
          "state",
          "failure_reason",
          "created_at",
          "updated_at",
          "bank_state",
          "instructions",
          "bank_checkout",
          "bank_session_token"
        ],
        "title": "DirectAttemptCreated",
        "type": "object"
      },
      "DirectAvailability": {
        "additionalProperties": false,
        "description": "Whether direct payment can start now; a per-bank breaker may stop it.",
        "properties": {
          "available": {
            "title": "Available",
            "type": "boolean"
          },
          "code": {
            "anyOf": [
              {
                "const": "bank_connector_unavailable",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code"
          }
        },
        "required": [
          "available",
          "code"
        ],
        "title": "DirectAvailability",
        "type": "object"
      },
      "DirectPayment": {
        "additionalProperties": false,
        "description": "The payer pays from their bank's session (connector ``direct``, test mode).",
        "properties": {
          "access_consent_text": {
            "title": "Access Consent Text",
            "type": "string"
          },
          "access_consent_version": {
            "const": "bank-access-v1",
            "title": "Access Consent Version",
            "type": "string"
          },
          "amount_clp": {
            "minimum": 0,
            "title": "Amount Clp",
            "type": "integer"
          },
          "bank_name": {
            "title": "Bank Name",
            "type": "string"
          },
          "kind": {
            "const": "direct_payment",
            "title": "Kind",
            "type": "string"
          },
          "merchant": {
            "title": "Merchant",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "bank_name",
          "merchant",
          "amount_clp",
          "access_consent_version",
          "access_consent_text"
        ],
        "title": "DirectPayment",
        "type": "object"
      },
      "EmptyIn": {
        "additionalProperties": false,
        "properties": {},
        "title": "EmptyIn",
        "type": "object"
      },
      "EventList": {
        "additionalProperties": false,
        "description": "The merchant's feed: the same bodies and ids as its webhooks, with or without one.",
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/FeedEvent"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "object": {
            "const": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "object",
          "data",
          "has_more"
        ],
        "title": "EventList",
        "type": "object"
      },
      "Fee": {
        "additionalProperties": false,
        "description": "The fee of a paid intent: ``min(cap, max(minimum, (final * bps + 5000) // 10000))``.",
        "properties": {
          "bps": {
            "minimum": 0,
            "title": "Bps",
            "type": "integer"
          },
          "cap_clp": {
            "minimum": 0,
            "title": "Cap Clp",
            "type": "integer"
          },
          "minimum_clp": {
            "minimum": 0,
            "title": "Minimum Clp",
            "type": "integer"
          },
          "net_clp": {
            "minimum": 0,
            "title": "Net Clp",
            "type": "integer"
          }
        },
        "required": [
          "net_clp",
          "bps",
          "minimum_clp",
          "cap_clp"
        ],
        "title": "Fee",
        "type": "object"
      },
      "FeeStatement": {
        "additionalProperties": false,
        "description": "One month (Santiago time) of fees; never billable in test mode.",
        "properties": {
          "billable": {
            "title": "Billable",
            "type": "boolean"
          },
          "iva_clp": {
            "minimum": 0,
            "title": "Iva Clp",
            "type": "integer"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/FeeStatementLine"
            },
            "title": "Lines",
            "type": "array"
          },
          "mode": {
            "const": "test",
            "title": "Mode",
            "type": "string"
          },
          "net_clp": {
            "minimum": 0,
            "title": "Net Clp",
            "type": "integer"
          },
          "object": {
            "const": "fee_statement",
            "title": "Object",
            "type": "string"
          },
          "payments": {
            "minimum": 0,
            "title": "Payments",
            "type": "integer"
          },
          "period": {
            "pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
            "title": "Period",
            "type": "string"
          },
          "total_clp": {
            "minimum": 0,
            "title": "Total Clp",
            "type": "integer"
          },
          "volume_clp": {
            "minimum": 0,
            "title": "Volume Clp",
            "type": "integer"
          }
        },
        "required": [
          "object",
          "period",
          "mode",
          "billable",
          "payments",
          "volume_clp",
          "net_clp",
          "iva_clp",
          "total_clp",
          "lines"
        ],
        "title": "FeeStatement",
        "type": "object"
      },
      "FeeStatementLine": {
        "additionalProperties": false,
        "properties": {
          "confirmed_at": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
            "title": "Confirmed At",
            "type": "string"
          },
          "fee_net_clp": {
            "minimum": 0,
            "title": "Fee Net Clp",
            "type": "integer"
          },
          "final_amount_clp": {
            "minimum": 0,
            "title": "Final Amount Clp",
            "type": "integer"
          },
          "payment_intent_id": {
            "pattern": "^pr_\\d{6,}$",
            "title": "Payment Intent Id",
            "type": "string"
          }
        },
        "required": [
          "payment_intent_id",
          "final_amount_clp",
          "fee_net_clp",
          "confirmed_at"
        ],
        "title": "FeeStatementLine",
        "type": "object"
      },
      "FeedEvent": {
        "description": "A fact about a payment, told apart by ``type``: a feed entry and its webhook body.\n\nA root model cannot forbid extra keys itself; each of its members does.",
        "discriminator": {
          "mapping": {
            "payment_intent.expired": "#/components/schemas/PaymentIntentExpiredEvent",
            "payment_intent.paid": "#/components/schemas/PaymentIntentPaidEvent",
            "transfer.review_required": "#/components/schemas/TransferReviewRequiredEvent"
          },
          "propertyName": "type"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/PaymentIntentPaidEvent"
          },
          {
            "$ref": "#/components/schemas/PaymentIntentExpiredEvent"
          },
          {
            "$ref": "#/components/schemas/TransferReviewRequiredEvent"
          }
        ],
        "title": "FeedEvent"
      },
      "FieldError": {
        "additionalProperties": false,
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Loc",
            "type": "array"
          },
          "type": {
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "type"
        ],
        "title": "FieldError",
        "type": "object"
      },
      "Health": {
        "additionalProperties": false,
        "properties": {
          "ok": {
            "title": "Ok",
            "type": "boolean"
          }
        },
        "required": [
          "ok"
        ],
        "title": "Health",
        "type": "object"
      },
      "IncomingTransfer": {
        "additionalProperties": false,
        "description": "A credit as the merchant's full key reads it, with what the bank said of the payer.",
        "properties": {
          "alias": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Alias"
          },
          "amount_clp": {
            "minimum": 1,
            "title": "Amount Clp",
            "type": "integer"
          },
          "bank_tx_id": {
            "title": "Bank Tx Id",
            "type": "string"
          },
          "candidates": {
            "items": {
              "pattern": "^pr_\\d{6,}$",
              "type": "string"
            },
            "title": "Candidates",
            "type": "array"
          },
          "credited_at": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
            "title": "Credited At",
            "type": "string"
          },
          "id": {
            "pattern": "^tr_\\d{6,}$",
            "title": "Id",
            "type": "string"
          },
          "method": {
            "anyOf": [
              {
                "enum": [
                  "alias",
                  "payer_amount",
                  "unique_amount",
                  "review"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Method"
          },
          "mode": {
            "const": "test",
            "title": "Mode",
            "type": "string"
          },
          "object": {
            "const": "incoming_transfer",
            "title": "Object",
            "type": "string"
          },
          "payer_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payer Name"
          },
          "payer_rut": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payer Rut"
          },
          "payment_intent_id": {
            "anyOf": [
              {
                "pattern": "^pr_\\d{6,}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Intent Id"
          },
          "received_at": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
            "title": "Received At",
            "type": "string"
          },
          "review_reason": {
            "anyOf": [
              {
                "enum": [
                  "ambiguous",
                  "unidentified",
                  "underpaid",
                  "overpaid",
                  "amount_mismatch",
                  "payer_mismatch",
                  "late_payment",
                  "notified_after_expiry",
                  "request_cancelled",
                  "already_paid",
                  "unknown_alias"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Review Reason"
          },
          "source": {
            "enum": [
              "sim",
              "csv",
              "bice_alias"
            ],
            "title": "Source",
            "type": "string"
          },
          "state": {
            "enum": [
              "matched",
              "needs_review",
              "assigned",
              "dismissed"
            ],
            "title": "State",
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "mode",
          "state",
          "amount_clp",
          "credited_at",
          "received_at",
          "source",
          "bank_tx_id",
          "alias",
          "method",
          "review_reason",
          "payment_intent_id",
          "candidates",
          "payer_rut",
          "payer_name"
        ],
        "title": "IncomingTransfer",
        "type": "object"
      },
      "IncomingTransferList": {
        "additionalProperties": false,
        "description": "``GET /v1/incoming_transfers`` and ``GET /v1/reviews`` (only ``needs_review``).",
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/IncomingTransfer"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "object": {
            "const": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "object",
          "data",
          "has_more"
        ],
        "title": "IncomingTransferList",
        "type": "object"
      },
      "MandateIn": {
        "additionalProperties": false,
        "properties": {
          "allowed_merchants": {
            "items": {
              "pattern": "^mer_\\d{6,18}$",
              "type": "string"
            },
            "maxItems": 20,
            "minItems": 1,
            "title": "Allowed Merchants",
            "type": "array"
          },
          "confirm_above_clp": {
            "maximum": 50000000,
            "minimum": 0,
            "title": "Confirm Above Clp",
            "type": "integer"
          },
          "expires_in_seconds": {
            "default": 604800,
            "maximum": 2592000,
            "minimum": 300,
            "title": "Expires In Seconds",
            "type": "integer"
          },
          "label": {
            "maxLength": 80,
            "minLength": 1,
            "title": "Label",
            "type": "string"
          },
          "per_payment_limit_clp": {
            "maximum": 50000000,
            "minimum": 1,
            "title": "Per Payment Limit Clp",
            "type": "integer"
          },
          "total_limit_clp": {
            "maximum": 500000000,
            "minimum": 1,
            "title": "Total Limit Clp",
            "type": "integer"
          }
        },
        "required": [
          "label",
          "allowed_merchants",
          "per_payment_limit_clp",
          "total_limit_clp",
          "confirm_above_clp"
        ],
        "title": "MandateIn",
        "type": "object"
      },
      "ManualTransfer": {
        "additionalProperties": false,
        "description": "Steps for a transfer from the payer's bank (connector ``assisted``).",
        "properties": {
          "amount_clp": {
            "minimum": 0,
            "title": "Amount Clp",
            "type": "integer"
          },
          "bank_name": {
            "title": "Bank Name",
            "type": "string"
          },
          "kind": {
            "const": "manual_transfer",
            "title": "Kind",
            "type": "string"
          },
          "steps": {
            "items": {
              "type": "string"
            },
            "title": "Steps",
            "type": "array"
          }
        },
        "required": [
          "kind",
          "bank_name",
          "amount_clp",
          "steps"
        ],
        "title": "ManualTransfer",
        "type": "object"
      },
      "PaymentAttempt": {
        "additionalProperties": false,
        "description": "The buyer's latest choice of bank. It shapes the page and never decides the payment.",
        "properties": {
          "bank_id": {
            "pattern": "^[a-z0-9_]{2,40}$",
            "title": "Bank Id",
            "type": "string"
          },
          "bank_state": {
            "anyOf": [
              {
                "enum": [
                  "authentication_required",
                  "authenticating",
                  "account_selection",
                  "review_required",
                  "challenge_required",
                  "submitted",
                  "outcome_unknown",
                  "failed",
                  "expired"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bank State"
          },
          "connector": {
            "enum": [
              "sim",
              "assisted",
              "direct"
            ],
            "title": "Connector",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
            "title": "Created At",
            "type": "string"
          },
          "failure_reason": {
            "anyOf": [
              {
                "enum": [
                  "superseded",
                  "declined_by_bank",
                  "bank_session_expired",
                  "bank_access_unverified",
                  "closed_by_payer"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failure Reason"
          },
          "id": {
            "pattern": "^pa_\\d{6,}$",
            "title": "Id",
            "type": "string"
          },
          "object": {
            "const": "payment_attempt",
            "title": "Object",
            "type": "string"
          },
          "state": {
            "enum": [
              "bank_selected",
              "confirmed",
              "authorized",
              "submitted",
              "outcome_unknown",
              "failed"
            ],
            "title": "State",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "bank_id",
          "connector",
          "state",
          "failure_reason",
          "created_at",
          "updated_at",
          "bank_state"
        ],
        "title": "PaymentAttempt",
        "type": "object"
      },
      "PaymentAttemptCreated": {
        "additionalProperties": false,
        "description": "``POST /v1/checkout/sessions/{token}/attempts``: the attempt and what to show next.",
        "properties": {
          "bank_id": {
            "pattern": "^[a-z0-9_]{2,40}$",
            "title": "Bank Id",
            "type": "string"
          },
          "bank_state": {
            "anyOf": [
              {
                "enum": [
                  "authentication_required",
                  "authenticating",
                  "account_selection",
                  "review_required",
                  "challenge_required",
                  "submitted",
                  "outcome_unknown",
                  "failed",
                  "expired"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bank State"
          },
          "connector": {
            "enum": [
              "sim",
              "assisted"
            ],
            "title": "Connector",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
            "title": "Created At",
            "type": "string"
          },
          "failure_reason": {
            "anyOf": [
              {
                "enum": [
                  "superseded",
                  "declined_by_bank",
                  "bank_session_expired",
                  "bank_access_unverified",
                  "closed_by_payer"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failure Reason"
          },
          "id": {
            "pattern": "^pa_\\d{6,}$",
            "title": "Id",
            "type": "string"
          },
          "instructions": {
            "discriminator": {
              "mapping": {
                "manual_transfer": "#/components/schemas/ManualTransfer",
                "simulated_authorization": "#/components/schemas/SimulatedAuthorization"
              },
              "propertyName": "kind"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/SimulatedAuthorization"
              },
              {
                "$ref": "#/components/schemas/ManualTransfer"
              }
            ],
            "title": "Instructions"
          },
          "object": {
            "const": "payment_attempt",
            "title": "Object",
            "type": "string"
          },
          "state": {
            "enum": [
              "bank_selected",
              "confirmed",
              "authorized",
              "submitted",
              "outcome_unknown",
              "failed"
            ],
            "title": "State",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "bank_id",
          "connector",
          "state",
          "failure_reason",
          "created_at",
          "updated_at",
          "bank_state",
          "instructions"
        ],
        "title": "PaymentAttemptCreated",
        "type": "object"
      },
      "PaymentIntent": {
        "additionalProperties": false,
        "description": "What a merchant collects. ``discount_clp`` and the base price never reach the payer.",
        "properties": {
          "alias": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Alias"
          },
          "amount_clp": {
            "maximum": 50000000,
            "minimum": 100,
            "title": "Amount Clp",
            "type": "integer"
          },
          "cancel_url": {
            "anyOf": [
              {
                "maxLength": 2000,
                "minLength": 10,
                "pattern": "^https?://",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cancel Url"
          },
          "checkout_state": {
            "enum": [
              "created",
              "awaiting_customer",
              "awaiting_confirmation",
              "succeeded",
              "failed",
              "review"
            ],
            "title": "Checkout State",
            "type": "string"
          },
          "closed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Closed At"
          },
          "created_at": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 140,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "discount_clp": {
            "maximum": 99,
            "minimum": 0,
            "title": "Discount Clp",
            "type": "integer"
          },
          "expected_payer": {
            "title": "Expected Payer",
            "type": "boolean"
          },
          "expires_at": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
            "title": "Expires At",
            "type": "string"
          },
          "fee": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Fee"
              },
              {
                "type": "null"
              }
            ]
          },
          "final_amount_clp": {
            "minimum": 0,
            "title": "Final Amount Clp",
            "type": "integer"
          },
          "id": {
            "pattern": "^pr_\\d{6,}$",
            "title": "Id",
            "type": "string"
          },
          "method": {
            "anyOf": [
              {
                "enum": [
                  "alias",
                  "payer_amount",
                  "unique_amount",
                  "review"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Method"
          },
          "mode": {
            "const": "test",
            "title": "Mode",
            "type": "string"
          },
          "object": {
            "const": "payment_intent",
            "title": "Object",
            "type": "string"
          },
          "pay_token": {
            "pattern": "^[A-Za-z0-9_-]{32}$",
            "title": "Pay Token",
            "type": "string"
          },
          "pay_url": {
            "title": "Pay Url",
            "type": "string"
          },
          "receipt_id": {
            "anyOf": [
              {
                "pattern": "^rcpt_\\d{6,}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Receipt Id"
          },
          "reference": {
            "pattern": "^[A-Za-z0-9._-]{1,64}$",
            "title": "Reference",
            "type": "string"
          },
          "return_url": {
            "anyOf": [
              {
                "maxLength": 2000,
                "minLength": 10,
                "pattern": "^https?://",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Return Url"
          },
          "status": {
            "enum": [
              "open",
              "paid",
              "expired",
              "cancelled"
            ],
            "title": "Status",
            "type": "string"
          },
          "transfer_id": {
            "anyOf": [
              {
                "pattern": "^tr_\\d{6,}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transfer Id"
          }
        },
        "required": [
          "id",
          "object",
          "mode",
          "status",
          "checkout_state",
          "amount_clp",
          "discount_clp",
          "final_amount_clp",
          "reference",
          "description",
          "return_url",
          "cancel_url",
          "expected_payer",
          "alias",
          "created_at",
          "expires_at",
          "closed_at",
          "pay_url",
          "pay_token",
          "transfer_id",
          "method",
          "fee",
          "receipt_id"
        ],
        "title": "PaymentIntent",
        "type": "object"
      },
      "PaymentIntentExpiredData": {
        "additionalProperties": false,
        "properties": {
          "payment_intent": {
            "$ref": "#/components/schemas/PaymentIntent"
          }
        },
        "required": [
          "payment_intent"
        ],
        "title": "PaymentIntentExpiredData",
        "type": "object"
      },
      "PaymentIntentExpiredEvent": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
            "title": "Created At",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/PaymentIntentExpiredData"
          },
          "id": {
            "pattern": "^evt_\\d{6,}$",
            "title": "Id",
            "type": "string"
          },
          "mode": {
            "const": "test",
            "title": "Mode",
            "type": "string"
          },
          "object": {
            "const": "event",
            "title": "Object",
            "type": "string"
          },
          "type": {
            "const": "payment_intent.expired",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "mode",
          "type",
          "data"
        ],
        "title": "PaymentIntentExpiredEvent",
        "type": "object"
      },
      "PaymentIntentList": {
        "additionalProperties": false,
        "description": "``GET /v1/payment_intents``.",
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/PaymentIntent"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "object": {
            "const": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "object",
          "data",
          "has_more"
        ],
        "title": "PaymentIntentList",
        "type": "object"
      },
      "PaymentIntentPaidData": {
        "additionalProperties": false,
        "properties": {
          "payment_intent": {
            "$ref": "#/components/schemas/PaymentIntent"
          },
          "receipt": {
            "$ref": "#/components/schemas/Receipt"
          },
          "transfer": {
            "$ref": "#/components/schemas/WebhookTransfer"
          }
        },
        "required": [
          "payment_intent",
          "transfer",
          "receipt"
        ],
        "title": "PaymentIntentPaidData",
        "type": "object"
      },
      "PaymentIntentPaidEvent": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
            "title": "Created At",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/PaymentIntentPaidData"
          },
          "id": {
            "pattern": "^evt_\\d{6,}$",
            "title": "Id",
            "type": "string"
          },
          "mode": {
            "const": "test",
            "title": "Mode",
            "type": "string"
          },
          "object": {
            "const": "event",
            "title": "Object",
            "type": "string"
          },
          "type": {
            "const": "payment_intent.paid",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "mode",
          "type",
          "data"
        ],
        "title": "PaymentIntentPaidEvent",
        "type": "object"
      },
      "Readiness": {
        "additionalProperties": false,
        "description": "Database and schema verified; worker and bank-feed health are checked separately.",
        "properties": {
          "mode": {
            "const": "test",
            "title": "Mode",
            "type": "string"
          },
          "ready": {
            "const": true,
            "title": "Ready",
            "type": "boolean"
          },
          "real_money_enabled": {
            "const": false,
            "title": "Real Money Enabled",
            "type": "boolean"
          }
        },
        "required": [
          "ready",
          "mode",
          "real_money_enabled"
        ],
        "title": "Readiness",
        "type": "object"
      },
      "Receipt": {
        "additionalProperties": false,
        "description": "Signed by Axiomic with Ed25519 over the canonical JSON of every other field.",
        "properties": {
          "account_id": {
            "pattern": "^acc_\\d{6,}$",
            "title": "Account Id",
            "type": "string"
          },
          "bank_tx_id": {
            "title": "Bank Tx Id",
            "type": "string"
          },
          "confirmed_at": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
            "title": "Confirmed At",
            "type": "string"
          },
          "credited_at": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
            "title": "Credited At",
            "type": "string"
          },
          "final_amount_clp": {
            "minimum": 0,
            "title": "Final Amount Clp",
            "type": "integer"
          },
          "journal_digest": {
            "pattern": "^[0-9a-f]{64}$",
            "title": "Journal Digest",
            "type": "string"
          },
          "journal_sequence": {
            "minimum": 1,
            "title": "Journal Sequence",
            "type": "integer"
          },
          "key_id": {
            "title": "Key Id",
            "type": "string"
          },
          "merchant_id": {
            "pattern": "^mer_\\d{6,}$",
            "title": "Merchant Id",
            "type": "string"
          },
          "method": {
            "enum": [
              "alias",
              "payer_amount",
              "unique_amount",
              "review"
            ],
            "title": "Method",
            "type": "string"
          },
          "mode": {
            "const": "test",
            "title": "Mode",
            "type": "string"
          },
          "payer_check": {
            "enum": [
              "matched",
              "not_required",
              "not_available",
              "reviewed"
            ],
            "title": "Payer Check",
            "type": "string"
          },
          "payment_intent_id": {
            "pattern": "^pr_\\d{6,}$",
            "title": "Payment Intent Id",
            "type": "string"
          },
          "receipt_id": {
            "pattern": "^rcpt_\\d{6,}$",
            "title": "Receipt Id",
            "type": "string"
          },
          "reference": {
            "pattern": "^[A-Za-z0-9._-]{1,64}$",
            "title": "Reference",
            "type": "string"
          },
          "signature": {
            "pattern": "^[0-9a-f]{128}$",
            "title": "Signature",
            "type": "string"
          },
          "source": {
            "enum": [
              "sim",
              "csv",
              "bice_alias"
            ],
            "title": "Source",
            "type": "string"
          }
        },
        "required": [
          "receipt_id",
          "payment_intent_id",
          "merchant_id",
          "account_id",
          "mode",
          "reference",
          "final_amount_clp",
          "method",
          "payer_check",
          "source",
          "bank_tx_id",
          "credited_at",
          "confirmed_at",
          "journal_sequence",
          "journal_digest",
          "key_id",
          "signature"
        ],
        "title": "Receipt",
        "type": "object"
      },
      "ReceiptKey": {
        "additionalProperties": false,
        "properties": {
          "algorithm": {
            "const": "Ed25519",
            "title": "Algorithm",
            "type": "string"
          },
          "key_id": {
            "title": "Key Id",
            "type": "string"
          },
          "mode": {
            "const": "test",
            "title": "Mode",
            "type": "string"
          },
          "public_key": {
            "pattern": "^[0-9a-f]{64}$",
            "title": "Public Key",
            "type": "string"
          }
        },
        "required": [
          "key_id",
          "algorithm",
          "public_key",
          "mode"
        ],
        "title": "ReceiptKey",
        "type": "object"
      },
      "ReceiptKeyList": {
        "additionalProperties": false,
        "description": "``GET /v1/receipt_keys``: verify receipts with these public keys (hex).",
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ReceiptKey"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "object": {
            "const": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "object",
          "data",
          "has_more"
        ],
        "title": "ReceiptKeyList",
        "type": "object"
      },
      "ResolveIn": {
        "additionalProperties": false,
        "properties": {
          "action": {
            "enum": [
              "assign",
              "dismiss"
            ],
            "title": "Action",
            "type": "string"
          },
          "payment_intent_id": {
            "anyOf": [
              {
                "maxLength": 32,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Intent Id"
          }
        },
        "required": [
          "action"
        ],
        "title": "ResolveIn",
        "type": "object"
      },
      "ScenarioRun": {
        "additionalProperties": false,
        "description": "One fault scenario played on the merchant's test account: what it created and queued.",
        "properties": {
          "description": {
            "title": "Description",
            "type": "string"
          },
          "name": {
            "enum": [
              "duplicate_notification",
              "delayed_out_of_order",
              "same_amount_two_payers",
              "other_rut",
              "wrong_amount",
              "unknown_transfer"
            ],
            "title": "Name",
            "type": "string"
          },
          "notices": {
            "items": {
              "$ref": "#/components/schemas/SimulatedTransferAccepted"
            },
            "title": "Notices",
            "type": "array"
          },
          "object": {
            "const": "scenario_run",
            "title": "Object",
            "type": "string"
          },
          "payment_intents": {
            "items": {
              "pattern": "^pr_\\d{6,}$",
              "type": "string"
            },
            "title": "Payment Intents",
            "type": "array"
          }
        },
        "required": [
          "object",
          "name",
          "description",
          "payment_intents",
          "notices"
        ],
        "title": "ScenarioRun",
        "type": "object"
      },
      "ScenarioRunList": {
        "additionalProperties": false,
        "description": "``POST /v1/test/scenarios/{name}``: one run, or one per scenario for ``fault_tour``.",
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ScenarioRun"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "object": {
            "const": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "object",
          "data",
          "has_more"
        ],
        "title": "ScenarioRunList",
        "type": "object"
      },
      "SimulatedAuthorization": {
        "additionalProperties": false,
        "description": "The simulated bank's consent screen (connector ``sim``, test mode).",
        "properties": {
          "amount_clp": {
            "minimum": 0,
            "title": "Amount Clp",
            "type": "integer"
          },
          "bank_name": {
            "title": "Bank Name",
            "type": "string"
          },
          "consent_text": {
            "title": "Consent Text",
            "type": "string"
          },
          "kind": {
            "const": "simulated_authorization",
            "title": "Kind",
            "type": "string"
          },
          "merchant": {
            "title": "Merchant",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "bank_name",
          "merchant",
          "amount_clp",
          "consent_text"
        ],
        "title": "SimulatedAuthorization",
        "type": "object"
      },
      "SimulatedTransferAccepted": {
        "additionalProperties": false,
        "description": "A simulated bank notice was queued (test mode); the book decides when it arrives.",
        "properties": {
          "accepted": {
            "const": true,
            "title": "Accepted",
            "type": "boolean"
          },
          "bank_tx_ids": {
            "items": {
              "type": "string"
            },
            "title": "Bank Tx Ids",
            "type": "array"
          },
          "deliver_at": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
            "title": "Deliver At",
            "type": "string"
          }
        },
        "required": [
          "accepted",
          "bank_tx_ids",
          "deliver_at"
        ],
        "title": "SimulatedTransferAccepted",
        "type": "object"
      },
      "TestAuthorizeIn": {
        "additionalProperties": false,
        "properties": {
          "delay_seconds": {
            "default": 3,
            "maximum": 60,
            "minimum": 0,
            "title": "Delay Seconds",
            "type": "integer"
          },
          "outcome": {
            "default": "approve",
            "enum": [
              "approve",
              "decline"
            ],
            "title": "Outcome",
            "type": "string"
          }
        },
        "title": "TestAuthorizeIn",
        "type": "object"
      },
      "TestTransferIn": {
        "additionalProperties": false,
        "properties": {
          "alias": {
            "anyOf": [
              {
                "pattern": "^[A-Za-z0-9_-]{1,32}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Alias"
          },
          "amount_clp": {
            "maximum": 50000000,
            "minimum": 1,
            "title": "Amount Clp",
            "type": "integer"
          },
          "bank_tx_id": {
            "anyOf": [
              {
                "pattern": "^[A-Za-z0-9_-]{4,64}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bank Tx Id"
          },
          "copies": {
            "default": 1,
            "maximum": 3,
            "minimum": 1,
            "title": "Copies",
            "type": "integer"
          },
          "credited_offset_seconds": {
            "default": 0,
            "maximum": 86400,
            "minimum": 0,
            "title": "Credited Offset Seconds",
            "type": "integer"
          },
          "delay_seconds": {
            "default": 0,
            "maximum": 3600,
            "minimum": 0,
            "title": "Delay Seconds",
            "type": "integer"
          },
          "payer_name": {
            "anyOf": [
              {
                "maxLength": 80,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payer Name"
          },
          "payer_rut": {
            "anyOf": [
              {
                "maxLength": 16,
                "minLength": 3,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payer Rut"
          }
        },
        "required": [
          "amount_clp"
        ],
        "title": "TestTransferIn",
        "type": "object"
      },
      "TransferReviewRequiredData": {
        "additionalProperties": false,
        "properties": {
          "transfer": {
            "$ref": "#/components/schemas/WebhookTransfer"
          }
        },
        "required": [
          "transfer"
        ],
        "title": "TransferReviewRequiredData",
        "type": "object"
      },
      "TransferReviewRequiredEvent": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
            "title": "Created At",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/TransferReviewRequiredData"
          },
          "id": {
            "pattern": "^evt_\\d{6,}$",
            "title": "Id",
            "type": "string"
          },
          "mode": {
            "const": "test",
            "title": "Mode",
            "type": "string"
          },
          "object": {
            "const": "event",
            "title": "Object",
            "type": "string"
          },
          "type": {
            "const": "transfer.review_required",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "mode",
          "type",
          "data"
        ],
        "title": "TransferReviewRequiredEvent",
        "type": "object"
      },
      "TransferTo": {
        "additionalProperties": false,
        "description": "The merchant's account; shown only while the intent is open.",
        "properties": {
          "account_number": {
            "title": "Account Number",
            "type": "string"
          },
          "account_type": {
            "enum": [
              "cuenta_corriente",
              "cuenta_vista",
              "cuenta_rut",
              "cuenta_ahorro"
            ],
            "title": "Account Type",
            "type": "string"
          },
          "bank": {
            "title": "Bank",
            "type": "string"
          },
          "holder_name": {
            "title": "Holder Name",
            "type": "string"
          },
          "holder_rut": {
            "title": "Holder Rut",
            "type": "string"
          }
        },
        "required": [
          "bank",
          "account_type",
          "account_number",
          "holder_name",
          "holder_rut"
        ],
        "title": "TransferTo",
        "type": "object"
      },
      "WebhookDelivery": {
        "additionalProperties": false,
        "description": "An outbox event's delivery state. ``next_attempt_at`` is null once delivered or given up.",
        "properties": {
          "attempts": {
            "minimum": 0,
            "title": "Attempts",
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
            "title": "Created At",
            "type": "string"
          },
          "delivered_at": {
            "anyOf": [
              {
                "format": "date-time",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delivered At"
          },
          "gave_up_at": {
            "anyOf": [
              {
                "format": "date-time",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gave Up At"
          },
          "id": {
            "pattern": "^evt_\\d{6,}$",
            "title": "Id",
            "type": "string"
          },
          "last_status": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Status"
          },
          "next_attempt_at": {
            "anyOf": [
              {
                "format": "date-time",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Attempt At"
          },
          "type": {
            "enum": [
              "payment_intent.paid",
              "payment_intent.expired",
              "transfer.review_required",
              "webhook_endpoint.test"
            ],
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "attempts",
          "last_status",
          "delivered_at",
          "next_attempt_at",
          "gave_up_at"
        ],
        "title": "WebhookDelivery",
        "type": "object"
      },
      "WebhookDeliveryList": {
        "additionalProperties": false,
        "description": "``GET /v1/webhook_events``.",
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/WebhookDelivery"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "object": {
            "const": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "object",
          "data",
          "has_more"
        ],
        "title": "WebhookDeliveryList",
        "type": "object"
      },
      "WebhookEndpoint": {
        "additionalProperties": false,
        "description": "The mode's endpoint; ``secret`` signs every delivery (HMAC-SHA256 of the raw body).",
        "properties": {
          "events": {
            "items": {
              "enum": [
                "payment_intent.paid",
                "payment_intent.expired",
                "transfer.review_required"
              ],
              "type": "string"
            },
            "title": "Events",
            "type": "array"
          },
          "mode": {
            "const": "test",
            "title": "Mode",
            "type": "string"
          },
          "object": {
            "const": "webhook_endpoint",
            "title": "Object",
            "type": "string"
          },
          "secret": {
            "pattern": "^whsec_test_[A-Za-z0-9_-]{43}$",
            "title": "Secret",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "object",
          "mode",
          "url",
          "secret",
          "events"
        ],
        "title": "WebhookEndpoint",
        "type": "object"
      },
      "WebhookIn": {
        "additionalProperties": false,
        "properties": {
          "url": {
            "maxLength": 300,
            "minLength": 10,
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "title": "WebhookIn",
        "type": "object"
      },
      "WebhookTestData": {
        "additionalProperties": false,
        "properties": {
          "webhook_endpoint": {
            "$ref": "#/components/schemas/WebhookTestEndpoint"
          }
        },
        "required": [
          "webhook_endpoint"
        ],
        "title": "WebhookTestData",
        "type": "object"
      },
      "WebhookTestEndpoint": {
        "additionalProperties": false,
        "properties": {
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "title": "WebhookTestEndpoint",
        "type": "object"
      },
      "WebhookTestEvent": {
        "additionalProperties": false,
        "description": "Sent only when the merchant asks (``POST /v1/webhook_endpoints/test``); never in the feed\nand never about a payment, so a receiver that only knows the facts ignores it.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
            "title": "Created At",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/WebhookTestData"
          },
          "id": {
            "pattern": "^evt_\\d{6,}$",
            "title": "Id",
            "type": "string"
          },
          "mode": {
            "const": "test",
            "title": "Mode",
            "type": "string"
          },
          "object": {
            "const": "event",
            "title": "Object",
            "type": "string"
          },
          "type": {
            "const": "webhook_endpoint.test",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "mode",
          "type",
          "data"
        ],
        "title": "WebhookTestEvent",
        "type": "object"
      },
      "WebhookTransfer": {
        "additionalProperties": false,
        "description": "A credit inside a webhook: never any payer data.",
        "properties": {
          "alias": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Alias"
          },
          "amount_clp": {
            "minimum": 1,
            "title": "Amount Clp",
            "type": "integer"
          },
          "bank_tx_id": {
            "title": "Bank Tx Id",
            "type": "string"
          },
          "candidates": {
            "items": {
              "pattern": "^pr_\\d{6,}$",
              "type": "string"
            },
            "title": "Candidates",
            "type": "array"
          },
          "credited_at": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
            "title": "Credited At",
            "type": "string"
          },
          "id": {
            "pattern": "^tr_\\d{6,}$",
            "title": "Id",
            "type": "string"
          },
          "method": {
            "anyOf": [
              {
                "enum": [
                  "alias",
                  "payer_amount",
                  "unique_amount",
                  "review"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Method"
          },
          "mode": {
            "const": "test",
            "title": "Mode",
            "type": "string"
          },
          "object": {
            "const": "incoming_transfer",
            "title": "Object",
            "type": "string"
          },
          "payment_intent_id": {
            "anyOf": [
              {
                "pattern": "^pr_\\d{6,}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Intent Id"
          },
          "received_at": {
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
            "title": "Received At",
            "type": "string"
          },
          "review_reason": {
            "anyOf": [
              {
                "enum": [
                  "ambiguous",
                  "unidentified",
                  "underpaid",
                  "overpaid",
                  "amount_mismatch",
                  "payer_mismatch",
                  "late_payment",
                  "notified_after_expiry",
                  "request_cancelled",
                  "already_paid",
                  "unknown_alias"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Review Reason"
          },
          "source": {
            "enum": [
              "sim",
              "csv",
              "bice_alias"
            ],
            "title": "Source",
            "type": "string"
          },
          "state": {
            "enum": [
              "matched",
              "needs_review",
              "assigned",
              "dismissed"
            ],
            "title": "State",
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "mode",
          "state",
          "amount_clp",
          "credited_at",
          "received_at",
          "source",
          "bank_tx_id",
          "alias",
          "method",
          "review_reason",
          "payment_intent_id",
          "candidates"
        ],
        "title": "WebhookTransfer",
        "type": "object"
      }
    },
    "securitySchemes": {
      "agentToken": {
        "description": "A: agt_test_<43>, el token del agente de un mandato.",
        "scheme": "bearer",
        "type": "http"
      },
      "holderToken": {
        "description": "H: hld_test_<43>, el token de la persona titular del mandato.",
        "scheme": "bearer",
        "type": "http"
      },
      "merchantKey": {
        "description": "K o Ka: axk_test_<43>. Una llave con alcance agent no resuelve revisiones.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Solo modo de prueba. El pagador transfiere desde su banco, por su cuenta o con el pago directo contra el banco simulado, y Axiomic identifica el abono: un envío del banco no paga el cobro y Axiomic no custodia fondos. Guías y conceptos en [docs.axiomic.cl](https://docs.axiomic.cl/).",
    "title": "Axiomic: API de cobros por transferencia",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/health": {
      "get": {
        "description": "Responde `{\"ok\": true}` si el proceso está vivo. No consulta la base ni el worker.",
        "operationId": "getHealth",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "health": {
                    "value": {
                      "ok": true
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Health"
                }
              }
            },
            "description": "Health"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [],
        "summary": "Comprobar que el proceso responde",
        "tags": [
          "Sistema"
        ]
      }
    },
    "/ready": {
      "get": {
        "description": "Consulta PostgreSQL y la versión del esquema; si no puede verificarlas responde 503 `state_unverified`. Declara `mode=test` y `real_money_enabled=false`. No acredita el worker ni el canal bancario.",
        "operationId": "getReadiness",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "readiness": {
                    "value": {
                      "mode": "test",
                      "ready": true,
                      "real_money_enabled": false
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Readiness"
                }
              }
            },
            "description": "Database and schema verified; worker and bank-feed health are checked separately."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Every refusal: a Spanish ``detail`` and a stable ``code``; it never echoes the input.\n\n``request_id`` is also the ``X-Request-Id`` header, and ``doc_url`` explains the code."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [],
        "summary": "Comprobar la base y el esquema",
        "tags": [
          "Sistema"
        ]
      }
    },
    "/v1/agent/approvals": {
      "get": {
        "description": "Con el token de la persona. `state=pending_approval` es su bandeja de aprobación.",
        "operationId": "listAgentApprovals",
        "parameters": [
          {
            "in": "query",
            "name": "state",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "State"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "starting_after",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Starting After"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "agent-approvals-list": {
                    "value": {
                      "data": [
                        {
                          "amount_clp": 34998,
                          "checkout": null,
                          "created_at": "2026-10-30T15:01:30Z",
                          "decided_at": null,
                          "id": "apr_000012",
                          "mandate_id": "mdt_000007",
                          "merchant": {
                            "display_name": "Tienda Andes (demo)",
                            "id": "mer_000001"
                          },
                          "mode": "test",
                          "object": "agent_payment_request",
                          "reason": null,
                          "reference": "pedido-881",
                          "state": "pending_approval"
                        },
                        {
                          "amount_clp": 12000,
                          "checkout": null,
                          "created_at": "2026-10-30T14:45:00Z",
                          "decided_at": "2026-10-30T14:50:00Z",
                          "id": "apr_000011",
                          "mandate_id": "mdt_000007",
                          "merchant": {
                            "display_name": "Tienda Andes (demo)",
                            "id": "mer_000001"
                          },
                          "mode": "test",
                          "object": "agent_payment_request",
                          "reason": null,
                          "reference": "pedido-870",
                          "state": "rejected"
                        }
                      ],
                      "has_more": false,
                      "object": "list"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/AgentPaymentRequestList"
                }
              }
            },
            "description": "``GET /v1/agent/approvals``; ``state=pending_approval`` is the holder's inbox."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "error-invalid-token": {
                    "value": {
                      "code": "invalid_token",
                      "detail": "El token no es válido.",
                      "doc_url": "https://docs.axiomic.cl/errores#invalid_token",
                      "request_id": "req_d0379d68955d7c77aec88d9f"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Every refusal: a Spanish ``detail`` and a stable ``code``; it never echoes the input.\n\n``request_id`` is also the ``X-Request-Id`` header, and ``doc_url`` explains the code."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [
          {
            "holderToken": []
          }
        ],
        "summary": "Listar las solicitudes de la persona",
        "tags": [
          "Agentes"
        ]
      }
    },
    "/v1/agent/approvals/{request_id}/approve": {
      "post": {
        "description": "Vuelve a evaluar el mandato y el cobro. Aprobar no paga: la persona paga después en el checkout.",
        "operationId": "approveAgentPaymentRequest",
        "parameters": [
          {
            "in": "path",
            "name": "request_id",
            "required": true,
            "schema": {
              "title": "Request Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "agent-payment-request-approved": {
                    "value": {
                      "amount_clp": 34998,
                      "checkout": {
                        "pay_url": "https://app.axiomic.cl/pagar/p8Kq2vX9rT4mN7bW1cZ5yH3jL6dF0sAe"
                      },
                      "created_at": "2026-10-30T15:01:30Z",
                      "decided_at": "2026-10-30T15:02:00Z",
                      "id": "apr_000012",
                      "mandate_id": "mdt_000007",
                      "merchant": {
                        "display_name": "Tienda Andes (demo)",
                        "id": "mer_000001"
                      },
                      "mode": "test",
                      "object": "agent_payment_request",
                      "reason": null,
                      "reference": "pedido-881",
                      "state": "approved"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/AgentPaymentRequest"
                }
              }
            },
            "description": "An agent's request to prepare one checkout; ``checkout`` only when approved."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [
          {
            "holderToken": []
          }
        ],
        "summary": "Aprobar una solicitud",
        "tags": [
          "Agentes"
        ]
      }
    },
    "/v1/agent/approvals/{request_id}/reject": {
      "post": {
        "description": "La solicitud queda `rejected` y libera su monto del mandato.",
        "operationId": "rejectAgentPaymentRequest",
        "parameters": [
          {
            "in": "path",
            "name": "request_id",
            "required": true,
            "schema": {
              "title": "Request Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "agent-payment-request-rejected": {
                    "value": {
                      "amount_clp": 12000,
                      "checkout": null,
                      "created_at": "2026-10-30T14:45:00Z",
                      "decided_at": "2026-10-30T14:50:00Z",
                      "id": "apr_000011",
                      "mandate_id": "mdt_000007",
                      "merchant": {
                        "display_name": "Tienda Andes (demo)",
                        "id": "mer_000001"
                      },
                      "mode": "test",
                      "object": "agent_payment_request",
                      "reason": null,
                      "reference": "pedido-870",
                      "state": "rejected"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/AgentPaymentRequest"
                }
              }
            },
            "description": "An agent's request to prepare one checkout; ``checkout`` only when approved."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [
          {
            "holderToken": []
          }
        ],
        "summary": "Rechazar una solicitud",
        "tags": [
          "Agentes"
        ]
      }
    },
    "/v1/agent/mandates": {
      "post": {
        "description": "La persona fija comercios, límites, vigencia y desde qué monto aprueba ella. La respuesta trae una sola vez `agent_token`, para el agente, y `holder_token`, para la persona.",
        "operationId": "createAgentMandate",
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "agent-mandate-create": {
                  "value": {
                    "allowed_merchants": [
                      "mer_000001"
                    ],
                    "confirm_above_clp": 20000,
                    "expires_in_seconds": 604800,
                    "label": "Compras del hogar",
                    "per_payment_limit_clp": 50000,
                    "total_limit_clp": 100000
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/MandateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "examples": {
                  "agent-mandate-created": {
                    "value": {
                      "agent_token": "agt_test_Q7mZr2LkV9xB4nTe1Hs8Wc5Pd3Yf6Ja0Gu2Ko4Ni7Rq",
                      "allowed_merchants": [
                        "mer_000001"
                      ],
                      "committed_clp": 0,
                      "confirm_above_clp": 20000,
                      "created_at": "2026-10-30T14:30:00Z",
                      "expires_at": "2026-11-06T14:30:00Z",
                      "holder_token": "hld_test_D5vXe8Mb1Lq4Zt7Ka2Wn9Rc3Hs6Pf0Gj5Uy8Ti1Ob4E",
                      "id": "mdt_000007",
                      "label": "Compras del hogar",
                      "mode": "test",
                      "object": "agent_mandate",
                      "per_payment_limit_clp": 50000,
                      "revoked_at": null,
                      "total_limit_clp": 100000
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/AgentMandateCreated"
                }
              }
            },
            "description": "Returned once, at creation: only the tokens' hashes are kept."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [],
        "summary": "Crear un mandato",
        "tags": [
          "Agentes"
        ]
      }
    },
    "/v1/agent/mandates/{mandate_id}": {
      "get": {
        "description": "Con el token de la persona. `committed_clp` suma las solicitudes aprobadas y pendientes.",
        "operationId": "getAgentMandate",
        "parameters": [
          {
            "in": "path",
            "name": "mandate_id",
            "required": true,
            "schema": {
              "title": "Mandate Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "agent-mandate": {
                    "value": {
                      "allowed_merchants": [
                        "mer_000001"
                      ],
                      "committed_clp": 34998,
                      "confirm_above_clp": 20000,
                      "created_at": "2026-10-30T14:30:00Z",
                      "expires_at": "2026-11-06T14:30:00Z",
                      "id": "mdt_000007",
                      "label": "Compras del hogar",
                      "mode": "test",
                      "object": "agent_mandate",
                      "per_payment_limit_clp": 50000,
                      "revoked_at": null,
                      "total_limit_clp": 100000
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/AgentMandate"
                }
              }
            },
            "description": "A payer's grant to an AI agent. It never moves money."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [
          {
            "holderToken": []
          }
        ],
        "summary": "Leer un mandato",
        "tags": [
          "Agentes"
        ]
      }
    },
    "/v1/agent/mandates/{mandate_id}/revoke": {
      "post": {
        "description": "Con el token de la persona. Desde ahí toda solicitud nueva queda `refused` con `mandate_revoked`.",
        "operationId": "revokeAgentMandate",
        "parameters": [
          {
            "in": "path",
            "name": "mandate_id",
            "required": true,
            "schema": {
              "title": "Mandate Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "agent-mandate-revoked": {
                    "value": {
                      "allowed_merchants": [
                        "mer_000001"
                      ],
                      "committed_clp": 34998,
                      "confirm_above_clp": 20000,
                      "created_at": "2026-10-30T14:30:00Z",
                      "expires_at": "2026-11-06T14:30:00Z",
                      "id": "mdt_000007",
                      "label": "Compras del hogar",
                      "mode": "test",
                      "object": "agent_mandate",
                      "per_payment_limit_clp": 50000,
                      "revoked_at": "2026-10-30T15:20:00Z",
                      "total_limit_clp": 100000
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/AgentMandate"
                }
              }
            },
            "description": "A payer's grant to an AI agent. It never moves money."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [
          {
            "holderToken": []
          }
        ],
        "summary": "Revocar un mandato",
        "tags": [
          "Agentes"
        ]
      }
    },
    "/v1/agent/payment_requests": {
      "post": {
        "description": "Con el token del agente. Responde `approved` con el checkout que completa la persona, `pending_approval` o `refused` con su motivo. No paga nada.",
        "operationId": "createAgentPaymentRequest",
        "parameters": [
          {
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{8,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "agent-payment-request-create": {
                  "value": {
                    "checkout_token": "p8Kq2vX9rT4mN7bW1cZ5yH3jL6dF0sAe"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/AgentRequestIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "examples": {
                  "agent-payment-request-pending": {
                    "value": {
                      "amount_clp": 34998,
                      "checkout": null,
                      "created_at": "2026-10-30T15:01:30Z",
                      "decided_at": null,
                      "id": "apr_000012",
                      "mandate_id": "mdt_000007",
                      "merchant": {
                        "display_name": "Tienda Andes (demo)",
                        "id": "mer_000001"
                      },
                      "mode": "test",
                      "object": "agent_payment_request",
                      "reason": null,
                      "reference": "pedido-881",
                      "state": "pending_approval"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/AgentPaymentRequest"
                }
              }
            },
            "description": "An agent's request to prepare one checkout; ``checkout`` only when approved."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Falta Idempotency-Key."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [
          {
            "agentToken": []
          }
        ],
        "summary": "Pedir que se prepare un pago",
        "tags": [
          "Agentes"
        ]
      }
    },
    "/v1/agent/payment_requests/{request_id}": {
      "get": {
        "description": "Con el token del agente. `checkout` sólo existe cuando la solicitud está `approved`.",
        "operationId": "getAgentPaymentRequest",
        "parameters": [
          {
            "in": "path",
            "name": "request_id",
            "required": true,
            "schema": {
              "title": "Request Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "agent-payment-request-refused": {
                    "value": {
                      "amount_clp": 60000,
                      "checkout": null,
                      "created_at": "2026-10-30T15:20:00Z",
                      "decided_at": "2026-10-30T15:20:00Z",
                      "id": "apr_000013",
                      "mandate_id": "mdt_000007",
                      "merchant": {
                        "display_name": "Tienda Andes (demo)",
                        "id": "mer_000001"
                      },
                      "mode": "test",
                      "object": "agent_payment_request",
                      "reason": "over_per_payment_limit",
                      "reference": "pedido-900",
                      "state": "refused"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/AgentPaymentRequest"
                }
              }
            },
            "description": "An agent's request to prepare one checkout; ``checkout`` only when approved."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [
          {
            "agentToken": []
          }
        ],
        "summary": "Leer una solicitud de pago",
        "tags": [
          "Agentes"
        ]
      }
    },
    "/v1/banks": {
      "get": {
        "description": "Bancos del checkout, sus conectores (`sim`, `assisted`, `direct`) y si están disponibles.",
        "operationId": "listBanks",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "banks-list": {
                    "value": {
                      "data": [
                        {
                          "available": true,
                          "connectors": [
                            "sim",
                            "assisted",
                            "direct"
                          ],
                          "direct": {
                            "available": true,
                            "code": null
                          },
                          "id": "test_estatal",
                          "mode": "test",
                          "name": "Banco de Prueba Estatal",
                          "notice": null,
                          "object": "bank"
                        },
                        {
                          "available": true,
                          "connectors": [
                            "sim",
                            "assisted",
                            "direct"
                          ],
                          "direct": {
                            "available": true,
                            "code": null
                          },
                          "id": "test_norte",
                          "mode": "test",
                          "name": "Banco de Prueba Norte",
                          "notice": null,
                          "object": "bank"
                        },
                        {
                          "available": true,
                          "connectors": [
                            "sim",
                            "assisted"
                          ],
                          "direct": null,
                          "id": "test_sur",
                          "mode": "test",
                          "name": "Banco de Prueba Sur",
                          "notice": null,
                          "object": "bank"
                        },
                        {
                          "available": true,
                          "connectors": [
                            "sim",
                            "assisted",
                            "direct"
                          ],
                          "direct": {
                            "available": false,
                            "code": "bank_connector_unavailable"
                          },
                          "id": "test_digital",
                          "mode": "test",
                          "name": "Cuenta Digital de Prueba",
                          "notice": null,
                          "object": "bank"
                        },
                        {
                          "available": false,
                          "connectors": [
                            "assisted"
                          ],
                          "direct": null,
                          "id": "test_cooperativa",
                          "mode": "test",
                          "name": "Cooperativa de Prueba",
                          "notice": "Mantención programada (simulada).",
                          "object": "bank"
                        }
                      ],
                      "has_more": false,
                      "object": "list"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/BankList"
                }
              }
            },
            "description": "``GET /v1/banks``: the test-mode catalog, one bank unavailable on purpose."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [],
        "summary": "Listar bancos",
        "tags": [
          "Checkout"
        ]
      }
    },
    "/v1/checkout/sessions/{token}": {
      "get": {
        "description": "Lo que el pagador necesita: monto final exacto, comercio, vencimiento y, mientras el cobro está abierto, los datos de la transferencia. Nunca el RUT esperado ni el descuento.",
        "operationId": "getCheckoutSession",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "title": "Token",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "checkout-session-expired": {
                    "value": {
                      "allowed_origins": [
                        "https://tienda-andes.example",
                        "http://localhost:3000"
                      ],
                      "amount_clp": 18500,
                      "cancel_url": null,
                      "checkout_state": "failed",
                      "description": null,
                      "expires_at": "2026-10-30T11:00:00Z",
                      "last_attempt": null,
                      "merchant": {
                        "display_name": "Tienda Andes (demo)"
                      },
                      "mode": "test",
                      "object": "checkout_session",
                      "payer_restricted": false,
                      "receipt": null,
                      "reference": "pedido-868",
                      "return_url": null,
                      "revision": 2,
                      "server_time": "2026-10-30T11:06:00Z",
                      "status": "expired",
                      "transfer_to": null
                    }
                  },
                  "checkout-session-open": {
                    "value": {
                      "allowed_origins": [
                        "https://tienda-andes.example",
                        "http://localhost:3000"
                      ],
                      "amount_clp": 34998,
                      "cancel_url": "https://tienda-andes.example/carrito",
                      "checkout_state": "created",
                      "description": "Pedido 881",
                      "expires_at": "2026-10-30T16:00:00Z",
                      "last_attempt": null,
                      "merchant": {
                        "display_name": "Tienda Andes (demo)"
                      },
                      "mode": "test",
                      "object": "checkout_session",
                      "payer_restricted": false,
                      "receipt": null,
                      "reference": "pedido-881",
                      "return_url": "https://tienda-andes.example/pedidos/881/gracias",
                      "revision": 1,
                      "server_time": "2026-10-30T15:01:00Z",
                      "status": "open",
                      "transfer_to": {
                        "account_number": "000012345678",
                        "account_type": "cuenta_corriente",
                        "bank": "Banco Simulado",
                        "holder_name": "Tienda Andes SpA (demo)",
                        "holder_rut": "76.123.456-0"
                      }
                    }
                  },
                  "checkout-session-paid": {
                    "value": {
                      "allowed_origins": [
                        "https://tienda-andes.example",
                        "http://localhost:3000"
                      ],
                      "amount_clp": 34998,
                      "cancel_url": "https://tienda-andes.example/carrito",
                      "checkout_state": "succeeded",
                      "description": "Pedido 881",
                      "expires_at": "2026-10-30T16:00:00Z",
                      "last_attempt": {
                        "bank_id": "test_norte",
                        "bank_state": null,
                        "connector": "sim",
                        "created_at": "2026-10-30T15:02:10Z",
                        "failure_reason": null,
                        "id": "pa_000031",
                        "object": "payment_attempt",
                        "state": "authorized",
                        "updated_at": "2026-10-30T15:02:40Z"
                      },
                      "merchant": {
                        "display_name": "Tienda Andes (demo)"
                      },
                      "mode": "test",
                      "object": "checkout_session",
                      "payer_restricted": false,
                      "receipt": {
                        "account_id": "acc_000001",
                        "bank_tx_id": "sim-acc_000001-000077",
                        "confirmed_at": "2026-10-30T15:03:14Z",
                        "credited_at": "2026-10-30T15:03:12Z",
                        "final_amount_clp": 34998,
                        "journal_digest": "d82fb5f90cc0f61fba660ca3a5b5ed63ed7a49fe58736108f0f33e2cadd63927",
                        "journal_sequence": 12,
                        "key_id": "axiomic-receipts-test-1",
                        "merchant_id": "mer_000001",
                        "method": "unique_amount",
                        "mode": "test",
                        "payer_check": "not_required",
                        "payment_intent_id": "pr_000184",
                        "receipt_id": "rcpt_000184",
                        "reference": "pedido-881",
                        "signature": "88dbe4998fd4e60718bf70c33af205a3871aea6edca07af40c5fa8e19afb287101e2021b624a06fc7f968a9b5daea099e2262a8c4643c84e260e3befdfc64775",
                        "source": "sim"
                      },
                      "reference": "pedido-881",
                      "return_url": "https://tienda-andes.example/pedidos/881/gracias",
                      "revision": 2,
                      "server_time": "2026-10-30T15:03:16Z",
                      "status": "paid",
                      "transfer_to": null
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CheckoutSession"
                }
              }
            },
            "description": "The pay page. Its amount is the exact final amount; never a discount or payer data."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [],
        "summary": "Leer la página de pago",
        "tags": [
          "Checkout"
        ]
      }
    },
    "/v1/checkout/sessions/{token}/attempts": {
      "post": {
        "description": "Crea un intento con `bank_id` y `connector`. Con `direct` devuelve una sola vez `bank_session_token`. Un intento nunca paga el cobro.",
        "operationId": "createPaymentAttempt",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "title": "Token",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "payment-attempt-create": {
                  "value": {
                    "bank_id": "test_norte",
                    "connector": "sim"
                  }
                },
                "payment-attempt-create-direct": {
                  "value": {
                    "bank_id": "test_norte",
                    "connector": "direct"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/AttemptIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "examples": {
                  "payment-attempt-created": {
                    "value": {
                      "bank_id": "test_norte",
                      "bank_state": null,
                      "connector": "sim",
                      "created_at": "2026-10-30T15:02:10Z",
                      "failure_reason": null,
                      "id": "pa_000031",
                      "instructions": {
                        "amount_clp": 34998,
                        "bank_name": "Banco de Prueba Norte",
                        "consent_text": "Autorizo a Banco de Prueba Norte a pagar $34.998 a Tienda Andes (demo). Modo de prueba: no se mueve dinero real.",
                        "kind": "simulated_authorization",
                        "merchant": "Tienda Andes (demo)"
                      },
                      "object": "payment_attempt",
                      "state": "bank_selected",
                      "updated_at": "2026-10-30T15:02:10Z"
                    }
                  },
                  "payment-attempt-created-direct": {
                    "value": {
                      "bank_checkout": {
                        "accounts": [],
                        "amount_clp": 34998,
                        "attempt_id": "pa_000032",
                        "bank_id": "test_norte",
                        "bank_name": "Banco de Prueba Norte",
                        "can_submit": false,
                        "challenge": null,
                        "checkout_state": "awaiting_customer",
                        "currency": "CLP",
                        "error_code": null,
                        "expires_at": null,
                        "fingerprint": null,
                        "merchant": {
                          "display_name": "Tienda Andes (demo)"
                        },
                        "object": "bank_checkout",
                        "receiver": {
                          "bank": "Banco Simulado",
                          "display_name": "Tienda Andes SpA (demo)",
                          "masked_account": "****5678"
                        },
                        "selected_account": null,
                        "server_time": "2026-10-30T15:03:00Z",
                        "state": "authentication_required"
                      },
                      "bank_id": "test_norte",
                      "bank_session_token": "ilustrativo-bank-session-token-000000000000",
                      "bank_state": null,
                      "connector": "direct",
                      "created_at": "2026-10-30T15:03:00Z",
                      "failure_reason": null,
                      "id": "pa_000032",
                      "instructions": {
                        "access_consent_text": "Autorizo a Axiomic a usar mi sesión de Banco de Prueba Norte sólo para preparar esta transferencia de $34.998 a Tienda Andes (demo). Axiomic no guarda mi clave ni mi clave dinámica. Modo de prueba: banco simulado, no se mueve dinero real.",
                        "access_consent_version": "bank-access-v1",
                        "amount_clp": 34998,
                        "bank_name": "Banco de Prueba Norte",
                        "kind": "direct_payment",
                        "merchant": "Tienda Andes (demo)"
                      },
                      "object": "payment_attempt",
                      "state": "bank_selected",
                      "updated_at": "2026-10-30T15:03:00Z"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/AttemptCreated"
                }
              }
            },
            "description": "``POST /v1/checkout/sessions/{token}/attempts``, told apart by ``connector``.\n\nA root model cannot forbid extra keys itself; each of its members does."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "error-bank-unavailable": {
                    "value": {
                      "code": "bank_unavailable",
                      "detail": "El banco no está disponible ahora.",
                      "doc_url": "https://docs.axiomic.cl/errores#bank_unavailable",
                      "request_id": "req_81532306eafcbcd4124482ec"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Every refusal: a Spanish ``detail`` and a stable ``code``; it never echoes the input.\n\n``request_id`` is also the ``X-Request-Id`` header, and ``doc_url`` explains the code."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [],
        "summary": "Elegir banco y forma de pago",
        "tags": [
          "Checkout"
        ]
      }
    },
    "/v1/checkout/sessions/{token}/attempts/{attempt_id}/bank": {
      "get": {
        "description": "Devuelve el `bank_checkout` actual. Recupera una respuesta perdida sin repetir el ingreso ni la autorización.",
        "operationId": "getBankCheckout",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "title": "Token",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attempt_id",
            "required": true,
            "schema": {
              "title": "Attempt Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Axiomic-Bank-Session",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Axiomic-Bank-Session"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "bank-checkout-authentication-required": {
                    "value": {
                      "accounts": [],
                      "amount_clp": 34998,
                      "attempt_id": "pa_000032",
                      "bank_id": "test_norte",
                      "bank_name": "Banco de Prueba Norte",
                      "can_submit": false,
                      "challenge": null,
                      "checkout_state": "awaiting_customer",
                      "currency": "CLP",
                      "error_code": null,
                      "expires_at": null,
                      "fingerprint": null,
                      "merchant": {
                        "display_name": "Tienda Andes (demo)"
                      },
                      "object": "bank_checkout",
                      "receiver": {
                        "bank": "Banco Simulado",
                        "display_name": "Tienda Andes SpA (demo)",
                        "masked_account": "****5678"
                      },
                      "selected_account": null,
                      "server_time": "2026-10-30T15:03:05Z",
                      "state": "authentication_required"
                    }
                  },
                  "bank-checkout-succeeded": {
                    "value": {
                      "accounts": [],
                      "amount_clp": 34998,
                      "attempt_id": "pa_000032",
                      "bank_id": "test_norte",
                      "bank_name": "Banco de Prueba Norte",
                      "can_submit": false,
                      "challenge": null,
                      "checkout_state": "succeeded",
                      "currency": "CLP",
                      "error_code": null,
                      "expires_at": "2026-10-30T15:08:20Z",
                      "fingerprint": null,
                      "merchant": {
                        "display_name": "Tienda Andes (demo)"
                      },
                      "object": "bank_checkout",
                      "receiver": {
                        "bank": "Banco Simulado",
                        "display_name": "Tienda Andes SpA (demo)",
                        "masked_account": "****5678"
                      },
                      "selected_account": null,
                      "server_time": "2026-10-30T15:04:36Z",
                      "state": "submitted"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/BankCheckout"
                }
              }
            },
            "description": "A direct attempt's bank session as the page shows it. ``submitted`` is not paid: only\n``checkout_state: succeeded`` says the credit arrived."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "error-session-required": {
                    "value": {
                      "code": "session_required",
                      "detail": "Falta la sesión del banco.",
                      "doc_url": "https://docs.axiomic.cl/errores#session_required",
                      "request_id": "req_58912168b8e7c0dd53bce871"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Every refusal: a Spanish ``detail`` and a stable ``code``; it never echoes the input.\n\n``request_id`` is also the ``X-Request-Id`` header, and ``doc_url`` explains the code."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [],
        "summary": "Leer el paso del banco",
        "tags": [
          "Pago directo"
        ]
      }
    },
    "/v1/checkout/sessions/{token}/attempts/{attempt_id}/bank/account": {
      "post": {
        "description": "Recibe el `reference` opaco tal como llegó en `accounts[]`.",
        "operationId": "selectBankAccount",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "title": "Token",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attempt_id",
            "required": true,
            "schema": {
              "title": "Attempt Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Axiomic-Bank-Session",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Axiomic-Bank-Session"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "bank-account": {
                  "value": {
                    "reference": "acct_ilustrativa-cuenta-02"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/BankAccountIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "bank-checkout-review-required": {
                    "value": {
                      "accounts": [
                        {
                          "masked_number": "****3333",
                          "reference": "acct_ilustrativa-cuenta-01"
                        },
                        {
                          "masked_number": "****6666",
                          "reference": "acct_ilustrativa-cuenta-02"
                        }
                      ],
                      "amount_clp": 34998,
                      "attempt_id": "pa_000032",
                      "bank_id": "test_norte",
                      "bank_name": "Banco de Prueba Norte",
                      "can_submit": true,
                      "challenge": null,
                      "checkout_state": "awaiting_customer",
                      "currency": "CLP",
                      "error_code": null,
                      "expires_at": "2026-10-30T15:08:20Z",
                      "fingerprint": "5c1e0f3a9b7d2c4e6f8a1b3c5d7e9f0a2b4c6d8e0f1a3b5c7d9e1f2a4b6c8d0e",
                      "merchant": {
                        "display_name": "Tienda Andes (demo)"
                      },
                      "object": "bank_checkout",
                      "receiver": {
                        "bank": "Banco Simulado",
                        "display_name": "Tienda Andes SpA (demo)",
                        "masked_account": "****5678"
                      },
                      "selected_account": "acct_ilustrativa-cuenta-02",
                      "server_time": "2026-10-30T15:03:40Z",
                      "state": "review_required"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/BankCheckout"
                }
              }
            },
            "description": "A direct attempt's bank session as the page shows it. ``submitted`` is not paid: only\n``checkout_state: succeeded`` says the credit arrived."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [],
        "summary": "Elegir la cuenta de origen",
        "tags": [
          "Pago directo"
        ]
      }
    },
    "/v1/checkout/sessions/{token}/attempts/{attempt_id}/bank/authorize": {
      "post": {
        "description": "Clave dinámica en `code`, o `code: null` para aprobar en la app del banco. `submitted` no es pago recibido y `outcome_unknown` nunca se reintenta.",
        "operationId": "authorizeBankTransfer",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "title": "Token",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attempt_id",
            "required": true,
            "schema": {
              "title": "Attempt Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Axiomic-Bank-Session",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Axiomic-Bank-Session"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "bank-authorize": {
                  "value": {
                    "challenge_id": "mfa_ilustrativo-desafio-000001",
                    "code": "654321"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/BankAuthorizeIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "bank-checkout-failed": {
                    "value": {
                      "accounts": [],
                      "amount_clp": 34998,
                      "attempt_id": "pa_000032",
                      "bank_id": "test_norte",
                      "bank_name": "Banco de Prueba Norte",
                      "can_submit": false,
                      "challenge": null,
                      "checkout_state": "awaiting_customer",
                      "currency": "CLP",
                      "error_code": null,
                      "expires_at": "2026-10-30T15:08:20Z",
                      "fingerprint": null,
                      "merchant": {
                        "display_name": "Tienda Andes (demo)"
                      },
                      "object": "bank_checkout",
                      "receiver": {
                        "bank": "Banco Simulado",
                        "display_name": "Tienda Andes SpA (demo)",
                        "masked_account": "****5678"
                      },
                      "selected_account": null,
                      "server_time": "2026-10-30T15:04:30Z",
                      "state": "failed"
                    }
                  },
                  "bank-checkout-outcome-unknown": {
                    "value": {
                      "accounts": [],
                      "amount_clp": 34998,
                      "attempt_id": "pa_000032",
                      "bank_id": "test_norte",
                      "bank_name": "Banco de Prueba Norte",
                      "can_submit": false,
                      "challenge": null,
                      "checkout_state": "awaiting_confirmation",
                      "currency": "CLP",
                      "error_code": "outcome_unknown",
                      "expires_at": "2026-10-30T15:08:20Z",
                      "fingerprint": null,
                      "merchant": {
                        "display_name": "Tienda Andes (demo)"
                      },
                      "object": "bank_checkout",
                      "receiver": {
                        "bank": "Banco Simulado",
                        "display_name": "Tienda Andes SpA (demo)",
                        "masked_account": "****5678"
                      },
                      "selected_account": null,
                      "server_time": "2026-10-30T15:04:30Z",
                      "state": "outcome_unknown"
                    }
                  },
                  "bank-checkout-submitted": {
                    "value": {
                      "accounts": [],
                      "amount_clp": 34998,
                      "attempt_id": "pa_000032",
                      "bank_id": "test_norte",
                      "bank_name": "Banco de Prueba Norte",
                      "can_submit": false,
                      "challenge": null,
                      "checkout_state": "awaiting_confirmation",
                      "currency": "CLP",
                      "error_code": null,
                      "expires_at": "2026-10-30T15:08:20Z",
                      "fingerprint": null,
                      "merchant": {
                        "display_name": "Tienda Andes (demo)"
                      },
                      "object": "bank_checkout",
                      "receiver": {
                        "bank": "Banco Simulado",
                        "display_name": "Tienda Andes SpA (demo)",
                        "masked_account": "****5678"
                      },
                      "selected_account": null,
                      "server_time": "2026-10-30T15:04:30Z",
                      "state": "submitted"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/BankCheckout"
                }
              }
            },
            "description": "A direct attempt's bank session as the page shows it. ``submitted`` is not paid: only\n``checkout_state: succeeded`` says the credit arrived."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "error-session-expired": {
                    "value": {
                      "code": "session_expired",
                      "detail": "La sesión del banco terminó.",
                      "doc_url": "https://docs.axiomic.cl/errores#session_expired",
                      "request_id": "req_d50c27fec371d7d649f2c111"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Every refusal: a Spanish ``detail`` and a stable ``code``; it never echoes the input.\n\n``request_id`` is also the ``X-Request-Id`` header, and ``doc_url`` explains the code."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [],
        "summary": "Autorizar con el factor del banco",
        "tags": [
          "Pago directo"
        ]
      }
    },
    "/v1/checkout/sessions/{token}/attempts/{attempt_id}/bank/close": {
      "post": {
        "description": "Cierra la sesión bancaria. Si la transferencia ya se preparó, el intento queda `outcome_unknown`: el banco pudo guardar la orden.",
        "operationId": "closeBankSession",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "title": "Token",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attempt_id",
            "required": true,
            "schema": {
              "title": "Attempt Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Axiomic-Bank-Session",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Axiomic-Bank-Session"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "bank-close": {
                  "value": {}
                }
              },
              "schema": {
                "$ref": "#/components/schemas/EmptyIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "bank-checkout-expired": {
                    "value": {
                      "accounts": [],
                      "amount_clp": 34998,
                      "attempt_id": "pa_000032",
                      "bank_id": "test_norte",
                      "bank_name": "Banco de Prueba Norte",
                      "can_submit": false,
                      "challenge": null,
                      "checkout_state": "awaiting_customer",
                      "currency": "CLP",
                      "error_code": null,
                      "expires_at": "2026-10-30T15:08:20Z",
                      "fingerprint": null,
                      "merchant": {
                        "display_name": "Tienda Andes (demo)"
                      },
                      "object": "bank_checkout",
                      "receiver": {
                        "bank": "Banco Simulado",
                        "display_name": "Tienda Andes SpA (demo)",
                        "masked_account": "****5678"
                      },
                      "selected_account": null,
                      "server_time": "2026-10-30T15:03:50Z",
                      "state": "expired"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/BankCheckout"
                }
              }
            },
            "description": "A direct attempt's bank session as the page shows it. ``submitted`` is not paid: only\n``checkout_state: succeeded`` says the credit arrived."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [],
        "summary": "Salir del banco",
        "tags": [
          "Pago directo"
        ]
      }
    },
    "/v1/checkout/sessions/{token}/attempts/{attempt_id}/bank/login": {
      "post": {
        "description": "Envía RUT, clave y el consentimiento de acceso. La clave sólo vive en esta petición: no se guarda, no se registra y nunca vuelve en una respuesta.",
        "operationId": "loginToBank",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "title": "Token",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attempt_id",
            "required": true,
            "schema": {
              "title": "Attempt Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Axiomic-Bank-Session",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Axiomic-Bank-Session"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "bank-login": {
                  "value": {
                    "access_consent_version": "bank-access-v1",
                    "password": "123456",
                    "rut": "12.345.678-5"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/BankLoginIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "bank-checkout-access-unverified": {
                    "value": {
                      "accounts": [],
                      "amount_clp": 34998,
                      "attempt_id": "pa_000032",
                      "bank_id": "test_norte",
                      "bank_name": "Banco de Prueba Norte",
                      "can_submit": false,
                      "challenge": null,
                      "checkout_state": "awaiting_customer",
                      "currency": "CLP",
                      "error_code": "bank_access_unverified",
                      "expires_at": "2026-10-30T15:08:20Z",
                      "fingerprint": null,
                      "merchant": {
                        "display_name": "Tienda Andes (demo)"
                      },
                      "object": "bank_checkout",
                      "receiver": {
                        "bank": "Banco Simulado",
                        "display_name": "Tienda Andes SpA (demo)",
                        "masked_account": "****5678"
                      },
                      "selected_account": null,
                      "server_time": "2026-10-30T15:03:22Z",
                      "state": "outcome_unknown"
                    }
                  },
                  "bank-checkout-account-selection": {
                    "value": {
                      "accounts": [
                        {
                          "masked_number": "****3333",
                          "reference": "acct_ilustrativa-cuenta-01"
                        },
                        {
                          "masked_number": "****6666",
                          "reference": "acct_ilustrativa-cuenta-02"
                        }
                      ],
                      "amount_clp": 34998,
                      "attempt_id": "pa_000032",
                      "bank_id": "test_norte",
                      "bank_name": "Banco de Prueba Norte",
                      "can_submit": false,
                      "challenge": null,
                      "checkout_state": "awaiting_customer",
                      "currency": "CLP",
                      "error_code": null,
                      "expires_at": "2026-10-30T15:08:20Z",
                      "fingerprint": null,
                      "merchant": {
                        "display_name": "Tienda Andes (demo)"
                      },
                      "object": "bank_checkout",
                      "receiver": {
                        "bank": "Banco Simulado",
                        "display_name": "Tienda Andes SpA (demo)",
                        "masked_account": "****5678"
                      },
                      "selected_account": null,
                      "server_time": "2026-10-30T15:03:22Z",
                      "state": "account_selection"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/BankCheckout"
                }
              }
            },
            "description": "A direct attempt's bank session as the page shows it. ``submitted`` is not paid: only\n``checkout_state: succeeded`` says the credit arrived."
          },
          "422": {
            "content": {
              "application/json": {
                "examples": {
                  "error-invalid-bank-login": {
                    "value": {
                      "code": "invalid_bank_login",
                      "detail": "El RUT o la clave no tienen un formato válido.",
                      "doc_url": "https://docs.axiomic.cl/errores#invalid_bank_login",
                      "request_id": "req_d861e1c1a861bbad768da664"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Every refusal: a Spanish ``detail`` and a stable ``code``; it never echoes the input.\n\n``request_id`` is also the ``X-Request-Id`` header, and ``doc_url`` explains the code."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [],
        "summary": "Ingresar al banco",
        "tags": [
          "Pago directo"
        ]
      }
    },
    "/v1/checkout/sessions/{token}/attempts/{attempt_id}/bank/prepare": {
      "post": {
        "description": "Ata el consentimiento al pago exacto con la `fingerprint` recibida y pide el desafío del banco. El monto, el comercio y el destino los fija el servidor.",
        "operationId": "prepareBankTransfer",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "title": "Token",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attempt_id",
            "required": true,
            "schema": {
              "title": "Attempt Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "X-Axiomic-Bank-Session",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Axiomic-Bank-Session"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "bank-prepare": {
                  "value": {
                    "consent_version": "bank-transfer-v1",
                    "fingerprint": "5c1e0f3a9b7d2c4e6f8a1b3c5d7e9f0a2b4c6d8e0f1a3b5c7d9e1f2a4b6c8d0e"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/BankPrepareIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "bank-checkout-challenge-bank-app": {
                    "value": {
                      "accounts": [
                        {
                          "masked_number": "****3333",
                          "reference": "acct_ilustrativa-cuenta-01"
                        },
                        {
                          "masked_number": "****6666",
                          "reference": "acct_ilustrativa-cuenta-02"
                        }
                      ],
                      "amount_clp": 34998,
                      "attempt_id": "pa_000032",
                      "bank_id": "test_norte",
                      "bank_name": "Banco de Prueba Norte",
                      "can_submit": true,
                      "challenge": {
                        "code_length": null,
                        "expires_at": "2026-10-30T15:05:10Z",
                        "id": "mfa_ilustrativo-desafio-000001",
                        "prompt": "Autoriza en la aplicación del banco.",
                        "type": "bank_app"
                      },
                      "checkout_state": "awaiting_customer",
                      "currency": "CLP",
                      "error_code": null,
                      "expires_at": "2026-10-30T15:08:20Z",
                      "fingerprint": "5c1e0f3a9b7d2c4e6f8a1b3c5d7e9f0a2b4c6d8e0f1a3b5c7d9e1f2a4b6c8d0e",
                      "merchant": {
                        "display_name": "Tienda Andes (demo)"
                      },
                      "object": "bank_checkout",
                      "receiver": {
                        "bank": "Banco Simulado",
                        "display_name": "Tienda Andes SpA (demo)",
                        "masked_account": "****5678"
                      },
                      "selected_account": "acct_ilustrativa-cuenta-02",
                      "server_time": "2026-10-30T15:04:10Z",
                      "state": "challenge_required"
                    }
                  },
                  "bank-checkout-challenge-otp": {
                    "value": {
                      "accounts": [
                        {
                          "masked_number": "****3333",
                          "reference": "acct_ilustrativa-cuenta-01"
                        },
                        {
                          "masked_number": "****6666",
                          "reference": "acct_ilustrativa-cuenta-02"
                        }
                      ],
                      "amount_clp": 34998,
                      "attempt_id": "pa_000032",
                      "bank_id": "test_norte",
                      "bank_name": "Banco de Prueba Norte",
                      "can_submit": true,
                      "challenge": {
                        "code_length": 6,
                        "expires_at": "2026-10-30T15:05:10Z",
                        "id": "mfa_ilustrativo-desafio-000001",
                        "prompt": "Ingresa la clave dinámica solicitada por tu banco.",
                        "type": "otp"
                      },
                      "checkout_state": "awaiting_customer",
                      "currency": "CLP",
                      "error_code": null,
                      "expires_at": "2026-10-30T15:08:20Z",
                      "fingerprint": "5c1e0f3a9b7d2c4e6f8a1b3c5d7e9f0a2b4c6d8e0f1a3b5c7d9e1f2a4b6c8d0e",
                      "merchant": {
                        "display_name": "Tienda Andes (demo)"
                      },
                      "object": "bank_checkout",
                      "receiver": {
                        "bank": "Banco Simulado",
                        "display_name": "Tienda Andes SpA (demo)",
                        "masked_account": "****5678"
                      },
                      "selected_account": "acct_ilustrativa-cuenta-02",
                      "server_time": "2026-10-30T15:04:10Z",
                      "state": "challenge_required"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/BankCheckout"
                }
              }
            },
            "description": "A direct attempt's bank session as the page shows it. ``submitted`` is not paid: only\n``checkout_state: succeeded`` says the credit arrived."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [],
        "summary": "Revisar y preparar la transferencia",
        "tags": [
          "Pago directo"
        ]
      }
    },
    "/v1/checkout/sessions/{token}/attempts/{attempt_id}/confirm": {
      "post": {
        "description": "Pasa el recorrido a `awaiting_confirmation`. Es un aviso del pagador: el cobro se paga sólo cuando llega el abono.",
        "operationId": "confirmPaymentAttempt",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "title": "Token",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attempt_id",
            "required": true,
            "schema": {
              "title": "Attempt Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "payment-attempt-confirmed": {
                    "value": {
                      "bank_id": "test_sur",
                      "bank_state": null,
                      "connector": "assisted",
                      "created_at": "2026-10-30T14:40:05Z",
                      "failure_reason": null,
                      "id": "pa_000029",
                      "object": "payment_attempt",
                      "state": "confirmed",
                      "updated_at": "2026-10-30T14:44:51Z"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PaymentAttempt"
                }
              }
            },
            "description": "The buyer's latest choice of bank. It shapes the page and never decides the payment."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [],
        "summary": "Avisar que el pagador ya transfirió",
        "tags": [
          "Checkout"
        ]
      }
    },
    "/v1/checkout/sessions/{token}/attempts/{attempt_id}/test_authorize": {
      "post": {
        "description": "Para un intento `sim`: aprueba o rechaza y, si aprueba, encola el abono simulado que el worker entrega después de `delay_seconds`.",
        "operationId": "testAuthorizePaymentAttempt",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "title": "Token",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attempt_id",
            "required": true,
            "schema": {
              "title": "Attempt Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "payment-attempt-authorize": {
                  "value": {
                    "delay_seconds": 3,
                    "outcome": "approve"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/TestAuthorizeIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "payment-attempt-authorized": {
                    "value": {
                      "bank_id": "test_norte",
                      "bank_state": null,
                      "connector": "sim",
                      "created_at": "2026-10-30T15:02:10Z",
                      "failure_reason": null,
                      "id": "pa_000031",
                      "object": "payment_attempt",
                      "state": "authorized",
                      "updated_at": "2026-10-30T15:02:40Z"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PaymentAttempt"
                }
              }
            },
            "description": "The buyer's latest choice of bank. It shapes the page and never decides the payment."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [],
        "summary": "Simular la autorización del banco",
        "tags": [
          "Modo de prueba"
        ]
      }
    },
    "/v1/checkout/sessions/{token}/status": {
      "get": {
        "description": "Se consulta cada `poll_after_ms` con `If-None-Match`; responde 304 si nada cambió. Sólo `checkout_state: succeeded` significa pago recibido.",
        "operationId": "getCheckoutStatus",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "title": "Token",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "if-none-match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "If-None-Match"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "checkout-status-awaiting-confirmation": {
                    "value": {
                      "checkout_state": "awaiting_confirmation",
                      "last_attempt": {
                        "bank_id": "test_norte",
                        "bank_state": null,
                        "connector": "sim",
                        "created_at": "2026-10-30T15:02:10Z",
                        "failure_reason": null,
                        "id": "pa_000031",
                        "object": "payment_attempt",
                        "state": "authorized",
                        "updated_at": "2026-10-30T15:02:40Z"
                      },
                      "object": "checkout_status",
                      "poll_after_ms": 2000,
                      "revision": 1,
                      "server_time": "2026-10-30T15:02:41Z",
                      "status": "open"
                    }
                  },
                  "checkout-status-direct-access-unverified": {
                    "value": {
                      "checkout_state": "awaiting_customer",
                      "last_attempt": {
                        "bank_id": "test_norte",
                        "bank_state": "outcome_unknown",
                        "connector": "direct",
                        "created_at": "2026-10-30T15:03:00Z",
                        "failure_reason": "bank_access_unverified",
                        "id": "pa_000032",
                        "object": "payment_attempt",
                        "state": "failed",
                        "updated_at": "2026-10-30T15:03:22Z"
                      },
                      "object": "checkout_status",
                      "poll_after_ms": 2000,
                      "revision": 1,
                      "server_time": "2026-10-30T15:03:23Z",
                      "status": "open"
                    }
                  },
                  "checkout-status-direct-outcome-unknown": {
                    "value": {
                      "checkout_state": "awaiting_confirmation",
                      "last_attempt": {
                        "bank_id": "test_norte",
                        "bank_state": "outcome_unknown",
                        "connector": "direct",
                        "created_at": "2026-10-30T15:03:00Z",
                        "failure_reason": null,
                        "id": "pa_000032",
                        "object": "payment_attempt",
                        "state": "outcome_unknown",
                        "updated_at": "2026-10-30T15:04:30Z"
                      },
                      "object": "checkout_status",
                      "poll_after_ms": 2000,
                      "revision": 1,
                      "server_time": "2026-10-30T15:04:31Z",
                      "status": "open"
                    }
                  },
                  "checkout-status-direct-review": {
                    "value": {
                      "checkout_state": "awaiting_customer",
                      "last_attempt": {
                        "bank_id": "test_norte",
                        "bank_state": "review_required",
                        "connector": "direct",
                        "created_at": "2026-10-30T15:03:00Z",
                        "failure_reason": null,
                        "id": "pa_000032",
                        "object": "payment_attempt",
                        "state": "bank_selected",
                        "updated_at": "2026-10-30T15:03:00Z"
                      },
                      "object": "checkout_status",
                      "poll_after_ms": 2000,
                      "revision": 1,
                      "server_time": "2026-10-30T15:03:41Z",
                      "status": "open"
                    }
                  },
                  "checkout-status-direct-submitted": {
                    "value": {
                      "checkout_state": "awaiting_confirmation",
                      "last_attempt": {
                        "bank_id": "test_norte",
                        "bank_state": "submitted",
                        "connector": "direct",
                        "created_at": "2026-10-30T15:03:00Z",
                        "failure_reason": null,
                        "id": "pa_000032",
                        "object": "payment_attempt",
                        "state": "submitted",
                        "updated_at": "2026-10-30T15:04:30Z"
                      },
                      "object": "checkout_status",
                      "poll_after_ms": 2000,
                      "revision": 1,
                      "server_time": "2026-10-30T15:04:31Z",
                      "status": "open"
                    }
                  },
                  "checkout-status-open": {
                    "value": {
                      "checkout_state": "created",
                      "last_attempt": null,
                      "object": "checkout_status",
                      "poll_after_ms": 2000,
                      "revision": 1,
                      "server_time": "2026-10-30T15:01:00Z",
                      "status": "open"
                    }
                  },
                  "checkout-status-paid": {
                    "value": {
                      "checkout_state": "succeeded",
                      "last_attempt": {
                        "bank_id": "test_norte",
                        "bank_state": null,
                        "connector": "sim",
                        "created_at": "2026-10-30T15:02:10Z",
                        "failure_reason": null,
                        "id": "pa_000031",
                        "object": "payment_attempt",
                        "state": "authorized",
                        "updated_at": "2026-10-30T15:02:40Z"
                      },
                      "object": "checkout_status",
                      "poll_after_ms": 2000,
                      "revision": 2,
                      "server_time": "2026-10-30T15:03:16Z",
                      "status": "paid"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CheckoutStatus"
                }
              }
            },
            "description": "The pay page's poll, with an ETag over everything but ``server_time``."
          },
          "304": {
            "description": "Sin cambios desde el ETag de If-None-Match."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "error-rate-limited": {
                    "value": {
                      "code": "rate_limited",
                      "detail": "Demasiadas solicitudes; intenta en unos segundos.",
                      "doc_url": "https://docs.axiomic.cl/errores#rate_limited",
                      "request_id": "req_efacbda1b10efa447aeb51a0"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Every refusal: a Spanish ``detail`` and a stable ``code``; it never echoes the input.\n\n``request_id`` is also the ``X-Request-Id`` header, and ``doc_url`` explains the code."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [],
        "summary": "Consultar el estado del pago",
        "tags": [
          "Checkout"
        ]
      }
    },
    "/v1/checkout/sessions/{token}/test_transfer": {
      "post": {
        "description": "Encola un abono por el monto exacto del cobro, como el botón Simular transferencia de la página de pago.",
        "operationId": "simulateCheckoutTransfer",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "title": "Token",
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "examples": {
                  "checkout-test-transfer.accepted": {
                    "value": {
                      "accepted": true,
                      "bank_tx_ids": [
                        "sim-acc_000001-000077"
                      ],
                      "deliver_at": "2026-10-30T15:03:14Z"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/SimulatedTransferAccepted"
                }
              }
            },
            "description": "A simulated bank notice was queued (test mode); the book decides when it arrives."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [],
        "summary": "Simular la transferencia del pagador",
        "tags": [
          "Modo de prueba"
        ]
      }
    },
    "/v1/checkout_settings": {
      "get": {
        "description": "Los orígenes que pueden incrustar la página de pago del modo; vacía si nunca se fijaron.",
        "operationId": "getCheckoutSettings",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "checkout-settings": {
                    "value": {
                      "allowed_origins": [
                        "https://tienda-andes.example",
                        "http://localhost:3000"
                      ],
                      "mode": "test",
                      "object": "checkout_settings"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CheckoutSettings"
                }
              }
            },
            "description": "The mode's pay page settings: the origins that may embed it, normalized."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [
          {
            "merchantKey": []
          }
        ],
        "summary": "Leer los orígenes de la página de pago",
        "tags": [
          "Cobros"
        ]
      },
      "post": {
        "description": "Reemplaza los orígenes (`https://host[:puerto]`, o `http` a localhost) desde los que se puede incrustar la página de pago del modo: hasta 10, normalizados. Con la lista vacía, la página no se deja incrustar. Requiere la llave `full`.",
        "operationId": "setCheckoutSettings",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "checkout-settings": {
                  "value": {
                    "allowed_origins": [
                      "https://tienda-andes.example",
                      "http://localhost:3000"
                    ]
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/CheckoutSettingsIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "checkout-settings": {
                    "value": {
                      "allowed_origins": [
                        "https://tienda-andes.example",
                        "http://localhost:3000"
                      ],
                      "mode": "test",
                      "object": "checkout_settings"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CheckoutSettings"
                }
              }
            },
            "description": "The mode's pay page settings: the origins that may embed it, normalized."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [
          {
            "merchantKey": []
          }
        ],
        "summary": "Fijar los orígenes de la página de pago",
        "tags": [
          "Cobros"
        ]
      }
    },
    "/v1/events": {
      "get": {
        "description": "Feed de solo inserción con el mismo id y cuerpo que cada webhook, haya o no un endpoint registrado. Sirve para sincronizarse y deduplicar por id.",
        "operationId": "listEvents",
        "parameters": [
          {
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Type"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "starting_after",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Starting After"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "events-list": {
                    "value": {
                      "data": [
                        {
                          "created_at": "2026-10-30T15:12:02Z",
                          "data": {
                            "transfer": {
                              "alias": null,
                              "amount_clp": 34999,
                              "bank_tx_id": "sim-acc_000001-000080",
                              "candidates": [
                                "pr_000183"
                              ],
                              "credited_at": "2026-10-30T15:12:00Z",
                              "id": "tr_000080",
                              "method": null,
                              "mode": "test",
                              "object": "incoming_transfer",
                              "payment_intent_id": null,
                              "received_at": "2026-10-30T15:12:02Z",
                              "review_reason": "payer_mismatch",
                              "source": "sim",
                              "state": "needs_review"
                            }
                          },
                          "id": "evt_000043",
                          "mode": "test",
                          "object": "event",
                          "type": "transfer.review_required"
                        },
                        {
                          "created_at": "2026-10-30T15:03:14Z",
                          "data": {
                            "payment_intent": {
                              "alias": null,
                              "amount_clp": 35000,
                              "cancel_url": "https://tienda-andes.example/carrito",
                              "checkout_state": "succeeded",
                              "closed_at": "2026-10-30T15:03:14Z",
                              "created_at": "2026-10-30T15:00:00Z",
                              "description": "Pedido 881",
                              "discount_clp": 2,
                              "expected_payer": false,
                              "expires_at": "2026-10-30T16:00:00Z",
                              "fee": {
                                "bps": 30,
                                "cap_clp": 3000,
                                "minimum_clp": 50,
                                "net_clp": 105
                              },
                              "final_amount_clp": 34998,
                              "id": "pr_000184",
                              "method": "unique_amount",
                              "mode": "test",
                              "object": "payment_intent",
                              "pay_token": "p8Kq2vX9rT4mN7bW1cZ5yH3jL6dF0sAe",
                              "pay_url": "https://app.axiomic.cl/pagar/p8Kq2vX9rT4mN7bW1cZ5yH3jL6dF0sAe",
                              "receipt_id": "rcpt_000184",
                              "reference": "pedido-881",
                              "return_url": "https://tienda-andes.example/pedidos/881/gracias",
                              "status": "paid",
                              "transfer_id": "tr_000077"
                            },
                            "receipt": {
                              "account_id": "acc_000001",
                              "bank_tx_id": "sim-acc_000001-000077",
                              "confirmed_at": "2026-10-30T15:03:14Z",
                              "credited_at": "2026-10-30T15:03:12Z",
                              "final_amount_clp": 34998,
                              "journal_digest": "d82fb5f90cc0f61fba660ca3a5b5ed63ed7a49fe58736108f0f33e2cadd63927",
                              "journal_sequence": 12,
                              "key_id": "axiomic-receipts-test-1",
                              "merchant_id": "mer_000001",
                              "method": "unique_amount",
                              "mode": "test",
                              "payer_check": "not_required",
                              "payment_intent_id": "pr_000184",
                              "receipt_id": "rcpt_000184",
                              "reference": "pedido-881",
                              "signature": "88dbe4998fd4e60718bf70c33af205a3871aea6edca07af40c5fa8e19afb287101e2021b624a06fc7f968a9b5daea099e2262a8c4643c84e260e3befdfc64775",
                              "source": "sim"
                            },
                            "transfer": {
                              "alias": null,
                              "amount_clp": 34998,
                              "bank_tx_id": "sim-acc_000001-000077",
                              "candidates": [],
                              "credited_at": "2026-10-30T15:03:12Z",
                              "id": "tr_000077",
                              "method": "unique_amount",
                              "mode": "test",
                              "object": "incoming_transfer",
                              "payment_intent_id": "pr_000184",
                              "received_at": "2026-10-30T15:03:14Z",
                              "review_reason": null,
                              "source": "sim",
                              "state": "matched"
                            }
                          },
                          "id": "evt_000041",
                          "mode": "test",
                          "object": "event",
                          "type": "payment_intent.paid"
                        },
                        {
                          "created_at": "2026-10-30T11:05:00Z",
                          "data": {
                            "payment_intent": {
                              "alias": null,
                              "amount_clp": 18500,
                              "cancel_url": null,
                              "checkout_state": "failed",
                              "closed_at": "2026-10-30T11:05:00Z",
                              "created_at": "2026-10-30T10:00:00Z",
                              "description": null,
                              "discount_clp": 0,
                              "expected_payer": false,
                              "expires_at": "2026-10-30T11:00:00Z",
                              "fee": null,
                              "final_amount_clp": 18500,
                              "id": "pr_000171",
                              "method": null,
                              "mode": "test",
                              "object": "payment_intent",
                              "pay_token": "Zr3Tq8Lm1Wx6Hc9Vb2Nk5Pd7Gf4Js0Ya",
                              "pay_url": "https://app.axiomic.cl/pagar/Zr3Tq8Lm1Wx6Hc9Vb2Nk5Pd7Gf4Js0Ya",
                              "receipt_id": null,
                              "reference": "pedido-868",
                              "return_url": null,
                              "status": "expired",
                              "transfer_id": null
                            }
                          },
                          "id": "evt_000038",
                          "mode": "test",
                          "object": "event",
                          "type": "payment_intent.expired"
                        }
                      ],
                      "has_more": true,
                      "object": "list"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/EventList"
                }
              }
            },
            "description": "The merchant's feed: the same bodies and ids as its webhooks, with or without one."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [
          {
            "merchantKey": []
          }
        ],
        "summary": "Listar eventos",
        "tags": [
          "Webhooks y eventos"
        ]
      }
    },
    "/v1/fee_statements/{period}": {
      "get": {
        "description": "Comisiones del período `YYYY-MM`. Requiere la llave `full`.",
        "operationId": "getFeeStatement",
        "parameters": [
          {
            "in": "path",
            "name": "period",
            "required": true,
            "schema": {
              "title": "Period",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "fee-statement": {
                    "value": {
                      "billable": false,
                      "iva_clp": 690,
                      "lines": [
                        {
                          "confirmed_at": "2026-10-12T13:00:00Z",
                          "fee_net_clp": 50,
                          "final_amount_clp": 10000,
                          "payment_intent_id": "pr_000150"
                        },
                        {
                          "confirmed_at": "2026-10-20T18:30:00Z",
                          "fee_net_clp": 3000,
                          "final_amount_clp": 1250000,
                          "payment_intent_id": "pr_000160"
                        },
                        {
                          "confirmed_at": "2026-10-29T09:15:00Z",
                          "fee_net_clp": 370,
                          "final_amount_clp": 123457,
                          "payment_intent_id": "pr_000170"
                        },
                        {
                          "confirmed_at": "2026-10-30T15:03:14Z",
                          "fee_net_clp": 105,
                          "final_amount_clp": 34998,
                          "payment_intent_id": "pr_000184"
                        },
                        {
                          "confirmed_at": "2026-10-30T15:14:00Z",
                          "fee_net_clp": 105,
                          "final_amount_clp": 35000,
                          "payment_intent_id": "pr_000182"
                        }
                      ],
                      "mode": "test",
                      "net_clp": 3630,
                      "object": "fee_statement",
                      "payments": 5,
                      "period": "2026-10",
                      "total_clp": 4320,
                      "volume_clp": 1453455
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/FeeStatement"
                }
              }
            },
            "description": "One month (Santiago time) of fees; never billable in test mode."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [
          {
            "merchantKey": []
          }
        ],
        "summary": "Leer el estado de cuenta de un mes",
        "tags": [
          "Conciliación"
        ]
      }
    },
    "/v1/incoming_transfers": {
      "get": {
        "description": "Transferencias que llegaron a la cuenta del comercio y cómo se identificaron. Es el único lugar con el RUT y el nombre del pagador. Requiere la llave `full`.",
        "operationId": "listIncomingTransfers",
        "parameters": [
          {
            "in": "query",
            "name": "state",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "State"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "starting_after",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Starting After"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "incoming-transfers-list": {
                    "value": {
                      "data": [
                        {
                          "alias": null,
                          "amount_clp": 4200,
                          "bank_tx_id": "sim-acc_000001-000081",
                          "candidates": [],
                          "credited_at": "2026-10-30T15:20:00Z",
                          "id": "tr_000081",
                          "method": null,
                          "mode": "test",
                          "object": "incoming_transfer",
                          "payer_name": null,
                          "payer_rut": null,
                          "payment_intent_id": null,
                          "received_at": "2026-10-30T15:20:01Z",
                          "review_reason": "unidentified",
                          "source": "sim",
                          "state": "dismissed"
                        },
                        {
                          "alias": null,
                          "amount_clp": 34999,
                          "bank_tx_id": "sim-acc_000001-000080",
                          "candidates": [
                            "pr_000183"
                          ],
                          "credited_at": "2026-10-30T15:12:00Z",
                          "id": "tr_000080",
                          "method": null,
                          "mode": "test",
                          "object": "incoming_transfer",
                          "payer_name": "Pedro Soto",
                          "payer_rut": "11.111.111-1",
                          "payment_intent_id": null,
                          "received_at": "2026-10-30T15:12:02Z",
                          "review_reason": "payer_mismatch",
                          "source": "sim",
                          "state": "needs_review"
                        },
                        {
                          "alias": null,
                          "amount_clp": 35000,
                          "bank_tx_id": "sim-acc_000001-000079",
                          "candidates": [],
                          "credited_at": "2026-10-30T15:10:00Z",
                          "id": "tr_000079",
                          "method": "review",
                          "mode": "test",
                          "object": "incoming_transfer",
                          "payer_name": "Pedro Soto",
                          "payer_rut": "11.111.111-1",
                          "payment_intent_id": "pr_000182",
                          "received_at": "2026-10-30T15:10:03Z",
                          "review_reason": "payer_mismatch",
                          "source": "sim",
                          "state": "assigned"
                        },
                        {
                          "alias": null,
                          "amount_clp": 34998,
                          "bank_tx_id": "sim-acc_000001-000077",
                          "candidates": [],
                          "credited_at": "2026-10-30T15:03:12Z",
                          "id": "tr_000077",
                          "method": "unique_amount",
                          "mode": "test",
                          "object": "incoming_transfer",
                          "payer_name": "Juana Pérez",
                          "payer_rut": "12.345.678-5",
                          "payment_intent_id": "pr_000184",
                          "received_at": "2026-10-30T15:03:14Z",
                          "review_reason": null,
                          "source": "sim",
                          "state": "matched"
                        }
                      ],
                      "has_more": false,
                      "object": "list"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/IncomingTransferList"
                }
              }
            },
            "description": "``GET /v1/incoming_transfers`` and ``GET /v1/reviews`` (only ``needs_review``)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [
          {
            "merchantKey": []
          }
        ],
        "summary": "Listar abonos",
        "tags": [
          "Conciliación"
        ]
      }
    },
    "/v1/payment_intents": {
      "get": {
        "description": "Del más nuevo al más antiguo. Filtra por `status` y pagina con `limit` (1 a 100) y `starting_after`.",
        "operationId": "listPaymentIntents",
        "parameters": [
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "starting_after",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Starting After"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "payment-intents-list": {
                    "value": {
                      "data": [
                        {
                          "alias": null,
                          "amount_clp": 35000,
                          "cancel_url": "https://tienda-andes.example/carrito",
                          "checkout_state": "succeeded",
                          "closed_at": "2026-10-30T15:03:14Z",
                          "created_at": "2026-10-30T15:00:00Z",
                          "description": "Pedido 881",
                          "discount_clp": 2,
                          "expected_payer": false,
                          "expires_at": "2026-10-30T16:00:00Z",
                          "fee": {
                            "bps": 30,
                            "cap_clp": 3000,
                            "minimum_clp": 50,
                            "net_clp": 105
                          },
                          "final_amount_clp": 34998,
                          "id": "pr_000184",
                          "method": "unique_amount",
                          "mode": "test",
                          "object": "payment_intent",
                          "pay_token": "p8Kq2vX9rT4mN7bW1cZ5yH3jL6dF0sAe",
                          "pay_url": "https://app.axiomic.cl/pagar/p8Kq2vX9rT4mN7bW1cZ5yH3jL6dF0sAe",
                          "receipt_id": "rcpt_000184",
                          "reference": "pedido-881",
                          "return_url": "https://tienda-andes.example/pedidos/881/gracias",
                          "status": "paid",
                          "transfer_id": "tr_000077"
                        },
                        {
                          "alias": null,
                          "amount_clp": 35000,
                          "cancel_url": null,
                          "checkout_state": "review",
                          "closed_at": null,
                          "created_at": "2026-10-30T14:58:00Z",
                          "description": "Pedido 880",
                          "discount_clp": 1,
                          "expected_payer": true,
                          "expires_at": "2026-10-30T15:58:00Z",
                          "fee": null,
                          "final_amount_clp": 34999,
                          "id": "pr_000183",
                          "method": null,
                          "mode": "test",
                          "object": "payment_intent",
                          "pay_token": "Qa1Ws2Ed3Rf4Tg5Yh6Uj7Ik8Ol9Pz0Xc",
                          "pay_url": "https://app.axiomic.cl/pagar/Qa1Ws2Ed3Rf4Tg5Yh6Uj7Ik8Ol9Pz0Xc",
                          "receipt_id": null,
                          "reference": "pedido-880",
                          "return_url": null,
                          "status": "open",
                          "transfer_id": null
                        },
                        {
                          "alias": null,
                          "amount_clp": 35000,
                          "cancel_url": null,
                          "checkout_state": "succeeded",
                          "closed_at": "2026-10-30T15:14:00Z",
                          "created_at": "2026-10-30T14:55:00Z",
                          "description": "Pedido 879",
                          "discount_clp": 0,
                          "expected_payer": true,
                          "expires_at": "2026-10-30T15:55:00Z",
                          "fee": {
                            "bps": 30,
                            "cap_clp": 3000,
                            "minimum_clp": 50,
                            "net_clp": 105
                          },
                          "final_amount_clp": 35000,
                          "id": "pr_000182",
                          "method": "review",
                          "mode": "test",
                          "object": "payment_intent",
                          "pay_token": "Vb6Nm7Lk8Jh9Gf0Ds1Ap2Qw3Er4Ty5Ui",
                          "pay_url": "https://app.axiomic.cl/pagar/Vb6Nm7Lk8Jh9Gf0Ds1Ap2Qw3Er4Ty5Ui",
                          "receipt_id": "rcpt_000182",
                          "reference": "pedido-879",
                          "return_url": null,
                          "status": "paid",
                          "transfer_id": "tr_000079"
                        }
                      ],
                      "has_more": false,
                      "object": "list"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PaymentIntentList"
                }
              }
            },
            "description": "``GET /v1/payment_intents``."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "error-invalid-api-key": {
                    "value": {
                      "code": "invalid_api_key",
                      "detail": "La llave de API no es válida.",
                      "doc_url": "https://docs.axiomic.cl/errores#invalid_api_key",
                      "request_id": "req_2b20c348ab4eb2dcbbbcbdd8"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Every refusal: a Spanish ``detail`` and a stable ``code``; it never echoes the input.\n\n``request_id`` is also the ``X-Request-Id`` header, and ``doc_url`` explains the code."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [
          {
            "merchantKey": []
          }
        ],
        "summary": "Listar cobros",
        "tags": [
          "Cobros"
        ]
      },
      "post": {
        "description": "Crea un cobro por transferencia y devuelve su `pay_url` para el pagador. Montos en pesos chilenos enteros. Repetir la `Idempotency-Key` con el mismo cuerpo devuelve el mismo cobro; con otro cuerpo responde 409 `idempotency_key_reused`.",
        "operationId": "createPaymentIntent",
        "parameters": [
          {
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "pattern": "^[A-Za-z0-9_-]{8,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "payment-intent-create": {
                  "value": {
                    "amount_clp": 35000,
                    "cancel_url": "https://tienda-andes.example/carrito",
                    "description": "Pedido 881",
                    "expires_in_seconds": 3600,
                    "reference": "pedido-881",
                    "return_url": "https://tienda-andes.example/pedidos/881/gracias"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/CreateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "examples": {
                  "payment-intent-open": {
                    "value": {
                      "alias": null,
                      "amount_clp": 35000,
                      "cancel_url": "https://tienda-andes.example/carrito",
                      "checkout_state": "created",
                      "closed_at": null,
                      "created_at": "2026-10-30T15:00:00Z",
                      "description": "Pedido 881",
                      "discount_clp": 2,
                      "expected_payer": false,
                      "expires_at": "2026-10-30T16:00:00Z",
                      "fee": null,
                      "final_amount_clp": 34998,
                      "id": "pr_000184",
                      "method": null,
                      "mode": "test",
                      "object": "payment_intent",
                      "pay_token": "p8Kq2vX9rT4mN7bW1cZ5yH3jL6dF0sAe",
                      "pay_url": "https://app.axiomic.cl/pagar/p8Kq2vX9rT4mN7bW1cZ5yH3jL6dF0sAe",
                      "receipt_id": null,
                      "reference": "pedido-881",
                      "return_url": "https://tienda-andes.example/pedidos/881/gracias",
                      "status": "open",
                      "transfer_id": null
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PaymentIntent"
                }
              }
            },
            "description": "What a merchant collects. ``discount_clp`` and the base price never reach the payer."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Falta Idempotency-Key."
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "error-unique-amount-unavailable": {
                    "value": {
                      "code": "unique_amount_unavailable",
                      "detail": "No queda un monto único libre para este precio en la cuenta. Indica el RUT de quien paga o usa una cuenta alias.",
                      "doc_url": "https://docs.axiomic.cl/errores#unique_amount_unavailable",
                      "request_id": "req_7de45a6c6230ccb630e4018f"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Every refusal: a Spanish ``detail`` and a stable ``code``; it never echoes the input.\n\n``request_id`` is also the ``X-Request-Id`` header, and ``doc_url`` explains the code."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [
          {
            "merchantKey": []
          }
        ],
        "summary": "Crear un cobro",
        "tags": [
          "Cobros"
        ]
      }
    },
    "/v1/payment_intents/{request_id}": {
      "get": {
        "description": "`status` es el estado del cobro y `checkout_state`, el recorrido del comprador. Sólo un abono identificado lo deja `paid`.",
        "operationId": "getPaymentIntent",
        "parameters": [
          {
            "in": "path",
            "name": "request_id",
            "required": true,
            "schema": {
              "title": "Request Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "payment-intent-expired": {
                    "value": {
                      "alias": null,
                      "amount_clp": 18500,
                      "cancel_url": null,
                      "checkout_state": "failed",
                      "closed_at": "2026-10-30T11:05:00Z",
                      "created_at": "2026-10-30T10:00:00Z",
                      "description": null,
                      "discount_clp": 0,
                      "expected_payer": false,
                      "expires_at": "2026-10-30T11:00:00Z",
                      "fee": null,
                      "final_amount_clp": 18500,
                      "id": "pr_000171",
                      "method": null,
                      "mode": "test",
                      "object": "payment_intent",
                      "pay_token": "Zr3Tq8Lm1Wx6Hc9Vb2Nk5Pd7Gf4Js0Ya",
                      "pay_url": "https://app.axiomic.cl/pagar/Zr3Tq8Lm1Wx6Hc9Vb2Nk5Pd7Gf4Js0Ya",
                      "receipt_id": null,
                      "reference": "pedido-868",
                      "return_url": null,
                      "status": "expired",
                      "transfer_id": null
                    }
                  },
                  "payment-intent-paid": {
                    "value": {
                      "alias": null,
                      "amount_clp": 35000,
                      "cancel_url": "https://tienda-andes.example/carrito",
                      "checkout_state": "succeeded",
                      "closed_at": "2026-10-30T15:03:14Z",
                      "created_at": "2026-10-30T15:00:00Z",
                      "description": "Pedido 881",
                      "discount_clp": 2,
                      "expected_payer": false,
                      "expires_at": "2026-10-30T16:00:00Z",
                      "fee": {
                        "bps": 30,
                        "cap_clp": 3000,
                        "minimum_clp": 50,
                        "net_clp": 105
                      },
                      "final_amount_clp": 34998,
                      "id": "pr_000184",
                      "method": "unique_amount",
                      "mode": "test",
                      "object": "payment_intent",
                      "pay_token": "p8Kq2vX9rT4mN7bW1cZ5yH3jL6dF0sAe",
                      "pay_url": "https://app.axiomic.cl/pagar/p8Kq2vX9rT4mN7bW1cZ5yH3jL6dF0sAe",
                      "receipt_id": "rcpt_000184",
                      "reference": "pedido-881",
                      "return_url": "https://tienda-andes.example/pedidos/881/gracias",
                      "status": "paid",
                      "transfer_id": "tr_000077"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PaymentIntent"
                }
              }
            },
            "description": "What a merchant collects. ``discount_clp`` and the base price never reach the payer."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [
          {
            "merchantKey": []
          }
        ],
        "summary": "Leer un cobro",
        "tags": [
          "Cobros"
        ]
      }
    },
    "/v1/payment_intents/{request_id}/cancel": {
      "post": {
        "description": "Cancela un cobro abierto: el checkout deja de aceptar intentos.",
        "operationId": "cancelPaymentIntent",
        "parameters": [
          {
            "in": "path",
            "name": "request_id",
            "required": true,
            "schema": {
              "title": "Request Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "payment-intent-cancelled": {
                    "value": {
                      "alias": null,
                      "amount_clp": 42000,
                      "cancel_url": null,
                      "checkout_state": "failed",
                      "closed_at": "2026-10-30T12:20:00Z",
                      "created_at": "2026-10-30T12:00:00Z",
                      "description": "Pedido 873",
                      "discount_clp": 0,
                      "expected_payer": false,
                      "expires_at": "2026-10-30T13:00:00Z",
                      "fee": null,
                      "final_amount_clp": 42000,
                      "id": "pr_000176",
                      "method": null,
                      "mode": "test",
                      "object": "payment_intent",
                      "pay_token": "Mx4Bv7Nc2Lq9Kw5Jt8Hr1Gs6Fd3Ep0Za",
                      "pay_url": "https://app.axiomic.cl/pagar/Mx4Bv7Nc2Lq9Kw5Jt8Hr1Gs6Fd3Ep0Za",
                      "receipt_id": null,
                      "reference": "pedido-873",
                      "return_url": null,
                      "status": "cancelled",
                      "transfer_id": null
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PaymentIntent"
                }
              }
            },
            "description": "What a merchant collects. ``discount_clp`` and the base price never reach the payer."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [
          {
            "merchantKey": []
          }
        ],
        "summary": "Cancelar un cobro",
        "tags": [
          "Cobros"
        ]
      }
    },
    "/v1/receipt_keys": {
      "get": {
        "description": "Llaves Ed25519 con las que se verifica la firma de cada recibo, por `key_id`.",
        "operationId": "listReceiptKeys",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "receipt-keys": {
                    "value": {
                      "data": [
                        {
                          "algorithm": "Ed25519",
                          "key_id": "axiomic-receipts-test-1",
                          "mode": "test",
                          "public_key": "006a6fde71ab1db2218fa88788afbcf7a6fd652e16dd400a04c5fe852440d28e"
                        }
                      ],
                      "has_more": false,
                      "object": "list"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ReceiptKeyList"
                }
              }
            },
            "description": "``GET /v1/receipt_keys``: verify receipts with these public keys (hex)."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [],
        "summary": "Listar las llaves públicas de los recibos",
        "tags": [
          "Sistema"
        ]
      }
    },
    "/v1/reviews": {
      "get": {
        "description": "Abonos que Axiomic no confirma solo: monto distinto, tardío, ambiguo o desconocido. Requiere la llave `full`.",
        "operationId": "listReviews",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "reviews-list": {
                    "value": {
                      "data": [
                        {
                          "alias": null,
                          "amount_clp": 15000,
                          "bank_tx_id": "sim-acc_000001-000090",
                          "candidates": [
                            "pr_000190",
                            "pr_000191"
                          ],
                          "credited_at": "2026-10-30T16:00:00Z",
                          "id": "tr_000090",
                          "method": null,
                          "mode": "test",
                          "object": "incoming_transfer",
                          "payer_name": null,
                          "payer_rut": null,
                          "payment_intent_id": null,
                          "received_at": "2026-10-30T16:00:02Z",
                          "review_reason": "ambiguous",
                          "source": "sim",
                          "state": "needs_review"
                        },
                        {
                          "alias": null,
                          "amount_clp": 4200,
                          "bank_tx_id": "sim-acc_000001-000091",
                          "candidates": [],
                          "credited_at": "2026-10-30T16:01:00Z",
                          "id": "tr_000091",
                          "method": null,
                          "mode": "test",
                          "object": "incoming_transfer",
                          "payer_name": null,
                          "payer_rut": null,
                          "payment_intent_id": null,
                          "received_at": "2026-10-30T16:01:02Z",
                          "review_reason": "unidentified",
                          "source": "sim",
                          "state": "needs_review"
                        },
                        {
                          "alias": null,
                          "amount_clp": 20000,
                          "bank_tx_id": "sim-acc_000001-000092",
                          "candidates": [
                            "pr_000192"
                          ],
                          "credited_at": "2026-10-30T16:02:00Z",
                          "id": "tr_000092",
                          "method": null,
                          "mode": "test",
                          "object": "incoming_transfer",
                          "payer_name": "Juana Pérez",
                          "payer_rut": "12.345.678-5",
                          "payment_intent_id": null,
                          "received_at": "2026-10-30T16:02:02Z",
                          "review_reason": "underpaid",
                          "source": "sim",
                          "state": "needs_review"
                        },
                        {
                          "alias": null,
                          "amount_clp": 30000,
                          "bank_tx_id": "sim-acc_000001-000093",
                          "candidates": [
                            "pr_000193"
                          ],
                          "credited_at": "2026-10-30T16:03:00Z",
                          "id": "tr_000093",
                          "method": null,
                          "mode": "test",
                          "object": "incoming_transfer",
                          "payer_name": "Juana Pérez",
                          "payer_rut": "12.345.678-5",
                          "payment_intent_id": null,
                          "received_at": "2026-10-30T16:03:02Z",
                          "review_reason": "overpaid",
                          "source": "sim",
                          "state": "needs_review"
                        },
                        {
                          "alias": null,
                          "amount_clp": 27500,
                          "bank_tx_id": "sim-acc_000001-000094",
                          "candidates": [
                            "pr_000194",
                            "pr_000195"
                          ],
                          "credited_at": "2026-10-30T16:04:00Z",
                          "id": "tr_000094",
                          "method": null,
                          "mode": "test",
                          "object": "incoming_transfer",
                          "payer_name": "Juana Pérez",
                          "payer_rut": "12.345.678-5",
                          "payment_intent_id": null,
                          "received_at": "2026-10-30T16:04:02Z",
                          "review_reason": "amount_mismatch",
                          "source": "sim",
                          "state": "needs_review"
                        },
                        {
                          "alias": null,
                          "amount_clp": 34999,
                          "bank_tx_id": "sim-acc_000001-000095",
                          "candidates": [
                            "pr_000183"
                          ],
                          "credited_at": "2026-10-30T16:05:00Z",
                          "id": "tr_000095",
                          "method": null,
                          "mode": "test",
                          "object": "incoming_transfer",
                          "payer_name": "Pedro Soto",
                          "payer_rut": "11.111.111-1",
                          "payment_intent_id": null,
                          "received_at": "2026-10-30T16:05:02Z",
                          "review_reason": "payer_mismatch",
                          "source": "sim",
                          "state": "needs_review"
                        },
                        {
                          "alias": null,
                          "amount_clp": 18500,
                          "bank_tx_id": "sim-acc_000001-000096",
                          "candidates": [
                            "pr_000171"
                          ],
                          "credited_at": "2026-10-30T16:06:00Z",
                          "id": "tr_000096",
                          "method": null,
                          "mode": "test",
                          "object": "incoming_transfer",
                          "payer_name": null,
                          "payer_rut": null,
                          "payment_intent_id": null,
                          "received_at": "2026-10-30T16:06:02Z",
                          "review_reason": "late_payment",
                          "source": "sim",
                          "state": "needs_review"
                        },
                        {
                          "alias": null,
                          "amount_clp": 21000,
                          "bank_tx_id": "sim-acc_000001-000097",
                          "candidates": [
                            "pr_000172"
                          ],
                          "credited_at": "2026-10-30T16:07:00Z",
                          "id": "tr_000097",
                          "method": null,
                          "mode": "test",
                          "object": "incoming_transfer",
                          "payer_name": null,
                          "payer_rut": null,
                          "payment_intent_id": null,
                          "received_at": "2026-10-30T16:07:02Z",
                          "review_reason": "notified_after_expiry",
                          "source": "sim",
                          "state": "needs_review"
                        },
                        {
                          "alias": null,
                          "amount_clp": 42000,
                          "bank_tx_id": "sim-acc_000001-000098",
                          "candidates": [
                            "pr_000176"
                          ],
                          "credited_at": "2026-10-30T16:08:00Z",
                          "id": "tr_000098",
                          "method": null,
                          "mode": "test",
                          "object": "incoming_transfer",
                          "payer_name": null,
                          "payer_rut": null,
                          "payment_intent_id": null,
                          "received_at": "2026-10-30T16:08:02Z",
                          "review_reason": "request_cancelled",
                          "source": "sim",
                          "state": "needs_review"
                        },
                        {
                          "alias": null,
                          "amount_clp": 34998,
                          "bank_tx_id": "sim-acc_000001-000099",
                          "candidates": [
                            "pr_000184"
                          ],
                          "credited_at": "2026-10-30T16:09:00Z",
                          "id": "tr_000099",
                          "method": null,
                          "mode": "test",
                          "object": "incoming_transfer",
                          "payer_name": "Juana Pérez",
                          "payer_rut": "12.345.678-5",
                          "payment_intent_id": null,
                          "received_at": "2026-10-30T16:09:02Z",
                          "review_reason": "already_paid",
                          "source": "sim",
                          "state": "needs_review"
                        },
                        {
                          "alias": "ali-000009",
                          "amount_clp": 9900,
                          "bank_tx_id": "sim-acc_000001-000100",
                          "candidates": [],
                          "credited_at": "2026-10-30T16:10:00Z",
                          "id": "tr_000100",
                          "method": null,
                          "mode": "test",
                          "object": "incoming_transfer",
                          "payer_name": null,
                          "payer_rut": null,
                          "payment_intent_id": null,
                          "received_at": "2026-10-30T16:10:02Z",
                          "review_reason": "unknown_alias",
                          "source": "sim",
                          "state": "needs_review"
                        }
                      ],
                      "has_more": false,
                      "object": "list"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/IncomingTransferList"
                }
              }
            },
            "description": "``GET /v1/incoming_transfers`` and ``GET /v1/reviews`` (only ``needs_review``)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [
          {
            "merchantKey": []
          }
        ],
        "summary": "Listar la bandeja de revisión",
        "tags": [
          "Conciliación"
        ]
      }
    },
    "/v1/reviews/{transfer_id}/resolve": {
      "post": {
        "description": "Una persona del comercio asigna el abono a un cobro o lo descarta. Una llave `agent` no puede hacerlo.",
        "operationId": "resolveReview",
        "parameters": [
          {
            "in": "path",
            "name": "transfer_id",
            "required": true,
            "schema": {
              "title": "Transfer Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "review-resolve-assign": {
                  "value": {
                    "action": "assign",
                    "payment_intent_id": "pr_000183"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/ResolveIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "review-resolved": {
                    "value": {
                      "alias": null,
                      "amount_clp": 34999,
                      "bank_tx_id": "sim-acc_000001-000080",
                      "candidates": [
                        "pr_000183"
                      ],
                      "credited_at": "2026-10-30T15:12:00Z",
                      "id": "tr_000080",
                      "method": "review",
                      "mode": "test",
                      "object": "incoming_transfer",
                      "payer_name": "Pedro Soto",
                      "payer_rut": "11.111.111-1",
                      "payment_intent_id": "pr_000183",
                      "received_at": "2026-10-30T15:12:02Z",
                      "review_reason": "payer_mismatch",
                      "source": "sim",
                      "state": "assigned"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/IncomingTransfer"
                }
              }
            },
            "description": "A credit as the merchant's full key reads it, with what the bank said of the payer."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [
          {
            "merchantKey": []
          }
        ],
        "summary": "Resolver una revisión",
        "tags": [
          "Conciliación"
        ]
      }
    },
    "/v1/test/scenarios/{name}": {
      "post": {
        "description": "Crea en tu cuenta de prueba los cobros de un escenario y encola sus avisos del banco: duplicados, atrasados, del mismo precio, de otro RUT, de otro monto o desconocidos. `fault_tour` corre los seis. Las revisiones quedan para que las resuelvas tú.",
        "operationId": "runTestScenario",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "title": "Name",
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "examples": {
                  "test-scenario.accepted": {
                    "value": {
                      "data": [
                        {
                          "description": "Dos cobros del mismo precio: el descuento único y el RUT los separan, y un tercer pago del precio base no cae en el cobro ya pagado.",
                          "name": "same_amount_two_payers",
                          "notices": [
                            {
                              "accepted": true,
                              "bank_tx_ids": [
                                "sim-acc_000001-000201"
                              ],
                              "deliver_at": "2026-10-30T15:20:00Z"
                            },
                            {
                              "accepted": true,
                              "bank_tx_ids": [
                                "sim-acc_000001-000202"
                              ],
                              "deliver_at": "2026-10-30T15:20:00Z"
                            },
                            {
                              "accepted": true,
                              "bank_tx_ids": [
                                "sim-acc_000001-000203"
                              ],
                              "deliver_at": "2026-10-30T15:20:00Z"
                            }
                          ],
                          "object": "scenario_run",
                          "payment_intents": [
                            "pr_000201",
                            "pr_000202"
                          ]
                        }
                      ],
                      "has_more": false,
                      "object": "list"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ScenarioRunList"
                }
              }
            },
            "description": "``POST /v1/test/scenarios/{name}``: one run, or one per scenario for ``fault_tour``."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [
          {
            "merchantKey": []
          }
        ],
        "summary": "Correr un escenario de fallas",
        "tags": [
          "Modo de prueba"
        ]
      }
    },
    "/v1/test/transfers": {
      "post": {
        "description": "Simula un abono a la cuenta del comercio con cualquier monto y pagador: duplicados (`copies`), atrasos (`delay_seconds`) y acreditación anterior (`credited_offset_seconds`).",
        "operationId": "simulateTransfer",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "test-transfer": {
                  "value": {
                    "alias": null,
                    "amount_clp": 34998,
                    "bank_tx_id": null,
                    "copies": 1,
                    "credited_offset_seconds": 0,
                    "delay_seconds": 0,
                    "payer_name": "Juana Pérez",
                    "payer_rut": "12.345.678-5"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/TestTransferIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "examples": {
                  "test-transfer.accepted": {
                    "value": {
                      "accepted": true,
                      "bank_tx_ids": [
                        "sim-acc_000001-000077"
                      ],
                      "deliver_at": "2026-10-30T15:03:14Z"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/SimulatedTransferAccepted"
                }
              }
            },
            "description": "A simulated bank notice was queued (test mode); the book decides when it arrives."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [
          {
            "merchantKey": []
          }
        ],
        "summary": "Simular un aviso del banco",
        "tags": [
          "Modo de prueba"
        ]
      }
    },
    "/v1/webhook_endpoints": {
      "post": {
        "description": "Registra o reemplaza el destino del modo y devuelve el secreto con que se firma cada entrega en `X-Axiomic-Signature`. El destino debe usar https y una dirección pública.",
        "operationId": "setWebhookEndpoint",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "webhook-endpoint": {
                  "value": {
                    "url": "https://tienda-andes.example/hooks/axiomic"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/WebhookIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "webhook-endpoint": {
                    "value": {
                      "events": [
                        "payment_intent.paid",
                        "payment_intent.expired",
                        "transfer.review_required"
                      ],
                      "mode": "test",
                      "object": "webhook_endpoint",
                      "secret": "whsec_test_8udLDOiR8u_HQvcyexVLqYjXQl-xIgHH6gujrsLSaSs",
                      "url": "https://tienda-andes.example/hooks/axiomic"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            },
            "description": "The mode's endpoint; ``secret`` signs every delivery (HMAC-SHA256 of the raw body)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [
          {
            "merchantKey": []
          }
        ],
        "summary": "Registrar el webhook",
        "tags": [
          "Webhooks y eventos"
        ]
      }
    },
    "/v1/webhook_endpoints/test": {
      "post": {
        "description": "Encola un `webhook_endpoint.test` firmado hacia el webhook registrado y devuelve su entrega, que luego aparece en `GET /v1/webhook_events`. Nunca entra al feed ni habla de un cobro, tiene un solo intento automático y responde 409 si no hay webhook.",
        "operationId": "sendTestWebhookEvent",
        "parameters": [],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "examples": {
                  "webhook-test.accepted": {
                    "value": {
                      "attempts": 0,
                      "created_at": "2026-10-30T15:05:30Z",
                      "delivered_at": null,
                      "gave_up_at": null,
                      "id": "evt_000042",
                      "last_status": null,
                      "next_attempt_at": "2026-10-30T15:05:30Z",
                      "type": "webhook_endpoint.test"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/WebhookDelivery"
                }
              }
            },
            "description": "An outbox event's delivery state. ``next_attempt_at`` is null once delivered or given up."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [
          {
            "merchantKey": []
          }
        ],
        "summary": "Enviar un evento de prueba",
        "tags": [
          "Webhooks y eventos"
        ]
      }
    },
    "/v1/webhook_events": {
      "get": {
        "description": "Intentos, último código HTTP, próxima entrega y si los reintentos se rindieron.",
        "operationId": "listWebhookEvents",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "webhook-events-list": {
                    "value": {
                      "data": [
                        {
                          "attempts": 3,
                          "created_at": "2026-10-30T15:12:02Z",
                          "delivered_at": null,
                          "gave_up_at": null,
                          "id": "evt_000043",
                          "last_status": 503,
                          "next_attempt_at": "2026-10-30T15:14:37Z",
                          "type": "transfer.review_required"
                        },
                        {
                          "attempts": 1,
                          "created_at": "2026-10-30T15:05:30Z",
                          "delivered_at": "2026-10-30T15:05:31Z",
                          "gave_up_at": null,
                          "id": "evt_000042",
                          "last_status": 200,
                          "next_attempt_at": null,
                          "type": "webhook_endpoint.test"
                        },
                        {
                          "attempts": 1,
                          "created_at": "2026-10-30T15:03:14Z",
                          "delivered_at": "2026-10-30T15:03:15Z",
                          "gave_up_at": null,
                          "id": "evt_000041",
                          "last_status": 200,
                          "next_attempt_at": null,
                          "type": "payment_intent.paid"
                        }
                      ],
                      "has_more": false,
                      "object": "list"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveryList"
                }
              }
            },
            "description": "``GET /v1/webhook_events``."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [
          {
            "merchantKey": []
          }
        ],
        "summary": "Listar las entregas de webhooks",
        "tags": [
          "Webhooks y eventos"
        ]
      }
    },
    "/v1/webhook_events/{event_id}/redeliver": {
      "post": {
        "description": "Programa otra entrega del evento, también después de que los reintentos se rindieron. Responde 202 sin cuerpo.",
        "operationId": "redeliverWebhookEvent",
        "parameters": [
          {
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "title": "Event Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Reenvío programado; sin cuerpo."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiValidationError"
                    },
                    {
                      "$ref": "#/components/schemas/ApiError"
                    }
                  ]
                }
              }
            },
            "description": "Solicitud no válida; `fields` solo si falló el esquema."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "description": "Error: `{detail, code}`; cada `code` está en el [catálogo de errores](https://docs.axiomic.cl/errores/)."
          }
        },
        "security": [
          {
            "merchantKey": []
          }
        ],
        "summary": "Reenviar un webhook",
        "tags": [
          "Webhooks y eventos"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://api.axiomic.cl",
      "description": "Producción, en modo de prueba (banco simulado, sin dinero real)"
    }
  ],
  "tags": [
    {
      "description": "Lo que el comercio quiere cobrar: monto, referencia y vencimiento.",
      "name": "Cobros"
    },
    {
      "description": "Rutas públicas de la página de pago; el token del checkout es la credencial. Las usa la página de pago de Axiomic.",
      "name": "Checkout"
    },
    {
      "description": "El pagador paga desde la sesión de su banco con X-Axiomic-Bank-Session. En esta versión, sólo contra el banco simulado.",
      "name": "Pago directo"
    },
    {
      "description": "Abonos recibidos, bandeja de revisión y estado de cuenta.",
      "name": "Conciliación"
    },
    {
      "description": "Avisos firmados con reintentos y el feed de eventos de solo inserción.",
      "name": "Webhooks y eventos"
    },
    {
      "description": "Mandatos con aprobación humana: el agente pide, la persona aprueba y paga desde su banco. Un mandato nunca mueve dinero.",
      "name": "Agentes"
    },
    {
      "description": "Simuladores del banco. Fuera de modo de prueba responden 404.",
      "name": "Modo de prueba"
    },
    {
      "description": "Salud del servicio y llaves públicas de los recibos.",
      "name": "Sistema"
    }
  ],
  "webhooks": {
    "payment_intent.expired": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "webhook-event-expired": {
                  "value": {
                    "created_at": "2026-10-30T11:05:00Z",
                    "data": {
                      "payment_intent": {
                        "alias": null,
                        "amount_clp": 18500,
                        "cancel_url": null,
                        "checkout_state": "failed",
                        "closed_at": "2026-10-30T11:05:00Z",
                        "created_at": "2026-10-30T10:00:00Z",
                        "description": null,
                        "discount_clp": 0,
                        "expected_payer": false,
                        "expires_at": "2026-10-30T11:00:00Z",
                        "fee": null,
                        "final_amount_clp": 18500,
                        "id": "pr_000171",
                        "method": null,
                        "mode": "test",
                        "object": "payment_intent",
                        "pay_token": "Zr3Tq8Lm1Wx6Hc9Vb2Nk5Pd7Gf4Js0Ya",
                        "pay_url": "https://app.axiomic.cl/pagar/Zr3Tq8Lm1Wx6Hc9Vb2Nk5Pd7Gf4Js0Ya",
                        "receipt_id": null,
                        "reference": "pedido-868",
                        "return_url": null,
                        "status": "expired",
                        "transfer_id": null
                      }
                    },
                    "id": "evt_000038",
                    "mode": "test",
                    "object": "event",
                    "type": "payment_intent.expired"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/PaymentIntentExpiredEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Recibido"
          }
        },
        "summary": "Evento payment_intent.expired"
      }
    },
    "payment_intent.paid": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "webhook-event-paid": {
                  "value": {
                    "created_at": "2026-10-30T15:03:14Z",
                    "data": {
                      "payment_intent": {
                        "alias": null,
                        "amount_clp": 35000,
                        "cancel_url": "https://tienda-andes.example/carrito",
                        "checkout_state": "succeeded",
                        "closed_at": "2026-10-30T15:03:14Z",
                        "created_at": "2026-10-30T15:00:00Z",
                        "description": "Pedido 881",
                        "discount_clp": 2,
                        "expected_payer": false,
                        "expires_at": "2026-10-30T16:00:00Z",
                        "fee": {
                          "bps": 30,
                          "cap_clp": 3000,
                          "minimum_clp": 50,
                          "net_clp": 105
                        },
                        "final_amount_clp": 34998,
                        "id": "pr_000184",
                        "method": "unique_amount",
                        "mode": "test",
                        "object": "payment_intent",
                        "pay_token": "p8Kq2vX9rT4mN7bW1cZ5yH3jL6dF0sAe",
                        "pay_url": "https://app.axiomic.cl/pagar/p8Kq2vX9rT4mN7bW1cZ5yH3jL6dF0sAe",
                        "receipt_id": "rcpt_000184",
                        "reference": "pedido-881",
                        "return_url": "https://tienda-andes.example/pedidos/881/gracias",
                        "status": "paid",
                        "transfer_id": "tr_000077"
                      },
                      "receipt": {
                        "account_id": "acc_000001",
                        "bank_tx_id": "sim-acc_000001-000077",
                        "confirmed_at": "2026-10-30T15:03:14Z",
                        "credited_at": "2026-10-30T15:03:12Z",
                        "final_amount_clp": 34998,
                        "journal_digest": "d82fb5f90cc0f61fba660ca3a5b5ed63ed7a49fe58736108f0f33e2cadd63927",
                        "journal_sequence": 12,
                        "key_id": "axiomic-receipts-test-1",
                        "merchant_id": "mer_000001",
                        "method": "unique_amount",
                        "mode": "test",
                        "payer_check": "not_required",
                        "payment_intent_id": "pr_000184",
                        "receipt_id": "rcpt_000184",
                        "reference": "pedido-881",
                        "signature": "88dbe4998fd4e60718bf70c33af205a3871aea6edca07af40c5fa8e19afb287101e2021b624a06fc7f968a9b5daea099e2262a8c4643c84e260e3befdfc64775",
                        "source": "sim"
                      },
                      "transfer": {
                        "alias": null,
                        "amount_clp": 34998,
                        "bank_tx_id": "sim-acc_000001-000077",
                        "candidates": [],
                        "credited_at": "2026-10-30T15:03:12Z",
                        "id": "tr_000077",
                        "method": "unique_amount",
                        "mode": "test",
                        "object": "incoming_transfer",
                        "payment_intent_id": "pr_000184",
                        "received_at": "2026-10-30T15:03:14Z",
                        "review_reason": null,
                        "source": "sim",
                        "state": "matched"
                      }
                    },
                    "id": "evt_000041",
                    "mode": "test",
                    "object": "event",
                    "type": "payment_intent.paid"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/PaymentIntentPaidEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Recibido"
          }
        },
        "summary": "Evento payment_intent.paid"
      }
    },
    "transfer.review_required": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "webhook-event-review": {
                  "value": {
                    "created_at": "2026-10-30T15:12:02Z",
                    "data": {
                      "transfer": {
                        "alias": null,
                        "amount_clp": 34999,
                        "bank_tx_id": "sim-acc_000001-000080",
                        "candidates": [
                          "pr_000183"
                        ],
                        "credited_at": "2026-10-30T15:12:00Z",
                        "id": "tr_000080",
                        "method": null,
                        "mode": "test",
                        "object": "incoming_transfer",
                        "payment_intent_id": null,
                        "received_at": "2026-10-30T15:12:02Z",
                        "review_reason": "payer_mismatch",
                        "source": "sim",
                        "state": "needs_review"
                      }
                    },
                    "id": "evt_000043",
                    "mode": "test",
                    "object": "event",
                    "type": "transfer.review_required"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/TransferReviewRequiredEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Recibido"
          }
        },
        "summary": "Evento transfer.review_required"
      }
    },
    "webhook_endpoint.test": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "webhook-event-test": {
                  "value": {
                    "created_at": "2026-10-30T15:05:30Z",
                    "data": {
                      "webhook_endpoint": {
                        "url": "https://tienda-andes.example/hooks/axiomic"
                      }
                    },
                    "id": "evt_000042",
                    "mode": "test",
                    "object": "event",
                    "type": "webhook_endpoint.test"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/WebhookTestEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Recibido"
          }
        },
        "summary": "Evento webhook_endpoint.test"
      }
    }
  }
}
