Uptick Micropayment
    • UPTICK Micropayment (x402 Facilitator) API Documentation
    • Uptick Micropayment API
      • x402 Core
        • Health Check
        • Supported
        • Verify
        • Settle
      • Webhook
        • Configure Webhook
        • List All Webhook Configurations
        • Get Webhook Configuration
        • List Supported Event Types
      • Payer Quota
        • Get EIP-712 Signing Domain
        • Register or Update Payer Quota
        • Get Active Payer Quota
        • Revoke Payer Quota
        • List Payer Quota History
      • Orders
        • List Micropayment Orders
        • Get Micropayment Order Detail
    • 数据模型
      • GatewayError
      • VerifyRequest
      • SettleRequest

    UPTICK Micropayment (x402 Facilitator) API Documentation

    Authentication#

    All Micropayment APIs require a project API Key. Example format: upt_xxxxxxxxxxxxxxxx.

    Option 1: Request Header (Recommended)#

    Option 2: Query Parameter#

    RuleDescription
    Key typeMust be a Micropayment (facilitator) project key
    Query nameFixed as apiKey; used for gateway auth only

    Apifox Setup#

    1.
    Open Environment Management and add variable apiKey.
    2.
    In Auth or global Headers, set x-api-key = {{apiKey}}.
    3.
    Alternatively, add apiKey = {{apiKey}} as a query parameter on each request.

    General Conventions#

    Request Format#

    Encoding: UTF-8
    POST / PUT bodies are typically application/json (Webhook and other cases follow Facilitator requirements)
    Optional: send X-Request-ID for tracing (forwarded upstream)

    Response Format#

    TypeDescription
    Business successHTTP status and JSON body from Facilitator
    Gateway errorHTTP 4xx/5xx with UPTICK gateway JSON (see Error Codes)

    Forwarded Headers#

    HeaderPurpose
    AcceptContent negotiation
    Content-TypeRequest body type
    X-Request-IDRequest trace ID
    X-Webhook-SignatureWebhook signature verification

    Billing#

    Fees are deducted from the developer account Gas balance (UPTICK).

    Pricing#

    EndpointConditionPrice (UPTICK/call)
    POST /verifyStandard verify0.00002
    POST /verifypaymentPayload.payload.type = voucher0.0008
    POST /settle—0.002
    Other endpointshealth, supported, webhook, payer-quota, ordersNo per-call fee

    Voucher Detection#

    For verify requests, type is resolved in this order:
    1.
    paymentPayload.payload.type (x402 v2 standard, recommended)
    2.
    Top-level type (legacy compatibility)
    When the value is voucher (case-insensitive), the 0.0008 rate applies.

    Balance Requirements#

    Endpoint typeMinimum balance
    verify / settle≥ fee for that call
    Other endpoints≥ 0.1 UPTICK (platform minimum)
    Billing occurs only after the upstream returns HTTP 2xx.

    Error Codes#

    Gateway Errors (Returned by UPTICK)#

    HTTPerrorDescriptionAction
    401UNAUTHORIZEDMissing/invalid API Key, or non-micropayment project keyCheck key and project type
    402INSUFFICIENT_GAS_BALANCEInsufficient Gas balanceTop up and retry
    404NOT_FOUNDUnknown gateway pathCheck URL
    429RATE_LIMITEDExceeded per-minute limitReduce rate or request higher quota
    503FACILITATOR_UNAVAILABLEMicropayment service unavailableRetry later
    502—Upstream timeout or connection failureRetry later
    402 Response Example
    {
      "error": "INSUFFICIENT_GAS_BALANCE",
      "message": "Insufficient gas balance for x402 call",
      "requiredFee": 0.0008,
      "currentBalance": 0.05
    }
    401 Response Example
    {
      "error": "UNAUTHORIZED",
      "message": "Invalid API key or wrong project type (requires type=facilitator)"
    }

    Business Errors (Returned by Facilitator)#

    When verify/settle or other business calls fail, status codes and bodies are defined by Facilitator (often 400 / 422). The gateway does not charge for non-2xx upstream responses.

    API Index#

    GroupGateway PathMethodBillable
    Basics/healthGETNo
    Basics/supportedGETNo
    x402 Core/verifyPOSTYes
    x402 Core/settlePOSTYes
    Webhook/webhook/configPOSTNo
    Webhook/webhook/configGETNo
    Webhook/webhook/config/{merchantId}GETNo
    Webhook/webhook/eventsGETNo
    Webhook/webhook/testPOSTNo
    Webhook/webhook/receivePOSTNo
    Payer Quota/payer-quota/signing-domainGETNo
    Payer Quota/payer-quotaPOSTNo
    Payer Quota/payer-quotaGETNo
    Payer Quota/payer-quota/historyGETNo
    Payer Quota/payer-quotaDELETENo
    Orders/ordersGETNo
    Orders/orders/{orderId}GETNo

    Endpoint Details#

    1. Health Check#

    Check whether the Facilitator service is available.
    Response: Facilitator /health response (typically 200).

    2. Supported#

    Query supported x402 capabilities (scheme, network, etc.).
    Response: Facilitator /supported response.

    3. Verify#

    Verify an x402 payment payload; a core step in the micropayment flow.
    Billing
    ConditionPrice
    paymentPayload.payload.type = voucher0.0008 UPTICK
    Other0.00002 UPTICK
    Request Body (voucher example)
    {
      "x402Version": 2,
      "paymentPayload": {
        "x402Version": 2,
        "accepted": {
          "scheme": "batch-settlement",
          "network": "eip155:1170"
        },
        "payload": {
          "type": "voucher",
          "channelConfig": {
            "payer": "0x20fa255492c0c5fe5b6e9513ad4dc565d72ed885",
            "payerAuthorizer": "0x20fa255492c0c5fe5b6e9513ad4dc565d72ed885",
            "receiver": "0x5a08f46b5c6c5c25a58cd12f51ebe3ffadb67f56",
            "receiverAuthorizer": "0xd7df9727cac53059832607a6ad4b25feb6fd04ff",
            "token": "0x5b7cdc0de74e158eac21d1d054bc25d0ad56b773",
            "withdrawDelay": 900,
            "salt": "0x0000000000000000000000000000000000000000000000000000000000000000"
          },
          "voucher": {
            "channelId": "0x28e7764ab6408119c3e086e98a7a6582564d151d4334962c9b51c5b15695dd0b",
            "maxClaimableAmount": "1100",
            "signature": "0x4ce01ae20e04dcb525e333b28211a22e38f92e345223fa22a9d5887f786f6dee13d0e819d9b8887281304e5254de5494ebdbbea26da6fdc89c01b9c79583db491b"
          }
        }
      },
      "paymentRequirements": {
        "scheme": "batch-settlement",
        "network": "eip155:1170",
        "asset": "0x5b7cdc0de74e158eac21d1d054bc25d0ad56b773",
        "amount": "10",
        "payTo": "0x5a08f46b5c6c5c25a58cd12f51ebe3ffadb67f56",
        "maxTimeoutSeconds": 3600,
        "extra": {
          "withdrawDelay": 900,
          "receiverAuthorizer": "0xd7df9727cac53059832607a6ad4b25feb6fd04ff"
        }
      }
    }
    Response: Facilitator verification result (2xx → charged; 4xx/5xx → not charged).
    curl

    4. Settle#

    Execute x402 settlement.
    Billing: 0.002 UPTICK per call (charged after upstream 2xx).
    Request body: JSON per Facilitator settle protocol (see Facilitator documentation).
    Response: Facilitator settlement response.
    curl

    5. Webhook#

    GatewayMethodUpstreamDescription
    /webhook/configPOST/api/v1/webhook/configConfigure Webhook
    /webhook/configGET/api/v1/webhook/configList all configs
    /webhook/config/{merchantId}GET/api/v1/webhook/config/{merchantId}Get config by merchant
    /webhook/eventsGET/api/v1/webhook/eventsList supported event types
    /webhook/testPOST/api/v1/webhook/testSend test notification
    /webhook/receivePOST/api/v1/webhook/receiveDebug receive endpoint
    Example: Configure Webhook
    Example: Receive Callback

    6. Payer Quota#

    GatewayMethodUpstreamDescription
    /payer-quota/signing-domainGET/api/v1/payer-quota/signing-domainQuery: network
    /payer-quotaPOST/api/v1/payer-quotaRegister/update quota
    /payer-quotaGET/api/v1/payer-quotaQuery: payer, network
    /payer-quota/historyGET/api/v1/payer-quota/historyQuery: payer, network?
    /payer-quotaDELETE/api/v1/payer-quotaQuery: payer, network
    Example: Get Signing Domain
    Example: Register Quota

    7. Micropayment Orders#

    GatewayMethodUpstreamDescription
    /ordersGET/api/v1/micropayment/ordersPaginated list; Query: payer/payTo (at least one), recordType, network, status, page, pageSize
    /orders/{orderId}GET/api/v1/micropayment/orders/{orderId}Order detail
    Example: List Orders
    Example: Get Order Detail
    The Facilitator orders module provides read-only APIs; there is no create-order POST.

    FAQ#

    Q: Where do I get an API Key?
    A: Log in to the UPTICK Developer Console → create a Micropayment project → copy the API Key. Keep it secret; do not commit it to public repositories.
    Q: Why was verify charged 0.00002 instead of 0.0008?
    A: Confirm that paymentPayload.payload.type in your JSON is "voucher".
    Q: Am I charged when the response is 400?
    A: No. Only upstream HTTP 2xx triggers billing.
    Q: How do I top up Gas balance?
    A: Use the recharge feature in the Developer Console to transfer UPTICK to the platform address, or contact an administrator for manual credit.
    Q: Can I use the same API Key in test and production?
    A: Usually not. Create separate projects per environment and use the matching key.

    Apifox Import#

    FilePurpose
    micropayment-api-external.en.mdCopy into Apifox Docs, or use as team reference
    micropayment-openapi.en.yamlApifox → Import → OpenAPI to generate APIs and mocks
    After importing OpenAPI, set environment variables:
    baseUrl: e.g. https://developapi.testweb.uptick.network/v1/x402
    apiKey: your Micropayment project key
    Bind auth: x-api-key: {{apiKey}}.

    Revision History#

    VersionDateNotes
    v1.02026-05Initial release: auth, billing, errors, x402 / Webhook / Payer Quota / Orders
    修改于 2026-06-26 08:37:47
    下一页
    Health Check
    Built with