Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nhestrompia/shielded-x402/llms.txt
Use this file to discover all available pages before exploring further.
What is the Merchant SDK?
The Merchant SDK enables merchants to accept privacy-preserving x402 payments using zero-knowledge proofs. Customers can pay for API access, services, or content without revealing their identity or payment history.Key Features
Zero-Knowledge Proofs
Verify payments without revealing customer identity or transaction history.
Challenge-Response
Issue payment challenges and verify cryptographic proofs in responses.
Nullifier Protection
Prevent double-spending with cryptographic nullifiers.
On-Chain Settlement
Settle verified payments on-chain for cryptographic guarantees.
How It Works
The x402 payment flow follows a challenge-response pattern:Core SDK Class
TheShieldedMerchantSDK class provides the main interface for accepting payments:
Configuration Reference
MerchantConfig
Payment rail identifier. Currently supports
'shielded-usdc'.Price in smallest asset units (e.g., micro-USDC: 1000000n = 1 USDC).
Merchant’s public key for payment verification.
Address of the shielded pool contract that verifies proofs.
Challenge time-to-live in milliseconds (recommended: 180000).
Network identifier (default:
'eip155:11155111' for Sepolia).Asset identifier for the payment token.
Payment recipient address (defaults to
verifyingContract).Fixed nonce for testing only. Omit for production.
MerchantHooks
Hook to verify zero-knowledge proofs. Must check both proof validity and merkle root.
Hook to check if a nullifier has been used. Prevents double-spending.
Next Steps
Integration Guide
Integrate x402 payments into your application
Payment Verification
Learn how to verify and settle payments