okx-x402-payment

Sign x402 payments and assemble v2 or v1 headers for gated resources.

Updated Apr 8, 2026
One-click install
npx skills add https://github.com/Sarnav07/Nexus.AI --skill okx-x402-payment-sarnav07
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: okx-x402-payment
Source: https://github.com/Sarnav07/Nexus.AI/tree/main/.agents/skills/okx-x402-payment
Command: npx skills add https://github.com/Sarnav07/Nexus.AI --skill okx-x402-payment-sarnav07

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Sign and attach a verified x402 payment to access payment-gated resources. This workflow eliminates manual gate checks by producing a signed authorization that can be sent with the original request.

Core Features & Use Cases

  • TEE-backed signing: Sign via a wallet session to obtain a payment signature and authorization for gated resources.
  • Local signing fallback: Opt-in local EIP-3009 signing when a TEE session is unavailable, with the private key staying on the user device.
  • Header assembly & replay: Correctly construct PAYMENT-SIGNATURE (v2) or X-PAYMENT (v1) headers and replay the request to unlock access.

Quick Start

Run the x402 payment flow to obtain a signature and authorization, then replay the original request with the resulting header to access the resource.

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 to access a gated HTTP resource?

The x402 payment signing process uses a default TEE-based wallet session to generate the signature. If unavailable, it falls back to local EIP-3009 signing, keeping your private key on the device while producing the required authorization header.

What is the difference between PAYMENT-SIGNATURE and X-PAYMENT headers in x402?

Payment signing supports both aggr_deferred and exact payment schemes. These schemes dictate how the authorization and signature are structured before being assembled into the v2 PAYMENT-SIGNATURE or v1 X-PAYMENT headers for the gated resource request.

Can I use local EIP-3009 signing for x402 payments without a TEE session?

Yes, the workflow supports both aggr_deferred and exact payment schemes. These schemes define how the payment authorization is structured before being signed and attached to the request header for accessing the gated resource.

How do I replay an HTTP request after obtaining an x402 payment signature?

After signing the x402 payment, you attach the resulting signature and authorization proof as a header to your original request. Replaying this updated request unlocks access to the payment-gated resource.

Do I need a TEE wallet session to authorize x402 payments?

No, a TEE wallet session is the default signing method but not strictly required. You can opt into local EIP-3009 signing as a fallback, which keeps the private key on your device and bypasses the need for a TEE environment.