# Handle OKX Agent Payment Flows

Paid agent endpoints often require careful signing, confirmation, and replay steps. This skill guides Claude, Codex, and Claude Code through OKX Agent Payments Protocol flows.

## Install

```bash
npx skillstore add internet-court/okx-agent-payments-protocol
```

## Metadata

- Status: approved
- Slug: internet-court-okx-agent-payments-protocol
- Version: 4.2.1
- Author version: 4.2.1
- Skillstore revision: r1
- Version status: valid
- Tree hash: 845c9de578acd57a6280e0b951164cb4d70b666e1ba360735aa291a0f9e82a1f
- Author: internet-court
- GitHub username: internet-court
- License: MIT
- Repository: https://github.com/internet-court/internet-court-skill/tree/main/vendored/okx/okx-agent-payments-protocol
- Ref: 3f6e026a3363e0954ede7bef0cfe88d4475de137
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: confirmation\_required
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: filesystem, env\_access, scripts, external\_commands, network
- Quality score: 38
- Quality tier: warning
- Public page: https://skillstore.pages.dev/skills/internet-court-okx-agent-payments-protocol
- Manifest: https://skillstore.pages.dev/api/skills/internet-court-okx-agent-payments-protocol/manifest

## Capabilities

- Detects HTTP 402 payment challenges and routes accepts-based, charge, session, and subscription flows.
- Builds confirmation prompts that show network, token, amount, recipient, and request parameters.
- Uses onchainos wallet and payment commands for signing, replay, status, and channel operations.
- Handles a2a payment link creation, payment submission, status polling, and terminal state messages.
- Shows amount display rules for USDC, USDT, USDG, ETH, and unknown token fallback.

## Use Cases

- Access paid agent endpoints: Handle HTTP 402 responses, show payment details, collect confirmation, sign, and replay the protected request.
- Manage payment channels: Open a prepaid session, issue vouchers, top up balance, and close the channel with clear state tracking.
- Operate a2a payment links: Create seller links, pay buyer links, poll status, and present terminal payment states in plain language.

## Prompt Templates

### Pay a protected endpoint

```
Call <endpoint URL>. If it returns a payment requirement, show the charge details and wait for my confirmation before payment.
```

### Create a payment link

```
Create an a2a payment link for <amount> <symbol> to <recipient address> with description <description>.
```

### Continue a channel session

```
Use channel <channel_id> to make another request to <business URL>. Track the cumulative amount and show the channel state.
```

### Compare payment schemes

```
For this HTTP 402 response, compare the available OKX Agent Payments Protocol options, recommend one, and wait for confirmation.
```

## Limitations

- Only EVM payment methods are supported for the documented flows.
- Some paths require a live OKX wallet session or TEE signing.
- The local-key fallback exposes host private key handling risk.
- a2a buyer payments rely on upstream verification before signing.

## Best Practices

- Confirm each payment with amount, token, network, recipient, and request parameters before signing.
- Prefer TEE wallet signing over local private key fallback when possible.
- Keep channel identifiers, escrow address, chain ID, deposit, cumulative amount, and signature in conversation state.

## Anti Patterns

- Do not sign a payment before showing the required confirmation card.
- Do not reuse stale signatures or expired payment challenges.
- Do not expose internal protocol routing when a plain payment result is enough.

## Security Audit

- Audited at: 2026-07-21T04:04:41.405\+00:00
- Summary: Most static matches are false positives caused by Markdown code formatting, relative documentation links, protocol literals, and security-oriented guidance. Four findings are confirmed because the local-key fallback reads EVM\_PRIVATE\_KEY from the environment or ~/.onchainos/.env to authorize payment signing. No prompt-injection, credential-exfiltration, or covert network-intent evidence was found in the reviewed material.

## Stats

- Views: 0
- Downloads: 5
- Favorites: 1
- Popularity score: 0
