Pular para o conteúdo
Skillpedia
Agentes7,0 mil · #13623

x402

O que ela faz

Esta skill trata do x402, uma forma de serviços web cobrarem por cada requisição usando a resposta de pagamento padrão HTTP 402. O agente pode decodificar um pedido de pagamento, preparar um pagamento para assinar e usar um serviço facilitador para verificar ou liquidar o pagamento.

Quando usar

  • ✓Quando um serviço online responde com um pedido de pagamento e seu agente precisa pagar.
  • ✓Quando você quer cobrar de outros agentes por requisição pela sua própria API.
  • ✓Quando você precisa conferir um pedido de pagamento antes de aprová-lo.

Link da skill

https://github.com/internet-court/internet-court-skill/blob/main/vendored/chaingpt/x402/SKILL.md

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/internet-court/internet-court-skill/blob/main/vendored/chaingpt/x402/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Quero que meu agente pague por uma API que pediu pagamento, mas primeiro me explique o que ela quer que eu pague.”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

O agente lê o pedido de pagamento e explica o valor, a moeda e o destinatário em termos simples. Ele prepara um pagamento não assinado, sua carteira assina e o agente o envia de volta com a requisição. O facilitador não consegue alterar o valor nem o destinatário que você assinou.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do GitHub.

x402 Payments skill

x402 turns HTTP 402 Payment Required into a real payment rail for agents: a server replies 402 with what it wants paid; the client signs an off-chain authorization and retries with an X-PAYMENT header; a facilitator broadcasts it. Settlement uses EIP-3009 transferWithAuthorization (e.g. USDC on Base) — the facilitator can only broadcast the signed authorization, never alter the amount or destination.

Custody-free: the plugin builds the EIP-712 the payer signs and assembles the header; it never holds a key.

Tools

Tool Purpose
chaingpt_x402_decode Decode a 402 body or X-PAYMENT header into human terms (amount/token/recipient/expiry) before paying.
chaingpt_x402_build_payment Build the UNSIGNED EIP-3009 typed data; pass a signature back to get the final X-PAYMENT header.
chaingpt_x402_facilitator Call a facilitator: supported / verify / settle.
chaingpt_x402_create_requirements Server side: generate the PaymentRequirements + 402 body to monetize your endpoint.
chaingpt_x402_fetch The whole client loop in one tool: fetch a URL; on 402 it decodes the challenge and (given from) emits the unsigned typed data; re-call with xPaymentHeader to complete the paid request.

Pay an endpoint (client flow)

Fast path — one tool drives the loop:

  1. chaingpt_x402_fetch url=<resource> from=<payer> → on 402 you get the decoded price/payee AND the unsigned EIP-3009 typed data.
  2. Sign the typed data in the payer's wallet.
  3. chaingpt_x402_build_payment from=<payer> requirements=<from step 1> signature=0x… → the X-PAYMENT header.
  4. chaingpt_x402_fetch url=<resource> xPaymentHeader=<header> → the paid response.

Manual path (same primitives, finer control): _decode → _build_payment → sign → _build_payment +signature → retry yourself.

Monetize your endpoint (server flow)

chaingpt_x402_create_requirements network=base amount=0.01 payTo=<you> → serve the returned JSON with HTTP 402. Verify/settle incoming payments via a facilitator (chaingpt_x402_facilitator).

Known EIP-3009 tokens: USDC on base and base-sepolia. For other tokens pass full PaymentRequirements (with asset + extra.name/extra.version). 0 ChainGPT credits.

Perguntas frequentes

O agente guarda a minha chave de carteira?

Não. A skill diz que o agente nunca guarda uma chave, e a sua carteira é que faz a assinatura.

O que é um facilitador?

É um serviço que verifica um pagamento assinado e o envia para a blockchain.

Qual moeda ele usa?

Os exemplos da skill usam USDC na rede Base.

Detalhes

Descrição original do autor

x402 agentic payments (Coinbase's HTTP 402 protocol). Custody-free tools to pay x402-protected endpoints (build the EIP-3009 transferWithAuthorization the payer signs, assemble the X-PAYMENT header), call a facilitator (verify/settle/supported), and monetize your own API by generating PaymentRequirements. USDC on Base. Triggers: x402, HTTP 402, pay per request, agentic payment, machine payment, X-PAYMENT, transferWithAuthorization, EIP-3009, facilitator, monetize API, pay for API, agent pays.

repo: internet-court/internet-court-skill

Popularidade

Estrelas no GitHub
7,0 mil
Posição no ranking
#13623
Licença
—
Atualizada em
26/10/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas