Skip to content

Commit a5fd9b0

Browse files
add an overview section for x402
1 parent da43bc8 commit a5fd9b0

2 files changed

Lines changed: 61 additions & 0 deletions

File tree

gator-sidebar.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ const sidebar = {
118118
label: 'x402',
119119
collapsed: true,
120120
items: [
121+
'guides/x402/overview',
121122
{
122123
type: 'category',
123124
label: 'Buyer',
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
description: Use x402 and ERC-7710 delegations to enable programmatic payments from MetaMask smart accounts.
3+
sidebar_label: Overview
4+
keywords: [x402, HTTP 402, ERC-7710, delegation, facilitator, payments, smart account]
5+
---
6+
7+
import GlossaryTerm from '@theme/GlossaryTerm'
8+
import CardList from '@site/src/components/CardList'
9+
10+
# x402 Payments
11+
12+
[x402](https://www.x402.org/) is an open payment protocol that uses the HTTP `402` status code to enable programmatic, machine-to-machine payments over HTTP. It allows servers to charge for API access without requiring buyer accounts, API keys, or traditional payment infrastructure.
13+
14+
For example, an AI agent can pay 0.01 USDC per request to access a weather API, or a
15+
dapp can charge users a microtransaction to retrieve premium onchain analytics data.
16+
17+
## ERC-7710 payments
18+
19+
The standard x402 protocol supports direct token transfers (using ERC-20 Permit2 or EIP-3009).
20+
[ERC-7710](https://eips.ethereum.org/EIPS/eip-7710) extends this by enabling <GlossaryTerm term="Delegation">delegation</GlossaryTerm>-based
21+
payments from <GlossaryTerm term="MetaMask smart account">MetaMask smart accounts</GlossaryTerm>.
22+
23+
With ERC-7710, a buyer's smart account creates a delegation that authorizes the facilitator
24+
to transfer tokens on their behalf. The buyer doesn't sign a direct token approval.
25+
Instead, they sign a delegation that the facilitator redeems during settlement.
26+
27+
This approach enables buyers to pay from MetaMask wallet.
28+
Buyers can restrict delegations to specific facilitator addresses, amounts, and time windows
29+
using <GlossaryTerm term="Delegation scope">delegation scopes</GlossaryTerm>.
30+
They can also create long lived delegations that allow recurring payments without re-signing
31+
for each request.
32+
33+
Learn more [ERC-7710 delegations](../../concepts/delegation/overview.md).
34+
35+
## Guides
36+
37+
Get started with x402 payments using MetaMask Smart Accounts Kit.
38+
These guides walk you through creating delegations, requesting permissions, and setting up recurring payments.
39+
40+
<CardList
41+
items={[
42+
{
43+
href: '/smart-accounts-kit/development/guides/x402/buyer/delegations',
44+
title: 'Pay using a delegation',
45+
description: 'Create an ERC-7710 delegation and use it as the x402 payment payload.',
46+
},
47+
{
48+
href: '/smart-accounts-kit/development/guides/x402/buyer/advanced-permissions',
49+
title: 'Pay using Advanced Permissions',
50+
description:
51+
'Request ERC-7715 Advanced Permissions for x402 payments with a fixed allowance.',
52+
},
53+
{
54+
href: '/smart-accounts-kit/development/guides/x402/buyer/recurring-payments',
55+
title: 'Set up recurring payments',
56+
description:
57+
'Grant a periodic budget permission for recurring x402 payments.',
58+
},
59+
]}
60+
/>

0 commit comments

Comments
 (0)