x402 requires a feature flag to be enabled on your Pinata account. Contact [email protected] to request access.
x402 is currently available through the Pinata API v3. SDK support coming soon.
Overview
Pinata’s x402 implementation enables:- Monetization of private IPFS content using Payment Instructions
- You receive payments directly to your wallet address. Payments go to you, not Pinata.
- Flexible payment requirements configurable per file or group of files
- USDC payments on Base (mainnet) and Base Sepolia (testnet)
- Gateway-level enforcement through the x402 protocol
Network Configuration
| Network | USDC Token Address | Use Case |
|---|---|---|
| Base (Mainnet) | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 | Production monetization |
| Base Sepolia (Testnet) | 0x036CbD53842c5426634e7929541eC2318f3dCF7e | Testing payment flows |
Payment Instructions API
Create and manage payment requirements for your private content:List Instructions
View all payment instructions
Create Instruction
Define new payment requirements
Get Instruction
Retrieve instruction details
Update Instruction
Modify payment requirements
Delete Instruction
Remove payment instructions
CID Management
Attach payment instructions to your private files:How It Works
- Upload a private file to Pinata IPFS
- Create a Payment Instruction with your desired payment requirements
- Attach the CID of your private file to the Payment Instruction
- Share your x402 gateway URL:
https://your-gateway.mypinata.cloud/x402/cid/{cid} - Requesters make USDC payments through your gateway to access content
You must use your own dedicated Pinata gateway domain. Replace
your-gateway.mypinata.cloud with your actual gateway domain throughout these examples.Example Workflow
Why Use Payment Instructions
The Payment Instructions API enables you to monetize your private content by setting custom payment requirements and receiving payments directly to your wallet. Key benefits:- You get paid for your content. Set your own prices and receive USDC payments directly.
- Flexible pricing for different files or groups of files
- Reusable payment instructions that can be attached to multiple CIDs
- Full control over payment requirements, pricing, and access