{
  "openapi": "3.0.0",
  "info": {
    "title": "Exodus Checkout API",
    "version": "1.0.0",
    "description": "Reference for the Exodus Checkout merchant API, generated from the same Zod schemas that validate requests. The documented request shape is the validated request shape, so this reference is always in sync with the deployed endpoints."
  },
  "servers": [
    {
      "url": "https://checkout-api.exodus.com"
    }
  ],
  "security": [
    {
      "ApiKey": []
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Merchant secret API key. Send as `Authorization: Bearer sk_...`. Keys can be restricted to scopes: `read` (all GET endpoints), `checkouts_write` (create/cancel checkouts and quotes), `payments_write` (capture, refund, rescue, recover, subscription charge/cancel), `settings_write` (webhook, settlement, and signer configuration — highest privilege). Calls outside a key’s scopes fail with 403 `permission_error`."
      }
    },
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "validation_error",
                  "authentication_error",
                  "permission_error",
                  "not_found",
                  "invalid_request",
                  "rate_limit_error",
                  "service_unavailable",
                  "cannot_process"
                ]
              },
              "message": {
                "type": "string"
              },
              "param": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "data": {
                "type": "object",
                "additionalProperties": {
                  "nullable": true
                }
              }
            },
            "required": [
              "type",
              "message"
            ]
          }
        },
        "required": [
          "error"
        ]
      },
      "Charge": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "subscription_charge"
            ]
          },
          "id": {
            "type": "string"
          },
          "subscription_id": {
            "type": "string"
          },
          "subscriber": {
            "type": "string"
          },
          "external_customer_id": {
            "type": "string",
            "nullable": true
          },
          "amount": {
            "type": "string"
          },
          "fee": {
            "type": "string"
          },
          "fiat_amount": {
            "type": "string",
            "nullable": true,
            "description": "The subscription's fixed per-cycle fiat price, in fiat_currency's minor units (e.g. cents for USD, centavos for ARS). Set at subscription creation and identical on every charge — not a per-charge market rate, and not a confirmation from the settlement provider (see settlement_status). Null when the subscription is not fiat-denominated, and on failed charges (including on-chain reverts) and on a charge made outside the charge and subscribe endpoints."
          },
          "fiat_currency": {
            "type": "string",
            "nullable": true,
            "description": "ISO-4217 code that fiat_amount is denominated in. Null whenever fiat_amount is null."
          },
          "settlement_status": {
            "type": "string",
            "nullable": true,
            "enum": [
              "pending",
              "delayed",
              "completed",
              "failed",
              null
            ],
            "description": "Fiat settlement leg state: pending, delayed, completed, or failed. Delayed is non-terminal: the payout is running late. Null when the business settles in crypto (fiat_amount is then the subscription's price only, with no settlement leg behind it), when the subscription is not fiat-denominated, and on failed charges (including on-chain reverts) and on a charge made outside the charge and subscribe endpoints."
          },
          "tx_hash": {
            "type": "string",
            "nullable": true
          },
          "chain": {
            "type": "string"
          },
          "token_symbol": {
            "type": "string",
            "nullable": true
          },
          "token_decimals": {
            "type": "number",
            "nullable": true
          },
          "charge_nonce": {
            "type": "number"
          },
          "charged_at": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "succeeded",
              "failed"
            ]
          },
          "failure_reason": {
            "type": "string",
            "nullable": true
          },
          "block_number": {
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "nullable": true,
            "additionalProperties": {
              "nullable": true
            }
          },
          "created_at": {
            "type": "string"
          }
        },
        "required": [
          "object",
          "id",
          "subscription_id",
          "subscriber",
          "external_customer_id",
          "amount",
          "fee",
          "fiat_amount",
          "fiat_currency",
          "settlement_status",
          "tx_hash",
          "chain",
          "token_symbol",
          "token_decimals",
          "charge_nonce",
          "charged_at",
          "status",
          "failure_reason",
          "block_number",
          "metadata",
          "created_at"
        ],
        "example": {
          "object": "subscription_charge",
          "id": "subc_6789abcdef012345",
          "subscription_id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
          "subscriber": "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21",
          "external_customer_id": "cus_42",
          "token_symbol": "USDC",
          "token_decimals": 6,
          "amount": "9990000",
          "fee": "0",
          "fiat_amount": "1250000",
          "fiat_currency": "ARS",
          "settlement_status": "completed",
          "tx_hash": "0x8a9c67b2d1e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9",
          "chain": "eip155:1",
          "charge_nonce": 3,
          "charged_at": "2026-05-19T12:02:18Z",
          "status": "succeeded",
          "failure_reason": null,
          "block_number": "12346789",
          "metadata": {
            "invoice_id": "inv_202605"
          },
          "created_at": "2026-05-19T12:02:18Z"
        }
      },
      "Checkout": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "checkout"
            ]
          },
          "amount": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "completed",
              "expired",
              "cancelled"
            ]
          },
          "checkout_url": {
            "type": "string",
            "format": "uri"
          },
          "success_url": {
            "type": "string",
            "nullable": true
          },
          "cancel_url": {
            "type": "string",
            "nullable": true
          },
          "return_url": {
            "type": "string",
            "nullable": true
          },
          "customer_email": {
            "type": "string",
            "nullable": true,
            "format": "email"
          },
          "metadata": {
            "type": "object",
            "nullable": true,
            "additionalProperties": {
              "nullable": true
            }
          },
          "expires_at": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "payments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "object": {
                  "type": "string",
                  "enum": [
                    "payment"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "client_deposit_pending",
                    "client_deposit_detected",
                    "client_deposit_confirmed",
                    "client_deposit_expired",
                    "escrow_confirmed",
                    "settlement_pending",
                    "settled",
                    "failed",
                    "refunded",
                    "cancelled"
                  ]
                },
                "payment_method": {
                  "type": "string",
                  "enum": [
                    "direct",
                    "two_step"
                  ]
                },
                "detected_asset": {
                  "type": "string",
                  "nullable": true
                },
                "detected_token_symbol": {
                  "type": "string",
                  "nullable": true
                },
                "detected_chain": {
                  "type": "string",
                  "nullable": true,
                  "pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$"
                },
                "token_amount": {
                  "type": "string",
                  "nullable": true
                },
                "token_amount_decimal": {
                  "type": "string",
                  "nullable": true
                },
                "deposit_address": {
                  "type": "string",
                  "nullable": true
                },
                "payer_addresses": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "on_chain_id": {
                  "type": "string",
                  "nullable": true
                },
                "factory_address": {
                  "type": "string",
                  "nullable": true
                },
                "payment_options": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "on_chain_id": {
                        "type": "string"
                      },
                      "deposit_address": {
                        "type": "string"
                      },
                      "chain_family": {
                        "type": "string"
                      },
                      "token": {
                        "type": "string",
                        "nullable": true
                      }
                    },
                    "required": [
                      "on_chain_id",
                      "deposit_address",
                      "chain_family",
                      "token"
                    ]
                  }
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "flagged": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "object",
                "status",
                "payment_method",
                "detected_asset",
                "detected_token_symbol",
                "detected_chain",
                "token_amount",
                "token_amount_decimal",
                "deposit_address",
                "payer_addresses",
                "on_chain_id",
                "factory_address",
                "payment_options",
                "created_at",
                "flagged"
              ]
            }
          }
        },
        "required": [
          "id",
          "object",
          "amount",
          "currency",
          "description",
          "status",
          "checkout_url",
          "success_url",
          "cancel_url",
          "return_url",
          "customer_email",
          "metadata",
          "expires_at",
          "created_at",
          "payments"
        ],
        "example": {
          "id": "chk_1234567890abcdef",
          "object": "checkout",
          "amount": 5000,
          "currency": "USD",
          "description": "Premium Plan - Monthly",
          "status": "completed",
          "checkout_url": "https://checkout.exodus.com/pay/chk_1234567890abcdef",
          "success_url": "https://yoursite.com/success",
          "cancel_url": "https://yoursite.com/cancel",
          "return_url": "https://yoursite.com/products/premium-plan",
          "customer_email": "customer@example.com",
          "metadata": {
            "order_id": "12345",
            "product_name": "Premium Plan"
          },
          "expires_at": "2024-01-16T12:00:00Z",
          "created_at": "2024-01-15T12:00:00Z",
          "payments": [
            {
              "id": "tz4a98xxat96iws9zmbrgj3a",
              "object": "payment",
              "status": "settled",
              "payment_method": "two_step",
              "detected_asset": "eip155:1/erc20:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
              "detected_token_symbol": "USDC",
              "detected_chain": "eip155:1",
              "token_amount": "50000000",
              "token_amount_decimal": "50",
              "deposit_address": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
              "payer_addresses": [
                "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21"
              ],
              "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
              "factory_address": "0x2f1c4e7b9a3d5c8e6f0a1b2c3d4e5f6a7b8c9d0e",
              "payment_options": [
                {
                  "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                  "deposit_address": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
                  "chain_family": "evm",
                  "token": "USDC"
                }
              ],
              "created_at": "2024-01-15T12:30:00Z",
              "flagged": false
            }
          ]
        }
      },
      "Payment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "payment"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "client_deposit_pending",
              "client_deposit_detected",
              "client_deposit_confirmed",
              "client_deposit_expired",
              "escrow_confirmed",
              "settlement_pending",
              "settled",
              "failed",
              "refunded",
              "cancelled"
            ]
          },
          "payment_method": {
            "type": "string",
            "enum": [
              "direct",
              "two_step"
            ]
          },
          "detected_asset": {
            "type": "string",
            "nullable": true
          },
          "detected_token_symbol": {
            "type": "string",
            "nullable": true
          },
          "detected_chain": {
            "type": "string",
            "nullable": true,
            "pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$"
          },
          "token_amount": {
            "type": "string",
            "nullable": true
          },
          "token_amount_decimal": {
            "type": "string",
            "nullable": true
          },
          "deposit_address": {
            "type": "string",
            "nullable": true
          },
          "payer_addresses": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "on_chain_id": {
            "type": "string",
            "nullable": true
          },
          "factory_address": {
            "type": "string",
            "nullable": true
          },
          "payment_options": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "on_chain_id": {
                  "type": "string"
                },
                "deposit_address": {
                  "type": "string"
                },
                "chain_family": {
                  "type": "string"
                },
                "token": {
                  "type": "string",
                  "nullable": true
                }
              },
              "required": [
                "on_chain_id",
                "deposit_address",
                "chain_family",
                "token"
              ]
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "flagged": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "object",
          "status",
          "payment_method",
          "detected_asset",
          "detected_token_symbol",
          "detected_chain",
          "token_amount",
          "token_amount_decimal",
          "deposit_address",
          "payer_addresses",
          "on_chain_id",
          "factory_address",
          "payment_options",
          "created_at",
          "flagged"
        ],
        "example": {
          "id": "tz4a98xxat96iws9zmbrgj3a",
          "object": "payment",
          "status": "settled",
          "payment_method": "two_step",
          "detected_asset": "eip155:1/erc20:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
          "detected_token_symbol": "USDC",
          "detected_chain": "eip155:1",
          "token_amount": "50000000",
          "token_amount_decimal": "50",
          "deposit_address": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
          "payer_addresses": [
            "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21"
          ],
          "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
          "factory_address": "0x2f1c4e7b9a3d5c8e6f0a1b2c3d4e5f6a7b8c9d0e",
          "payment_options": [
            {
              "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
              "deposit_address": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
              "chain_family": "evm",
              "token": "USDC"
            }
          ],
          "created_at": "2024-01-15T12:30:00Z",
          "flagged": false
        }
      },
      "Settings": {
        "type": "object",
        "properties": {
          "business_id": {
            "type": "string",
            "description": "Your Exodus business id. Stable for the life of the business and also returned as business_id on subscription checkouts."
          },
          "business_name": {
            "type": "string",
            "description": "Your registered business name, set by Exodus during onboarding. Hosted checkout and subscribe pages show display_name instead when it is set."
          },
          "display_name": {
            "type": "string",
            "nullable": true,
            "description": "The name your customers see on hosted checkout and subscribe pages. null shows business_name instead."
          },
          "background_color": {
            "type": "string",
            "nullable": true
          },
          "primary_color": {
            "type": "string",
            "nullable": true
          },
          "is_test": {
            "type": "boolean"
          },
          "settlement_type": {
            "type": "string",
            "enum": [
              "CRYPTO",
              "FIAT"
            ]
          },
          "currency": {
            "type": "string",
            "nullable": true
          },
          "settlement_provider": {
            "type": "string",
            "nullable": true
          },
          "settlement_provider_id": {
            "type": "string",
            "nullable": true
          },
          "chain_configs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "chain_family": {
                  "type": "string",
                  "enum": [
                    "evm",
                    "solana"
                  ]
                },
                "signer_status": {
                  "type": "string",
                  "enum": [
                    "not_configured",
                    "pending_activation",
                    "active"
                  ]
                },
                "merchant_signer": {
                  "type": "string",
                  "nullable": true
                },
                "settlement_address": {
                  "type": "string",
                  "nullable": true
                },
                "factory_address": {
                  "type": "string",
                  "nullable": true
                }
              },
              "required": [
                "chain_family",
                "signer_status",
                "merchant_signer",
                "settlement_address",
                "factory_address"
              ]
            }
          },
          "can_generate_key": {
            "type": "boolean"
          },
          "webhook_url": {
            "type": "string",
            "nullable": true
          },
          "merchant_id": {
            "type": "string",
            "description": "The merchant id bound into your PaymentFactory and SubscriptionManager contracts: keccak256 of `merchant:<business_id>`."
          },
          "subscription_managers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "chain": {
                  "type": "string"
                },
                "address": {
                  "type": "string"
                }
              },
              "required": [
                "chain",
                "address"
              ]
            },
            "description": "Your SubscriptionManager contract addresses, one entry per chain where one is deployed, each with its CAIP-2 chain id."
          }
        },
        "required": [
          "business_id",
          "business_name",
          "display_name",
          "background_color",
          "primary_color",
          "is_test",
          "settlement_type",
          "currency",
          "settlement_provider",
          "settlement_provider_id",
          "chain_configs",
          "can_generate_key",
          "webhook_url",
          "merchant_id",
          "subscription_managers"
        ],
        "example": {
          "business_id": "clzk3n8x50000qw3f7h2p9r1b",
          "business_name": "Acme Store",
          "display_name": null,
          "background_color": null,
          "primary_color": null,
          "is_test": false,
          "settlement_type": "CRYPTO",
          "currency": null,
          "settlement_provider": null,
          "settlement_provider_id": null,
          "chain_configs": [
            {
              "chain_family": "evm",
              "signer_status": "active",
              "merchant_signer": "0x1234abcd1234abcd1234abcd1234abcd1234abcd",
              "settlement_address": "0xabcd1234abcd1234abcd1234abcd1234abcd1234",
              "factory_address": "0xfaceb00cfaceb00cfaceb00cfaceb00cfaceb00c"
            },
            {
              "chain_family": "solana",
              "signer_status": "active",
              "merchant_signer": "9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin",
              "settlement_address": "5tzFkiKscXHK5ZXCGbXZxdw7gTjjD1mBwuoFbhUvuAi9",
              "factory_address": null
            }
          ],
          "can_generate_key": false,
          "webhook_url": "https://yoursite.com/webhooks/exodus",
          "merchant_id": "0x750ba0a7160fc57611beb7d07de10a83425eb034e2daf679f7069347751ab566",
          "subscription_managers": [
            {
              "chain": "eip155:42161",
              "address": "0x9a1b2c3d4e5f60718293a4b5c6d7e8f901234567"
            }
          ]
        }
      },
      "WebhookTestResult": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "webhook_test"
            ]
          },
          "delivered": {
            "type": "boolean"
          },
          "status": {
            "type": "number"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "object",
          "delivered"
        ],
        "example": {
          "object": "webhook_test",
          "delivered": true,
          "status": 200
        }
      },
      "SignerRotationPrepare": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "signer_rotation"
            ]
          },
          "current_signer": {
            "type": "string"
          },
          "new_signer": {
            "type": "string"
          },
          "new_factory_address": {
            "type": "string"
          },
          "merchant_id": {
            "type": "string"
          },
          "settlement_address": {
            "type": "string"
          },
          "rotations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "chain": {
                  "type": "string"
                },
                "contract_address": {
                  "type": "string"
                },
                "current_signer": {
                  "type": "string"
                },
                "new_factory_address": {
                  "type": "string"
                },
                "metafactory_address": {
                  "type": "string"
                },
                "set_factory_nonce": {
                  "type": "integer",
                  "minimum": 0
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "already_rotated"
                  ]
                }
              },
              "required": [
                "chain",
                "contract_address",
                "current_signer",
                "new_factory_address",
                "metafactory_address",
                "set_factory_nonce",
                "status"
              ]
            }
          }
        },
        "required": [
          "object",
          "current_signer",
          "new_signer",
          "new_factory_address",
          "merchant_id",
          "settlement_address",
          "rotations"
        ],
        "example": {
          "object": "signer_rotation",
          "current_signer": "0x1234abcd1234abcd1234abcd1234abcd1234abcd",
          "new_signer": "0x5678ef015678ef015678ef015678ef015678ef01",
          "new_factory_address": "0xfaceb00cfaceb00cfaceb00cfaceb00cfaceb00c",
          "merchant_id": "0x750ba0a7160fc57611beb7d07de10a83425eb034e2daf679f7069347751ab566",
          "settlement_address": "0xabcd1234abcd1234abcd1234abcd1234abcd1234",
          "rotations": [
            {
              "chain": "eip155:11155111",
              "contract_address": "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef",
              "current_signer": "0x1234abcd1234abcd1234abcd1234abcd1234abcd",
              "new_factory_address": "0xfaceb00cfaceb00cfaceb00cfaceb00cfaceb00c",
              "metafactory_address": "0xc0ffee254729296a45a3885639ac7e10f9d54979",
              "set_factory_nonce": 0,
              "status": "pending"
            }
          ]
        }
      },
      "SignerRotation": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "signer_rotation"
            ]
          },
          "new_signer": {
            "type": "string"
          },
          "new_factory_address": {
            "type": "string"
          },
          "rotations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "chain": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "rotated",
                    "already_rotated"
                  ]
                },
                "tx_hash": {
                  "type": "string",
                  "nullable": true
                }
              },
              "required": [
                "chain",
                "status",
                "tx_hash"
              ]
            }
          }
        },
        "required": [
          "object",
          "new_signer",
          "new_factory_address",
          "rotations"
        ],
        "example": {
          "object": "signer_rotation",
          "new_signer": "0x5678ef015678ef015678ef015678ef015678ef01",
          "new_factory_address": "0xfaceb00cfaceb00cfaceb00cfaceb00cfaceb00c",
          "rotations": [
            {
              "chain": "eip155:11155111",
              "status": "rotated",
              "tx_hash": "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"
            }
          ]
        }
      },
      "MerchantPauser": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "merchant_pauser"
            ]
          },
          "merchant_pauser": {
            "type": "string",
            "nullable": true
          },
          "shared_pauser_risk_acknowledged": {
            "type": "boolean"
          },
          "declaration_message": {
            "type": "string"
          },
          "locked_by_chain": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "object",
          "merchant_pauser",
          "shared_pauser_risk_acknowledged",
          "declaration_message",
          "locked_by_chain"
        ],
        "example": {
          "object": "merchant_pauser",
          "merchant_pauser": "0x9876fedc9876fedc9876fedc9876fedc9876fedc",
          "shared_pauser_risk_acknowledged": false,
          "declaration_message": "Exodus Checkout: declare SubscriptionManager pause authority\nbusiness: clzk3n8x50000qw3f7h2p9r1b\nchain family: evm",
          "locked_by_chain": null
        }
      },
      "SubscriptionCheckout": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "subscription_checkout"
            ]
          },
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "completed",
              "expired",
              "cancelled"
            ]
          },
          "onchain_id": {
            "type": "string"
          },
          "subscription_id": {
            "type": "string",
            "nullable": true,
            "description": "The on-chain id of the subscription created from this checkout, usable with GET /subscriptions/{id}, or null until one exists. Always equal to onchain_id once a subscription is bound: onchain_id is reserved when the checkout is created, so subscription_id is the field that tells you a subscription exists. Present even when the checkout is cancelled or expired, because a subscriber whose subscribe landed after a cancel keeps a live subscription."
          },
          "business_id": {
            "type": "string",
            "description": "Your Exodus business id. Stable for the life of the business and also returned by GET /settings."
          },
          "business_name": {
            "type": "string",
            "description": "The merchant name shown to subscribers on the hosted subscribe page: your display_name from GET /settings when set, otherwise your registered business name."
          },
          "background_color": {
            "type": "string",
            "nullable": true
          },
          "primary_color": {
            "type": "string",
            "nullable": true
          },
          "subscriber": {
            "type": "string",
            "nullable": true
          },
          "external_customer_id": {
            "type": "string",
            "nullable": true
          },
          "subscription_options": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "chain": {
                  "type": "string"
                },
                "token": {
                  "type": "string"
                },
                "subscription_manager_address": {
                  "type": "string"
                },
                "relayer_address": {
                  "type": "string"
                }
              },
              "required": [
                "chain",
                "token",
                "subscription_manager_address",
                "relayer_address"
              ]
            },
            "description": "Every chain/token combination the subscriber may pick at subscribe time. For a fiat-settled business, only the pairs the settlement provider settles. Always an array -- do not assume a single entry."
          },
          "price": {
            "type": "string",
            "description": "The recurring per-cycle amount, in price_currency's minor units. price, cap, and budget share one unit system; fiat figures convert to exact-out token amounts at subscribe/charge time via a quote, never pre-converted here. At most 9007199254740991."
          },
          "price_currency": {
            "type": "string",
            "nullable": true,
            "description": "ISO-4217 pricing currency. Always set on checkouts created after fiat-only creation shipped; null only on legacy rows."
          },
          "period_duration": {
            "type": "number"
          },
          "cap": {
            "type": "string",
            "nullable": true,
            "description": "Per-charge ceiling, same unit system as price."
          },
          "budget": {
            "type": "string",
            "description": "Per-window spend ceiling, same unit system as price."
          },
          "initial_charge": {
            "type": "boolean"
          },
          "checkout_url": {
            "type": "string"
          },
          "success_url": {
            "type": "string",
            "nullable": true
          },
          "cancel_url": {
            "type": "string",
            "nullable": true
          },
          "return_url": {
            "type": "string",
            "nullable": true
          },
          "metadata": {
            "type": "object",
            "nullable": true,
            "additionalProperties": {
              "nullable": true
            }
          },
          "expires_at": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "completed_at": {
            "type": "string",
            "nullable": true
          },
          "cancelled_at": {
            "type": "string",
            "nullable": true
          },
          "expired_at": {
            "type": "string",
            "nullable": true
          },
          "cancellation_reason": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "object",
          "id",
          "status",
          "onchain_id",
          "subscription_id",
          "business_id",
          "business_name",
          "background_color",
          "primary_color",
          "subscriber",
          "external_customer_id",
          "subscription_options",
          "price",
          "price_currency",
          "period_duration",
          "cap",
          "budget",
          "initial_charge",
          "checkout_url",
          "success_url",
          "cancel_url",
          "return_url",
          "metadata",
          "expires_at",
          "created_at",
          "updated_at",
          "completed_at",
          "cancelled_at",
          "expired_at",
          "cancellation_reason"
        ],
        "example": {
          "object": "subscription_checkout",
          "id": "schk_1234567890abcdef",
          "status": "completed",
          "onchain_id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
          "subscription_id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
          "business_id": "clzk3n8x50000qw3f7h2p9r1b",
          "business_name": "Acme Inc",
          "background_color": "#0f172a",
          "primary_color": "#7c3aed",
          "subscriber": "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21",
          "external_customer_id": "cus_42",
          "subscription_options": [
            {
              "chain": "eip155:1",
              "token": "USDC",
              "subscription_manager_address": "0xa1b2c3d4e5f6789012345678901234567890abcd",
              "relayer_address": "0x9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b"
            },
            {
              "chain": "eip155:137",
              "token": "USDC",
              "subscription_manager_address": "0xb2c3d4e5f67890123456789012345678901234cd",
              "relayer_address": "0x9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b"
            }
          ],
          "price": "250000",
          "price_currency": "ARS",
          "period_duration": 2592000,
          "cap": "1000000",
          "budget": "2500000",
          "initial_charge": true,
          "checkout_url": "https://checkout.exodus.com/subscribe/schk_1234567890abcdef",
          "success_url": "https://merchant.com/subscribed",
          "cancel_url": "https://merchant.com/cancelled",
          "return_url": "https://merchant.com/plans/pro",
          "metadata": {
            "external_plan_ref": "pro_monthly",
            "plan_name": "Pro",
            "plan_description": "Unlimited projects and priority support"
          },
          "expires_at": "2026-05-19T12:05:00Z",
          "created_at": "2026-05-19T12:00:00Z",
          "updated_at": "2026-05-19T12:02:18Z",
          "completed_at": "2026-05-19T12:02:18Z",
          "cancelled_at": null,
          "expired_at": null,
          "cancellation_reason": null
        }
      },
      "Subscription": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "subscription"
            ]
          },
          "id": {
            "type": "string"
          },
          "subscriber": {
            "type": "string"
          },
          "external_customer_id": {
            "type": "string",
            "nullable": true
          },
          "asset": {
            "type": "string",
            "pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\\/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$"
          },
          "token_symbol": {
            "type": "string"
          },
          "token_decimals": {
            "type": "number"
          },
          "cap_amount": {
            "type": "string"
          },
          "price": {
            "type": "string"
          },
          "price_currency": {
            "type": "string",
            "nullable": true
          },
          "period_duration": {
            "type": "number"
          },
          "last_charged_at": {
            "type": "string",
            "nullable": true
          },
          "next_charge_at": {
            "type": "string",
            "nullable": true
          },
          "charge_nonce": {
            "type": "number"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "cancelling",
              "cancelled"
            ]
          },
          "paused": {
            "type": "boolean",
            "description": "Deprecated: always `false`, will be removed. A failed charge does not pause the subscription. Classify failures by the charge `failure_reason` and retry on your own schedule.",
            "deprecated": true
          },
          "flagged": {
            "type": "boolean"
          },
          "budget": {
            "type": "string",
            "nullable": true
          },
          "spent_this_period": {
            "type": "string",
            "nullable": true
          },
          "remaining_budget": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string"
          }
        },
        "required": [
          "object",
          "id",
          "subscriber",
          "external_customer_id",
          "asset",
          "token_symbol",
          "token_decimals",
          "cap_amount",
          "price",
          "price_currency",
          "period_duration",
          "last_charged_at",
          "next_charge_at",
          "charge_nonce",
          "status",
          "paused",
          "flagged",
          "budget",
          "spent_this_period",
          "remaining_budget",
          "created_at"
        ],
        "example": {
          "object": "subscription",
          "id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
          "subscriber": "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21",
          "external_customer_id": "cus_42",
          "asset": "eip155:1/erc20:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
          "token_symbol": "USDC",
          "token_decimals": 6,
          "cap_amount": "120000000",
          "price": "1250000",
          "price_currency": "ARS",
          "period_duration": 2592000,
          "last_charged_at": "2026-04-19T12:02:18Z",
          "next_charge_at": "2026-05-19T12:02:18Z",
          "charge_nonce": 3,
          "status": "active",
          "paused": false,
          "flagged": false,
          "budget": "300000000",
          "spent_this_period": "29970000",
          "remaining_budget": "270030000",
          "created_at": "2026-02-19T12:02:18Z"
        }
      },
      "SubscriptionDetail": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "subscription"
            ]
          },
          "id": {
            "type": "string"
          },
          "subscriber": {
            "type": "string"
          },
          "external_customer_id": {
            "type": "string",
            "nullable": true
          },
          "asset": {
            "type": "string",
            "pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\\/[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}$"
          },
          "token_symbol": {
            "type": "string"
          },
          "token_decimals": {
            "type": "number"
          },
          "cap_amount": {
            "type": "string"
          },
          "price": {
            "type": "string"
          },
          "price_currency": {
            "type": "string",
            "nullable": true
          },
          "period_duration": {
            "type": "number"
          },
          "last_charged_at": {
            "type": "string",
            "nullable": true
          },
          "next_charge_at": {
            "type": "string",
            "nullable": true
          },
          "charge_nonce": {
            "type": "number"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "cancelling",
              "cancelled"
            ]
          },
          "paused": {
            "type": "boolean",
            "description": "Deprecated: always `false`, will be removed. A failed charge does not pause the subscription. Classify failures by the charge `failure_reason` and retry on your own schedule.",
            "deprecated": true
          },
          "flagged": {
            "type": "boolean"
          },
          "budget": {
            "type": "string",
            "nullable": true
          },
          "spent_this_period": {
            "type": "string",
            "nullable": true
          },
          "remaining_budget": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string"
          },
          "subscription_manager_address": {
            "type": "string"
          },
          "chain": {
            "type": "string"
          },
          "cancel_url": {
            "type": "string",
            "nullable": true
          },
          "subscription_checkout_id": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "object",
          "id",
          "subscriber",
          "external_customer_id",
          "asset",
          "token_symbol",
          "token_decimals",
          "cap_amount",
          "price",
          "price_currency",
          "period_duration",
          "last_charged_at",
          "next_charge_at",
          "charge_nonce",
          "status",
          "paused",
          "flagged",
          "budget",
          "spent_this_period",
          "remaining_budget",
          "created_at",
          "subscription_manager_address",
          "chain",
          "cancel_url",
          "subscription_checkout_id"
        ],
        "example": {
          "object": "subscription",
          "id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
          "subscriber": "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21",
          "external_customer_id": "cus_42",
          "asset": "eip155:1/erc20:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
          "token_symbol": "USDC",
          "token_decimals": 6,
          "cap_amount": "120000000",
          "price": "1250000",
          "price_currency": "ARS",
          "period_duration": 2592000,
          "last_charged_at": "2026-04-19T12:02:18Z",
          "next_charge_at": "2026-05-19T12:02:18Z",
          "charge_nonce": 3,
          "status": "active",
          "paused": false,
          "flagged": false,
          "budget": "300000000",
          "spent_this_period": "29970000",
          "remaining_budget": "270030000",
          "created_at": "2026-02-19T12:02:18Z",
          "subscription_manager_address": "0xa1b2c3d4e5f6789012345678901234567890abcd",
          "chain": "eip155:1",
          "cancel_url": "https://merchant.com/cancelled",
          "subscription_checkout_id": "schk_1234567890abcdef"
        }
      },
      "WebhookEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "event"
            ]
          },
          "type": {
            "type": "string"
          },
          "delivered": {
            "type": "boolean"
          },
          "attempts": {
            "type": "number"
          },
          "last_error": {
            "type": "string",
            "nullable": true
          },
          "subscription_id": {
            "type": "string",
            "nullable": true
          },
          "subscription_checkout_id": {
            "type": "string",
            "nullable": true
          },
          "checkout_id": {
            "type": "string",
            "nullable": true
          },
          "payment_id": {
            "type": "string",
            "nullable": true
          },
          "payload": {
            "nullable": true
          },
          "created_at": {
            "type": "string"
          },
          "delivered_at": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "id",
          "object",
          "type",
          "delivered",
          "attempts",
          "last_error",
          "subscription_id",
          "subscription_checkout_id",
          "checkout_id",
          "payment_id",
          "created_at",
          "delivered_at"
        ],
        "example": {
          "id": "evt_1234567890abcdef",
          "object": "event",
          "type": "payment.settled",
          "delivered": true,
          "attempts": 1,
          "last_error": null,
          "subscription_id": null,
          "subscription_checkout_id": null,
          "checkout_id": "chk_1234567890abcdef",
          "payment_id": "tz4a98xxat96iws9zmbrgj3a",
          "payload": {
            "id": "evt_1234567890abcdef",
            "object": "event",
            "type": "payment.settled",
            "created_at": "2024-01-15T12:30:00Z",
            "data": {
              "object": {
                "id": "tz4a98xxat96iws9zmbrgj3a",
                "object": "payment",
                "status": "settled"
              }
            }
          },
          "created_at": "2024-01-15T12:30:00Z",
          "delivered_at": "2024-01-15T12:30:01Z"
        }
      }
    },
    "parameters": {}
  },
  "paths": {
    "/merchants/{merchantId}/charges": {
      "get": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "listCharges",
        "summary": "List a merchant's subscription charges",
        "description": "List a merchant's subscription charges — both succeeded and failed — in descending ingestion order. Use for health dashboards, dunning workflows (filter `status=failed`), and reconciliation. Filter by subscription, subscriber, status, chain, and date range.",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "merchantId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Rows per page, 1 to 100. Defaults to 50. Values outside the range are rejected rather than clamped."
            },
            "required": false,
            "description": "Rows per page, 1 to 100. Defaults to 50. Values outside the range are rejected rather than clamped.",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Cursor for forward pagination: an object id from a previous page. Returns results after it. Mutually exclusive with `ending_before`; sending both is a 400."
            },
            "required": false,
            "description": "Cursor for forward pagination: an object id from a previous page. Returns results after it. Mutually exclusive with `ending_before`; sending both is a 400.",
            "name": "starting_after",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Cursor for backward pagination: an object id from a previous page. Returns results before it. Mutually exclusive with `starting_after`; sending both is a 400."
            },
            "required": false,
            "description": "Cursor for backward pagination: an object id from a previous page. Returns results before it. Mutually exclusive with `starting_after`; sending both is a 400.",
            "name": "ending_before",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^0x[a-fA-F0-9]{40}$"
            },
            "required": false,
            "name": "subscriber",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": false,
            "name": "subscription_id",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "required": false,
            "name": "external_customer_id",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$"
            },
            "required": false,
            "name": "chain",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "from",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "to",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "succeeded",
                "failed"
              ]
            },
            "required": false,
            "name": "status",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of subscription charges.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Charge"
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "has_more"
                  ],
                  "example": {
                    "object": "list",
                    "data": [
                      {
                        "object": "subscription_charge",
                        "id": "subc_6789abcdef012345",
                        "subscription_id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
                        "subscriber": "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21",
                        "external_customer_id": "cus_42",
                        "token_symbol": "USDC",
                        "token_decimals": 6,
                        "amount": "9990000",
                        "fee": "0",
                        "fiat_amount": "1250000",
                        "fiat_currency": "ARS",
                        "settlement_status": "completed",
                        "tx_hash": "0x8a9c67b2d1e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9",
                        "chain": "eip155:1",
                        "charge_nonce": 3,
                        "charged_at": "2026-05-19T12:02:18Z",
                        "status": "succeeded",
                        "failure_reason": null,
                        "block_number": "12346789",
                        "metadata": {
                          "invoice_id": "inv_202605"
                        },
                        "created_at": "2026-05-19T12:02:18Z"
                      }
                    ],
                    "has_more": false
                  }
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "object": "subscription_charge",
                      "id": "subc_6789abcdef012345",
                      "subscription_id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
                      "subscriber": "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21",
                      "external_customer_id": "cus_42",
                      "token_symbol": "USDC",
                      "token_decimals": 6,
                      "amount": "9990000",
                      "fee": "0",
                      "fiat_amount": "1250000",
                      "fiat_currency": "ARS",
                      "settlement_status": "completed",
                      "tx_hash": "0x8a9c67b2d1e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9",
                      "chain": "eip155:1",
                      "charge_nonce": 3,
                      "charged_at": "2026-05-19T12:02:18Z",
                      "status": "succeeded",
                      "failure_reason": null,
                      "block_number": "12346789",
                      "metadata": {
                        "invoice_id": "inv_202605"
                      },
                      "created_at": "2026-05-19T12:02:18Z"
                    }
                  ],
                  "has_more": false
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "starting_after and ending_before are mutually exclusive",
                    "param": "ending_before"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/merchants/{merchantId}/charges/{chargeId}": {
      "patch": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "updateChargeMetadata",
        "summary": "Update a subscription charge's metadata",
        "description": "Replace the metadata object on a subscription charge. Use this to attach a reconciliation reference (invoice, order, or ledger id) after the fact — in particular when a charge relay request failed after the on-chain charge settled, so the metadata never persisted. Discover the charge via the list endpoint (filter by `subscription_id`, match on `charge_nonce` or `tx_hash`). The metadata is replaced wholesale, not merged; send `{ \"metadata\": {} }` to clear it.",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "merchantId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "chargeId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "description": "Flat map of merchant-defined references. Up to 50 keys; keys up to 40 characters; values are strings up to 500 characters (nested values are rejected)."
                  }
                },
                "required": [
                  "metadata"
                ],
                "example": {
                  "metadata": {
                    "invoice_id": "inv_202605"
                  }
                }
              },
              "example": {
                "metadata": {
                  "invoice_id": "inv_202605"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The charge with its updated metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Charge"
                },
                "example": {
                  "object": "subscription_charge",
                  "id": "subc_6789abcdef012345",
                  "subscription_id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
                  "subscriber": "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21",
                  "external_customer_id": "cus_42",
                  "token_symbol": "USDC",
                  "token_decimals": 6,
                  "amount": "9990000",
                  "fee": "0",
                  "fiat_amount": "1250000",
                  "fiat_currency": "ARS",
                  "settlement_status": "completed",
                  "tx_hash": "0x8a9c67b2d1e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9",
                  "chain": "eip155:1",
                  "charge_nonce": 3,
                  "charged_at": "2026-05-19T12:02:18Z",
                  "status": "succeeded",
                  "failure_reason": null,
                  "block_number": "12346789",
                  "metadata": {
                    "invoice_id": "inv_202605"
                  },
                  "created_at": "2026-05-19T12:02:18Z"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "not_found",
                    "message": "Payment not found"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/checkouts": {
      "post": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "createCheckout",
        "summary": "Create a checkout",
        "description": "Create a checkout session for a one-time stablecoin payment. Returns a `checkout_url` to redirect the customer to the hosted payment page. Direct payments require a `signatures` array whose shared deploy deadline is at least 30 minutes ahead; two-step payments need no signature at creation, accept an optional `expires_at`, and when it is omitted expire two hours after creation, or after the fiat-settlement window for a fiat-settled checkout.",
        "tags": [
          "Checkouts"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "integer",
                    "maximum": 9007199254740991,
                    "minimum": 0,
                    "exclusiveMinimum": true,
                    "description": "Amount in the currency's minor units (5000 is 50.00 USD). At most 9007199254740991. A fiat-settled business has a settlement floor of 1.00 USD, or the provider's higher minimum."
                  },
                  "currency": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 3,
                    "description": "ISO 4217 currency of `amount`, which is in its minor units (cents for USD, centavos for ARS; CLP has no minor unit, so CLP 15,000 is 15000). Crypto-settled businesses price in USD, ARS, BRL, COP, UYU, CLP, VES, MXN, BOB and PEN. Fiat-settled businesses price in their settlement currency."
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "success_url": {
                    "type": "string",
                    "description": "Where to redirect the customer after a successful payment. Automatic countdown redirect and the primary CTA on the completed screen."
                  },
                  "cancel_url": {
                    "type": "string",
                    "description": "Where to redirect the customer if the checkout was actually cancelled. Also used on the expired/failed terminal screens."
                  },
                  "return_url": {
                    "type": "string",
                    "description": "Where to send the customer if they leave a still-pending checkout. Purely navigational — no side effects. Distinct from cancel_url (the checkout was actually cancelled) and success_url (the post-payment confirmation destination)."
                  },
                  "customer_email": {
                    "type": "string",
                    "format": "email"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "description": "Flat map of merchant-defined references. Up to 50 keys; keys up to 40 characters; values are strings up to 500 characters (nested values are rejected)."
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "payment_method": {
                    "type": "string",
                    "enum": [
                      "direct",
                      "two_step"
                    ]
                  },
                  "signatures": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "chain_family": {
                          "type": "string",
                          "enum": [
                            "evm",
                            "solana"
                          ]
                        },
                        "token": {
                          "type": "string",
                          "enum": [
                            "USDT",
                            "USDC",
                            "XO"
                          ]
                        },
                        "on_chain_id": {
                          "type": "string",
                          "pattern": "^0x[0-9a-fA-F]{64}$"
                        },
                        "signature": {
                          "type": "string"
                        },
                        "deadline": {
                          "type": "integer",
                          "minimum": 0,
                          "exclusiveMinimum": true
                        }
                      },
                      "required": [
                        "chain_family",
                        "on_chain_id",
                        "signature",
                        "deadline"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "quote_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "currency",
                  "payment_method"
                ],
                "additionalProperties": false,
                "example": {
                  "amount": 5000,
                  "currency": "USD",
                  "description": "Premium Plan - Monthly",
                  "payment_method": "two_step",
                  "success_url": "https://yoursite.com/success",
                  "cancel_url": "https://yoursite.com/cancel",
                  "return_url": "https://yoursite.com/products/premium-plan",
                  "customer_email": "customer@example.com",
                  "metadata": {
                    "order_id": "12345"
                  }
                }
              },
              "example": {
                "amount": 5000,
                "currency": "USD",
                "description": "Premium Plan - Monthly",
                "payment_method": "two_step",
                "success_url": "https://yoursite.com/success",
                "cancel_url": "https://yoursite.com/cancel",
                "return_url": "https://yoursite.com/products/premium-plan",
                "customer_email": "customer@example.com",
                "metadata": {
                  "order_id": "12345"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created checkout.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Checkout"
                },
                "example": {
                  "id": "chk_1234567890abcdef",
                  "object": "checkout",
                  "amount": 5000,
                  "currency": "USD",
                  "description": "Premium Plan - Monthly",
                  "status": "completed",
                  "checkout_url": "https://checkout.exodus.com/pay/chk_1234567890abcdef",
                  "success_url": "https://yoursite.com/success",
                  "cancel_url": "https://yoursite.com/cancel",
                  "return_url": "https://yoursite.com/products/premium-plan",
                  "customer_email": "customer@example.com",
                  "metadata": {
                    "order_id": "12345",
                    "product_name": "Premium Plan"
                  },
                  "expires_at": "2024-01-16T12:00:00Z",
                  "created_at": "2024-01-15T12:00:00Z",
                  "payments": [
                    {
                      "id": "tz4a98xxat96iws9zmbrgj3a",
                      "object": "payment",
                      "status": "settled",
                      "payment_method": "two_step",
                      "detected_asset": "eip155:1/erc20:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
                      "detected_token_symbol": "USDC",
                      "detected_chain": "eip155:1",
                      "token_amount": "50000000",
                      "token_amount_decimal": "50",
                      "deposit_address": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
                      "payer_addresses": [
                        "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21"
                      ],
                      "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                      "factory_address": "0x2f1c4e7b9a3d5c8e6f0a1b2c3d4e5f6a7b8c9d0e",
                      "payment_options": [
                        {
                          "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                          "deposit_address": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
                          "chain_family": "evm",
                          "token": "USDC"
                        }
                      ],
                      "created_at": "2024-01-15T12:30:00Z",
                      "flagged": false
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "listCheckouts",
        "summary": "List checkouts",
        "description": "Retrieve a paginated list of checkouts, most recent first. Filter by status and creation-date range.",
        "tags": [
          "Checkouts"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Rows per page, 1 to 100. Defaults to 50. Values outside the range are rejected rather than clamped."
            },
            "required": false,
            "description": "Rows per page, 1 to 100. Defaults to 50. Values outside the range are rejected rather than clamped.",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Cursor for forward pagination: an object id from a previous page. Returns results after it. Mutually exclusive with `ending_before`; sending both is a 400."
            },
            "required": false,
            "description": "Cursor for forward pagination: an object id from a previous page. Returns results after it. Mutually exclusive with `ending_before`; sending both is a 400.",
            "name": "starting_after",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Cursor for backward pagination: an object id from a previous page. Returns results before it. Mutually exclusive with `starting_after`; sending both is a 400."
            },
            "required": false,
            "description": "Cursor for backward pagination: an object id from a previous page. Returns results before it. Mutually exclusive with `starting_after`; sending both is a 400.",
            "name": "ending_before",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "completed",
                "expired",
                "cancelled"
              ]
            },
            "required": false,
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "created_gte",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "created_lte",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of checkouts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Checkout"
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "has_more"
                  ],
                  "example": {
                    "object": "list",
                    "data": [
                      {
                        "id": "chk_1234567890abcdef",
                        "object": "checkout",
                        "amount": 5000,
                        "currency": "USD",
                        "description": "Premium Plan - Monthly",
                        "status": "completed",
                        "checkout_url": "https://checkout.exodus.com/pay/chk_1234567890abcdef",
                        "success_url": "https://yoursite.com/success",
                        "cancel_url": "https://yoursite.com/cancel",
                        "return_url": "https://yoursite.com/products/premium-plan",
                        "customer_email": "customer@example.com",
                        "metadata": {
                          "order_id": "12345",
                          "product_name": "Premium Plan"
                        },
                        "expires_at": "2024-01-16T12:00:00Z",
                        "created_at": "2024-01-15T12:00:00Z",
                        "payments": [
                          {
                            "id": "tz4a98xxat96iws9zmbrgj3a",
                            "object": "payment",
                            "status": "settled",
                            "payment_method": "two_step",
                            "detected_asset": "eip155:1/erc20:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
                            "detected_token_symbol": "USDC",
                            "detected_chain": "eip155:1",
                            "token_amount": "50000000",
                            "token_amount_decimal": "50",
                            "deposit_address": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
                            "payer_addresses": [
                              "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21"
                            ],
                            "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                            "factory_address": "0x2f1c4e7b9a3d5c8e6f0a1b2c3d4e5f6a7b8c9d0e",
                            "payment_options": [
                              {
                                "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                                "deposit_address": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
                                "chain_family": "evm",
                                "token": "USDC"
                              }
                            ],
                            "created_at": "2024-01-15T12:30:00Z",
                            "flagged": false
                          }
                        ]
                      }
                    ],
                    "has_more": false
                  }
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "id": "chk_1234567890abcdef",
                      "object": "checkout",
                      "amount": 5000,
                      "currency": "USD",
                      "description": "Premium Plan - Monthly",
                      "status": "completed",
                      "checkout_url": "https://checkout.exodus.com/pay/chk_1234567890abcdef",
                      "success_url": "https://yoursite.com/success",
                      "cancel_url": "https://yoursite.com/cancel",
                      "return_url": "https://yoursite.com/products/premium-plan",
                      "customer_email": "customer@example.com",
                      "metadata": {
                        "order_id": "12345",
                        "product_name": "Premium Plan"
                      },
                      "expires_at": "2024-01-16T12:00:00Z",
                      "created_at": "2024-01-15T12:00:00Z",
                      "payments": [
                        {
                          "id": "tz4a98xxat96iws9zmbrgj3a",
                          "object": "payment",
                          "status": "settled",
                          "payment_method": "two_step",
                          "detected_asset": "eip155:1/erc20:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
                          "detected_token_symbol": "USDC",
                          "detected_chain": "eip155:1",
                          "token_amount": "50000000",
                          "token_amount_decimal": "50",
                          "deposit_address": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
                          "payer_addresses": [
                            "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21"
                          ],
                          "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                          "factory_address": "0x2f1c4e7b9a3d5c8e6f0a1b2c3d4e5f6a7b8c9d0e",
                          "payment_options": [
                            {
                              "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                              "deposit_address": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
                              "chain_family": "evm",
                              "token": "USDC"
                            }
                          ],
                          "created_at": "2024-01-15T12:30:00Z",
                          "flagged": false
                        }
                      ]
                    }
                  ],
                  "has_more": false
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "starting_after and ending_before are mutually exclusive",
                    "param": "ending_before"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/checkouts/{checkoutId}": {
      "get": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "getCheckout",
        "summary": "Retrieve a checkout",
        "description": "Retrieve a single checkout by ID to check its status or read transaction details after completion.",
        "tags": [
          "Checkouts"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "checkoutId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The requested checkout.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Checkout"
                },
                "example": {
                  "id": "chk_1234567890abcdef",
                  "object": "checkout",
                  "amount": 5000,
                  "currency": "USD",
                  "description": "Premium Plan - Monthly",
                  "status": "completed",
                  "checkout_url": "https://checkout.exodus.com/pay/chk_1234567890abcdef",
                  "success_url": "https://yoursite.com/success",
                  "cancel_url": "https://yoursite.com/cancel",
                  "return_url": "https://yoursite.com/products/premium-plan",
                  "customer_email": "customer@example.com",
                  "metadata": {
                    "order_id": "12345",
                    "product_name": "Premium Plan"
                  },
                  "expires_at": "2024-01-16T12:00:00Z",
                  "created_at": "2024-01-15T12:00:00Z",
                  "payments": [
                    {
                      "id": "tz4a98xxat96iws9zmbrgj3a",
                      "object": "payment",
                      "status": "settled",
                      "payment_method": "two_step",
                      "detected_asset": "eip155:1/erc20:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
                      "detected_token_symbol": "USDC",
                      "detected_chain": "eip155:1",
                      "token_amount": "50000000",
                      "token_amount_decimal": "50",
                      "deposit_address": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
                      "payer_addresses": [
                        "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21"
                      ],
                      "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                      "factory_address": "0x2f1c4e7b9a3d5c8e6f0a1b2c3d4e5f6a7b8c9d0e",
                      "payment_options": [
                        {
                          "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                          "deposit_address": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
                          "chain_family": "evm",
                          "token": "USDC"
                        }
                      ],
                      "created_at": "2024-01-15T12:30:00Z",
                      "flagged": false
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "not_found",
                    "message": "Payment not found"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/checkouts/{checkoutId}/cancel": {
      "post": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "cancelCheckout",
        "summary": "Cancel a checkout",
        "description": "Cancel a pending checkout. Any associated payment cascades to `cancelled` and a `payment.cancelled` webhook fires. Cancellation is blocked once on-chain funds are observed — the deposit must settle or expire first.",
        "tags": [
          "Checkouts"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "checkoutId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The cancelled checkout.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Checkout"
                },
                "example": {
                  "id": "chk_1234567890abcdef",
                  "object": "checkout",
                  "amount": 5000,
                  "currency": "USD",
                  "description": "Premium Plan - Monthly",
                  "status": "completed",
                  "checkout_url": "https://checkout.exodus.com/pay/chk_1234567890abcdef",
                  "success_url": "https://yoursite.com/success",
                  "cancel_url": "https://yoursite.com/cancel",
                  "return_url": "https://yoursite.com/products/premium-plan",
                  "customer_email": "customer@example.com",
                  "metadata": {
                    "order_id": "12345",
                    "product_name": "Premium Plan"
                  },
                  "expires_at": "2024-01-16T12:00:00Z",
                  "created_at": "2024-01-15T12:00:00Z",
                  "payments": [
                    {
                      "id": "tz4a98xxat96iws9zmbrgj3a",
                      "object": "payment",
                      "status": "settled",
                      "payment_method": "two_step",
                      "detected_asset": "eip155:1/erc20:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
                      "detected_token_symbol": "USDC",
                      "detected_chain": "eip155:1",
                      "token_amount": "50000000",
                      "token_amount_decimal": "50",
                      "deposit_address": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
                      "payer_addresses": [
                        "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21"
                      ],
                      "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                      "factory_address": "0x2f1c4e7b9a3d5c8e6f0a1b2c3d4e5f6a7b8c9d0e",
                      "payment_options": [
                        {
                          "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                          "deposit_address": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
                          "chain_family": "evm",
                          "token": "USDC"
                        }
                      ],
                      "created_at": "2024-01-15T12:30:00Z",
                      "flagged": false
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "not_found",
                    "message": "Payment not found"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/checkouts/quote": {
      "post": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "createCheckoutQuote",
        "summary": "Create a settlement quote",
        "description": "Lock token-specific exchange rates for a fiat-denominated checkout. Pass the returned `quote_id` when creating a checkout with token-specific signatures.",
        "tags": [
          "Checkouts"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "integer",
                    "maximum": 9007199254740991,
                    "minimum": 0,
                    "exclusiveMinimum": true,
                    "description": "Amount in the currency's minor units (5000 is 50.00 USD). At most 9007199254740991. A fiat-settled business has a settlement floor of 1.00 USD, or the provider's higher minimum."
                  },
                  "currency": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "amount",
                  "currency"
                ],
                "example": {
                  "amount": 5000,
                  "currency": "USD"
                }
              },
              "example": {
                "amount": 5000,
                "currency": "USD"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A quote with locked token rates.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "quote_id": {
                      "type": "string"
                    },
                    "amount": {
                      "type": "number"
                    },
                    "currency": {
                      "type": "string"
                    },
                    "tokens": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "amount": {
                            "type": "string"
                          },
                          "canonical_amount": {
                            "type": "string"
                          },
                          "rate": {
                            "type": "string"
                          },
                          "expires_at": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "amount",
                          "canonical_amount",
                          "rate",
                          "expires_at"
                        ]
                      }
                    }
                  },
                  "required": [
                    "quote_id",
                    "amount",
                    "currency",
                    "tokens"
                  ],
                  "example": {
                    "quote_id": "quote_1234567890abcdef",
                    "amount": 5000,
                    "currency": "USD",
                    "tokens": {
                      "USDC": {
                        "amount": "50000000",
                        "canonical_amount": "50",
                        "rate": "1.0",
                        "expires_at": "2024-01-15T12:05:00Z"
                      }
                    }
                  }
                },
                "example": {
                  "quote_id": "quote_1234567890abcdef",
                  "amount": 5000,
                  "currency": "USD",
                  "tokens": {
                    "USDC": {
                      "amount": "50000000",
                      "canonical_amount": "50",
                      "rate": "1.0",
                      "expires_at": "2024-01-15T12:05:00Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/payments": {
      "get": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "listPayments",
        "summary": "List payments",
        "description": "Retrieve a paginated list of payments, most recent first. Filter by status, checkout, payment method, and creation-date range.",
        "tags": [
          "Payments"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Rows per page, 1 to 100. Defaults to 50. Values outside the range are rejected rather than clamped."
            },
            "required": false,
            "description": "Rows per page, 1 to 100. Defaults to 50. Values outside the range are rejected rather than clamped.",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Cursor for forward pagination: an object id from a previous page. Returns results after it. Mutually exclusive with `ending_before`; sending both is a 400."
            },
            "required": false,
            "description": "Cursor for forward pagination: an object id from a previous page. Returns results after it. Mutually exclusive with `ending_before`; sending both is a 400.",
            "name": "starting_after",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Cursor for backward pagination: an object id from a previous page. Returns results before it. Mutually exclusive with `starting_after`; sending both is a 400."
            },
            "required": false,
            "description": "Cursor for backward pagination: an object id from a previous page. Returns results before it. Mutually exclusive with `starting_after`; sending both is a 400.",
            "name": "ending_before",
            "in": "query"
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "client_deposit_pending",
                  "client_deposit_detected",
                  "client_deposit_confirmed",
                  "client_deposit_expired",
                  "escrow_confirmed",
                  "settlement_pending",
                  "settled",
                  "failed",
                  "refunded",
                  "cancelled"
                ]
              }
            },
            "required": false,
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "checkout_id",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "direct",
                "two_step"
              ]
            },
            "required": false,
            "name": "payment_method",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "created_gte",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "created_lte",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of payments.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Payment"
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "has_more"
                  ],
                  "example": {
                    "object": "list",
                    "data": [
                      {
                        "id": "tz4a98xxat96iws9zmbrgj3a",
                        "object": "payment",
                        "status": "settled",
                        "payment_method": "two_step",
                        "detected_asset": "eip155:1/erc20:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
                        "detected_token_symbol": "USDC",
                        "detected_chain": "eip155:1",
                        "token_amount": "50000000",
                        "token_amount_decimal": "50",
                        "deposit_address": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
                        "payer_addresses": [
                          "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21"
                        ],
                        "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                        "factory_address": "0x2f1c4e7b9a3d5c8e6f0a1b2c3d4e5f6a7b8c9d0e",
                        "payment_options": [
                          {
                            "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                            "deposit_address": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
                            "chain_family": "evm",
                            "token": "USDC"
                          }
                        ],
                        "created_at": "2024-01-15T12:30:00Z",
                        "flagged": false
                      }
                    ],
                    "has_more": false
                  }
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "id": "tz4a98xxat96iws9zmbrgj3a",
                      "object": "payment",
                      "status": "settled",
                      "payment_method": "two_step",
                      "detected_asset": "eip155:1/erc20:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
                      "detected_token_symbol": "USDC",
                      "detected_chain": "eip155:1",
                      "token_amount": "50000000",
                      "token_amount_decimal": "50",
                      "deposit_address": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
                      "payer_addresses": [
                        "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21"
                      ],
                      "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                      "factory_address": "0x2f1c4e7b9a3d5c8e6f0a1b2c3d4e5f6a7b8c9d0e",
                      "payment_options": [
                        {
                          "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                          "deposit_address": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
                          "chain_family": "evm",
                          "token": "USDC"
                        }
                      ],
                      "created_at": "2024-01-15T12:30:00Z",
                      "flagged": false
                    }
                  ],
                  "has_more": false
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "starting_after and ending_before are mutually exclusive",
                    "param": "ending_before"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/payments/{id}": {
      "get": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "getPayment",
        "summary": "Retrieve a payment",
        "description": "Retrieve a single payment by ID, including its current status, the token and chain detected on-chain, and the contract deposit address.",
        "tags": [
          "Payments"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The requested payment.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                },
                "example": {
                  "id": "tz4a98xxat96iws9zmbrgj3a",
                  "object": "payment",
                  "status": "settled",
                  "payment_method": "two_step",
                  "detected_asset": "eip155:1/erc20:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
                  "detected_token_symbol": "USDC",
                  "detected_chain": "eip155:1",
                  "token_amount": "50000000",
                  "token_amount_decimal": "50",
                  "deposit_address": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
                  "payer_addresses": [
                    "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21"
                  ],
                  "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                  "factory_address": "0x2f1c4e7b9a3d5c8e6f0a1b2c3d4e5f6a7b8c9d0e",
                  "payment_options": [
                    {
                      "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                      "deposit_address": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
                      "chain_family": "evm",
                      "token": "USDC"
                    }
                  ],
                  "created_at": "2024-01-15T12:30:00Z",
                  "flagged": false
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "not_found",
                    "message": "Payment not found"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/payments/{id}/capture": {
      "post": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "capturePayment",
        "summary": "Capture a two-step payment",
        "description": "Capture an authorized two-step payment, releasing the escrowed funds to your settlement address. Only valid for payments created with `payment_method: two_step`. Requires a signed request (`signCapture()` from `@exodus/checkout-signer`); a compliance screen runs before funds move.",
        "tags": [
          "Payments"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "deadline": {
                    "type": "integer",
                    "minimum": 0,
                    "exclusiveMinimum": true
                  }
                },
                "required": [
                  "deadline"
                ],
                "example": {
                  "deadline": 1798761600
                }
              },
              "example": {
                "deadline": 1798761600
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The captured payment.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                },
                "example": {
                  "id": "tz4a98xxat96iws9zmbrgj3a",
                  "object": "payment",
                  "status": "settled",
                  "payment_method": "two_step",
                  "detected_asset": "eip155:1/erc20:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
                  "detected_token_symbol": "USDC",
                  "detected_chain": "eip155:1",
                  "token_amount": "50000000",
                  "token_amount_decimal": "50",
                  "deposit_address": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
                  "payer_addresses": [
                    "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21"
                  ],
                  "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                  "factory_address": "0x2f1c4e7b9a3d5c8e6f0a1b2c3d4e5f6a7b8c9d0e",
                  "payment_options": [
                    {
                      "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                      "deposit_address": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
                      "chain_family": "evm",
                      "token": "USDC"
                    }
                  ],
                  "created_at": "2024-01-15T12:30:00Z",
                  "flagged": false
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "not_found",
                    "message": "Payment not found"
                  }
                }
              }
            }
          },
          "504": {
            "description": "`code: tx_pending`: the transaction was broadcast but the relay could not read its receipt within the wait (the wait timed out, or the RPC failed while polling). `data` carries `payment_id` and `tx_hash`. Retry the same request after the transaction confirms to record the result; a retry after the signed `deadline` needs a fresh signature. The retry returns the payment with `tx_hash: null`, so keep the hash from this response. If the transaction reverts or never mines instead, nothing is recorded and the payment stays `escrow_confirmed`, so you can send the same request again (with a fresh signature after the signed `deadline`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "invalid_request",
                    "message": "The transaction was broadcast but has not confirmed yet. Retry the same request after it confirms to record the result; a retry after the deadline needs a fresh signature. The retry returns the payment with tx_hash null, so keep the hash from this response.",
                    "code": "tx_pending",
                    "data": {
                      "payment_id": "tz4a98xxat96iws9zmbrgj3a",
                      "tx_hash": "0x9999999999999999999999999999999999999999999999999999999999999999"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/payments/{id}/refund": {
      "post": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "refundPayment",
        "summary": "Refund a payment",
        "description": "Refund a two-step payment, returning funds to the customer's wallet. Only valid for payments created with `payment_method: two_step`. Requires a signed request (`signRefund()`); the destination address is part of the signature and is screened before funds move.",
        "tags": [
          "Payments"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "destination": {
                    "type": "string"
                  },
                  "deadline": {
                    "type": "integer",
                    "minimum": 0,
                    "exclusiveMinimum": true
                  }
                },
                "required": [
                  "destination",
                  "deadline"
                ],
                "example": {
                  "destination": "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21",
                  "deadline": 1798761600
                }
              },
              "example": {
                "destination": "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21",
                "deadline": 1798761600
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The refunded payment.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                },
                "example": {
                  "id": "tz4a98xxat96iws9zmbrgj3a",
                  "object": "payment",
                  "status": "settled",
                  "payment_method": "two_step",
                  "detected_asset": "eip155:1/erc20:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
                  "detected_token_symbol": "USDC",
                  "detected_chain": "eip155:1",
                  "token_amount": "50000000",
                  "token_amount_decimal": "50",
                  "deposit_address": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
                  "payer_addresses": [
                    "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21"
                  ],
                  "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                  "factory_address": "0x2f1c4e7b9a3d5c8e6f0a1b2c3d4e5f6a7b8c9d0e",
                  "payment_options": [
                    {
                      "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                      "deposit_address": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
                      "chain_family": "evm",
                      "token": "USDC"
                    }
                  ],
                  "created_at": "2024-01-15T12:30:00Z",
                  "flagged": false
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "not_found",
                    "message": "Payment not found"
                  }
                }
              }
            }
          },
          "504": {
            "description": "`code: tx_pending`: the transaction was broadcast but the relay could not read its receipt within the wait (the wait timed out, or the RPC failed while polling). `data` carries `payment_id` and `tx_hash`. Retry the same request after the transaction confirms to record the result; a retry after the signed `deadline` needs a fresh signature. The retry returns the payment with `tx_hash: null`, so keep the hash from this response. If the transaction reverts or never mines instead, nothing is recorded and the payment stays `escrow_confirmed`, so you can send the same request again (with a fresh signature after the signed `deadline`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "invalid_request",
                    "message": "The transaction was broadcast but has not confirmed yet. Retry the same request after it confirms to record the result; a retry after the deadline needs a fresh signature. The retry returns the payment with tx_hash null, so keep the hash from this response.",
                    "code": "tx_pending",
                    "data": {
                      "payment_id": "tz4a98xxat96iws9zmbrgj3a",
                      "tx_hash": "0x9999999999999999999999999999999999999999999999999999999999999999"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/payments/{id}/rescue": {
      "post": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "rescuePayment",
        "summary": "Rescue stranded funds from a payment",
        "description": "Recover excess deposits or wrong tokens from a payment contract by transferring the full token balance to a receiver. Requires a signed request (`signRescue()`); the receiver address is screened before funds move.",
        "tags": [
          "Payments"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string"
                  },
                  "receiver": {
                    "type": "string"
                  },
                  "deadline": {
                    "type": "integer",
                    "minimum": 0,
                    "exclusiveMinimum": true
                  }
                },
                "required": [
                  "token",
                  "receiver",
                  "deadline"
                ],
                "example": {
                  "token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
                  "receiver": "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21",
                  "deadline": 1798761600
                }
              },
              "example": {
                "token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
                "receiver": "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21",
                "deadline": 1798761600
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The payment after rescue.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                },
                "example": {
                  "id": "tz4a98xxat96iws9zmbrgj3a",
                  "object": "payment",
                  "status": "settled",
                  "payment_method": "two_step",
                  "detected_asset": "eip155:1/erc20:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
                  "detected_token_symbol": "USDC",
                  "detected_chain": "eip155:1",
                  "token_amount": "50000000",
                  "token_amount_decimal": "50",
                  "deposit_address": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
                  "payer_addresses": [
                    "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21"
                  ],
                  "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                  "factory_address": "0x2f1c4e7b9a3d5c8e6f0a1b2c3d4e5f6a7b8c9d0e",
                  "payment_options": [
                    {
                      "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                      "deposit_address": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
                      "chain_family": "evm",
                      "token": "USDC"
                    }
                  ],
                  "created_at": "2024-01-15T12:30:00Z",
                  "flagged": false
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "not_found",
                    "message": "Payment not found"
                  }
                }
              }
            }
          },
          "504": {
            "description": "`code: tx_pending`: the transaction was broadcast but the relay could not read its receipt within the wait (the wait timed out, or the RPC failed while polling). `data` carries `payment_id` and `tx_hash`. Do not resubmit: a retry before the signed `deadline` answers 400 `Nothing to rescue at this escrow` once the transaction confirms. If the transaction reverts or never mines instead, nothing is recorded and you can send a new rescue request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "invalid_request",
                    "message": "The transaction was broadcast but has not confirmed yet. Do not resubmit: a retry before the deadline answers 400 \"Nothing to rescue at this escrow\" once it confirms.",
                    "code": "tx_pending",
                    "data": {
                      "payment_id": "tz4a98xxat96iws9zmbrgj3a",
                      "tx_hash": "0x9999999999999999999999999999999999999999999999999999999999999999"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/payments/{id}/recover": {
      "post": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "recoverPayment",
        "summary": "Recover an expired payment to the customer",
        "description": "Return an expired direct payment to the customer's original deposit source. EVM-only, requires a signed request, and needs a single recorded source address.",
        "tags": [
          "Payments"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "deadline": {
                    "type": "integer",
                    "minimum": 0,
                    "exclusiveMinimum": true
                  }
                },
                "required": [
                  "deadline"
                ],
                "example": {
                  "deadline": 1798761600
                }
              },
              "example": {
                "deadline": 1798761600
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The recovered payment.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                },
                "example": {
                  "id": "tz4a98xxat96iws9zmbrgj3a",
                  "object": "payment",
                  "status": "settled",
                  "payment_method": "two_step",
                  "detected_asset": "eip155:1/erc20:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
                  "detected_token_symbol": "USDC",
                  "detected_chain": "eip155:1",
                  "token_amount": "50000000",
                  "token_amount_decimal": "50",
                  "deposit_address": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
                  "payer_addresses": [
                    "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21"
                  ],
                  "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                  "factory_address": "0x2f1c4e7b9a3d5c8e6f0a1b2c3d4e5f6a7b8c9d0e",
                  "payment_options": [
                    {
                      "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                      "deposit_address": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
                      "chain_family": "evm",
                      "token": "USDC"
                    }
                  ],
                  "created_at": "2024-01-15T12:30:00Z",
                  "flagged": false
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "not_found",
                    "message": "Payment not found"
                  }
                }
              }
            }
          },
          "504": {
            "description": "`code: tx_pending`: the transaction was broadcast but the relay could not read its receipt within the wait (the wait timed out, or the RPC failed while polling). `data` carries `payment_id` and `tx_hash`. Recover refunds an `escrow_confirmed` payment and rescues a `settled` one, and the 504 follows that path. After a refund, retry the same request after the transaction confirms to record the result; a retry after the signed `deadline` needs a fresh signature, and the retry returns `tx_hash: null`, so keep the hash from this response. After a rescue, do not resubmit: a retry before the signed `deadline` answers 400 `Nothing to rescue at this escrow` once the transaction confirms. If the transaction reverts or never mines instead, nothing is recorded. After a refund the payment stays `escrow_confirmed` and you can send the same request again (with a fresh signature after the signed `deadline`). After a rescue you can send a new recover request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "invalid_request",
                    "message": "The transaction was broadcast but has not confirmed yet. Retry the same request after it confirms to record the result; a retry after the deadline needs a fresh signature. The retry returns the payment with tx_hash null, so keep the hash from this response.",
                    "code": "tx_pending",
                    "data": {
                      "payment_id": "tz4a98xxat96iws9zmbrgj3a",
                      "tx_hash": "0x9999999999999999999999999999999999999999999999999999999999999999"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/payments/{id}/reopen": {
      "post": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "reopenPayment",
        "summary": "Reopen an expired payment",
        "description": "Re-arm an expired one-shot payment under a new deadline, with or without a recorded deposit, or re-arm a direct payment whose deploy deadline passed after it was funded. Send one signature per entry of the payment object's `payment_options`, all under the same `deadline` (`signReopen()` from `@exodus/checkout-signer` builds the body from the payment object). Signatures verify against the business's current factory (`factory_address`); a payment whose addresses no longer derive from it, after a signer rotation, is refused with `factory_rotated`. Direct payments sign a fresh deploy and need a deadline at least 30 minutes ahead; two-step payments sign a `Reopen` message. Every address is registered again, and the deposits already recorded are judged before the response: one that covers an address funds the payment under the new deadline. The response is the payment object. The status in the response reflects the deposits already recorded. Deposits not yet recorded surface after the reopen through the deposit poll: recent ones (the last 6,000 blocks of each chain, about 25 minutes on Arbitrum One and longer on every other chain) typically within about a minute, one cron tick, and older ones typically within about 50 minutes for each day since the payment was created, for a payment option enabled on every supported mainnet (a little under 6 hours for a payment created a week earlier), twice that for a fiat-settled payment with a USDC and a USDT option, and sooner for a payment on fewer chains. These figures assume approximate published block cadences, 12,000 blocks (24 pages of 500) of catch-up per minute left after the poll's own deposit scan, which for the reopened payment starts at its floor, and one reopened payment in the backlog at a time. A refusal is a 409 `payment_not_reopenable` whose `data.cause` is one of `not_expired` (the payment is not expired, a deploy is in flight, or it changed while reopening; the message names which), `flagged`, `checkout_closed`, `unsupported_method` (defensive, no current payment method reaches it), `solana_not_supported`, `factory_rotated` (the business rotated its signer, so the addresses no longer derive from its current factory, or the signer configuration changed while reopening; the message names the second case), `signer_missing` (the business has no merchant signer configured), `config_invalid` (the business's payment configuration lists no supported chains) or `fiat_settlement_not_reopenable` (the business settles in fiat, so the quoted token amount is tied to a price lock that a reopen cannot honour; the payment stays expired). A 503 `service_unavailable` with `code: chain_unavailable` means the chain could not be reached before anything was written; retry later.",
        "tags": [
          "Payments"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "deadline": {
                    "type": "integer",
                    "minimum": 0,
                    "exclusiveMinimum": true
                  },
                  "signatures": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "on_chain_id": {
                          "type": "string",
                          "pattern": "^0x[0-9a-fA-F]{64}$"
                        },
                        "signature": {
                          "type": "string",
                          "pattern": "^0x[0-9a-fA-F]{130}$"
                        }
                      },
                      "required": [
                        "on_chain_id",
                        "signature"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 1
                  }
                },
                "required": [
                  "deadline",
                  "signatures"
                ],
                "additionalProperties": false,
                "example": {
                  "deadline": 1798761600,
                  "signatures": [
                    {
                      "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                      "signature": "0x8106eb4a89add4e134b91dfd43edc51e9499df687b4f8fd8f5b51e070326abad033e4ad556d1f34cf65da3e547d388f8672dfb0233f1b2c18e774e121c10030e1c"
                    }
                  ]
                }
              },
              "example": {
                "deadline": 1798761600,
                "signatures": [
                  {
                    "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                    "signature": "0x8106eb4a89add4e134b91dfd43edc51e9499df687b4f8fd8f5b51e070326abad033e4ad556d1f34cf65da3e547d388f8672dfb0233f1b2c18e774e121c10030e1c"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reopened payment.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                },
                "example": {
                  "id": "tz4a98xxat96iws9zmbrgj3a",
                  "object": "payment",
                  "status": "settled",
                  "payment_method": "two_step",
                  "detected_asset": "eip155:1/erc20:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
                  "detected_token_symbol": "USDC",
                  "detected_chain": "eip155:1",
                  "token_amount": "50000000",
                  "token_amount_decimal": "50",
                  "deposit_address": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
                  "payer_addresses": [
                    "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21"
                  ],
                  "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                  "factory_address": "0x2f1c4e7b9a3d5c8e6f0a1b2c3d4e5f6a7b8c9d0e",
                  "payment_options": [
                    {
                      "on_chain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                      "deposit_address": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
                      "chain_family": "evm",
                      "token": "USDC"
                    }
                  ],
                  "created_at": "2024-01-15T12:30:00Z",
                  "flagged": false
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "A reopen signature does not verify",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Invalid reopen signature"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "not_found",
                    "message": "Payment not found"
                  }
                }
              }
            }
          },
          "409": {
            "description": "The payment cannot be reopened",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "invalid_request",
                    "message": "Payment cannot be reopened: not_expired (status cancelled)",
                    "code": "payment_not_reopenable",
                    "data": {
                      "payment_id": "tz4a98xxat96iws9zmbrgj3a",
                      "cause": "not_expired"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "The chain could not be reached; nothing was written",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "service_unavailable",
                    "message": "Payment cannot be reopened right now: the chain could not be reached",
                    "code": "chain_unavailable",
                    "data": {
                      "payment_id": "tz4a98xxat96iws9zmbrgj3a"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/payments/settlement": {
      "get": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "listSettlementAddresses",
        "summary": "List on-chain settlement addresses",
        "description": "List the on-chain settlement contract address and current nonce for each configured chain. Use the nonce when signing a settlement-address change.",
        "tags": [
          "Payments"
        ],
        "responses": {
          "200": {
            "description": "The settlement addresses per chain.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "settlements": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "chain": {
                            "type": "string"
                          },
                          "contract_address": {
                            "type": "string"
                          },
                          "nonce": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "chain",
                          "contract_address",
                          "nonce"
                        ]
                      }
                    }
                  },
                  "required": [
                    "settlements"
                  ],
                  "example": {
                    "settlements": [
                      {
                        "chain": "eip155:1",
                        "contract_address": "0x11112222333344445555666677778888999900aa",
                        "nonce": 2
                      },
                      {
                        "chain": "eip155:137",
                        "contract_address": "0xaa009999888877776666555544443333222211bb",
                        "nonce": 0
                      }
                    ]
                  }
                },
                "example": {
                  "settlements": [
                    {
                      "chain": "eip155:1",
                      "contract_address": "0x11112222333344445555666677778888999900aa",
                      "nonce": 2
                    },
                    {
                      "chain": "eip155:137",
                      "contract_address": "0xaa009999888877776666555544443333222211bb",
                      "nonce": 0
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "updateSettlementAddress",
        "summary": "Update an on-chain settlement address",
        "description": "Change the wallet address that captured funds settle to for a chain. Takes effect immediately for future captures. Requires a signed request (`signSettlementChange()`) against the chain's settlement contract and its current nonce, which increments on each successful change. A business has one settlement address across its EVM chains, so rotate every chain. Chains not rotated yet keep accepting subscription charges while their contract still pays the address recorded before this rotation; once every chain pays the new address, only the new address is accepted.",
        "tags": [
          "Payments"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "new_address": {
                    "type": "string"
                  },
                  "chain": {
                    "type": "string",
                    "pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$"
                  }
                },
                "required": [
                  "new_address",
                  "chain"
                ],
                "example": {
                  "new_address": "0xabcd1234abcd1234abcd1234abcd1234abcd1234",
                  "chain": "eip155:1"
                }
              },
              "example": {
                "new_address": "0xabcd1234abcd1234abcd1234abcd1234abcd1234",
                "chain": "eip155:1"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated settlement address and its on-chain nonce.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "address": {
                      "type": "string"
                    },
                    "chain": {
                      "type": "string"
                    },
                    "nonce": {
                      "type": "number"
                    },
                    "tx_hash": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "address",
                    "chain",
                    "nonce",
                    "tx_hash"
                  ],
                  "example": {
                    "address": "0xabcd1234abcd1234abcd1234abcd1234abcd1234",
                    "chain": "eip155:1",
                    "nonce": 2,
                    "tx_hash": "0x8a9c67b2d1e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9"
                  }
                },
                "example": {
                  "address": "0xabcd1234abcd1234abcd1234abcd1234abcd1234",
                  "chain": "eip155:1",
                  "nonce": 2,
                  "tx_hash": "0x8a9c67b2d1e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          },
          "504": {
            "description": "`code: tx_pending`: the settlement change was broadcast but the relay could not read its receipt within the wait (the wait timed out, or the RPC failed while polling). `data` carries `chain` and `tx_hash`. Do not resubmit: the new address is recorded within about 15 minutes after the transaction confirms. Until then, charges, captures and checkout subscribes on that chain may be refused with a 503 whose `data.reason` is `settlement_address_mismatch`, and new payments wait. Do not rotate again in that window, even though the 503 message says to. If the transaction reverts or never mines instead, the settlement address is not updated and you can send a new settlement request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "invalid_request",
                    "message": "The transaction was broadcast but has not confirmed yet. Do not resubmit: the new address is recorded within about 15 minutes after the transaction confirms, and charges, captures and subscribes on this chain may be refused until then. Do not rotate again in the meantime.",
                    "code": "tx_pending",
                    "data": {
                      "chain": "eip155:11155111",
                      "tx_hash": "0x9999999999999999999999999999999999999999999999999999999999999999"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/reports/payments/export": {
      "get": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "exportPayments",
        "summary": "Export payments as CSV",
        "description": "Export payment history as a CSV file. Each row is one payment with its checkout's fiat amount, currency, and customer email. Filter by date range and status. Amount columns (token_amount, checkout_amount) are display-scaled to major units, unlike the JSON endpoints, which return minor units.",
        "tags": [
          "Reports"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "required": false,
            "name": "from",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "to",
            "in": "query"
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "client_deposit_pending",
                  "client_deposit_detected",
                  "client_deposit_confirmed",
                  "client_deposit_expired",
                  "escrow_confirmed",
                  "settlement_pending",
                  "settled",
                  "failed",
                  "refunded",
                  "cancelled"
                ]
              }
            },
            "required": false,
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "true"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "false"
                  ]
                }
              ]
            },
            "required": false,
            "name": "recoverable",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A CSV export.",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                },
                "example": "payment_id,checkout_id,created_at,status,method,token,chain,token_amount,deposit_address,payer_address,on_chain_id,checkout_amount,checkout_currency,customer_email\ntz4a98xxat96iws9zmbrgj3a,chk_1234567890abcdef,2024-01-15T12:30:00.000Z,settled,TWO_STEP,USDC,eip155:1,50,0x5fbdb2315678afecb367f032d93f642f64180aa3,0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21,0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b,50,USD,customer@example.com"
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/reports/subscriptions/export": {
      "get": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "exportSubscriptions",
        "summary": "Export subscriptions as CSV",
        "description": "Export subscriptions as a CSV file for reconciliation and analysis. Filter by date range and status. Amount columns (price, cap_amount) are display-scaled to major units, unlike the JSON endpoints, which return minor units.",
        "tags": [
          "Reports"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "required": false,
            "name": "from",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "to",
            "in": "query"
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "active",
                  "cancelling",
                  "cancelled"
                ]
              }
            },
            "required": false,
            "name": "status",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A CSV export.",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                },
                "example": "subscription_id,onchain_id,status,paused,cancel_at_period_end,subscriber,token,price,price_currency,cap_amount,period_duration,last_charged_at,next_charge_at,external_customer_id,created_at\n0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a,0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a,active,false,false,0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21,USDC,12500,ARS,120,2592000,2026-04-19T12:02:18.000Z,2026-05-19T12:02:18.000Z,cus_42,2026-02-19T12:02:18.000Z"
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/reports/subscription-charges/export": {
      "get": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "exportSubscriptionCharges",
        "summary": "Export subscription charges as CSV",
        "description": "Export subscription charges — succeeded and failed — as a CSV file for reconciliation and dunning analysis. Amount columns (amount, fee, fiat_amount) are display-scaled to major units, unlike the JSON endpoints, which return minor units.",
        "tags": [
          "Reports"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "required": false,
            "name": "from",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "to",
            "in": "query"
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "succeeded",
                  "failed"
                ]
              }
            },
            "required": false,
            "name": "status",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A CSV export.",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                },
                "example": "charge_id,subscription_id,subscriber,token,charge_nonce,amount,fee,status,failure_reason,tx_hash,block_number,charged_at,metadata,external_customer_id,fiat_amount,fiat_currency,settlement_status\nsubc_6789abcdef012345,0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a,0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21,USDC,3,9.99,0,succeeded,,0x8a9c67b2d1e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9,12346789,2026-05-19T12:02:18.000Z,\"{\"\"invoice_id\"\":\"\"inv_202605\"\"}\",cus_42,12500,ARS,completed"
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/settings/pauser": {
      "get": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "getMerchantPauser",
        "summary": "Retrieve the declared SubscriptionManager pause authority",
        "description": "Retrieve the pause authority declared for your SubscriptionManager, along with the exact message to sign when declaring one. `locked_by_chain` is non-null once a manager is deployed: the pauser is bound into the manager address, so it can no longer be changed without a redeploy and subscriber migration.",
        "tags": [
          "Settings"
        ],
        "responses": {
          "200": {
            "description": "The declared pause authority.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MerchantPauser"
                },
                "example": {
                  "object": "merchant_pauser",
                  "merchant_pauser": "0x9876fedc9876fedc9876fedc9876fedc9876fedc",
                  "shared_pauser_risk_acknowledged": false,
                  "declaration_message": "Exodus Checkout: declare SubscriptionManager pause authority\nbusiness: clzk3n8x50000qw3f7h2p9r1b\nchain family: evm",
                  "locked_by_chain": null
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "declareMerchantPauser",
        "summary": "Declare the SubscriptionManager pause authority",
        "description": "Declare the merchant-held address that may pause and unpause your SubscriptionManager. Required before the manager is deployed, and immutable afterwards. Prove control by signing the `declaration_message` from `GET /settings/pauser` with that address — an EOA signature is recovered directly, and a contract account (e.g. a Safe) is verified on-chain against every chain your business supports. Declaring the same address as your `merchant_signer` is permitted only with `acknowledge_shared_pauser_risk`, because a stolen signer key would then also be able to lift an incident freeze. Declaring the Exodus pauser address is refused, because the Guardian must never be able to unpause a manager it halted.",
        "tags": [
          "Settings"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "merchant_pauser": {
                    "type": "string",
                    "minLength": 1
                  },
                  "signature": {
                    "type": "string",
                    "minLength": 1
                  },
                  "acknowledge_shared_pauser_risk": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "merchant_pauser",
                  "signature"
                ],
                "example": {
                  "merchant_pauser": "0x9876fedc9876fedc9876fedc9876fedc9876fedc",
                  "signature": "0xababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab"
                }
              },
              "example": {
                "merchant_pauser": "0x9876fedc9876fedc9876fedc9876fedc9876fedc",
                "signature": "0xababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The declared pause authority.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MerchantPauser"
                },
                "example": {
                  "object": "merchant_pauser",
                  "merchant_pauser": "0x9876fedc9876fedc9876fedc9876fedc9876fedc",
                  "shared_pauser_risk_acknowledged": false,
                  "declaration_message": "Exodus Checkout: declare SubscriptionManager pause authority\nbusiness: clzk3n8x50000qw3f7h2p9r1b\nchain family: evm",
                  "locked_by_chain": null
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Control of the address was not proven (`pauser_control_unproven`), the address matches the merchant signer without an acknowledgment (`shared_pauser_risk_unacknowledged`), the address is the Exodus pauser (`pauser_is_exodus_pauser`), or a manager is already deployed (`pauser_locked_by_deployment`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "cannot_process",
                    "message": "The signature does not recover to the declared pauser address, and no contract is deployed there on eip155:42161.",
                    "code": "pauser_control_unproven",
                    "data": {
                      "business_id": "clzk3n8x50000qw3f7h2p9r1b",
                      "chain": "eip155:42161"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/settings": {
      "get": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "getSettings",
        "summary": "Retrieve merchant settings",
        "description": "Retrieve your business configuration: test/live mode, per-chain signer status, the PaymentFactory address needed to sign direct payments, and the settlement address. These values are stable — fetch once and cache them with your config. It also returns your merchant id and one SubscriptionManager address per chain.",
        "tags": [
          "Settings"
        ],
        "responses": {
          "200": {
            "description": "The merchant settings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Settings"
                },
                "example": {
                  "business_id": "clzk3n8x50000qw3f7h2p9r1b",
                  "business_name": "Acme Store",
                  "display_name": null,
                  "background_color": null,
                  "primary_color": null,
                  "is_test": false,
                  "settlement_type": "CRYPTO",
                  "currency": null,
                  "settlement_provider": null,
                  "settlement_provider_id": null,
                  "chain_configs": [
                    {
                      "chain_family": "evm",
                      "signer_status": "active",
                      "merchant_signer": "0x1234abcd1234abcd1234abcd1234abcd1234abcd",
                      "settlement_address": "0xabcd1234abcd1234abcd1234abcd1234abcd1234",
                      "factory_address": "0xfaceb00cfaceb00cfaceb00cfaceb00cfaceb00c"
                    },
                    {
                      "chain_family": "solana",
                      "signer_status": "active",
                      "merchant_signer": "9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin",
                      "settlement_address": "5tzFkiKscXHK5ZXCGbXZxdw7gTjjD1mBwuoFbhUvuAi9",
                      "factory_address": null
                    }
                  ],
                  "can_generate_key": false,
                  "webhook_url": "https://yoursite.com/webhooks/exodus",
                  "merchant_id": "0x750ba0a7160fc57611beb7d07de10a83425eb034e2daf679f7069347751ab566",
                  "subscription_managers": [
                    {
                      "chain": "eip155:42161",
                      "address": "0x9a1b2c3d4e5f60718293a4b5c6d7e8f901234567"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "registerSigner",
        "summary": "Register a merchant signer and settlement address",
        "description": "Register the merchant signer and settlement address for a chain family, activating signed-request verification for that chain.",
        "tags": [
          "Settings"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "merchant_signer": {
                    "type": "string",
                    "minLength": 1
                  },
                  "chain_family": {
                    "type": "string",
                    "enum": [
                      "evm",
                      "solana"
                    ],
                    "default": "evm"
                  },
                  "settlement_address": {
                    "type": "string",
                    "minLength": 1
                  },
                  "genesis_settlement_signature": {
                    "type": "string",
                    "pattern": "^0x[0-9a-fA-F]{128}$"
                  }
                },
                "required": [
                  "merchant_signer",
                  "settlement_address"
                ],
                "example": {
                  "merchant_signer": "0x1234abcd1234abcd1234abcd1234abcd1234abcd",
                  "chain_family": "evm",
                  "settlement_address": "0xabcd1234abcd1234abcd1234abcd1234abcd1234"
                }
              },
              "example": {
                "merchant_signer": "0x1234abcd1234abcd1234abcd1234abcd1234abcd",
                "chain_family": "evm",
                "settlement_address": "0xabcd1234abcd1234abcd1234abcd1234abcd1234"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The updated merchant settings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Settings"
                },
                "example": {
                  "business_id": "clzk3n8x50000qw3f7h2p9r1b",
                  "business_name": "Acme Store",
                  "display_name": null,
                  "background_color": null,
                  "primary_color": null,
                  "is_test": false,
                  "settlement_type": "CRYPTO",
                  "currency": null,
                  "settlement_provider": null,
                  "settlement_provider_id": null,
                  "chain_configs": [
                    {
                      "chain_family": "evm",
                      "signer_status": "active",
                      "merchant_signer": "0x1234abcd1234abcd1234abcd1234abcd1234abcd",
                      "settlement_address": "0xabcd1234abcd1234abcd1234abcd1234abcd1234",
                      "factory_address": "0xfaceb00cfaceb00cfaceb00cfaceb00cfaceb00c"
                    },
                    {
                      "chain_family": "solana",
                      "signer_status": "active",
                      "merchant_signer": "9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin",
                      "settlement_address": "5tzFkiKscXHK5ZXCGbXZxdw7gTjjD1mBwuoFbhUvuAi9",
                      "factory_address": null
                    }
                  ],
                  "can_generate_key": false,
                  "webhook_url": "https://yoursite.com/webhooks/exodus",
                  "merchant_id": "0x750ba0a7160fc57611beb7d07de10a83425eb034e2daf679f7069347751ab566",
                  "subscription_managers": [
                    {
                      "chain": "eip155:42161",
                      "address": "0x9a1b2c3d4e5f60718293a4b5c6d7e8f901234567"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "updateMerchantSettlementAddress",
        "summary": "Update the merchant settlement address",
        "description": "Update the settlement address for a chain family. New captures settle to the updated address.",
        "tags": [
          "Settings"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "chain_family": {
                    "type": "string",
                    "enum": [
                      "evm",
                      "solana"
                    ]
                  },
                  "settlement_address": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "chain_family",
                  "settlement_address"
                ],
                "example": {
                  "chain_family": "evm",
                  "settlement_address": "0xabcd1234abcd1234abcd1234abcd1234abcd1234"
                }
              },
              "example": {
                "chain_family": "evm",
                "settlement_address": "0xabcd1234abcd1234abcd1234abcd1234abcd1234"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated merchant settings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Settings"
                },
                "example": {
                  "business_id": "clzk3n8x50000qw3f7h2p9r1b",
                  "business_name": "Acme Store",
                  "display_name": null,
                  "background_color": null,
                  "primary_color": null,
                  "is_test": false,
                  "settlement_type": "CRYPTO",
                  "currency": null,
                  "settlement_provider": null,
                  "settlement_provider_id": null,
                  "chain_configs": [
                    {
                      "chain_family": "evm",
                      "signer_status": "active",
                      "merchant_signer": "0x1234abcd1234abcd1234abcd1234abcd1234abcd",
                      "settlement_address": "0xabcd1234abcd1234abcd1234abcd1234abcd1234",
                      "factory_address": "0xfaceb00cfaceb00cfaceb00cfaceb00cfaceb00c"
                    },
                    {
                      "chain_family": "solana",
                      "signer_status": "active",
                      "merchant_signer": "9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin",
                      "settlement_address": "5tzFkiKscXHK5ZXCGbXZxdw7gTjjD1mBwuoFbhUvuAi9",
                      "factory_address": null
                    }
                  ],
                  "can_generate_key": false,
                  "webhook_url": "https://yoursite.com/webhooks/exodus",
                  "merchant_id": "0x750ba0a7160fc57611beb7d07de10a83425eb034e2daf679f7069347751ab566",
                  "subscription_managers": [
                    {
                      "chain": "eip155:42161",
                      "address": "0x9a1b2c3d4e5f60718293a4b5c6d7e8f901234567"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "updateSettings",
        "summary": "Update the webhook URL, display name and branding colors",
        "description": "Set or clear the webhook endpoint URL that receives event deliveries, the customer-facing display name, and/or the checkout background/primary brand colors. Pass `null` for `webhook_url` to disable webhooks, or for `display_name`/`background_color`/`primary_color` to fall back to the default. Each color applies independently — whichever is unset falls back to the platform default. Omitted fields are left unchanged; only a first-time webhook_url configuration also returns `webhook_secret`.",
        "tags": [
          "Settings"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "webhook_url": {
                    "type": "string",
                    "nullable": true
                  },
                  "display_name": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 100
                  },
                  "background_color": {
                    "type": "string",
                    "nullable": true,
                    "pattern": "^#[0-9a-f]{6}$",
                    "example": "#7c3aed"
                  },
                  "primary_color": {
                    "type": "string",
                    "nullable": true,
                    "pattern": "^#[0-9a-f]{6}$",
                    "example": "#7c3aed"
                  }
                },
                "example": {
                  "webhook_url": "https://yoursite.com/webhooks/exodus",
                  "display_name": "Acme Inc.",
                  "background_color": "#0f172a",
                  "primary_color": "#7c3aed"
                }
              },
              "example": {
                "webhook_url": "https://yoursite.com/webhooks/exodus",
                "display_name": "Acme Inc.",
                "background_color": "#0f172a",
                "primary_color": "#7c3aed"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated settings.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "webhook_url": {
                      "type": "string",
                      "nullable": true
                    },
                    "display_name": {
                      "type": "string",
                      "nullable": true
                    },
                    "background_color": {
                      "type": "string",
                      "nullable": true
                    },
                    "primary_color": {
                      "type": "string",
                      "nullable": true
                    },
                    "webhook_secret": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "webhook_url"
                  ],
                  "example": {
                    "webhook_url": "https://yoursite.com/webhooks/exodus",
                    "display_name": "Acme Inc.",
                    "background_color": "#0f172a",
                    "primary_color": "#7c3aed"
                  }
                },
                "example": {
                  "webhook_url": "https://yoursite.com/webhooks/exodus",
                  "display_name": "Acme Inc.",
                  "background_color": "#0f172a",
                  "primary_color": "#7c3aed"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/settings/webhook/test": {
      "post": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "sendTestWebhook",
        "summary": "Send a test webhook delivery",
        "description": "Send a test event to your configured webhook endpoint to verify connectivity and signature handling.",
        "tags": [
          "Settings"
        ],
        "responses": {
          "200": {
            "description": "The test delivery result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookTestResult"
                },
                "example": {
                  "object": "webhook_test",
                  "delivered": true,
                  "status": 200
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "No webhook configured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "cannot_process",
                    "message": "Configure and save a webhook URL before sending a test",
                    "code": "webhook_not_configured",
                    "data": {
                      "business_id": "clzk3n8x50000qw3f7h2p9r1b"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/settings/webhook/secret": {
      "post": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "rotateWebhookSecret",
        "summary": "Regenerate the webhook signing secret",
        "description": "Regenerate the webhook signing secret. The previous secret keeps working for a 24 hour grace window, during which events are signed with both secrets, so deliveries do not fail while you roll out the new one. The response returns previous_secret_expires_at (null when there was no previous secret).",
        "tags": [
          "Settings"
        ],
        "responses": {
          "200": {
            "description": "The new webhook secret.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "webhook_secret": {
                      "type": "string"
                    },
                    "previous_secret_expires_at": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "webhook_secret",
                    "previous_secret_expires_at"
                  ],
                  "example": {
                    "webhook_secret": "whsec_1234567890abcdef1234567890abcdef",
                    "previous_secret_expires_at": "2026-07-02T00:00:00.000Z"
                  }
                },
                "example": {
                  "webhook_secret": "whsec_1234567890abcdef1234567890abcdef",
                  "previous_secret_expires_at": "2026-07-02T00:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "No webhook configured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "cannot_process",
                    "message": "Configure a webhook URL before regenerating the secret",
                    "code": "webhook_not_configured",
                    "data": {
                      "business_id": "clzk3n8x50000qw3f7h2p9r1b"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/subscription-checkouts": {
      "post": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "createSubscriptionCheckout",
        "summary": "Create a subscription checkout",
        "description": "Create a single-use intent that authorizes a customer to start a recurring subscription. The merchant declares an optional per-window `budget` (defaults to 10x `price`) and an optional per-charge `cap` (defaults to `budget`); all amounts are in `price_currency`'s minor units. The subscriber picks the settlement token at subscribe time. Returns a `checkout_url` — redirect the customer there to complete the subscribe and first-charge flow. No signed request is needed at creation; the customer's on-chain signature authorizes the subscription and first charge atomically.",
        "tags": [
          "Subscription checkouts"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "supported_chains": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$"
                    },
                    "minItems": 1,
                    "description": "CAIP-2 chains the subscriber may pick from. Optional; defaults to every supported chain where the merchant has a subscription manager deployed, minus chains the request cannot use (see `initial_charge`). For a fiat-settled business, chains on which the settlement provider cannot settle any token are dropped from the resolved set, and the subscription options list only the tokens the provider settles on each remaining chain. Creation fails with `no_settleable_chain_for_business` when no chain remains."
                  },
                  "price": {
                    "type": "string",
                    "pattern": "^0*[1-9]\\d*$",
                    "description": "The recurring per-cycle amount, in price_currency's ISO 4217 minor units (e.g. cents for USD, centavos for ARS; CLP has no minor unit, so CLP 15,000 is 15000). At most 9007199254740991. A fiat-settled business has a settlement floor of 1.00 USD, or the provider's higher minimum. A non-USD price is checked when it is quoted, not when it is created."
                  },
                  "price_currency": {
                    "type": "string",
                    "enum": [
                      "USD",
                      "ARS",
                      "BRL",
                      "COP",
                      "UYU",
                      "CLP",
                      "VES",
                      "MXN",
                      "BOB",
                      "PEN",
                      "EUR"
                    ],
                    "description": "Required ISO-4217 pricing currency; price, cap, and budget are all denominated in its minor units. Crypto-settled businesses price in USD, ARS, BRL, COP, UYU, CLP, VES, MXN, BOB and PEN. Fiat-settled businesses price in their settlement currency. The subscriber picks the settlement token and chain at subscribe time."
                  },
                  "period_duration": {
                    "type": "integer",
                    "minimum": 3600
                  },
                  "cap": {
                    "type": "string",
                    "pattern": "^\\d+$",
                    "description": "Per-charge ceiling, in price_currency's minor units. Optional -- defaults to budget (provided or derived). At most 9007199254740991."
                  },
                  "budget": {
                    "type": "string",
                    "pattern": "^0*[1-9]\\d*$",
                    "description": "Per-window spend ceiling, in price_currency's minor units. Optional -- defaults to 10x price. At most 9007199254740991."
                  },
                  "initial_charge": {
                    "type": "boolean",
                    "default": true,
                    "description": "Whether the customer is charged the first period at subscribe time. When false, the subscribe signature only registers the subscription on-chain (no funds move) and billing starts with the first merchant-relayed charge. Chargeless subscriptions are EVM-only: when supported_chains is omitted, chains without chargeless subscribe support are dropped from the resolved set; naming one explicitly in supported_chains is rejected, as is a merchant with no chargeless-capable deployment at all. For a fiat-settled business, a chain the settlement provider cannot settle is dropped first, so the rejection applies to the chains that remain."
                  },
                  "subscriber": {
                    "type": "string"
                  },
                  "external_customer_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "success_url": {
                    "type": "string",
                    "description": "Where to redirect the subscriber after a successful subscribe. Automatic countdown redirect and the primary CTA on the completed screen."
                  },
                  "cancel_url": {
                    "type": "string",
                    "description": "Where to redirect the subscriber if the subscription checkout was actually cancelled. Also used on the expired terminal screen."
                  },
                  "return_url": {
                    "type": "string",
                    "description": "Where to send the subscriber if they leave a still-pending subscription checkout. Purely navigational — no side effects. Distinct from cancel_url (the subscription checkout was actually cancelled) and success_url (the post-subscribe confirmation destination)."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "description": "Flat map of merchant-defined references. Up to 50 keys; keys up to 40 characters; values are strings up to 500 characters (nested values are rejected). Echoed back on the intent and on every `subscription_checkout.*` webhook. Two keys are also rendered on the hosted subscribe page: `plan_name` at the end of the summary card, below the economic terms, with `plan_description` as supporting copy directly beneath it. Only those two exact keys are read — every other key, including any other `plan_*` key, stays opaque to Exodus and is never shown. The two are independent: pass one, both, or neither."
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "price",
                  "price_currency",
                  "period_duration"
                ],
                "example": {
                  "supported_chains": [
                    "eip155:1",
                    "eip155:137"
                  ],
                  "price": "250000",
                  "price_currency": "ARS",
                  "period_duration": 2592000,
                  "cap": "1000000",
                  "budget": "2500000",
                  "initial_charge": true,
                  "success_url": "https://merchant.com/subscribed",
                  "cancel_url": "https://merchant.com/cancelled",
                  "return_url": "https://merchant.com/plans/pro",
                  "metadata": {
                    "external_plan_ref": "pro_monthly",
                    "plan_name": "Pro",
                    "plan_description": "Unlimited projects and priority support"
                  }
                }
              },
              "example": {
                "supported_chains": [
                  "eip155:1",
                  "eip155:137"
                ],
                "price": "250000",
                "price_currency": "ARS",
                "period_duration": 2592000,
                "cap": "1000000",
                "budget": "2500000",
                "initial_charge": true,
                "success_url": "https://merchant.com/subscribed",
                "cancel_url": "https://merchant.com/cancelled",
                "return_url": "https://merchant.com/plans/pro",
                "metadata": {
                  "external_plan_ref": "pro_monthly",
                  "plan_name": "Pro",
                  "plan_description": "Unlimited projects and priority support"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created subscription checkout.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionCheckout"
                },
                "example": {
                  "object": "subscription_checkout",
                  "id": "schk_1234567890abcdef",
                  "status": "completed",
                  "onchain_id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
                  "subscription_id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
                  "business_id": "clzk3n8x50000qw3f7h2p9r1b",
                  "business_name": "Acme Inc",
                  "background_color": "#0f172a",
                  "primary_color": "#7c3aed",
                  "subscriber": "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21",
                  "external_customer_id": "cus_42",
                  "subscription_options": [
                    {
                      "chain": "eip155:1",
                      "token": "USDC",
                      "subscription_manager_address": "0xa1b2c3d4e5f6789012345678901234567890abcd",
                      "relayer_address": "0x9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b"
                    },
                    {
                      "chain": "eip155:137",
                      "token": "USDC",
                      "subscription_manager_address": "0xb2c3d4e5f67890123456789012345678901234cd",
                      "relayer_address": "0x9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b"
                    }
                  ],
                  "price": "250000",
                  "price_currency": "ARS",
                  "period_duration": 2592000,
                  "cap": "1000000",
                  "budget": "2500000",
                  "initial_charge": true,
                  "checkout_url": "https://checkout.exodus.com/subscribe/schk_1234567890abcdef",
                  "success_url": "https://merchant.com/subscribed",
                  "cancel_url": "https://merchant.com/cancelled",
                  "return_url": "https://merchant.com/plans/pro",
                  "metadata": {
                    "external_plan_ref": "pro_monthly",
                    "plan_name": "Pro",
                    "plan_description": "Unlimited projects and priority support"
                  },
                  "expires_at": "2026-05-19T12:05:00Z",
                  "created_at": "2026-05-19T12:00:00Z",
                  "updated_at": "2026-05-19T12:02:18Z",
                  "completed_at": "2026-05-19T12:02:18Z",
                  "cancelled_at": null,
                  "expired_at": null,
                  "cancellation_reason": null
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "The subscription checkout cannot be created for this business (`type: invalid_request`). A `price_currency` the business cannot quote carries `code: price_currency_not_quotable`. On a fiat-settled business, a USD `price` below the settlement floor of 1.00 USD, or the provider's higher minimum, carries `code: amount_below_settlement_minimum` with `data.minimum_usd`, and a USD `price` above the provider's settlement maximum, when it declares one, carries `code: amount_above_settlement_maximum` with `data.maximum_usd`; a non-USD price is checked when it is quoted, not when it is created. The other rejections carry no `code` and name their cause as a `message` prefix: `business_not_found`, `no_deployment_for_business`, `chargeless_not_supported_for_business`, `chain_not_supported`, `chargeless_not_supported_on_chain`, `no_deployment_on_chain`, `fiat_settlement_required` (a fiat-settled business without a fiat settlement configuration), `currency_mismatch` (`price_currency` differs from the merchant's settlement currency), `no_settleable_chain_for_business` (a fiat-settled business whose settlement provider cannot settle any token on the requested or deployed chains).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "invalid_request",
                    "code": "price_currency_not_quotable",
                    "message": "price_currency_not_quotable: price_currency is not supported"
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "listSubscriptionCheckouts",
        "summary": "List subscription checkouts",
        "description": "Retrieve a paginated list of subscription checkout intents, most recent first. Filter by status, subscriber, chain, and creation-date range.",
        "tags": [
          "Subscription checkouts"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Rows per page, 1 to 100. Defaults to 50. Values outside the range are rejected rather than clamped."
            },
            "required": false,
            "description": "Rows per page, 1 to 100. Defaults to 50. Values outside the range are rejected rather than clamped.",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Cursor for forward pagination: an object id from a previous page. Returns results after it. Mutually exclusive with `ending_before`; sending both is a 400."
            },
            "required": false,
            "description": "Cursor for forward pagination: an object id from a previous page. Returns results after it. Mutually exclusive with `ending_before`; sending both is a 400.",
            "name": "starting_after",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Cursor for backward pagination: an object id from a previous page. Returns results before it. Mutually exclusive with `starting_after`; sending both is a 400."
            },
            "required": false,
            "description": "Cursor for backward pagination: an object id from a previous page. Returns results before it. Mutually exclusive with `starting_after`; sending both is a 400.",
            "name": "ending_before",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "completed",
                "expired",
                "cancelled"
              ]
            },
            "required": false,
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "subscriber",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "required": false,
            "name": "external_customer_id",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$"
            },
            "required": false,
            "name": "chain",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "created_gte",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "created_lte",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of subscription checkouts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SubscriptionCheckout"
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "has_more"
                  ],
                  "example": {
                    "object": "list",
                    "data": [
                      {
                        "object": "subscription_checkout",
                        "id": "schk_1234567890abcdef",
                        "status": "completed",
                        "onchain_id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
                        "subscription_id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
                        "business_id": "clzk3n8x50000qw3f7h2p9r1b",
                        "business_name": "Acme Inc",
                        "background_color": "#0f172a",
                        "primary_color": "#7c3aed",
                        "subscriber": "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21",
                        "external_customer_id": "cus_42",
                        "subscription_options": [
                          {
                            "chain": "eip155:1",
                            "token": "USDC",
                            "subscription_manager_address": "0xa1b2c3d4e5f6789012345678901234567890abcd",
                            "relayer_address": "0x9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b"
                          },
                          {
                            "chain": "eip155:137",
                            "token": "USDC",
                            "subscription_manager_address": "0xb2c3d4e5f67890123456789012345678901234cd",
                            "relayer_address": "0x9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b"
                          }
                        ],
                        "price": "250000",
                        "price_currency": "ARS",
                        "period_duration": 2592000,
                        "cap": "1000000",
                        "budget": "2500000",
                        "initial_charge": true,
                        "checkout_url": "https://checkout.exodus.com/subscribe/schk_1234567890abcdef",
                        "success_url": "https://merchant.com/subscribed",
                        "cancel_url": "https://merchant.com/cancelled",
                        "return_url": "https://merchant.com/plans/pro",
                        "metadata": {
                          "external_plan_ref": "pro_monthly",
                          "plan_name": "Pro",
                          "plan_description": "Unlimited projects and priority support"
                        },
                        "expires_at": "2026-05-19T12:05:00Z",
                        "created_at": "2026-05-19T12:00:00Z",
                        "updated_at": "2026-05-19T12:02:18Z",
                        "completed_at": "2026-05-19T12:02:18Z",
                        "cancelled_at": null,
                        "expired_at": null,
                        "cancellation_reason": null
                      },
                      {
                        "object": "subscription_checkout",
                        "id": "schk_fiat0987654321",
                        "status": "completed",
                        "onchain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                        "subscription_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                        "business_id": "clzk3n8x50000qw3f7h2p9r1b",
                        "business_name": "Klassly",
                        "background_color": null,
                        "primary_color": null,
                        "subscriber": "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21",
                        "external_customer_id": "cus_88",
                        "subscription_options": [
                          {
                            "chain": "eip155:1",
                            "token": "USDC",
                            "subscription_manager_address": "0xa1b2c3d4e5f6789012345678901234567890abcd",
                            "relayer_address": "0x9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b"
                          },
                          {
                            "chain": "eip155:1",
                            "token": "USDT",
                            "subscription_manager_address": "0xa1b2c3d4e5f6789012345678901234567890abcd",
                            "relayer_address": "0x9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b"
                          },
                          {
                            "chain": "eip155:137",
                            "token": "USDC",
                            "subscription_manager_address": "0xb2c3d4e5f67890123456789012345678901234cd",
                            "relayer_address": "0x9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b"
                          },
                          {
                            "chain": "eip155:137",
                            "token": "USDT",
                            "subscription_manager_address": "0xb2c3d4e5f67890123456789012345678901234cd",
                            "relayer_address": "0x9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b"
                          }
                        ],
                        "price": "150000",
                        "price_currency": "ARS",
                        "period_duration": 2592000,
                        "cap": "1500000",
                        "budget": "1500000",
                        "initial_charge": true,
                        "checkout_url": "https://checkout.exodus.com/subscribe/schk_fiat0987654321",
                        "success_url": "https://klassly.com/subscribed",
                        "cancel_url": "https://klassly.com/cancelled",
                        "return_url": "https://klassly.com/plans",
                        "metadata": {
                          "external_plan_ref": "ars_monthly"
                        },
                        "expires_at": "2026-07-10T09:20:42Z",
                        "created_at": "2026-07-10T09:15:00Z",
                        "updated_at": "2026-07-10T09:15:42Z",
                        "completed_at": "2026-07-10T09:15:42Z",
                        "cancelled_at": null,
                        "expired_at": null,
                        "cancellation_reason": null
                      }
                    ],
                    "has_more": false
                  }
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "object": "subscription_checkout",
                      "id": "schk_1234567890abcdef",
                      "status": "completed",
                      "onchain_id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
                      "subscription_id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
                      "business_id": "clzk3n8x50000qw3f7h2p9r1b",
                      "business_name": "Acme Inc",
                      "background_color": "#0f172a",
                      "primary_color": "#7c3aed",
                      "subscriber": "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21",
                      "external_customer_id": "cus_42",
                      "subscription_options": [
                        {
                          "chain": "eip155:1",
                          "token": "USDC",
                          "subscription_manager_address": "0xa1b2c3d4e5f6789012345678901234567890abcd",
                          "relayer_address": "0x9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b"
                        },
                        {
                          "chain": "eip155:137",
                          "token": "USDC",
                          "subscription_manager_address": "0xb2c3d4e5f67890123456789012345678901234cd",
                          "relayer_address": "0x9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b"
                        }
                      ],
                      "price": "250000",
                      "price_currency": "ARS",
                      "period_duration": 2592000,
                      "cap": "1000000",
                      "budget": "2500000",
                      "initial_charge": true,
                      "checkout_url": "https://checkout.exodus.com/subscribe/schk_1234567890abcdef",
                      "success_url": "https://merchant.com/subscribed",
                      "cancel_url": "https://merchant.com/cancelled",
                      "return_url": "https://merchant.com/plans/pro",
                      "metadata": {
                        "external_plan_ref": "pro_monthly",
                        "plan_name": "Pro",
                        "plan_description": "Unlimited projects and priority support"
                      },
                      "expires_at": "2026-05-19T12:05:00Z",
                      "created_at": "2026-05-19T12:00:00Z",
                      "updated_at": "2026-05-19T12:02:18Z",
                      "completed_at": "2026-05-19T12:02:18Z",
                      "cancelled_at": null,
                      "expired_at": null,
                      "cancellation_reason": null
                    },
                    {
                      "object": "subscription_checkout",
                      "id": "schk_fiat0987654321",
                      "status": "completed",
                      "onchain_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                      "subscription_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b",
                      "business_id": "clzk3n8x50000qw3f7h2p9r1b",
                      "business_name": "Klassly",
                      "background_color": null,
                      "primary_color": null,
                      "subscriber": "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21",
                      "external_customer_id": "cus_88",
                      "subscription_options": [
                        {
                          "chain": "eip155:1",
                          "token": "USDC",
                          "subscription_manager_address": "0xa1b2c3d4e5f6789012345678901234567890abcd",
                          "relayer_address": "0x9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b"
                        },
                        {
                          "chain": "eip155:1",
                          "token": "USDT",
                          "subscription_manager_address": "0xa1b2c3d4e5f6789012345678901234567890abcd",
                          "relayer_address": "0x9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b"
                        },
                        {
                          "chain": "eip155:137",
                          "token": "USDC",
                          "subscription_manager_address": "0xb2c3d4e5f67890123456789012345678901234cd",
                          "relayer_address": "0x9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b"
                        },
                        {
                          "chain": "eip155:137",
                          "token": "USDT",
                          "subscription_manager_address": "0xb2c3d4e5f67890123456789012345678901234cd",
                          "relayer_address": "0x9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b"
                        }
                      ],
                      "price": "150000",
                      "price_currency": "ARS",
                      "period_duration": 2592000,
                      "cap": "1500000",
                      "budget": "1500000",
                      "initial_charge": true,
                      "checkout_url": "https://checkout.exodus.com/subscribe/schk_fiat0987654321",
                      "success_url": "https://klassly.com/subscribed",
                      "cancel_url": "https://klassly.com/cancelled",
                      "return_url": "https://klassly.com/plans",
                      "metadata": {
                        "external_plan_ref": "ars_monthly"
                      },
                      "expires_at": "2026-07-10T09:20:42Z",
                      "created_at": "2026-07-10T09:15:00Z",
                      "updated_at": "2026-07-10T09:15:42Z",
                      "completed_at": "2026-07-10T09:15:42Z",
                      "cancelled_at": null,
                      "expired_at": null,
                      "cancellation_reason": null
                    }
                  ],
                  "has_more": false
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "starting_after and ending_before are mutually exclusive",
                    "param": "ending_before"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/subscription-checkouts/{id}": {
      "get": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "getSubscriptionCheckout",
        "summary": "Retrieve a subscription checkout",
        "description": "Retrieve the current state of a subscription checkout intent. Use this to confirm whether the customer completed the subscribe flow.",
        "tags": [
          "Subscription checkouts"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The requested subscription checkout.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionCheckout"
                },
                "example": {
                  "object": "subscription_checkout",
                  "id": "schk_1234567890abcdef",
                  "status": "completed",
                  "onchain_id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
                  "subscription_id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
                  "business_id": "clzk3n8x50000qw3f7h2p9r1b",
                  "business_name": "Acme Inc",
                  "background_color": "#0f172a",
                  "primary_color": "#7c3aed",
                  "subscriber": "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21",
                  "external_customer_id": "cus_42",
                  "subscription_options": [
                    {
                      "chain": "eip155:1",
                      "token": "USDC",
                      "subscription_manager_address": "0xa1b2c3d4e5f6789012345678901234567890abcd",
                      "relayer_address": "0x9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b"
                    },
                    {
                      "chain": "eip155:137",
                      "token": "USDC",
                      "subscription_manager_address": "0xb2c3d4e5f67890123456789012345678901234cd",
                      "relayer_address": "0x9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b"
                    }
                  ],
                  "price": "250000",
                  "price_currency": "ARS",
                  "period_duration": 2592000,
                  "cap": "1000000",
                  "budget": "2500000",
                  "initial_charge": true,
                  "checkout_url": "https://checkout.exodus.com/subscribe/schk_1234567890abcdef",
                  "success_url": "https://merchant.com/subscribed",
                  "cancel_url": "https://merchant.com/cancelled",
                  "return_url": "https://merchant.com/plans/pro",
                  "metadata": {
                    "external_plan_ref": "pro_monthly",
                    "plan_name": "Pro",
                    "plan_description": "Unlimited projects and priority support"
                  },
                  "expires_at": "2026-05-19T12:05:00Z",
                  "created_at": "2026-05-19T12:00:00Z",
                  "updated_at": "2026-05-19T12:02:18Z",
                  "completed_at": "2026-05-19T12:02:18Z",
                  "cancelled_at": null,
                  "expired_at": null,
                  "cancellation_reason": null
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "not_found",
                    "message": "Payment not found"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/subscription-checkouts/{id}/cancel": {
      "patch": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "cancelSubscriptionCheckout",
        "summary": "Cancel a subscription checkout",
        "description": "Cancel a pending subscription checkout intent before the customer signs. This cancels the intent only — to cancel an active on-chain subscription, use the subscriptions endpoint. Cancelling does not abort an in-flight `subscribeAndCharge` transaction; if it later confirms, the intent flips back to `completed`.",
        "tags": [
          "Subscription checkouts"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cancellation_reason": {
                    "type": "string",
                    "enum": [
                      "merchant_initiated",
                      "subscriber_declined"
                    ]
                  }
                },
                "example": {
                  "cancellation_reason": "merchant_initiated"
                }
              },
              "example": {
                "cancellation_reason": "merchant_initiated"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The cancelled subscription checkout.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionCheckout"
                },
                "example": {
                  "object": "subscription_checkout",
                  "id": "schk_1234567890abcdef",
                  "status": "completed",
                  "onchain_id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
                  "subscription_id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
                  "business_id": "clzk3n8x50000qw3f7h2p9r1b",
                  "business_name": "Acme Inc",
                  "background_color": "#0f172a",
                  "primary_color": "#7c3aed",
                  "subscriber": "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21",
                  "external_customer_id": "cus_42",
                  "subscription_options": [
                    {
                      "chain": "eip155:1",
                      "token": "USDC",
                      "subscription_manager_address": "0xa1b2c3d4e5f6789012345678901234567890abcd",
                      "relayer_address": "0x9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b"
                    },
                    {
                      "chain": "eip155:137",
                      "token": "USDC",
                      "subscription_manager_address": "0xb2c3d4e5f67890123456789012345678901234cd",
                      "relayer_address": "0x9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b"
                    }
                  ],
                  "price": "250000",
                  "price_currency": "ARS",
                  "period_duration": 2592000,
                  "cap": "1000000",
                  "budget": "2500000",
                  "initial_charge": true,
                  "checkout_url": "https://checkout.exodus.com/subscribe/schk_1234567890abcdef",
                  "success_url": "https://merchant.com/subscribed",
                  "cancel_url": "https://merchant.com/cancelled",
                  "return_url": "https://merchant.com/plans/pro",
                  "metadata": {
                    "external_plan_ref": "pro_monthly",
                    "plan_name": "Pro",
                    "plan_description": "Unlimited projects and priority support"
                  },
                  "expires_at": "2026-05-19T12:05:00Z",
                  "created_at": "2026-05-19T12:00:00Z",
                  "updated_at": "2026-05-19T12:02:18Z",
                  "completed_at": "2026-05-19T12:02:18Z",
                  "cancelled_at": null,
                  "expired_at": null,
                  "cancellation_reason": null
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "not_found",
                    "message": "Payment not found"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}": {
      "get": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "getSubscription",
        "summary": "Retrieve a subscription",
        "description": "Retrieve the current state of an on-chain subscription, including the subscriber, the contract address on the chosen chain, charge scheduling (`next_charge_at`, `charge_nonce`), and per-cycle budget tracking.",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "subscriptionId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The requested subscription.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionDetail"
                },
                "example": {
                  "object": "subscription",
                  "id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
                  "subscriber": "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21",
                  "external_customer_id": "cus_42",
                  "asset": "eip155:1/erc20:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
                  "token_symbol": "USDC",
                  "token_decimals": 6,
                  "cap_amount": "120000000",
                  "price": "1250000",
                  "price_currency": "ARS",
                  "period_duration": 2592000,
                  "last_charged_at": "2026-04-19T12:02:18Z",
                  "next_charge_at": "2026-05-19T12:02:18Z",
                  "charge_nonce": 3,
                  "status": "active",
                  "paused": false,
                  "flagged": false,
                  "budget": "300000000",
                  "spent_this_period": "29970000",
                  "remaining_budget": "270030000",
                  "created_at": "2026-02-19T12:02:18Z",
                  "subscription_manager_address": "0xa1b2c3d4e5f6789012345678901234567890abcd",
                  "chain": "eip155:1",
                  "cancel_url": "https://merchant.com/cancelled",
                  "subscription_checkout_id": "schk_1234567890abcdef"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "not_found",
                    "message": "Payment not found"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/cancel": {
      "post": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "cancelSubscription",
        "summary": "Cancel a subscription",
        "description": "Cancel an active subscription as the merchant via a signed request. Exodus submits the on-chain `cancelWithSig` transaction and pays the gas. The subscription transitions to `cancelling` once the cancel is sent, then to `cancelled` once the on-chain event is indexed. If the cancel does not take effect on-chain, the subscription returns to `active` and the `subscription.cancel_failed` webhook fires.",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "subscriptionId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "deadline": {
                    "type": "integer",
                    "minimum": 0,
                    "exclusiveMinimum": true,
                    "description": "The Unix time in seconds after which the signed cancel can no longer take effect, identical to the deadline signed. It must be at most 7 days after the request, or the cancel is rejected with 400 `validation_error` and `param: deadline`."
                  }
                },
                "required": [
                  "deadline"
                ],
                "example": {
                  "deadline": 1798761600
                }
              },
              "example": {
                "deadline": 1798761600
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The cancel result. `status` is `cancelling` until the on-chain event is indexed, including while the cancel is sent and not yet seen on-chain; `tx_hash` is the hash of the cancel transaction, which may not be confirmed yet. A retry while the subscription is `cancelling` sends nothing new and returns the held `tx_hash` (`null` when none is held). A retry signed with a later `deadline` replaces the held signature, and Exodus uses the newer signature if it has to send the cancel again. A pending cancel can still fail: the subscription then returns to `active` and `subscription.cancel_failed` fires, so sign a new cancel to try again. A first cancel can also answer `status: cancelled` with its `tx_hash` when Exodus recorded the cancel as final before it answered. Cancelling a subscription that is already `cancelled` is a no-op 200 with `tx_hash: null`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "subscription_id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "cancelling",
                        "cancelled"
                      ]
                    },
                    "tx_hash": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "subscription_id",
                    "status",
                    "tx_hash"
                  ],
                  "example": {
                    "subscription_id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
                    "status": "cancelling",
                    "tx_hash": "0x7e81c228fc4fcf0372a86ce6f8bbc457210a8b51fc30dee5557280e5153c9f06"
                  }
                },
                "example": {
                  "subscription_id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
                  "status": "cancelling",
                  "tx_hash": "0x7e81c228fc4fcf0372a86ce6f8bbc457210a8b51fc30dee5557280e5153c9f06"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key, missing `X-Signature` header, or the `X-Signature` was not produced by the merchant signer registered for the subscription's chain (\"Invalid merchant signature\"). A present but wrong-size `X-Signature` is rejected as a 400 with `param: X-Signature`; it must be a 64-byte (Solana) or 65-byte (EVM) hex string.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Invalid merchant signature"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "not_found",
                    "message": "Payment not found"
                  }
                }
              }
            }
          },
          "422": {
            "description": "The cancel cannot be processed as sent. Merchant signer not configured carries no `code` (`type: invalid_request`). Revert decoded before submission: `code` is the contract error name (`SignatureExpired`, `SubscriptionNotFound`, `SubscriptionNotActive`, `InvalidSignature`), or `UnknownRevert` when it cannot decode the error. Post-submission revert: `OnChainRevert`. `SubscriptionNotActive` or `OnChainRevert` because an earlier cancel already took effect is not an error: it returns 200 with `status: cancelling`. A cancel that was sent but whose confirmation could not be read yet is not an error: it returns 200 with `status: cancelling` and the `tx_hash`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "invalid_request",
                    "message": "On-chain cancel reverted",
                    "code": "OnChainRevert"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Relayer wallet not configured on this environment (no `code`). A relay failure the API cannot decode is not a 500 on this route: it returns the 422 `UnknownRevert` described above. Any other unexpected failure inside the cancel relay returns \"Internal server error\" with no `code`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "invalid_request",
                    "message": "Relayer wallet not configured"
                  }
                }
              }
            }
          },
          "503": {
            "description": "`type: service_unavailable`. No `code`: the relayer is paused by operators or, on EVM, cannot pay gas right now, or, on EVM, a temporary network read failed before the cancel was sent (nothing is sent in that case). Retry later with the same `deadline` and signature until that `deadline` passes. `code: subscription_manager_paused`: the merchant's subscription manager is paused on-chain; retrying will not succeed until the manager's pauser unpauses it. The pause may be Exodus-initiated as an incident response, so confirm the cause with support before unpausing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "service_unavailable",
                    "message": "Service is temporarily unavailable."
                  }
                }
              }
            }
          },
          "504": {
            "description": "`code: tx_pending`: rare. The cancel was sent, but Exodus could not record it, so the subscription can stay `active` and charges can go on. `data` carries `subscription_id` and `tx_hash` (`null` when the request sent nothing new). Retry the same request with the same signature. The retry returns the subscription's current state: 200 `cancelling` or `cancelled` once Exodus records the cancel, or the error a first cancel gets when the cancel did not take effect.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "invalid_request",
                    "message": "The cancel was sent but could not be recorded. Retry the same request: it returns the subscription's current state.",
                    "code": "tx_pending",
                    "data": {
                      "subscription_id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
                      "tx_hash": "0x9999999999999999999999999999999999999999999999999999999999999999"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/charge": {
      "post": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "chargeSubscription",
        "summary": "Charge a subscription",
        "description": "Charge an active subscription. Sign the charge `amount` together with the subscription's current `charge_nonce`; Exodus submits the on-chain charge and pays the gas. Quote first: `amount` is the token amount the charge quote returned and `price_lock_code` is its code. Each charge is bounded by the per-call `cap_amount` and the per-cycle `budget`, so multiple charges may run within a period until the budget is exhausted. Succeeded charges are recorded in the charges ledger and dispatched via the `subscription.charge_succeeded` webhook.",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "subscriptionId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "string",
                    "pattern": "^\\d+$",
                    "description": "The amount to charge, in the settlement token's smallest units, identical to the amount signed. This is the `amount` the charge quote returned, verbatim. On a legacy token-denominated plan (no `price_currency`) it is any amount within `cap_amount` and the remaining per-window `budget`."
                  },
                  "price_lock_code": {
                    "type": "string",
                    "description": "The `price_lock_code` of the charge quote whose `amount` is being charged. Required on fiat-priced plans, which is every plan that can be created today; the schema keeps it optional only for legacy token-denominated plans. The quote is bound to this subscription and to `amount`, and a missing, mismatched, expired or already-used code is rejected. A code minted for another subscription is reported as not found. Ignored on a legacy token-denominated plan."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "description": "Flat map of merchant-defined references. Up to 50 keys; keys up to 40 characters; values are strings up to 500 characters (nested values are rejected)."
                  }
                },
                "required": [
                  "amount"
                ],
                "example": {
                  "amount": "9990000",
                  "price_lock_code": "refq_3f9a1c7d2e5b8064",
                  "metadata": {
                    "invoice_id": "inv_202605"
                  }
                }
              },
              "example": {
                "amount": "9990000",
                "price_lock_code": "refq_3f9a1c7d2e5b8064",
                "metadata": {
                  "invoice_id": "inv_202605"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The charge result — `status` is always `succeeded` on a 200 (failures throw error responses). Fetch the subscription for the updated budget and scheduling state.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "subscription_id": {
                      "type": "string"
                    },
                    "charge_nonce": {
                      "type": "number"
                    },
                    "amount": {
                      "type": "string"
                    },
                    "tx_hash": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "succeeded"
                      ]
                    },
                    "metadata": {
                      "type": "object",
                      "nullable": true,
                      "additionalProperties": {
                        "nullable": true
                      }
                    }
                  },
                  "required": [
                    "subscription_id",
                    "charge_nonce",
                    "amount",
                    "tx_hash",
                    "status",
                    "metadata"
                  ],
                  "example": {
                    "subscription_id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
                    "charge_nonce": 3,
                    "amount": "9990000",
                    "tx_hash": "0x7e81c228fc4fcf0372a86ce6f8bbc457210a8b51fc30dee5557280e5153c9f06",
                    "status": "succeeded",
                    "metadata": {
                      "invoice_id": "inv_202605"
                    }
                  }
                },
                "example": {
                  "subscription_id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
                  "charge_nonce": 3,
                  "amount": "9990000",
                  "tx_hash": "0x7e81c228fc4fcf0372a86ce6f8bbc457210a8b51fc30dee5557280e5153c9f06",
                  "status": "succeeded",
                  "metadata": {
                    "invoice_id": "inv_202605"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key, missing `X-Signature` header, or the `X-Signature` was not produced by the merchant signer registered for the subscription's chain (\"Invalid merchant signature\"). A present but wrong-size `X-Signature` is rejected as a 400 with `param: X-Signature`; it must be a 64-byte (Solana) or 65-byte (EVM) hex string.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Invalid merchant signature"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "not_found",
                    "message": "Payment not found"
                  }
                }
              }
            }
          },
          "409": {
            "description": "The subscription or the quote is in a state that refuses the charge. `subscription_cancelled`: the subscription is `cancelled` or `cancelling`. `quote_expired`: the `price_lock_code` passed its `expires_at`. `quote_already_used`: the `price_lock_code` was already reserved or consumed by another request. Re-quote and re-sign for either quote code. `charge_already_recorded`: a charge is already recorded for this `charge_nonce`; a retry at that nonce gets this answer once the charge is indexed, unless it reuses the same `price_lock_code` (`quote_already_used`). `data` carries `subscription_id`, `charge_id`, `status` (always `succeeded`), `tx_hash` and `charge_nonce` of the recorded charge. Do not resubmit. `already_submitted`: an earlier request already used this `charge_nonce` (a charge, a cancel or a migration) and is not recorded yet, so this request was not applied and no failed charge is recorded. `data` carries `subscription_id`, `charge_nonce` and `tx_hash`: the hash of the newest charge that the API sent, that mined and is not recorded yet, else `null`. Do not resubmit: wait for the webhook, or fetch the subscription, before sending another request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "invalid_request",
                    "message": "Price lock has expired; re-quote required",
                    "code": "quote_expired",
                    "data": {
                      "subscription_id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "The charge cannot be processed as sent. A `price_currency` the business cannot quote carries `code: price_currency_not_quotable` (`type: invalid_request`). On a fiat-settled business, a stablecoin `amount` below the settlement floor of 1.00 USD, or the provider's higher minimum, carries `code: amount_below_settlement_minimum` with `data.minimum_usd` (`type: invalid_request`), and one above the provider's settlement maximum, when it declares one, carries `code: amount_above_settlement_maximum` with `data.maximum_usd` (`type: invalid_request`); the `price_lock_code` is not reserved. The other configuration and request-shape rejections carry no `code` (`type: invalid_request`): fiat settlement not configured, `price_currency` differs from the settlement currency, `price_lock_code` missing on a fiat-priced plan, fiat amount (plan price or quoted amount) exceeds the safe range for fiat settlement, merchant signer not configured. Ceilings: `amount_exceeds_cap`, `budget_exceeded`, `missing_budget_state`. Quote binding: `quote_amount_mismatch`, `quote_asset_mismatch`, `quote_not_found`; re-quote and re-sign. Compliance screening (`type: cannot_process`): `flagged`, either because the subscriber failed screening or because the merchant's settlement address is under a compliance hold after an out-of-band rotation; the hold clears when the merchant rotates to a different address that passes screening. Revert decoded before submission: `code` is the contract error name (`BudgetExceeded`, `ChargeAmountExceedsCap`, `InsufficientBalance`, `InsufficientAllowance`, `SubscriptionNotActive`, `SubscriptionNotFound`, `InvalidSignature`); the failed charge is recorded in the charges ledger unless a read of the chain shows the nonce already spent; at a spent nonce the API answers 409 `charge_already_recorded` or 409 `already_submitted` instead, as the 409 response describes. If that read fails, the API answers 503 and records no failed charge. A contract revert the API cannot name carries `code: UnknownRevert`. The failed charge is recorded the same way, and `subscription.charge_failed` fires. The API records at most one such failed charge, and fires one webhook, per subscription, `charge_nonce` and revert in each clock hour (UTC); the revert is its error selector, plus its message for a `require` revert. A replay with the same revert in that hour answers the same 422 and records nothing. On a fiat-priced plan the quote is released, so the same `price_lock_code` can be sent again until `expires_at`. `TokenNotSettleableOnChain`: the subscription's chain and token cannot be settled by the business's settlement provider; the failed charge is recorded in the charges ledger and `subscription.charge_failed` fires. A failed charge consumes no `charge_nonce` and no budget. A retry can succeed once the cause is resolved, except after `SubscriptionNotActive` or `SubscriptionNotFound`. After `TokenNotSettleableOnChain`, a retry will not succeed unless the settlement provider adds the pair; contact support. Post-submission revert on EVM, and the Solana program errors the API recognises: `OnChainRevert`; the failed charge is recorded with its `tx_hash` unless a read of the chain shows the nonce already spent; at a spent nonce the API answers 409 `charge_already_recorded` or 409 `already_submitted` instead, as the 409 response describes. If that read fails, the API answers 503 and records no failed charge, even though the transaction mined: the charges ledger does not show that reverted `tx_hash`, no `subscription.charge_failed` fires for it, and a retry sends a new transaction. An empty revert can answer 422 or 500 depending on whether the chain's RPC returns revert data. A chain error with no revert data, an `EnforcedPause` revert, or a revert the node returns when the signed charge is sent, returns the 500 described below.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "invalid_request",
                    "message": "Charge amount does not match the quoted price lock",
                    "code": "quote_amount_mismatch",
                    "data": {
                      "subscription_id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Relayer wallet not configured on this environment (no `code`); the quote is released, so once the environment is fixed the same `amount`, `price_lock_code` and signature stay valid until `expires_at`. `charge_persist_failed`: the charge landed on-chain but its receipt could not be recorded; `data` carries `subscription_id`, `charge_nonce` and `tx_hash`. Do not resubmit: the charge appears once indexed, and metadata can be attached afterwards through the charge metadata endpoint. Any other unexpected failure inside the charge relay, including a chain error with no revert data, an `EnforcedPause` revert, or a revert the node returns when the signed charge is sent, returns \"Internal server error\" with no `code` (a receipt-wait failure after broadcast returns the 504 below instead); the quote is not released on that path, so re-quote before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "invalid_request",
                    "message": "Relayer wallet not configured"
                  }
                }
              }
            }
          },
          "503": {
            "description": "`type: service_unavailable`. No `code`: the relayer is paused by operators or, on EVM, cannot pay gas right now, or the merchant's settlement address is awaiting a compliance re-screen after an out-of-band rotation, or the address the merchant's payment factory holds on-chain differs from the one Exodus has screened (message `The settlement address on this chain differs from the one Exodus has screened`; the relay refuses until the rotation monitor screens it or the merchant rotates that chain through the settlement endpoint), or the subscription manager points at a payment factory that is neither the screened one nor the target of a signer rotation in progress (message `The subscription manager on this chain points at a payment factory Exodus has not screened`; retry the signer rotation or rotate the manager back), or one of those on-chain reads failed (message `Settlement address check is temporarily unavailable`; retry later), or a chain read failed that the relay needs to classify a revert or to check an earlier charge at the same `charge_nonce` (no failed charge is recorded and no webhook fires). The quote is released, so retry later with the same `amount`, `price_lock_code` and signature until `expires_at`. `code: subscription_manager_paused`: the merchant's subscription manager is paused on-chain; retrying will not succeed until the manager's pauser unpauses it. The pause may be Exodus-initiated as an incident response, so confirm the cause with support before unpausing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "service_unavailable",
                    "message": "Service is temporarily unavailable."
                  }
                }
              }
            }
          },
          "504": {
            "description": "`code: tx_pending`: the transaction was broadcast but the relay could not read its receipt within the wait (the wait timed out, or the RPC failed while polling). `data` carries `subscription_id`, `charge_nonce` and `tx_hash`. Do not resubmit: the charge appears in the ledger and `subscription.charge_succeeded` fires once it is indexed.\n\nIf the transaction reverts or never mines instead, no charge is recorded and no webhook fires: the nonce stays unconsumed, the subscription stays chargeable and the quote is deleted 72 hours after it expires, so confirm the hash on-chain before you re-quote.\n\nA retry of the same charge:\n\n- On a fiat-priced plan, a retry with the same `price_lock_code` is refused with 409 `quote_already_used` (after the charge is indexed too), because the quote stays held; once the quote is deleted it gets 422 `quote_not_found`.\n- Any other retry sent before this transaction confirms answers 504 `tx_pending` with the same `tx_hash` and is not broadcast again. If the chain has no record of the transaction 5 minutes after it was sent, a retry is broadcast as a new transaction.\n- Once the transaction mined, a retry gets 409 `charge_already_recorded` once the charge is indexed, before or after the indexer advanced the nonce, and 409 `already_submitted` while it is not indexed yet, with this hash in `data.tx_hash`; no failed charge is recorded and no webhook fires for that retry.\n- A retry whose chain error carries no revert data returns the 500 described above instead, also with no failed charge.\n- A migration or a cancel can also spend the nonce: the retry gets 409 `already_submitted` until the indexer records it, then 401 after a migration or 409 `subscription_cancelled` after a cancel.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "invalid_request",
                    "message": "The transaction was broadcast but has not confirmed yet. Do not resubmit: the charge appears once indexed.",
                    "code": "tx_pending",
                    "data": {
                      "subscription_id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
                      "charge_nonce": 2,
                      "tx_hash": "0x9999999999999999999999999999999999999999999999999999999999999999"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/charge-quote": {
      "post": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "getSubscriptionChargeQuote",
        "summary": "Quote the next charge for a subscription",
        "description": "Quote the next charge for a subscription: the token `amount` to sign, plus the locked `rate` and the `price_lock_code` to submit with the charge. An optional `amount` in fiat minor units quotes an ad-hoc charge; omitted, the stored plan price is quoted. Every quote is checked against the subscription's `cap_amount` and the remaining per-window `budget` at quote time. Legacy token-denominated plans return the fixed `amount` with no lock.",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "subscriptionId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "string",
                    "pattern": "^[1-9]\\d*$",
                    "description": "Optional ad-hoc charge amount in minor units of the subscription's `price_currency`. Omitted, the stored plan price is quoted. Bounded by the subscription's `cap_amount` and the remaining per-window `budget`. At most 9007199254740991. A fiat-settled business has a settlement floor of 1.00 USD, or the provider's higher minimum."
                  }
                },
                "additionalProperties": false,
                "example": {
                  "amount": "3490000"
                }
              },
              "example": {
                "amount": "3490000"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The charge quote, including any locked rate.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "subscription_charge_quote"
                      ]
                    },
                    "subscription_id": {
                      "type": "string",
                      "description": "The on-chain subscription id the quote is for."
                    },
                    "amount": {
                      "type": "string",
                      "description": "The amount to sign and submit to the charge, in the settlement token's smallest units. It is the fiat amount converted at `rate` and rounded to a whole smallest unit. That fiat amount is the ad-hoc `amount` from the request body when given, else the plan `price`. On a fiat-settled business the amount is the settlement provider's quoted crypto amount; send exactly that amount."
                    },
                    "price_lock_code": {
                      "type": "string",
                      "nullable": true,
                      "description": "Code that binds this quote to the subscription, its token and chain, and `amount`. Pass it to the charge before `expires_at`. One successful charge consumes the code; a cleanly rejected charge releases it, so you can retry with it until `expires_at`. A charge whose on-chain outcome is undeterminable holds the code instead; re-quote rather than retry. Minted by the settlement provider on a fiat-settled business, or as a `refq_`-prefixed reference quote on a crypto-settled one. Legacy token-denominated plans, created before fiat-only creation shipped, return `null` here and in `rate` and `expires_at`; their `amount` is the plan `price` unchanged."
                    },
                    "rate": {
                      "type": "string",
                      "nullable": true,
                      "description": "Conversion rate the quote applied, in whole units of `price_currency` per one whole token (`\"696.27\"` is 696.27 ARS per USDC)."
                    },
                    "expires_at": {
                      "type": "string",
                      "nullable": true,
                      "description": "ISO 8601 timestamp after which the quote can no longer be charged. Quote again past it."
                    }
                  },
                  "required": [
                    "object",
                    "subscription_id",
                    "amount",
                    "price_lock_code",
                    "rate",
                    "expires_at"
                  ],
                  "example": {
                    "object": "subscription_charge_quote",
                    "subscription_id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
                    "amount": "9990000",
                    "price_lock_code": "refq_3f9a1c7d2e5b8064",
                    "rate": "696.27",
                    "expires_at": "2026-09-16T12:04:18Z"
                  }
                },
                "example": {
                  "object": "subscription_charge_quote",
                  "subscription_id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
                  "amount": "9990000",
                  "price_lock_code": "refq_3f9a1c7d2e5b8064",
                  "rate": "696.27",
                  "expires_at": "2026-09-16T12:04:18Z"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "not_found",
                    "message": "Payment not found"
                  }
                }
              }
            }
          },
          "422": {
            "description": "The charge cannot be quoted (`type: invalid_request`). A `price_currency` the business cannot quote carries `code: price_currency_not_quotable`; an `amount` sent for a legacy token-denominated plan carries `code: amount_override_not_supported`. On a fiat-settled business, a quoted amount (plan price or `amount`) below the settlement floor of 1.00 USD, or the provider's higher minimum, carries `code: amount_below_settlement_minimum` with `data.minimum_usd`, and one above the provider's settlement maximum, when it declares one, carries `code: amount_above_settlement_maximum` with `data.maximum_usd`. Ceilings, checked against the quoted amount: `amount_exceeds_cap`, `budget_exceeded`, `missing_budget_state`. A fiat amount (plan price or `amount`) beyond the safe range for fiat settlement carries no `code`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "invalid_request",
                    "code": "price_currency_not_quotable",
                    "message": "price_currency_not_quotable: price_currency is not supported"
                  }
                }
              }
            }
          },
          "502": {
            "description": "`code: settlement_quote_unavailable` (`type: invalid_request`). The settlement provider could not issue or attach a quote; retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "invalid_request",
                    "code": "settlement_quote_unavailable",
                    "message": "Failed to create price lock: provider unavailable",
                    "data": {
                      "subscription_id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/merchants/{merchantId}/subscriptions": {
      "get": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "listSubscriptions",
        "summary": "List a merchant's subscriptions",
        "description": "Retrieve a paginated list of a merchant's subscriptions, most recent first. Filter by status, chain, and external customer id.",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "merchantId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}$"
            },
            "required": false,
            "name": "chain",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "cancelling",
                "cancelled"
              ]
            },
            "required": false,
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "description": "Deprecated: will be removed. Every subscription has `paused: false`, so `true` returns an empty list and `false` matches every subscription."
            },
            "required": false,
            "description": "Deprecated: will be removed. Every subscription has `paused: false`, so `true` returns an empty list and `false` matches every subscription.",
            "deprecated": true,
            "name": "paused",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "description": "Filter to subscriptions whose `external_customer_id` matches exactly."
            },
            "required": false,
            "description": "Filter to subscriptions whose `external_customer_id` matches exactly.",
            "name": "external_customer_id",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Rows per page, 1 to 100. Defaults to 50. Values outside the range are rejected rather than clamped."
            },
            "required": false,
            "description": "Rows per page, 1 to 100. Defaults to 50. Values outside the range are rejected rather than clamped.",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Cursor for forward pagination: a subscription `id` (the on-chain bytes32 id) from a previous page. Returns subscriptions after it. Mutually exclusive with `ending_before`; sending both is a 400."
            },
            "required": false,
            "description": "Cursor for forward pagination: a subscription `id` (the on-chain bytes32 id) from a previous page. Returns subscriptions after it. Mutually exclusive with `ending_before`; sending both is a 400.",
            "name": "starting_after",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Cursor for backward pagination: a subscription `id` from a previous page. Returns subscriptions before it. Mutually exclusive with `starting_after`; sending both is a 400."
            },
            "required": false,
            "description": "Cursor for backward pagination: a subscription `id` from a previous page. Returns subscriptions before it. Mutually exclusive with `starting_after`; sending both is a 400.",
            "name": "ending_before",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of subscriptions.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Subscription"
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "has_more"
                  ],
                  "example": {
                    "object": "list",
                    "data": [
                      {
                        "object": "subscription",
                        "id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
                        "subscriber": "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21",
                        "external_customer_id": "cus_42",
                        "asset": "eip155:1/erc20:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
                        "token_symbol": "USDC",
                        "token_decimals": 6,
                        "cap_amount": "120000000",
                        "price": "1250000",
                        "price_currency": "ARS",
                        "period_duration": 2592000,
                        "last_charged_at": "2026-04-19T12:02:18Z",
                        "next_charge_at": "2026-05-19T12:02:18Z",
                        "charge_nonce": 3,
                        "status": "active",
                        "paused": false,
                        "flagged": false,
                        "budget": "300000000",
                        "spent_this_period": "29970000",
                        "remaining_budget": "270030000",
                        "created_at": "2026-02-19T12:02:18Z"
                      }
                    ],
                    "has_more": false
                  }
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "object": "subscription",
                      "id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
                      "subscriber": "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE21",
                      "external_customer_id": "cus_42",
                      "asset": "eip155:1/erc20:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
                      "token_symbol": "USDC",
                      "token_decimals": 6,
                      "cap_amount": "120000000",
                      "price": "1250000",
                      "price_currency": "ARS",
                      "period_duration": 2592000,
                      "last_charged_at": "2026-04-19T12:02:18Z",
                      "next_charge_at": "2026-05-19T12:02:18Z",
                      "charge_nonce": 3,
                      "status": "active",
                      "paused": false,
                      "flagged": false,
                      "budget": "300000000",
                      "spent_this_period": "29970000",
                      "remaining_budget": "270030000",
                      "created_at": "2026-02-19T12:02:18Z"
                    }
                  ],
                  "has_more": false
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "starting_after and ending_before are mutually exclusive",
                    "param": "ending_before"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/merchants/{merchantId}/subscription-managers": {
      "get": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "listSubscriptionManagers",
        "summary": "List a merchant's deployed subscription managers",
        "description": "List the merchant's deployed SubscriptionManager contracts per chain, with the supported tokens and their decimals.",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "merchantId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deployed subscription manager contracts per chain.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "object": {
                            "type": "string",
                            "enum": [
                              "subscription_manager"
                            ]
                          },
                          "chain": {
                            "type": "string"
                          },
                          "address": {
                            "type": "string"
                          },
                          "version": {
                            "type": "string"
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "network_name": {
                            "type": "string",
                            "nullable": true
                          },
                          "tokens": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "object",
                              "properties": {
                                "decimals": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "decimals"
                              ]
                            }
                          }
                        },
                        "required": [
                          "object",
                          "chain",
                          "address",
                          "version",
                          "created_at",
                          "network_name",
                          "tokens"
                        ]
                      }
                    }
                  },
                  "required": [
                    "object",
                    "data"
                  ],
                  "example": {
                    "object": "list",
                    "data": [
                      {
                        "object": "subscription_manager",
                        "chain": "eip155:1",
                        "address": "0xa1b2c3d4e5f6789012345678901234567890abcd",
                        "version": "v4",
                        "created_at": "2026-02-19T12:02:18Z",
                        "network_name": "Ethereum",
                        "tokens": {
                          "USDC": {
                            "decimals": 6
                          }
                        }
                      },
                      {
                        "object": "subscription_manager",
                        "chain": "eip155:137",
                        "address": "0xb2c3d4e5f67890123456789012345678901234cd",
                        "version": "v3",
                        "created_at": "2026-02-19T12:02:18Z",
                        "network_name": "Polygon",
                        "tokens": {
                          "USDC": {
                            "decimals": 6
                          }
                        }
                      }
                    ]
                  }
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "object": "subscription_manager",
                      "chain": "eip155:1",
                      "address": "0xa1b2c3d4e5f6789012345678901234567890abcd",
                      "version": "v4",
                      "created_at": "2026-02-19T12:02:18Z",
                      "network_name": "Ethereum",
                      "tokens": {
                        "USDC": {
                          "decimals": 6
                        }
                      }
                    },
                    {
                      "object": "subscription_manager",
                      "chain": "eip155:137",
                      "address": "0xb2c3d4e5f67890123456789012345678901234cd",
                      "version": "v3",
                      "created_at": "2026-02-19T12:02:18Z",
                      "network_name": "Polygon",
                      "tokens": {
                        "USDC": {
                          "decimals": 6
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "amount must be a positive number",
                    "param": "amount"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/merchants/{merchantId}/webhook-events": {
      "get": {
        "security": [
          {
            "ApiKey": []
          }
        ],
        "operationId": "listWebhookEvents",
        "summary": "List webhook events",
        "description": "List webhook delivery records for the merchant, most recent first. Each record includes the event type, delivery status, attempt count, and the payload sent to your endpoint. Filter by subscription, type, and delivery status.",
        "tags": [
          "Webhook events"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "merchantId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Rows per page, 1 to 100. Defaults to 50. Values outside the range are rejected rather than clamped."
            },
            "required": false,
            "description": "Rows per page, 1 to 100. Defaults to 50. Values outside the range are rejected rather than clamped.",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Cursor for forward pagination: an object id from a previous page. Returns results after it. Mutually exclusive with `ending_before`; sending both is a 400."
            },
            "required": false,
            "description": "Cursor for forward pagination: an object id from a previous page. Returns results after it. Mutually exclusive with `ending_before`; sending both is a 400.",
            "name": "starting_after",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Cursor for backward pagination: an object id from a previous page. Returns results before it. Mutually exclusive with `starting_after`; sending both is a 400."
            },
            "required": false,
            "description": "Cursor for backward pagination: an object id from a previous page. Returns results before it. Mutually exclusive with `starting_after`; sending both is a 400.",
            "name": "ending_before",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": false,
            "name": "subscription_id",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": false,
            "name": "type",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "required": false,
            "name": "delivered",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of webhook events.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "object",
                    "data",
                    "has_more"
                  ],
                  "example": {
                    "object": "list",
                    "data": [
                      {
                        "id": "evt_1234567890abcdef",
                        "object": "event",
                        "type": "payment.settled",
                        "delivered": true,
                        "attempts": 1,
                        "last_error": null,
                        "subscription_id": null,
                        "subscription_checkout_id": null,
                        "checkout_id": "chk_1234567890abcdef",
                        "payment_id": "tz4a98xxat96iws9zmbrgj3a",
                        "payload": {
                          "id": "evt_1234567890abcdef",
                          "object": "event",
                          "type": "payment.settled",
                          "created_at": "2024-01-15T12:30:00Z",
                          "data": {
                            "object": {
                              "id": "tz4a98xxat96iws9zmbrgj3a",
                              "object": "payment",
                              "status": "settled"
                            }
                          }
                        },
                        "created_at": "2024-01-15T12:30:00Z",
                        "delivered_at": "2024-01-15T12:30:01Z"
                      }
                    ],
                    "has_more": false
                  }
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "id": "evt_1234567890abcdef",
                      "object": "event",
                      "type": "payment.settled",
                      "delivered": true,
                      "attempts": 1,
                      "last_error": null,
                      "subscription_id": null,
                      "subscription_checkout_id": null,
                      "checkout_id": "chk_1234567890abcdef",
                      "payment_id": "tz4a98xxat96iws9zmbrgj3a",
                      "payload": {
                        "id": "evt_1234567890abcdef",
                        "object": "event",
                        "type": "payment.settled",
                        "created_at": "2024-01-15T12:30:00Z",
                        "data": {
                          "object": {
                            "id": "tz4a98xxat96iws9zmbrgj3a",
                            "object": "payment",
                            "status": "settled"
                          }
                        }
                      },
                      "created_at": "2024-01-15T12:30:00Z",
                      "delivered_at": "2024-01-15T12:30:01Z"
                    }
                  ],
                  "has_more": false
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "validation_error",
                    "message": "starting_after and ending_before are mutually exclusive",
                    "param": "ending_before"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "authentication_error",
                    "message": "Missing or invalid API key"
                  }
                }
              }
            }
          },
          "403": {
            "description": "API key lacks the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "type": "permission_error",
                    "message": "API key is missing the required scope for this endpoint",
                    "code": "insufficient_scope",
                    "data": {
                      "required_scope": "<scope>"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
