> ## Documentation Index
> Fetch the complete documentation index at: https://docs.base.org/llms.txt
> Use this file to discover all available pages before exploring further.
# Payments and Transactions
> How your agent pays for services, receives payments, and executes onchain actions
Your agent has a wallet. Now it needs to use it. This page covers two key concepts: how your agent pays for services automatically using the x402 protocol, and how skills define the actions your agent can perform.
## x402: pay-per-request with stablecoins
x402 lets your agent pay for API requests using stablecoins without subscriptions or API keys. Your agent requests a resource, the server tells it the price, your agent pays, and the server delivers the data.
The name comes from HTTP status code `402 Payment Required`, which has been reserved in the HTTP specification since the 1990s but was never widely adopted. x402 finally puts it to use.
### How x402 works
Your agent sends a standard HTTP request to an API endpoint, just like any other API call.
Instead of returning data, the server responds with a `402` status code and includes payment details: how much it costs, which stablecoin to pay in, and where to send the payment.
Your agent's wallet constructs and sends a onchain payment based on the server's instructions. This happens automatically, no human approval needed.
Once the payment is confirmed, the server returns the requested data. The entire flow takes seconds.
This model is powerful for agents because it requires no pre-existing relationship between your agent and the service. Any agent with a funded wallet can pay for any x402-enabled API on the fly.
[Learn more about x402 →](https://www.x402.org/)
## Skills: actions your agent can perform
Skills are typed function definitions that describe an action your agent can invoke. Each skill specifies a name, expected inputs, and return type similar to a tool or function schema in any LLM tool-use integration. Your agent parses these definitions at runtime and calls them when relevant.
Skills cover actions like checking a token balance, executing a swap, sending a payment, or calling a smart contract.
### What a skill looks like
A skill definition includes the action name, a description of what it does, the required inputs, and the expected output. Here's a simplified example:
```json Title "Conceptual skill definition" theme={null}
{
"skill": "check-balance",
"description": "Check the token balance of a wallet address",
"inputs": {
"wallet_address": "The address to check",
"token": "The token symbol (e.g., USDC, ETH)"
},
"output": "The current balance of the specified token"
}
```
Your agent reads this definition, understands what inputs it needs to provide, and calls the skill when it's relevant to the task at hand.
### Skill providers
**What they are:** Pre-built skills for agents running on OpenClaw. BANKR skills cover common actions like token swaps, balance checks, and DeFi interactions.
**Best for:** Agents using OpenClaw or BANKR that need ready-to-use onchain capabilities.
[Browse BANKR skills →](https://github.com/BankrBot/openclaw-skills)
**What they are:** Skills provided by Coinbase's developer platform. CDP skills integrate with the Agentic Wallet and cover wallet management, token operations, and protocol interactions.
**Best for:** Agents using Agent SDK with a CDP Agentic Wallet.
[Browse CDP skills →](https://docs.cdp.coinbase.com/agentic-wallet/skills/overview)
## Next step
Make your agent discoverable and verifiable so other agents and services can trust it.