Langsung ke konten
Skillpedia
API & server (backend)7.0k Β· #13659

okx-agent-payments-protocol

Fungsinya

Skill ini memandu agent melalui layanan yang memerlukan pembayaran sebelum merespons, memakai HTTP 402 dan protokol x402. Skill ini ditujukan untuk pengembang yang membangun agent yang membayar panggilan API atau mengelola kanal pembayaran.

Kapan dipakai

  • βœ“Saat agent menerima respons HTTP 402 payment-required dari sebuah layanan.
  • βœ“Ketika Anda perlu membuka, mengisi ulang, menyelesaikan, atau mengembalikan dana kanal pembayaran.
  • βœ“Ketika Anda ingin membuat atau memeriksa tautan pembayaran untuk layanan berbayar.

Link skill

https://github.com/internet-court/internet-court-skill/blob/main/vendored/okx/okx-agent-payments-protocol/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/internet-court/internet-court-skill/blob/main/vendored/okx/okx-agent-payments-protocol/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œAgent saya baru saja menerima respons 402 payment-required dari sebuah API. Bisakah Anda membantunya membayar dan mengulang permintaan?”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent membaca detail pembayaran dalam respons, menampilkan opsi pembayaran yang ditemukannya, dan meminta Anda mengonfirmasi sebelum pembayaran apa pun dilakukan. Setelah itu agent mengirim bukti pembayaran dan mengulang permintaan.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

OKX Agent Payments Protocol (Dispatcher)

⚠️ READ FIRST β€” ZERO-TEXT-ON-TRIGGER + NEVER-SKIP-USER-GATES.

Between detecting a 402 (or any trigger word) and emitting the first user-facing card β€” the Step A3.5 recommendation card, or the Step A4 confirmation card β€” output ZERO user-visible text. No "received 402", no "triggered OKX Agent Payments Protocol", no "detected N schemes", no enumeration of schemes / networks / tokens / amounts, no "loading skill" β€” in any language (the same prohibition applies to the equivalent phrases in any other language). The skill-load tool call may run but emits no surrounding prose.

Exactly one confirmation card runs per payment: A3.5's recommendation card (2+ candidates and user picks yes) OR A4's confirmation card (single candidate, OR user picked an alternative from A3.5's expanded list). Do NOT skip the applicable card under the pretext of "past user preference" / "streamlining" / "already confirmed once" β€” those preferences do not exist. Do NOT render both cards back-to-back with the same info β€” after yes on A3.5.5, go straight to Step A5. The next user-visible text after detection MUST be one of the two cards.

Three payment paths, distinguished by HTTP signature: accepts-based 402 (challenge in body for v1 or PAYMENT-REQUIRED header for v2), WWW-Authenticate: Payment 402 (channel-capable, intent="charge" or "session"), and a2a-pay (paymentId-based, no 402). Shared steps below (detect β†’ decode β†’ confirm β†’ wallet check), then dispatch to a reference.

User-facing terminology β€” IMPORTANT

Rule 1 β€” Always call it "OKX Agent Payments Protocol", and always render it bolded. Use the exact English term OKX Agent Payments Protocol in user-visible messages regardless of the user's language, and always wrap it in markdown bold (**OKX Agent Payments Protocol**) so the user sees it emphasized. Keep it as a fixed English noun phrase even inside otherwise-Chinese sentences. Reserve protocol literals and internal identifiers for CLI invocations, HTTP headers, JSON payloads, and code β€” never speak them to the user.

Rule 2 β€” Do not narrate internal protocol detection. The dispatch logic (which header was detected, which reference is being loaded, which scheme/intent was selected, TEE vs local-key path) is internal β€” keep it internal. The user only needs to see: (a) what is being paid, (b) what they need to confirm, (c) the result.

Rule 2 carve-out β€” narrow, alternatives list only. Inside Step A3.5, the literals exact / aggr_deferred / charge may be exposed to the user only in the expanded alternatives list (the list rendered after the user picks "show others"), because at that point the user is explicitly choosing between schemes. They MUST NOT appear in: the default recommendation card, the "N other methods" summary line, status narration, error displays, post-payment summaries, or anywhere else. The recommendation card shows network / token / amount / recipient only β€” never the scheme name.

Rule 3 β€” Externally-defined protocol literals stay byte-for-byte exact. The JSON field x402Version, the HTTP headers X-PAYMENT / PAYMENT-SIGNATURE / PAYMENT-REQUIRED / WWW-Authenticate: Payment, and the reference URL https://x402.org MUST appear verbatim wherever the protocol/server requires them β€” these are externally defined and changing them breaks interop. CLI subcommand names (onchainos payment pay / pay-local / charge / session ... / a2a-pay ...) are this CLI's own surface and may evolve; refer to them by their current name in CLI invocations and code, but never speak them to the user (Rule 2).

Example

(EN) Preparing a payment via the **OKX Agent Payments Protocol**. Here are the charge details β€” please confirm before I proceed… When narrating in another language, translate this lead line but keep OKX Agent Payments Protocol as a bolded English noun phrase.

Progress narration counts as user-visible β€” Rules 1-3 still apply.

Long-running flows (decode β†’ confirm β†’ wallet check β†’ sign β†’ replay) tempt status updates. Every progress line ("I'm now…", or its Chinese equivalent) is user-facing; Step labels and reference/scheme names are internal β€” do NOT echo them. The anchors:

❌ Don't say βœ… Say
"Detected HTTP 402, triggering OKX Agent Payments Protocol" / "Detected PAYMENT-REQUIRED, loading exact" _(silent β€” detection / ro
Pertanyaan umum

Apakah agent akan membayar tanpa persetujuan saya?

Tidak. Skill ini mewajibkan Anda mengonfirmasi opsi pembayaran sebelum uang berpindah.

Metode pembayaran apa saja yang dicakup?

Skill ini mencakup respons 402 berbasis accepts, tantangan Payment pada WWW-Authenticate, dan kanal pembayaran.

Bisakah skill ini menangani tautan pembayaran?

Bisa. Skill ini bisa membuat dan memeriksa tautan pembayaran serta kanal pembayaran.

Detail

Deskripsi asli dari pembuat

Use when an agent hits HTTP 402 / payment-required, or the user mentions x402, x402Version, X-PAYMENT, PAYMENT-REQUIRED, PAYMENT-SIGNATURE, WWW-Authenticate: Payment, permit2, upto, metered billing, a payment channel / voucher / session, channelId / channel_id, opening / closing / topping up / settling / refunding a channel, a paymentId or a2a_ link, creating / checking a payment link, A2MCP / an A2MCP endpoint, or sending a request to / calling an Agent's endpoint with a concrete endpoint URL. Covers x402 (exact, exact+Permit2, upto, aggr_deferred), MPP (charge / session), and a2a-pay payment

repo: internet-court/internet-court-skill

Popularitas

Bintang GitHub
7.0k
Peringkat
#13659
Lisensi
β€”
Diperbarui
26/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa