okx-x402-payment

Decode x402 payment payloads and sign valid payment headers for gated resources.

1|2|Updated Apr 13, 2026
One-click install
npx skills add https://github.com/ranimth0707/PanicShield --skill okx-x402-payment-ranimth0707
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: okx-x402-payment
Source: https://github.com/ranimth0707/PanicShield/tree/main/.agents/skills/okx-x402-payment
Command: npx skills add https://github.com/ranimth0707/PanicShield --skill okx-x402-payment-ranimth0707

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

HTTP 402 gated resources require a signed payment header to access; this skill decodes the 402 payload and signs a valid payment proof for resource access using either a secure wallet session (TEE) or a local EVM private key fallback.

Core Features & Use Cases

  • TEE-backed signing: Sign x402 payments via wallet session to produce a valid payment header without exposing private keys.
  • Local fallback signing: When wallet access is unavailable, sign using a local EVM private key to generate the required authorization.
  • Cross-version header assembly: Supports both v2 (PAYMENT-SIGNATURE) and v1 (X-PAYMENT) payload formats and reconstructs the final request with the proper header.
  • Workflow flexibility: Guides users through decoding, signing decision, and replaying the original request.

Quick Start

Request an x402 payment for a gated resource and follow the prompts to obtain a signed payment header.

Frequently Asked Questions about okx-x402-payment

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

FAQPage Schema
How do I sign an x402 payment header to access gated API resources?

Signing an x402 payment header involves decoding the 402 payload from the server response and generating a valid payment proof. You can use TEE wallet-session signing or local EVM private-key signing, with a confirmation prompt before the final HTTP header is assembled for replay.

What is the x402 payment protocol and when do I need to sign a payload?

The x402 payment protocol uses HTTP 402 status codes to gate API resources, requiring clients to decode the payment requirements and submit a signed payment header. You need to sign a payload whenever an onchain API resource returns a 402 status demanding cryptographic payment proof for access.

Can I use my local EVM private key instead of TEE signing for x402 payments?

Yes, you can use a local EVM private key for x402 payments as a fallback when wallet access is unavailable. The skill supports local fallback signing to generate the required authorization, ensuring you can still access gated resources without a secure wallet session.

Does this x402 signing skill support both v1 and v2 payload formats?

Yes, the x402 signing skill supports both v1 and v2 payload formats for cross-version header assembly. It correctly reconstructs the final request using the appropriate header, handling v2 PAYMENT-SIGNATURE formats as well as v1 X-PAYMENT formats.

How do I replay an HTTP request after decoding a 402 payment requirement?

To replay an HTTP request after decoding a 402 payment requirement, sign the payment proof and let the skill assemble the final HTTP header. The skill guides you through decoding, the signing decision, and reconstructing the original request with the proper payment header attached.