Complete reference for integrating Ping Pay's micropayment infrastructure with the x402 protocol on Solana.
Ping Pay enables micropayments for API requests using Solana blockchain. Users can authenticate via prepaid API keys or pay-per-request using the x402 protocol with SOL or USDC. Our marketplace features creator-made APIs where creators earn revenue directly to their wallet.
Connect wallet, deposit USDC, generate your API key
Include your API key in Authorization header
Start building with instant, low-cost API access
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://pingpay.app/api/solana/balance?address=YOUR_WALLET_ADDRESS"All endpoints return JSON. Replace YOUR_WALLET_ADDRESS with your actual Solana address.
/api/solana/balanceReturns the SOL balance for a given wallet address
curl https://pingpay.app/api/solana/balance?address=YOUR_WALLET_ADDRESS/api/solana/tokensReturns all SPL tokens held by a wallet
curl https://pingpay.app/api/solana/tokens?address=YOUR_WALLET_ADDRESS/api/solana/transactionsReturns recent transaction history for a wallet
curl https://pingpay.app/api/solana/transactions?address=YOUR_WALLET_ADDRESS/api/solana/nftReturns NFTs owned by a wallet address
curl https://pingpay.app/api/solana/nft?address=YOUR_WALLET_ADDRESS/api/solana/validatorReturns validator information for a vote account
curl https://pingpay.app/api/solana/validator?vote_account=YOUR_VOTE_ACCOUNTPrepaid balance-based authentication. Ideal for high-volume usage with predictable costs.
Authorization: Bearer pp_live_...Pay-per-request using Solana transactions. No account required, instant settlement.
X-Transaction-Signature: ...Note: The x402 protocol enables HTTP 402 Payment Required responses with Solana settlement. Learn more at x402.org
Initial Request
Make an API request without payment credentials
402 Response
Server responds with payment details and quote ID
Submit Payment
Send SOL or USDC to the specified Solana address
Retry with Signature
Include transaction signature in headers to receive data
| Header | Description |
|---|---|
| X-Payment-Required | Always "true" on 402 responses |
| X-Quote-Id | Unique identifier for this payment quote |
| X-Amount-USD | Price in USD for this request |
| X-Solana-Address | Recipient wallet address for payment |
| X-Expires-At | ISO 8601 timestamp for quote expiration |
# Step 1: Initial request (receives 402)
curl https://pingpay.app/api/solana/balance?address=YOUR_WALLET
# Step 2: Server responds with 402 and payment details
# {
# "quote_id": "abc123...",
# "amount_usd": 0.01,
# "solana_address": "...",
# "expires_at": "2025-10-30T12:00:00Z"
# }
# Step 3: Submit Solana payment transaction
# Step 4: Retry with transaction signature
curl -H "X-Quote-Id: abc123" \
-H "X-Transaction-Signature: YourSolanaSignature..." \
https://pingpay.app/api/solana/balance?address=YOUR_WALLETMonetize your own APIs through Ping Pay's marketplace. Set your price, publish your endpoint, and earn revenue directly to your Solana wallet.
Need help or have questions? Connect with our community and development team.