okx-agent-payments-protocol
Was er macht
Diese Fähigkeit führt den Agenten durch Dienste, die vor der Antwort eine Zahlung verlangen, mit HTTP 402 und dem x402-Protokoll. Sie ist für Entwickler gedacht, die Agenten bauen, die für API-Aufrufe zahlen oder Zahlungskanäle verwalten.
Wann du ihn nutzt
- ✓Wenn ein Agent von einem Dienst eine HTTP-402-Antwort mit Zahlungsaufforderung erhält.
- ✓Wenn du einen Zahlungskanal öffnen, aufladen, abrechnen oder erstatten musst.
- ✓Wenn du einen Zahlungslink für einen kostenpflichtigen Dienst erstellen oder prüfen willst.
Link zum Skill
https://github.com/internet-court/internet-court-skill/blob/main/vendored/okx/okx-agent-payments-protocol/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Mein Agent hat von einer API eine 402-Zahlungsaufforderung erhalten. Kannst du ihm helfen zu bezahlen und die Anfrage zu wiederholen?”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Der Agent liest die Zahlungsdetails in der Antwort, zeigt dir die gefundenen Zahlungsoptionen und bittet dich um Bestätigung, bevor Geld fließt. Danach sendet er den Zahlungsnachweis und wiederholt die Anfrage.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von 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 — afteryeson 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/chargemay 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 headersX-PAYMENT/PAYMENT-SIGNATURE/PAYMENT-REQUIRED/WWW-Authenticate: Payment, and the reference URLhttps://x402.orgMUST 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, loadingexact"_(silent — detection / ro
Häufige Fragen
Zahlt sie ohne meine Freigabe?
Nein. Die Fähigkeit verlangt, dass du die Zahlungsoption bestätigst, bevor Geld fließt.
Welche Zahlungsmethoden deckt sie ab?
Akzeptierte 402-Antworten, WWW-Authenticate-Zahlungsaufforderungen und Zahlungskanäle.
Kann sie mit Zahlungslinks umgehen?
Ja. Sie kann Zahlungslinks und Zahlungskanäle erstellen und prüfen.
Details
Originalbeschreibung des Autors
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
Beliebtheit
- GitHub-Sterne
- 7.0k
- Platz im Ranking
- #13659
- Lizenz
- —
- Aktualisiert
- 26.10.2026
Kommentare
- …
Weitere Skills aus diesem Repository
internet-court
7.0kHilft deinem Agenten, sicher mit einem anderen KI-Agenten oder einem kostenpflichtigen Dienst zu zahlen, Aufträge zu vergeben oder abzuwickeln, und verweist auf die passende Anleitung.
genlayer-erc7710-connector
7.0kHilft deinem Agenten, ein KI-Prüfergebnis mit einem Berechtigungssystem zu verbinden, sodass eine schlechte Bewertung Berechtigungen eines Agenten einschränken oder aufheben kann.
genlayer-intelligent-contracts
7.0kHilft deinem Agenten, Regeln, Belege und Ergebnisse eines KI-Richters festzulegen, der prüft, ob ein anderer Agent seinen Auftrag eingehalten hat.
x402-erc7710
7.0kHilft deinem Agenten, für Webdienste Anfrage für Anfrage zu bezahlen und laufende Ausgaben innerhalb eines Berechtigungsbudgets einzurichten.
Ähnliche Skills
api-connector-builder
280kLässt deinen Agenten neue API-Anbindungen nach dem bestehenden Muster bauen. Nutze es, wenn du eine weitere Integration ergänzen willst, ohne neue Wege einzuführen.
api-design
280kHilft deinem Agenten, REST-APIs nach Best Practices zu entwerfen. Nützlich für die Kommunikation, die Fehlerausgabe und die Organisation von Daten.
backend-patterns
280kHilft deinem Agenten bei Architekturmustern für die Serverseite und bei der Datenbankoptimierung. Nützlich zum Bauen und Prüfen von Server-Code.