okx-x402-payment

Sign x402 payments and replay requests with payment headers.

Updated Mar 20, 2026
One-click install
npx skills add https://github.com/yikedu7/pawclaw --skill okx-x402-payment-yikedu7
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: okx-x402-payment
Source: https://github.com/yikedu7/pawclaw/tree/main/packages/backend/src/runtime/okx-skills/okx-x402-payment
Command: npx skills add https://github.com/yikedu7/pawclaw --skill okx-x402-payment-yikedu7

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Signing x402 payments and returning the payment proof enables automated access to paid resources without exposing users' private keys, streamlining pay-per-use flows in on-chain environments.

Core Features & Use Cases

  • TEE-backed signing: Primary path uses a wallet session to sign x402 transfers and generate a secure payment proof.
  • Local signing fallback: If a wallet session isn't available, users can sign with their own private key via EIP-3009.
  • Header assembly & replay: Builds the correct request header (PAYMENT-SIGNATURE or X-PAYMENT) and replays the original request to gain access.
  • Guided workflow: Handles pre-flight checks, user prompts, and error handling for robust paid-resource access.

Quick Start

Sign an x402 payment for a gated resource and replay the original request with the proper authorization 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 x402 payments for HTTP 402 gated resources?

To sign x402 payments for gated resources, you use a wallet session for TEE-backed signing to generate a secure payment proof, then replay the original request with the assembled PAYMENT-SIGNATURE or X-PAYMENT header. This process automates access to paid resources without exposing private keys.

Can I sign x402 payments offline without a wallet session?

Yes, you can sign x402 payments offline using the local EIP-3009 signing fallback. If a wallet session is unavailable, this fallback allows you to sign with your own private key to generate the required payment proof for accessing gated resources.

What is the x402 payment protocol and when is it needed?

The x402 payment protocol is a mechanism needed when a server responds with HTTP 402 to gate access to paid resources. It enables automated pay-per-use flows in on-chain environments by returning a cryptographic payment proof to authorize access.

Does x402 payment signing expose my private keys?

No, signing x402 payments does not expose your private keys. The primary path uses a TEE-backed wallet session to securely sign transfers, and the local fallback uses EIP-3009 signing, ensuring your keys remain protected throughout the automated access flow.

How do I assemble the correct header after signing an x402 payment?

After signing an x402 payment, the system automatically assembles the correct request header, either PAYMENT-SIGNATURE or X-PAYMENT, based on the server's requirements. It then replays the original request with the signed payload to grant access to the gated resource.

What are the limitations of using EIP-3009 for x402 payment signing?

The primary limitation of the EIP-3009 local signing fallback is that it requires you to manage your own private key directly, whereas the primary path uses a secure wallet session for TEE-backed signing to generate payment proofs without local key exposure.