{
  "openapi" : "3.1.0",
  "info" : {
    "title" : "Proxy-Seller x402 channel",
    "version" : "1.0.0",
    "description" : "Proxy purchase for AI agents over x402 v2: request a quote (402 + PAYMENT-REQUIRED), sign an EIP-3009 USDC transfer, retry with PAYMENT-SIGNATURE, poll the order with its access token. All amounts in USD are strings with two decimals; atomic amounts are unsigned integer strings; timestamps are RFC 3339 UTC."
  },
  "servers" : [ {
    "url" : "https://proxy-seller.com"
  } ],
  "tags" : [ {
    "name" : "catalog"
  }, {
    "name" : "orders"
  }, {
    "name" : "wallet"
  }, {
    "name" : "topup"
  } ],
  "paths" : {
    "/api/x402/v1/catalog" : {
      "get" : {
        "tags" : [ "catalog" ],
        "summary" : "Catalog: products, countries, periods, unit prices, terms, protocol capabilities",
        "responses" : {
          "200" : {
            "description" : "Catalog snapshot",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Catalog"
                }
              }
            }
          },
          "400" : {
            "description" : "Unknown or unpublished product",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "Catalog is being built",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "product",
          "in" : "query",
          "required" : false,
          "schema" : {
            "type" : "string"
          },
          "description" : "return only this product: the same envelope with one entry in products, ETag \"<catalog_version>:<product>\""
        } ],
        "x-cacheable" : true
      }
    },
    "/api/x402/v1/orders" : {
      "post" : {
        "tags" : [ "orders" ],
        "summary" : "Create an order. Without payment → 402 with PAYMENT-REQUIRED; with PAYMENT-SIGNATURE → 202",
        "responses" : {
          "202" : {
            "description" : "Payment accepted. A replay of the same PAYMENT-SIGNATURE (or of the same idempotency_key with the same payload) within 24 hours returns the same access_token and webhook_secret; later it returns the current state without access_token, webhook_secret and proxy credentials, with note and recover_url (POST /wallet/recover issues a new access token)",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationAccepted"
                }
              }
            }
          },
          "402" : {
            "description" : "payment_required: sign accepts[0] from the PAYMENT-REQUIRED header and retry with PAYMENT-SIGNATURE. quote_expired and payment_expired carry new requirements and a new quote the same way (resign). payment_invalid (abandon) and insufficient_funds (wait_and_retry, not before retry_after_seconds) come without new requirements",
            "headers" : {
              "PAYMENT-REQUIRED" : {
                "schema" : {
                  "type" : "string"
                },
                "description" : "base64(JSON PaymentRequired v2)"
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PaymentRequiredBody"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid request",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "intended_use not allowed or wallet rejected",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "409" : {
            "description" : "payment_not_settleable (the presented authorization can still be settled: do not sign again before authorization_expires_at), payment_under_review (human_required), quote_bound_to_other_wallet (bound_wallet and a new quote in PAYMENT-REQUIRED: resign), quote_payment_in_progress (wait_and_retry), quote_config_mismatch, payment_replayed, idempotency_key_conflict (abandon)",
            "headers" : {
              "PAYMENT-REQUIRED" : {
                "schema" : {
                  "type" : "string"
                },
                "description" : "only with quote_bound_to_other_wallet: base64(JSON PaymentRequired v2)"
              },
              "Retry-After" : {
                "schema" : {
                  "type" : "integer"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "Rate limited",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "settlement_retry (retry_same_payment: repeat the same request with the same PAYMENT-SIGNATURE after Retry-After, never sign again), channel_paused, dependency_unavailable (wait_and_retry)",
            "headers" : {
              "Retry-After" : {
                "schema" : {
                  "type" : "integer"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody" : {
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/OrderCreateRequest"
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "PAYMENT-SIGNATURE",
          "in" : "header",
          "required" : false,
          "schema" : {
            "type" : "string"
          },
          "description" : "base64(JSON PaymentPayload v2) — present only on the paying retry"
        } ],
        "x-cacheable" : false
      }
    },
    "/api/x402/v1/orders/{id}" : {
      "get" : {
        "tags" : [ "orders" ],
        "summary" : "Order status, lines, proxies with credentials, credits, renewals, auto-renew block",
        "responses" : {
          "200" : {
            "description" : "Order",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Order"
                }
              }
            }
          },
          "401" : {
            "description" : "Missing or malformed Authorization",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "Order not found (also for a foreign, revoked or expired token)",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [ {
          "orderToken" : [ ]
        } ],
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string",
            "pattern" : "^ord_[0-9A-HJKMNP-TV-Z]{26}$"
          }
        } ],
        "x-cacheable" : false
      },
      "patch" : {
        "tags" : [ "orders" ],
        "summary" : "JSON Merge Patch: auto_renew, callback_url, auth_method, allowed_ips",
        "responses" : {
          "200" : {
            "description" : "Changed fields; webhook_secret (with webhook_signature) is returned once when callback_url changes. Sending callback_url (the same URL or null) also re-enables webhook delivery to a disabled URL",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OrderPatchResult"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid field",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "Missing token",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "Order not found",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "Provider unavailable",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [ {
          "orderToken" : [ ]
        } ],
        "requestBody" : {
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/OrderPatchRequest"
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string",
            "pattern" : "^ord_[0-9A-HJKMNP-TV-Z]{26}$"
          }
        } ],
        "x-cacheable" : false
      }
    },
    "/api/x402/v1/orders/{id}/events" : {
      "get" : {
        "tags" : [ "orders" ],
        "summary" : "Pull channel of order events (same journal as webhooks), chronological, 90-day retention",
        "responses" : {
          "200" : {
            "description" : "Events",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/EventPage"
                }
              }
            }
          },
          "401" : {
            "description" : "Missing token",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "Order not found",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [ {
          "orderToken" : [ ]
        } ],
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string",
            "pattern" : "^ord_[0-9A-HJKMNP-TV-Z]{26}$"
          }
        }, {
          "name" : "since",
          "in" : "query",
          "required" : false,
          "schema" : {
            "type" : "string"
          },
          "description" : "event_id to continue after"
        }, {
          "name" : "limit",
          "in" : "query",
          "required" : false,
          "schema" : {
            "type" : "integer",
            "minimum" : 1,
            "maximum" : 200
          }
        } ],
        "x-cacheable" : false
      }
    },
    "/api/x402/v1/orders/{id}/items/{line_id}/renew" : {
      "post" : {
        "tags" : [ "orders" ],
        "summary" : "Renew a line. Without payment → 402 with the renewal price; with PAYMENT-SIGNATURE → 202 (poll the parent order)",
        "responses" : {
          "202" : {
            "description" : "Renewal accepted",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationAccepted"
                }
              }
            }
          },
          "402" : {
            "description" : "payment_required: sign accepts[0] from the PAYMENT-REQUIRED header and retry with PAYMENT-SIGNATURE. quote_expired and payment_expired carry new requirements and a new quote the same way (resign). payment_invalid (abandon) and insufficient_funds (wait_and_retry, not before retry_after_seconds) come without new requirements",
            "headers" : {
              "PAYMENT-REQUIRED" : {
                "schema" : {
                  "type" : "string"
                },
                "description" : "base64(JSON PaymentRequired v2)"
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PaymentRequiredBody"
                }
              }
            }
          },
          "400" : {
            "description" : "Line is not renewable",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "Missing token",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "Wallet rejected",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "Order not found",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "409" : {
            "description" : "payment_not_settleable (the presented authorization can still be settled: do not sign again before authorization_expires_at), payment_under_review (human_required), quote_bound_to_other_wallet (bound_wallet and a new quote in PAYMENT-REQUIRED: resign), quote_payment_in_progress (wait_and_retry), quote_config_mismatch, payment_replayed, idempotency_key_conflict (abandon)",
            "headers" : {
              "PAYMENT-REQUIRED" : {
                "schema" : {
                  "type" : "string"
                },
                "description" : "only with quote_bound_to_other_wallet: base64(JSON PaymentRequired v2)"
              },
              "Retry-After" : {
                "schema" : {
                  "type" : "integer"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "Rate limited",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "settlement_retry (retry_same_payment: repeat the same request with the same PAYMENT-SIGNATURE after Retry-After, never sign again), channel_paused, dependency_unavailable (wait_and_retry)",
            "headers" : {
              "Retry-After" : {
                "schema" : {
                  "type" : "integer"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [ {
          "orderToken" : [ ]
        } ],
        "requestBody" : {
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RenewRequest"
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string",
            "pattern" : "^ord_[0-9A-HJKMNP-TV-Z]{26}$"
          }
        }, {
          "name" : "line_id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "PAYMENT-SIGNATURE",
          "in" : "header",
          "required" : false,
          "schema" : {
            "type" : "string"
          },
          "description" : "base64(JSON PaymentPayload v2) — present only on the paying retry"
        } ],
        "x-cacheable" : false
      }
    },
    "/api/x402/v1/orders/{id}/traffic" : {
      "post" : {
        "tags" : [ "orders" ],
        "summary" : "Add traffic to a residential package. Without payment → 402 with the tier price; with PAYMENT-SIGNATURE → 202 (poll the parent order). Buying traffic restarts the package period",
        "responses" : {
          "202" : {
            "description" : "Traffic top-up accepted",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationAccepted"
                }
              }
            }
          },
          "402" : {
            "description" : "payment_required: sign accepts[0] from the PAYMENT-REQUIRED header and retry with PAYMENT-SIGNATURE. quote_expired and payment_expired carry new requirements and a new quote the same way (resign). payment_invalid (abandon) and insufficient_funds (wait_and_retry, not before retry_after_seconds) come without new requirements",
            "headers" : {
              "PAYMENT-REQUIRED" : {
                "schema" : {
                  "type" : "string"
                },
                "description" : "base64(JSON PaymentRequired v2)"
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PaymentRequiredBody"
                }
              }
            }
          },
          "400" : {
            "description" : "Not a residential order or unknown tier",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "Missing token",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "Wallet rejected",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "Order not found",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "409" : {
            "description" : "payment_not_settleable (the presented authorization can still be settled: do not sign again before authorization_expires_at), payment_under_review (human_required), quote_bound_to_other_wallet (bound_wallet and a new quote in PAYMENT-REQUIRED: resign), quote_payment_in_progress (wait_and_retry), quote_config_mismatch, payment_replayed, idempotency_key_conflict (abandon)",
            "headers" : {
              "PAYMENT-REQUIRED" : {
                "schema" : {
                  "type" : "string"
                },
                "description" : "only with quote_bound_to_other_wallet: base64(JSON PaymentRequired v2)"
              },
              "Retry-After" : {
                "schema" : {
                  "type" : "integer"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "Rate limited",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "settlement_retry (retry_same_payment: repeat the same request with the same PAYMENT-SIGNATURE after Retry-After, never sign again), channel_paused, dependency_unavailable (wait_and_retry)",
            "headers" : {
              "Retry-After" : {
                "schema" : {
                  "type" : "integer"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [ {
          "orderToken" : [ ]
        } ],
        "requestBody" : {
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/TrafficRequest"
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string",
            "pattern" : "^ord_[0-9A-HJKMNP-TV-Z]{26}$"
          }
        }, {
          "name" : "PAYMENT-SIGNATURE",
          "in" : "header",
          "required" : false,
          "schema" : {
            "type" : "string"
          },
          "description" : "base64(JSON PaymentPayload v2) — present only on the paying retry"
        } ],
        "x-cacheable" : false
      }
    },
    "/api/x402/v1/orders/{id}/replace" : {
      "post" : {
        "tags" : [ "orders" ],
        "summary" : "Request replacement of non-working proxies (provider processes asynchronously)",
        "responses" : {
          "202" : {
            "description" : "Per-address result",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ReplaceResult"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid request",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "Missing token",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "Order not found",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "Provider unavailable",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [ {
          "orderToken" : [ ]
        } ],
        "requestBody" : {
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ReplaceRequest"
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string",
            "pattern" : "^ord_[0-9A-HJKMNP-TV-Z]{26}$"
          }
        } ],
        "x-cacheable" : false
      }
    },
    "/api/x402/v1/topup" : {
      "post" : {
        "tags" : [ "topup" ],
        "summary" : "Top up the wallet balance (used for auto-renew). Without payment → 402; with PAYMENT-SIGNATURE → 202",
        "responses" : {
          "202" : {
            "description" : "Top-up accepted",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OperationAccepted"
                }
              }
            }
          },
          "402" : {
            "description" : "payment_required: sign accepts[0] from the PAYMENT-REQUIRED header and retry with PAYMENT-SIGNATURE. quote_expired and payment_expired carry new requirements and a new quote the same way (resign). payment_invalid (abandon) and insufficient_funds (wait_and_retry, not before retry_after_seconds) come without new requirements",
            "headers" : {
              "PAYMENT-REQUIRED" : {
                "schema" : {
                  "type" : "string"
                },
                "description" : "base64(JSON PaymentRequired v2)"
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PaymentRequiredBody"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid amount",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "Wallet rejected",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "409" : {
            "description" : "payment_not_settleable (the presented authorization can still be settled: do not sign again before authorization_expires_at), payment_under_review (human_required), quote_bound_to_other_wallet (bound_wallet and a new quote in PAYMENT-REQUIRED: resign), quote_payment_in_progress (wait_and_retry), quote_config_mismatch, payment_replayed, idempotency_key_conflict (abandon)",
            "headers" : {
              "PAYMENT-REQUIRED" : {
                "schema" : {
                  "type" : "string"
                },
                "description" : "only with quote_bound_to_other_wallet: base64(JSON PaymentRequired v2)"
              },
              "Retry-After" : {
                "schema" : {
                  "type" : "integer"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "Rate limited",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "settlement_retry (retry_same_payment: repeat the same request with the same PAYMENT-SIGNATURE after Retry-After, never sign again), channel_paused, dependency_unavailable (wait_and_retry)",
            "headers" : {
              "Retry-After" : {
                "schema" : {
                  "type" : "integer"
                }
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody" : {
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/TopupRequest"
              }
            }
          }
        },
        "parameters" : [ {
          "name" : "PAYMENT-SIGNATURE",
          "in" : "header",
          "required" : false,
          "schema" : {
            "type" : "string"
          },
          "description" : "base64(JSON PaymentPayload v2) — present only on the paying retry"
        } ],
        "x-cacheable" : false
      }
    },
    "/api/x402/v1/topup/{id}" : {
      "get" : {
        "tags" : [ "topup" ],
        "summary" : "Top-up status by its access token",
        "responses" : {
          "200" : {
            "description" : "Top-up",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Topup"
                }
              }
            }
          },
          "401" : {
            "description" : "Missing token",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "Not found",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security" : [ {
          "orderToken" : [ ]
        } ],
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string",
            "pattern" : "^tup_[0-9A-HJKMNP-TV-Z]{26}$"
          }
        } ],
        "x-cacheable" : false
      }
    },
    "/api/x402/v1/wallet/challenge" : {
      "post" : {
        "tags" : [ "wallet" ],
        "summary" : "Challenge (EIP-4361 / CAIP-122 message) to sign with the wallet",
        "responses" : {
          "200" : {
            "description" : "Challenge",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Challenge"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid address",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "429" : {
            "description" : "Rate limited",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody" : {
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/WalletChallengeRequest"
              }
            }
          }
        },
        "x-cacheable" : false
      }
    },
    "/api/x402/v1/wallet/recover" : {
      "post" : {
        "tags" : [ "wallet" ],
        "summary" : "Signed challenge → orders with new access tokens, pending payments, balance",
        "responses" : {
          "200" : {
            "description" : "Wallet state",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/WalletRecovery"
                }
              }
            }
          },
          "401" : {
            "description" : "Signature does not match",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "Challenge unknown, expired or used",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody" : {
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/WalletRecoverRequest"
              }
            }
          }
        },
        "x-cacheable" : false
      }
    },
    "/api/x402/v1/wallet/withdraw" : {
      "post" : {
        "tags" : [ "wallet" ],
        "summary" : "Signed withdrawal request to the paying address (manual queue)",
        "responses" : {
          "202" : {
            "description" : "Withdrawal requested",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Withdrawal"
                }
              }
            }
          },
          "400" : {
            "description" : "Amount not available",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "401" : {
            "description" : "Signature does not match",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "403" : {
            "description" : "Wallet rejected",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "404" : {
            "description" : "Challenge unknown, expired or used",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "503" : {
            "description" : "Wallet screening unavailable",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody" : {
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/WalletWithdrawRequest"
              }
            }
          }
        },
        "x-cacheable" : false
      }
    },
    "/api/x402/v1/openapi.json" : {
      "get" : {
        "tags" : [ "catalog" ],
        "summary" : "This document",
        "responses" : {
          "200" : {
            "description" : "OpenAPI 3.1 document"
          }
        },
        "x-cacheable" : true
      }
    }
  },
  "webhooks" : {
    "orderEvent" : {
      "post" : {
        "summary" : "Order event delivered to callback_url",
        "description" : "POST of one order event to the order's callback_url (https, port 443), HTTP/1.1, Content-Type: application/json; charset=utf-8, User-Agent: ProxySeller-Webhooks/1. The body is exactly one element of the pull channel (GET /orders/{id}/events) except attempt, which is the delivery attempt number (1, 2, …); the bytes of the body are the raw_body of the signature.\n\nSignature: X-PS-Timestamp is the unix time of sending in seconds (decimal string); X-PS-Signature: v1=hex(HMAC-SHA256(key, timestamp + \".\" + raw_body)), the HMAC key is the webhook_secret string as UTF-8 bytes (including the whsec_ prefix, not decoded). For 24 hours after webhook_secret changes the header carries two signatures, v1=<current>,v1=<previous> (current first): accept the request if any of them matches. Reject requests whose timestamp differs from your clock by more than 300 seconds.\n\nSuccess is any 2xx within 5 seconds (DNS, connect, TLS, request and the status line); everything else (1xx, 3xx — redirects are not followed, 4xx, 5xx, timeout, connection or TLS failure) is retried. Only the status line is read, the response body is ignored.\n\nDelivery is at-least-once and unordered: deduplicate by event_id. Retries follow the schedule 1m, 5m, 30m, 2h, 6h, 12h, 24h (8 attempts, about 45.6 hours in total); when the last attempt of an event fails and the URL has not accepted any webhook since that event was created, delivery to the URL is disabled until the client sends PATCH /orders/{id} with callback_url (the same URL, a new one or null; re-enabling the same URL takes effect at most once an hour). Changing callback_url to another URL starts it with a clean state. Disabling never changes the order.\n\nNot delivered by webhook, but available in the pull channel: events whose delivery is attempted while the order has no callback_url or while the URL is disabled (an event written before callback_url is set or the URL is re-enabled may still be delivered if it has not been attempted by then: do not rely on either outcome, the pull channel has every event), events that could not be delivered within about 45.6 hours of their creation (including a long delivery outage on our side; this does not disable the URL). Events of other operations (top-ups, withdrawals, renewal and traffic payments) have no callback_url and are not delivered by webhook.",
        "parameters" : [ {
          "name" : "X-PS-Timestamp",
          "in" : "header",
          "required" : true,
          "schema" : {
            "type" : "string",
            "pattern" : "^[0-9]+$"
          },
          "description" : "unix time of sending, seconds"
        }, {
          "name" : "X-PS-Signature",
          "in" : "header",
          "required" : true,
          "schema" : {
            "type" : "string",
            "pattern" : "^v1=[0-9a-f]{64}(,v1=[0-9a-f]{64})?$"
          },
          "description" : "v1=<hex HMAC-SHA256>; for 24 hours after a secret rotation also ,v1=<previous>"
        } ],
        "requestBody" : {
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/Event"
              }
            }
          }
        },
        "responses" : {
          "2XX" : {
            "description" : "Accepted: the event is not sent again"
          },
          "default" : {
            "description" : "Not accepted: the event is retried by the schedule"
          }
        }
      }
    }
  },
  "components" : {
    "securitySchemes" : {
      "orderToken" : {
        "type" : "http",
        "scheme" : "bearer",
        "description" : "access_token issued once with the paid operation (after settle) or by /wallet/recover; scope is exactly one operation; valid while the order lives plus 90 days (operations without a term: 90 days from the final status); revocable one by one; a new one is issued only by /wallet/recover"
      }
    },
    "schemas" : {
      "Error" : {
        "type" : "object",
        "required" : [ "error", "message", "retryable", "retry_action" ],
        "properties" : {
          "error" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "retryable" : {
            "type" : "boolean"
          },
          "retry_action" : {
            "type" : "string",
            "enum" : [ "resign", "retry_same_payment", "poll", "wait_and_retry", "abandon", "human_required" ]
          },
          "retry_after_seconds" : {
            "type" : "integer"
          },
          "poll_url" : {
            "type" : "string",
            "format" : "uri"
          },
          "order_id" : {
            "type" : "string"
          },
          "operation_id" : {
            "type" : "string"
          },
          "payment_state" : {
            "type" : "string",
            "enum" : [ "unused", "in_flight", "settled" ],
            "description" : "present in every response after verify: unused — settle was not and will not be called, do not pay again before authorization_expires_at; in_flight — outcome unknown; settled — funds taken"
          },
          "authorization_expires_at" : {
            "type" : "string",
            "format" : "date-time"
          },
          "bound_wallet" : {
            "type" : "string"
          },
          "detail" : {
            "type" : "string"
          },
          "facilitator_reason" : {
            "type" : "string"
          }
        },
        "additionalProperties" : true
      },
      "PaymentRequiredBody" : {
        "allOf" : [ {
          "$ref" : "#/components/schemas/Error"
        }, {
          "type" : "object",
          "properties" : {
            "quote_id" : {
              "type" : "string"
            },
            "quote_expires_at" : {
              "type" : "string",
              "format" : "date-time"
            },
            "amount_usd" : {
              "type" : "string",
              "pattern" : "^(0|[1-9][0-9]{0,8})\\.[0-9]{2}$",
              "examples" : [ "18.00" ]
            },
            "amount_atomic" : {
              "type" : "string"
            },
            "network" : {
              "type" : "string"
            },
            "asset" : {
              "type" : "string"
            }
          }
        } ]
      },
      "Catalog" : {
        "type" : "object",
        "additionalProperties" : true
      },
      "OrderItem" : {
        "type" : "object",
        "description" : "Dedicated products: country, qty, period_days. RESIDENT: exactly one item with gb (a catalog tier). MOBILE: country, qty, period_days and options {operator, rotation_min, service_type}. MIX and MIX_ISP: mix (package tag), qty (a package size) and period_days, no country",
        "properties" : {
          "country" : {
            "type" : "string",
            "pattern" : "^[A-Za-z]{2}$"
          },
          "qty" : {
            "type" : "integer",
            "minimum" : 1
          },
          "period_days" : {
            "type" : "integer",
            "minimum" : 1
          },
          "gb" : {
            "type" : "string",
            "pattern" : "^(0|[1-9][0-9]{0,6})(\\.[0-9]{1,3})?$"
          },
          "mix" : {
            "type" : "string",
            "pattern" : "^[A-Za-z0-9_.-]{1,64}$",
            "description" : "MIX and MIX_ISP only: package tag from /catalog"
          },
          "options" : {
            "type" : "object",
            "additionalProperties" : false,
            "description" : "MOBILE only (other products: absent or empty)",
            "properties" : {
              "operator" : {
                "type" : "string",
                "minLength" : 1,
                "maxLength" : 64,
                "description" : "carrier tag from /catalog, exact case"
              },
              "rotation_min" : {
                "type" : "integer",
                "minimum" : 0,
                "maximum" : 1440
              },
              "service_type" : {
                "type" : "string",
                "description" : "default dedicated"
              }
            }
          }
        },
        "additionalProperties" : false
      },
      "OrderCreateRequest" : {
        "type" : "object",
        "required" : [ "product", "items", "auth_method", "intended_use", "accept_terms" ],
        "properties" : {
          "product" : {
            "type" : "string"
          },
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/OrderItem"
            },
            "minItems" : 1
          },
          "auth_method" : {
            "type" : "string",
            "enum" : [ "userpass", "ip" ]
          },
          "allowed_ips" : {
            "type" : [ "array", "null" ],
            "items" : {
              "type" : "string"
            }
          },
          "intended_use" : {
            "type" : "string"
          },
          "accept_terms" : {
            "type" : "object",
            "required" : [ "offer_version", "privacy_version" ],
            "properties" : {
              "offer_version" : {
                "type" : "string"
              },
              "privacy_version" : {
                "type" : "string"
              }
            }
          },
          "auto_renew" : {
            "type" : "boolean"
          },
          "callback_url" : {
            "type" : "string",
            "format" : "uri"
          },
          "idempotency_key" : {
            "type" : "string",
            "minLength" : 16,
            "maxLength" : 128
          }
        },
        "additionalProperties" : false
      },
      "OperationAccepted" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "kind" : {
            "type" : "string",
            "enum" : [ "order", "renewal", "topup", "traffic" ]
          },
          "status" : {
            "type" : "string"
          },
          "payment_state" : {
            "type" : "string"
          },
          "access_token" : {
            "type" : "string"
          },
          "token_type" : {
            "type" : "string"
          },
          "poll_url" : {
            "type" : "string",
            "format" : "uri"
          },
          "poll_interval_seconds" : {
            "type" : "integer"
          },
          "quote_id" : {
            "type" : "string"
          },
          "amount_usd" : {
            "type" : "string",
            "pattern" : "^(0|[1-9][0-9]{0,8})\\.[0-9]{2}$",
            "examples" : [ "18.00" ]
          },
          "amount_atomic" : {
            "type" : "string"
          },
          "network" : {
            "type" : "string"
          },
          "asset" : {
            "type" : "string"
          },
          "tx_hash" : {
            "type" : "string"
          },
          "created_at" : {
            "type" : "string",
            "format" : "date-time"
          },
          "order_id" : {
            "type" : "string"
          },
          "line_id" : {
            "type" : "string"
          },
          "replayed" : {
            "type" : "boolean"
          },
          "webhook_secret" : {
            "type" : "string"
          },
          "note" : {
            "type" : "string"
          },
          "recover_url" : {
            "type" : "string",
            "format" : "uri"
          }
        },
        "additionalProperties" : true
      },
      "Proxy" : {
        "type" : "object",
        "description" : "IPv6: ip is the IPv4 gateway (connect to ip:port of the selected protocol), exit_ip is the IPv6 exit address; replace IPv6 by host:port. MOBILE: ip is a modem host shared by many proxies, address = ip:port_http identifies the proxy (replace MOBILE by address). IPv4_UPTIME / ISP_UPTIME (uptime = true): connect to any of gateways[].ip with port_http / port_socks5 and the username and password of this proxy; several uptime proxies may share ip, uptime_index tells them apart; replacement and authorization changes are not available",
        "properties" : {
          "ip" : {
            "type" : "string"
          },
          "exit_ip" : {
            "type" : "string"
          },
          "port_http" : {
            "type" : [ "string", "integer", "null" ]
          },
          "port_socks5" : {
            "type" : [ "string", "integer", "null" ]
          },
          "status" : {
            "type" : "string"
          },
          "starts_at" : {
            "type" : "string",
            "format" : "date-time"
          },
          "expires_at" : {
            "type" : "string",
            "format" : "date-time"
          },
          "auth" : {
            "type" : "string",
            "enum" : [ "userpass", "ip" ]
          },
          "username" : {
            "type" : "string"
          },
          "password" : {
            "type" : "string"
          },
          "allowed_ip" : {
            "type" : "string"
          },
          "replacement_pending" : {
            "type" : "boolean"
          },
          "country" : {
            "type" : [ "string", "null" ],
            "description" : "ISO 3166-1 alpha-2 of the address"
          },
          "address" : {
            "type" : [ "string", "null" ],
            "description" : "MOBILE: host:port_http"
          },
          "operator" : {
            "type" : [ "string", "null" ],
            "description" : "MOBILE: actual carrier tag of the modem"
          },
          "rotation_min" : {
            "type" : [ "integer", "null" ],
            "description" : "MOBILE: minutes between automatic exit IP changes, 0 - no timer (change the IP with change_ip_url)"
          },
          "change_ip_url" : {
            "type" : [ "string", "null" ],
            "format" : "uri",
            "description" : "MOBILE: URL that changes the exit IP now; a credential, omitted in replays after 24 hours"
          },
          "uptime" : {
            "type" : "boolean",
            "description" : "IPv4_UPTIME / ISP_UPTIME: true; absent for other products"
          },
          "uptime_index" : {
            "type" : [ "integer", "null" ],
            "description" : "uptime: index of the proxy in the order part (proxies may share ip)"
          },
          "gateways" : {
            "type" : "array",
            "description" : "uptime: entry points of the order part, connect through any of them; country is the gateway location, not the exit country",
            "items" : {
              "type" : "object",
              "properties" : {
                "ip" : {
                  "type" : "string"
                },
                "country" : {
                  "type" : [ "string", "null" ],
                  "description" : "ISO 3166-1 alpha-2"
                }
              }
            }
          }
        }
      },
      "OrderLine" : {
        "type" : "object",
        "properties" : {
          "line_id" : {
            "type" : "string"
          },
          "country" : {
            "type" : [ "string", "null" ],
            "description" : "null for MIX and MIX_ISP (see countries)"
          },
          "qty" : {
            "type" : "integer"
          },
          "qty_fulfilled" : {
            "type" : "integer"
          },
          "period_days" : {
            "type" : "integer"
          },
          "unit_price_usd" : {
            "type" : "string",
            "pattern" : "^(0|[1-9][0-9]{0,8})\\.[0-9]{2}$",
            "examples" : [ "18.00" ]
          },
          "line_total_usd" : {
            "type" : "string",
            "pattern" : "^(0|[1-9][0-9]{0,8})\\.[0-9]{2}$",
            "examples" : [ "18.00" ]
          },
          "status" : {
            "type" : "string",
            "enum" : [ "pending", "active", "partially_active", "failed" ]
          },
          "expires_at" : {
            "type" : [ "string", "null" ],
            "format" : "date-time"
          },
          "renew_url" : {
            "type" : "string",
            "format" : "uri"
          },
          "proxies" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/Proxy"
            }
          },
          "gb" : {
            "type" : "string"
          },
          "tariff" : {
            "type" : "string"
          },
          "traffic_url" : {
            "type" : "string",
            "format" : "uri"
          },
          "mix" : {
            "type" : [ "object", "null" ],
            "description" : "MIX and MIX_ISP: the ordered package",
            "properties" : {
              "mix" : {
                "type" : "string"
              },
              "name" : {
                "type" : "string"
              }
            }
          },
          "countries" : {
            "type" : [ "array", "null" ],
            "description" : "MIX and MIX_ISP: actual split by country, empty until the parts are created",
            "items" : {
              "type" : "object",
              "properties" : {
                "country" : {
                  "type" : [ "string", "null" ]
                },
                "qty" : {
                  "type" : "integer"
                },
                "delivered" : {
                  "type" : "integer"
                }
              }
            }
          },
          "operator" : {
            "type" : [ "object", "null" ],
            "description" : "MOBILE: the ordered carrier",
            "properties" : {
              "operator" : {
                "type" : "string"
              },
              "name" : {
                "type" : "string"
              }
            }
          },
          "service_type" : {
            "type" : [ "string", "null" ],
            "description" : "MOBILE: dedicated or shared"
          },
          "rotation_min" : {
            "type" : [ "integer", "null" ],
            "description" : "MOBILE: the ordered rotation"
          }
        }
      },
      "AutoRenew" : {
        "type" : "object",
        "properties" : {
          "enabled" : {
            "type" : "boolean"
          },
          "supported" : {
            "type" : "boolean"
          },
          "note" : {
            "type" : "string"
          },
          "funded" : {
            "type" : "boolean"
          },
          "next_charge_at" : {
            "type" : "string",
            "format" : "date-time"
          },
          "estimated_amount_usd" : {
            "type" : "string",
            "pattern" : "^(0|[1-9][0-9]{0,8})\\.[0-9]{2}$",
            "examples" : [ "18.00" ]
          },
          "balance_usd" : {
            "type" : "string",
            "pattern" : "^(0|[1-9][0-9]{0,8})\\.[0-9]{2}$",
            "examples" : [ "18.00" ]
          },
          "shortfall_usd" : {
            "type" : "string",
            "pattern" : "^(0|[1-9][0-9]{0,8})\\.[0-9]{2}$",
            "examples" : [ "18.00" ]
          },
          "topup_url" : {
            "type" : "string",
            "format" : "uri"
          },
          "refused_lines" : {
            "type" : "array",
            "description" : "MOBILE and MIX lines the provider refuses to renew for a permanent reason: auto-renew is off for them and they are not in the estimate",
            "items" : {
              "type" : "object",
              "properties" : {
                "line_id" : {
                  "type" : "string"
                },
                "reason" : {
                  "type" : "string"
                }
              }
            }
          }
        }
      },
      "ResidentPackage" : {
        "type" : "object",
        "properties" : {
          "traffic_limit_gb" : {
            "type" : "string"
          },
          "traffic_used_gb" : {
            "type" : "string"
          },
          "traffic_left_gb" : {
            "type" : "string"
          },
          "expires_at" : {
            "type" : "string",
            "format" : "date-time"
          },
          "active" : {
            "type" : "boolean"
          },
          "usage_synced_at" : {
            "type" : "string",
            "format" : "date-time"
          },
          "usage_note" : {
            "type" : "string"
          }
        }
      },
      "Resident" : {
        "type" : "object",
        "properties" : {
          "package" : {
            "$ref" : "#/components/schemas/ResidentPackage"
          },
          "connection" : {
            "type" : [ "object", "null" ],
            "additionalProperties" : true,
            "description" : "hosts, ports, protocols, username, password, example and the targeting syntax"
          },
          "credentials" : {
            "type" : [ "string", "null" ]
          },
          "note" : {
            "type" : "string"
          }
        }
      },
      "TrafficTopup" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "gb" : {
            "type" : "string"
          },
          "status" : {
            "type" : "string",
            "enum" : [ "payment_pending", "extending", "added", "failed", "failed_credited", "payment_failed", "needs_review" ]
          },
          "payment_state" : {
            "type" : "string"
          },
          "amount_usd" : {
            "type" : "string",
            "pattern" : "^(0|[1-9][0-9]{0,8})\\.[0-9]{2}$",
            "examples" : [ "18.00" ]
          },
          "tx_hash" : {
            "type" : "string"
          },
          "created_at" : {
            "type" : "string",
            "format" : "date-time"
          },
          "package_expires_at" : {
            "type" : "string",
            "format" : "date-time"
          }
        }
      },
      "TrafficRequest" : {
        "type" : "object",
        "required" : [ "gb" ],
        "properties" : {
          "gb" : {
            "type" : "string",
            "pattern" : "^(0|[1-9][0-9]{0,6})(\\.[0-9]{1,3})?$"
          },
          "idempotency_key" : {
            "type" : "string",
            "minLength" : 16,
            "maxLength" : 128
          }
        },
        "additionalProperties" : false
      },
      "Credit" : {
        "type" : "object",
        "properties" : {
          "line_id" : {
            "type" : "string"
          },
          "amount_usd" : {
            "type" : "string",
            "pattern" : "^(0|[1-9][0-9]{0,8})\\.[0-9]{2}$",
            "examples" : [ "18.00" ]
          },
          "reason" : {
            "type" : "string"
          },
          "created_at" : {
            "type" : "string",
            "format" : "date-time"
          }
        }
      },
      "Renewal" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "line_id" : {
            "type" : "string"
          },
          "period_days" : {
            "type" : "integer"
          },
          "status" : {
            "type" : "string"
          },
          "payment_state" : {
            "type" : "string"
          },
          "amount_usd" : {
            "type" : "string",
            "pattern" : "^(0|[1-9][0-9]{0,8})\\.[0-9]{2}$",
            "examples" : [ "18.00" ]
          },
          "tx_hash" : {
            "type" : "string"
          },
          "created_at" : {
            "type" : "string",
            "format" : "date-time"
          },
          "new_expires_at" : {
            "type" : "string",
            "format" : "date-time"
          }
        }
      },
      "Order" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "status" : {
            "type" : "string"
          },
          "status_is_terminal" : {
            "type" : "boolean"
          },
          "payment_state" : {
            "type" : "string"
          },
          "delayed" : {
            "type" : "boolean"
          },
          "next_poll_after_seconds" : {
            "type" : [ "integer", "null" ]
          },
          "created_at" : {
            "type" : "string",
            "format" : "date-time"
          },
          "updated_at" : {
            "type" : "string",
            "format" : "date-time"
          },
          "status_changed_at" : {
            "type" : "string",
            "format" : "date-time"
          },
          "expires_at" : {
            "type" : [ "string", "null" ],
            "format" : "date-time"
          },
          "quote_id" : {
            "type" : "string"
          },
          "product" : {
            "type" : "string"
          },
          "amount_usd" : {
            "type" : "string",
            "pattern" : "^(0|[1-9][0-9]{0,8})\\.[0-9]{2}$",
            "examples" : [ "18.00" ]
          },
          "amount_atomic" : {
            "type" : "string"
          },
          "network" : {
            "type" : "string"
          },
          "asset" : {
            "type" : "string"
          },
          "wallet" : {
            "type" : "string"
          },
          "tx_hash" : {
            "type" : "string"
          },
          "auth_method" : {
            "type" : "string"
          },
          "allowed_ips" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "intended_use" : {
            "type" : "string"
          },
          "callback_url" : {
            "type" : [ "string", "null" ]
          },
          "failure_reason" : {
            "type" : "string"
          },
          "progress" : {
            "type" : "object",
            "properties" : {
              "qty" : {
                "type" : "integer"
              },
              "qty_fulfilled" : {
                "type" : "integer"
              }
            }
          },
          "lines" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/OrderLine"
            }
          },
          "credits" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/Credit"
            }
          },
          "renewals" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/Renewal"
            }
          },
          "resident" : {
            "$ref" : "#/components/schemas/Resident"
          },
          "traffic_topups" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/TrafficTopup"
            }
          },
          "traffic_url" : {
            "type" : "string",
            "format" : "uri"
          },
          "auto_renew" : {
            "$ref" : "#/components/schemas/AutoRenew"
          },
          "events_url" : {
            "type" : "string",
            "format" : "uri"
          },
          "poll" : {
            "type" : "object"
          }
        },
        "additionalProperties" : true
      },
      "OrderPatchRequest" : {
        "type" : "object",
        "properties" : {
          "auto_renew" : {
            "type" : "boolean"
          },
          "callback_url" : {
            "type" : [ "string", "null" ],
            "format" : "uri"
          },
          "auth_method" : {
            "type" : "string",
            "enum" : [ "userpass", "ip" ]
          },
          "allowed_ips" : {
            "type" : [ "array", "null" ],
            "items" : {
              "type" : "string"
            }
          }
        },
        "additionalProperties" : false,
        "minProperties" : 1
      },
      "OrderPatchResult" : {
        "type" : "object",
        "properties" : {
          "changed" : {
            "type" : "object",
            "additionalProperties" : true
          },
          "webhook_secret" : {
            "type" : "string"
          },
          "webhook_signature" : {
            "type" : "string",
            "description" : "signature scheme of webhooks, returned together with webhook_secret"
          },
          "order" : {
            "$ref" : "#/components/schemas/Order"
          }
        }
      },
      "RenewRequest" : {
        "type" : "object",
        "required" : [ "period_days" ],
        "properties" : {
          "period_days" : {
            "type" : "integer",
            "minimum" : 1
          },
          "idempotency_key" : {
            "type" : "string",
            "minLength" : 16,
            "maxLength" : 128
          },
          "ips" : {
            "type" : "array",
            "items" : {
              "type" : "string",
              "maxLength" : 64
            },
            "minItems" : 1,
            "maxItems" : 1000,
            "description" : "Optional: renew only these proxies of the line (keys as in GET /orders/{id}: ip; MOBILE — host:port_http; uptime — ip or ip#uptime_index when several uptime proxies share the ip). Omit to renew the whole line. Not supported for IPv6, MIX and MIX_ISP: they are renewed as a whole"
          }
        },
        "additionalProperties" : false
      },
      "ReplaceRequest" : {
        "type" : "object",
        "required" : [ "ips", "reason" ],
        "properties" : {
          "line_id" : {
            "type" : "string"
          },
          "ips" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            },
            "minItems" : 1,
            "maxItems" : 100
          },
          "reason" : {
            "type" : "string",
            "minLength" : 3,
            "maxLength" : 200
          }
        },
        "additionalProperties" : false
      },
      "ReplaceResult" : {
        "type" : "object",
        "properties" : {
          "order_id" : {
            "type" : "string"
          },
          "results" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "properties" : {
                "ip" : {
                  "type" : "string"
                },
                "requested" : {
                  "type" : "boolean"
                },
                "error" : {
                  "type" : "string"
                },
                "detail" : {
                  "type" : "string"
                }
              }
            }
          },
          "note" : {
            "type" : "string"
          }
        }
      },
      "Event" : {
        "type" : "object",
        "properties" : {
          "event_id" : {
            "type" : "string",
            "description" : "stable: the deduplication key of webhook deliveries"
          },
          "type" : {
            "type" : "string"
          },
          "created_at" : {
            "type" : "string",
            "format" : "date-time"
          },
          "api_version" : {
            "type" : "string"
          },
          "order_id" : {
            "type" : "string"
          },
          "wallet" : {
            "type" : "string"
          },
          "attempt" : {
            "type" : "integer",
            "minimum" : 1,
            "description" : "pull channel: always 1; webhook: the delivery attempt number (1, 2, …)"
          },
          "data" : {
            "type" : "object",
            "additionalProperties" : true
          }
        }
      },
      "EventPage" : {
        "type" : "object",
        "properties" : {
          "order_id" : {
            "type" : "string"
          },
          "events" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/Event"
            }
          },
          "next_since" : {
            "type" : [ "string", "null" ]
          },
          "has_more" : {
            "type" : "boolean"
          }
        }
      },
      "TopupRequest" : {
        "type" : "object",
        "required" : [ "amount_usd" ],
        "properties" : {
          "amount_usd" : {
            "type" : "string",
            "pattern" : "^(0|[1-9][0-9]{0,8})\\.[0-9]{2}$",
            "examples" : [ "18.00" ]
          },
          "idempotency_key" : {
            "type" : "string",
            "minLength" : 16,
            "maxLength" : 128
          }
        },
        "additionalProperties" : false
      },
      "Topup" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "kind" : {
            "type" : "string"
          },
          "status" : {
            "type" : "string"
          },
          "status_is_terminal" : {
            "type" : "boolean"
          },
          "payment_state" : {
            "type" : "string"
          },
          "amount_usd" : {
            "type" : "string",
            "pattern" : "^(0|[1-9][0-9]{0,8})\\.[0-9]{2}$",
            "examples" : [ "18.00" ]
          },
          "amount_atomic" : {
            "type" : "string"
          },
          "network" : {
            "type" : "string"
          },
          "asset" : {
            "type" : "string"
          },
          "wallet" : {
            "type" : "string"
          },
          "tx_hash" : {
            "type" : "string"
          },
          "balance_usd" : {
            "type" : "string",
            "pattern" : "^(0|[1-9][0-9]{0,8})\\.[0-9]{2}$",
            "examples" : [ "18.00" ]
          },
          "created_at" : {
            "type" : "string",
            "format" : "date-time"
          },
          "updated_at" : {
            "type" : "string",
            "format" : "date-time"
          },
          "poll" : {
            "type" : "object"
          }
        }
      },
      "WalletChallengeRequest" : {
        "type" : "object",
        "required" : [ "address" ],
        "properties" : {
          "address" : {
            "type" : "string",
            "pattern" : "^0x[0-9a-fA-F]{40}$"
          },
          "purpose" : {
            "type" : "string",
            "enum" : [ "recover", "withdraw" ]
          }
        },
        "additionalProperties" : false
      },
      "Challenge" : {
        "type" : "object",
        "properties" : {
          "challenge_id" : {
            "type" : "string"
          },
          "address" : {
            "type" : "string"
          },
          "purpose" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string",
            "description" : "EIP-4361 text to sign with personal_sign (EIP-191)"
          },
          "expires_at" : {
            "type" : "string",
            "format" : "date-time"
          },
          "signature" : {
            "type" : "object"
          }
        }
      },
      "WalletRecoverRequest" : {
        "type" : "object",
        "required" : [ "challenge_id", "signature" ],
        "properties" : {
          "challenge_id" : {
            "type" : "string"
          },
          "signature" : {
            "type" : "string",
            "description" : "0x-hex signature: 65 bytes for EOA, contract-wallet signature for EIP-1271"
          },
          "limit" : {
            "type" : "integer",
            "minimum" : 1,
            "maximum" : 200
          },
          "offset" : {
            "type" : "integer",
            "minimum" : 0
          },
          "revoke_existing" : {
            "type" : "boolean",
            "description" : "revoke every access token of this wallet issued before this recovery started (send on the first page; later pages of the same recovery keep their tokens)"
          }
        },
        "additionalProperties" : false
      },
      "WalletRecovery" : {
        "type" : "object",
        "properties" : {
          "wallet" : {
            "type" : "string"
          },
          "network" : {
            "type" : "string"
          },
          "account" : {
            "type" : "object",
            "additionalProperties" : true
          },
          "orders" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "additionalProperties" : true
            }
          },
          "pending_payments" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "additionalProperties" : true
            }
          },
          "topups" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "additionalProperties" : true
            }
          },
          "withdrawals" : {
            "type" : "array",
            "description" : "Last 20 withdrawal requests of this wallet, newest first",
            "items" : {
              "$ref" : "#/components/schemas/Withdrawal"
            }
          },
          "pagination" : {
            "type" : "object",
            "properties" : {
              "limit" : {
                "type" : "integer"
              },
              "offset" : {
                "type" : "integer"
              },
              "total" : {
                "type" : "integer"
              }
            }
          }
        }
      },
      "WalletWithdrawRequest" : {
        "type" : "object",
        "required" : [ "challenge_id", "signature", "amount_usd" ],
        "properties" : {
          "challenge_id" : {
            "type" : "string"
          },
          "signature" : {
            "type" : "string"
          },
          "amount_usd" : {
            "type" : "string",
            "pattern" : "^(0|[1-9][0-9]{0,8})\\.[0-9]{2}$",
            "examples" : [ "18.00" ]
          }
        },
        "additionalProperties" : false
      },
      "Withdrawal" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "status" : {
            "type" : "string",
            "enum" : [ "requested", "approved", "sent", "done", "rejected", "cancelled" ]
          },
          "amount_usd" : {
            "type" : "string",
            "pattern" : "^(0|[1-9][0-9]{0,8})\\.[0-9]{2}$",
            "examples" : [ "18.00" ]
          },
          "address" : {
            "type" : "string"
          },
          "network" : {
            "type" : "string"
          },
          "created_at" : {
            "type" : "string",
            "format" : "date-time"
          },
          "tx_hash" : {
            "type" : [ "string", "null" ],
            "description" : "Transfer from the company wallet, once sent"
          },
          "sent_at" : {
            "type" : [ "string", "null" ],
            "format" : "date-time"
          },
          "confirmed_at" : {
            "type" : [ "string", "null" ],
            "format" : "date-time"
          },
          "note" : {
            "type" : "string"
          }
        }
      }
    }
  },
  "x-x402" : {
    "version" : 2,
    "scheme" : "exact",
    "network" : "eip155:8453",
    "asset" : "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "asset_transfer_method" : "eip3009",
    "payment_flow" : "upfront",
    "headers" : {
      "payment_required" : "PAYMENT-REQUIRED",
      "payment_signature" : "PAYMENT-SIGNATURE",
      "payment_response" : "PAYMENT-RESPONSE"
    },
    "quote_ttl_seconds" : 900,
    "max_timeout_seconds" : 900,
    "error_codes" : [ {
      "code" : "payment_required",
      "http_status" : 402,
      "retry_action" : "resign",
      "retryable" : true
    }, {
      "code" : "payment_invalid",
      "http_status" : 402,
      "retry_action" : "abandon",
      "retryable" : false
    }, {
      "code" : "insufficient_funds",
      "http_status" : 402,
      "retry_action" : "wait_and_retry",
      "retryable" : true
    }, {
      "code" : "quote_expired",
      "http_status" : 402,
      "retry_action" : "resign",
      "retryable" : true
    }, {
      "code" : "payment_expired",
      "http_status" : 402,
      "retry_action" : "resign",
      "retryable" : true
    }, {
      "code" : "invalid_request",
      "http_status" : 400,
      "retry_action" : "abandon",
      "retryable" : false
    }, {
      "code" : "terms_not_accepted",
      "http_status" : 400,
      "retry_action" : "resign",
      "retryable" : true
    }, {
      "code" : "purpose_not_allowed",
      "http_status" : 403,
      "retry_action" : "abandon",
      "retryable" : false
    }, {
      "code" : "wallet_rejected",
      "http_status" : 403,
      "retry_action" : "abandon",
      "retryable" : false
    }, {
      "code" : "unauthorized",
      "http_status" : 401,
      "retry_action" : "abandon",
      "retryable" : false
    }, {
      "code" : "order_not_found",
      "http_status" : 404,
      "retry_action" : "abandon",
      "retryable" : false
    }, {
      "code" : "payment_replayed",
      "http_status" : 409,
      "retry_action" : "abandon",
      "retryable" : false
    }, {
      "code" : "payment_not_settleable",
      "http_status" : 409,
      "retry_action" : "wait_and_retry",
      "retryable" : true
    }, {
      "code" : "payment_under_review",
      "http_status" : 409,
      "retry_action" : "human_required",
      "retryable" : false
    }, {
      "code" : "quote_bound_to_other_wallet",
      "http_status" : 409,
      "retry_action" : "resign",
      "retryable" : true
    }, {
      "code" : "quote_payment_in_progress",
      "http_status" : 409,
      "retry_action" : "wait_and_retry",
      "retryable" : true
    }, {
      "code" : "quote_config_mismatch",
      "http_status" : 409,
      "retry_action" : "abandon",
      "retryable" : false
    }, {
      "code" : "idempotency_key_conflict",
      "http_status" : 409,
      "retry_action" : "abandon",
      "retryable" : false
    }, {
      "code" : "not_found",
      "http_status" : 404,
      "retry_action" : "abandon",
      "retryable" : false
    }, {
      "code" : "invalid_request",
      "http_status" : 405,
      "retry_action" : "abandon",
      "retryable" : false
    }, {
      "code" : "rate_limited",
      "http_status" : 429,
      "retry_action" : "wait_and_retry",
      "retryable" : true
    }, {
      "code" : "settlement_retry",
      "http_status" : 503,
      "retry_action" : "retry_same_payment",
      "retryable" : true
    }, {
      "code" : "channel_paused",
      "http_status" : 503,
      "retry_action" : "wait_and_retry",
      "retryable" : true
    }, {
      "code" : "dependency_unavailable",
      "http_status" : 503,
      "retry_action" : "wait_and_retry",
      "retryable" : true
    }, {
      "code" : "internal_error",
      "http_status" : 500,
      "retry_action" : "wait_and_retry",
      "retryable" : true
    } ],
    "retry_actions" : [ "resign", "retry_same_payment", "poll", "wait_and_retry", "abandon", "human_required" ],
    "order_statuses" : [ "payment_pending", "provisioning", "active", "partially_active", "provisioning_failed", "payment_failed", "needs_review", "expired" ],
    "payment_states" : [ "unused", "in_flight", "settled" ],
    "event_types" : [ "order.active", "order.partially_active", "order.provisioning_failed", "order.credited", "order.expiring", "order.expired", "order.renewed", "order.renewal_failed", "order.payment_failed", "order.needs_review", "order.updated", "order.traffic_added", "quota.threshold", "topup.credited", "withdrawal.status" ],
    "replay" : {
      "window_hours" : 24,
      "after_window" : "no access_token, webhook_secret or proxy credentials: use POST /wallet/recover"
    },
    "webhooks" : {
      "method" : "POST",
      "headers" : {
        "timestamp" : "X-PS-Timestamp",
        "signature" : "X-PS-Signature"
      },
      "signature" : "X-PS-Timestamp, X-PS-Signature: v1=hex(HMAC-SHA256(secret, timestamp + \".\" + raw_body))",
      "hmac_key" : "the webhook_secret string as UTF-8 bytes (including the whsec_ prefix, not decoded)",
      "rotation" : "for 24 hours after webhook_secret changes: v1=<current>,v1=<previous> in one header, current first",
      "success" : "2xx",
      "timeout_seconds" : 5,
      "retry_schedule_seconds" : [ 60, 300, 1800, 7200, 21600, 43200, 86400 ],
      "max_age_hours" : "45.6",
      "recommended_tolerance_seconds" : 300,
      "delivery" : "at-least-once, unordered; deduplicate by event_id"
    },
    "access_token_grace_days" : 90,
    "terms" : {
      "offer_version" : "2026-07-01",
      "offer_url" : "https://proxy-seller.com/terms-of-service",
      "privacy_version" : "2026-07-01",
      "privacy_url" : "https://proxy-seller.com/privacy-policy"
    }
  }
}