Skip to content

Commit 5c05eca

Browse files
add x402 overview
* add an overview section for x402 * fix tpyo * fix typo * add seller guide
1 parent 3abb1cb commit 5c05eca

2 files changed

Lines changed: 67 additions & 0 deletions

File tree

gator-sidebar.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ const sidebar = {
119119
collapsed: true,
120120
key: 'x402-guides',
121121
items: [
122+
'guides/x402/overview',
122123
'guides/x402/seller',
123124
{
124125
type: 'category',
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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 micro-payment 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 in Smart Accounts Kit.
38+
These guides walk you through seller endpoint setup and buyer payment flows.
39+
40+
<CardList
41+
items={[
42+
{
43+
href: '/smart-accounts-kit/development/guides/x402/seller',
44+
title: 'Set up a seller endpoint',
45+
description:
46+
'Configure a resource server that returns x402 payment requirements and settles requests.',
47+
},
48+
{
49+
href: '/smart-accounts-kit/development/guides/x402/buyer/delegations',
50+
title: 'Pay using a delegation',
51+
description: 'Create an ERC-7710 delegation and use it as the x402 payment payload.',
52+
},
53+
{
54+
href: '/smart-accounts-kit/development/guides/x402/buyer/advanced-permissions',
55+
title: 'Pay using Advanced Permissions',
56+
description:
57+
'Request ERC-7715 Advanced Permissions for x402 payments with a fixed allowance.',
58+
},
59+
{
60+
href: '/smart-accounts-kit/development/guides/x402/buyer/recurring-payments',
61+
title: 'Set up recurring payments',
62+
description:
63+
'Grant a periodic budget permission for recurring x402 payments.',
64+
},
65+
]}
66+
/>

0 commit comments

Comments
 (0)