okx-x402-payment

Dispatch HTTP 402 payment requests by detecting MPP or x402 protocols.

Updated May 10, 2026
One-click install
npx skills add https://github.com/Tsin418/crypto-research-agent --skill okx-x402-payment-tsin418
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: okx-x402-payment
Source: https://github.com/Tsin418/crypto-research-agent/tree/main/.agents/skills/okx-x402-payment
Command: npx skills add https://github.com/Tsin418/crypto-research-agent --skill okx-x402-payment-tsin418

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automatically determines whether a server’s HTTP 402 payment gate uses MPP or x402 and then guides the process to produce a ready-to-paste authorization header.

Core Features & Use Cases

  • Protocol dispatcher for HTTP 402: Detects MPP vs x402 via WWW-Authenticate and PAYMENT-REQUIRED/x402Version signals, then loads the correct end-to-end playbook.
  • MPP session support with safe mid-session handling: Covers charge (one-shot) and full session workflows (open, voucher, topUp, close) while protecting continuity using channel state and correct stop/routing rules.
  • x402 v1/v2 signing support: Handles both header-embedded (v2) and body-embedded (v1) 402 payloads, assembles the correct payment header, and replays the original request.

Quick Start

Ask it to access a payment-gated API endpoint that returns HTTP 402 and generate the authorization header automatically so the request succeeds.

Frequently Asked Questions about okx-x402-payment

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate an authorization header for an HTTP 402 payment-gated request?▼

To generate an authorization header for an HTTP 402 payment-gated request, you must parse the server's WWW-Authenticate or PAYMENT-REQUIRED payload, confirm the wallet operation, and assemble the correct protocol-specific header for replay.

What is the difference between MPP and x402 payment protocols?▼

MPP handles multi-request session flows including open, voucher, topUp, and close, while x402 focuses on one-shot resource access using v1 body-embedded or v2 header-embedded payment proof generation.

How do I handle MPP session workflows and mid-session topUp requests?▼

Handling MPP session workflows requires maintaining channel state and applying correct stop/routing rules during open, voucher, topUp, and close phases to protect session continuity.

Can I use TEE signing for x402 v2 payment proof generation?▼

Yes, x402 v2 payment proof generation can utilize TEE signing to execute protocol-specific wallet checks before assembling the final header-embedded payload for replay.

Why does my HTTP 402 payment dispatch fail during onchain access?▼

HTTP 402 payment dispatch fails when the server expects MPP but receives x402, or vice versa, requiring correct detection of WWW-Authenticate and x402Version signals before loading the matching signing workflow.