{"sample":true,"quote":"Send an unpaid POST and base64-decode its PAYMENT-REQUIRED header as JSON, then choose the exact Solana USDC offer in accepts and check its asset, payTo and amount against your spending limit. USDC has six decimal places, so an amount of 1000000 base units pays exactly 1 USDC. The example uses an offline transaction and sample credentials, so always request fresh terms and create a new order for a wallet transfer.","example":{"unpaid_request":{"method":"POST","url":"https://loopholetape.com/fees/pack","headers":{"Content-Type":"application/json","Accept":"application/json"},"body":{}},"unpaid_reply":{"status":402,"decoded_headers":{"PAYMENT-REQUIRED":{"x402Version":2,"error":"Payment required","resource":{"url":"https://loopholetape.com/fees/pack","description":"One thousand usable fee checks cost 1 USDC.","mimeType":"application/json"},"accepts":[{"scheme":"exact","network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","amount":"1000000","payTo":"9HkwyUhDMyjbpSpnyu5xuZ9vRaFQeajnJsavhie7XcsT","maxTimeoutSeconds":90,"extra":{"feePayer":"11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs"}}]}},"body":{"message":"One thousand usable fee checks cost 1 USDC.","how_to_pay":"/pay","price_usdc":1,"terms_header":"PAYMENT-REQUIRED","payment_header":"PAYMENT-SIGNATURE"}},"paid_request":{"method":"POST","url":"https://loopholetape.com/fees/pack","headers":{"Content-Type":"application/json","Accept":"application/json","PAYMENT-SIGNATURE":"eyJ4NDAyVmVyc2lvbiI6MiwicmVzb3VyY2UiOnsidXJsIjoiaHR0cHM6Ly9sb29waG9sZXRhcGUuY29tL2ZlZXMvcGFjayIsImRlc2NyaXB0aW9uIjoiT25lIHRob3VzYW5kIHVzYWJsZSBmZWUgY2hlY2tzIGNvc3QgMSBVU0RDLiIsIm1pbWVUeXBlIjoiYXBwbGljYXRpb24vanNvbiJ9LCJhY2NlcHRlZCI6eyJzY2hlbWUiOiJleGFjdCIsIm5ldHdvcmsiOiJzb2xhbmE6NWV5a3Q0VXNGdjhQOE5K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FBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFFQkFBRkFpQk9BQUFFQUFrREFRQUFBQUFBQUFBR0JBSUhBd0VLREVCQ0R3QUFBQUFBQmdVQUlHSTNPRGs0TmpNd05qUmxPVGhtWW1JeU5EbGxOMlk0WlRKaE9EQmtaRFl3QUE9PSJ9fQ=="},"body":{}},"decoded_payment":{"x402Version":2,"resource":{"url":"https://loopholetape.com/fees/pack","description":"One thousand usable fee checks cost 1 USDC.","mimeType":"application/json"},"accepted":{"scheme":"exact","network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","amount":"1000000","payTo":"9HkwyUhDMyjbpSpnyu5xuZ9vRaFQeajnJsavhie7XcsT","maxTimeoutSeconds":90,"extra":{"feePayer":"11157t3sqMV725NVRLrVQbAu98Jjfk1uCKehJnXXQs"}},"payload":{"transaction":"AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsfTItjTrXVSsoENL2oDBZ03zsao0YrdWCTGBSmPfl3luMhvn5oAuUu6KVH44UJP3atTU678hkG1gWCE/ZNZQHgAIBBAgAAAABkHB7w+8lvcmO11y3DWHIsQbcJI2O9h4dHbHKQDV8p5A4Rb9lmbRASVqlgXQrIM4mS/0hbDtTP9GHLjQNl2NtUCcsk1vn1wvkBFO2DKMQzvB0FDppY838olhwGY+199DDpRX/Jw8gtFjMZ0GB8YTjqgsYZpSSVXQUdgUJYwMGRm/lIRcy/+ytunLDm+e8jOW7xfcSayxDmzpAAAAABUpTWpkpIQZNJOhxYNo4fHw1td28kruB5B+oQEEFRI0G3fbh12Whk9nL4UbO63msHLSF7V9bN5E6jPWFfv8Aqcb6evO+2606PWXzaqvJdDGxu+TC0vbg5HymAgNFL11hAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAAFAiBOAAAEAAkDAQAAAAAAAAAGBAIHAwEKDEBCDwAAAAAABgUAIGI3ODk4NjMwNjRlOThmYmIyNDllN2Y4ZTJhODBkZDYwAA=="}},"paid_reply":{"status":200,"decoded_headers":{"PAYMENT-RESPONSE":{"success":true,"transaction":"4MWGtpGvezWgXpV3H9oPvCrJwwyvHHaNdzrN9PrZTBeQmd1EYJtEJi7gLfP4nSeybcdHcev2oaJ3f2fjVvVLGQLg","network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","payer":"4bnrUoYh57tubbby4zPA3ibdCDwPDY1LgyDZ7gz3Rdjz"}},"body":{"access_key":"0000000000000000000000000000000000000000000000000000000000000000","check_url":"/fees/order/00000000000000000000000000000000/check","check_method":"POST","state":"paid","paid":true,"fee_url":"/fees/MINT?venue=VENUE","balance_url":"/fees/balance"}}},"signing":"Fetch a recent blockhash from your Solana RPC node and sign one USDC transferChecked for the exact amount from your associated token account to the payee’s associated token account. Use extra.feePayer as the transaction’s fee payer and leave its signature for the payment service, so the buyer needs no SOL.","retry":"Send the same POST body and content type again with PAYMENT-SIGNATURE set to the base64 encoding of the payment JSON, which carries the serialized transaction in base64. Decode PAYMENT-RESPONSE from base64 to read the settlement and keep the private reply. An x402 request that returns a 4xx or 5xx is never charged. If the service reports an uncertain settlement, use the supplied check_url before submitting another transfer.","routes":[{"method":"POST","path":"/wallet-report/full","price_usdc":1,"body":{"wallet":"5oWPWVXKzPtDvi3iZUXaopQS9gCfv74Lm9V7czf6omLK"},"reply_fields":["report","receipt_url"],"use":"POST the wallet to /wallet-report/prepare and repeat after Retry-After while it returns 202, then buy when ready is true and the coverage suits you. GET receipt_url to reopen the report for thirty days.","memo_path":"/wallet-report/WALLET/prepare"},{"method":"POST","path":"/watch/subscribe","price_usdc":2,"body":{"wallet":"5oWPWVXKzPtDvi3iZUXaopQS9gCfv74Lm9V7czf6omLK"},"reply_fields":["check_url","check_method","state","paid","access_key","wallet","watch_url","events_url","stream_url","hourly_url","subscribe_url","reading"],"use":"Send Authorization: Bearer ACCESS_KEY when reading the wallet feeds and when renewing the same watch.","memo_path":"/watch/memo"},{"method":"POST","path":"/alerts/subscribe","price_usdc":2,"body":{"webhook_url":"https://example.com/alerts"},"reply_fields":["check_url","check_method","state","paid","access_key","signing_key","manage_url","feed_url","stream_url"],"use":"Use Authorization: Bearer ACCESS_KEY to read the feed or change deliveries and verify webhook signatures with signing_key. You may include a filter with lists named programs, instructions and errors.","memo_path":"/alerts/memo"},{"method":"POST","path":"/fees/pack","price_usdc":1,"body":{},"reply_fields":["check_url","check_method","state","paid","access_key","fee_url","balance_url"],"use":"Replace MINT with a coin address and VENUE with pump or pumpswap and send Authorization: Bearer ACCESS_KEY to fee_url to spend a usable reply or to balance_url to see how many remain.","memo_path":"/fees/memo","balance_reply":{"balance":1000}},{"method":"POST","path":"/feedcheck/full","price_usdc":2,"body":{"start_us":1700000000000000,"end_us":1700000060000000,"venues":["pump.fun"],"include_failed":true,"signatures":["1111111111111111111111111111111111111111111111111111111111111111"]},"reply_fields":["receipt_url","report"],"use":"Use the times and filters from the free count and put the signatures from your log in the signatures array, or send text/plain with the filters on the first line and one signature on each following line. The report contains slots, slot_count, coverage, totals, examples, method, privacy and reading, and GET receipt_url reopens the comparison for seven days.","memo_path":"/feedcheck/memo"}],"memo":"For a watch, an alert or a fee pack, POST the same JSON body to the product’s memo route with Accept: application/json and save the private order_url. For a feed comparison, POST text/plain to /feedcheck/memo with the filters as JSON on the first line and one signature on each following line. Open solana_pay_url in the wallet and send the exact USDC amount with the supplied memo and reference before expires. POST to check_url with Accept: application/json and repeat after Retry-After seconds while the status is 202, then read the settled reply or its error. For a wallet report, first read the free day and POST to its prepare_url with an empty body, then GET order_url until its state is ready and use its pay_to, price_usdc and memo for the transfer, then POST to check_url to collect receipt_url. A program can pay that order over x402 instead by posting an empty JSON object with the signed transfer to its x402_url.","memo_example":{"order_url":"/fees/order/SAMPLE","check_url":"/fees/order/SAMPLE/check","check_method":"POST","state":"ready","paid":false,"price_usdc":1,"message":"One thousand usable fee checks cost 1 USDC. This order is unpaid, so send the exact amount with the memo before the time in expires and then post to check_url.","pay_to":"9HkwyUhDMyjbpSpnyu5xuZ9vRaFQeajnJsavhie7XcsT","memo":"00000000000000000000000000000000","reference":"9whbBTQFjBx8qWJf5ZFGHyBQeGRQxTg3UcCpG1yx1xtZ","expires":1795754400,"solana_pay_url":"solana:9HkwyUhDMyjbpSpnyu5xuZ9vRaFQeajnJsavhie7XcsT?amount=1&spl-token=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&memo=00000000000000000000000000000000&reference=9whbBTQFjBx8qWJf5ZFGHyBQeGRQxTg3UcCpG1yx1xtZ"},"unpaid_check":{"status":202,"body":{"order_url":"/fees/order/SAMPLE","check_url":"/fees/order/SAMPLE/check","check_method":"POST","state":"ready","paid":false,"message":"No transfer with this memo has been found yet, so the order is still unpaid, and you can post to check_url again after sending the exact amount with the memo.","poll_url":"/fees/order/SAMPLE/check","retry_after_seconds":2}},"client_url":"/pay/x402_buy.py","client":"Download the client and inspect the terms with --quote, which reads no key and signs nothing. To pay, install solders and replace --quote with --keypair and your keypair filename, and set --max-usdc to the amount you allow. The default cap is 1 USDC and the default payee is the report service. You can set X402_ACCESS_KEY to your saved watch key when renewing, and use --body with --content-type text/plain to send a feed log.","commands":"curl -fsS https://loopholetape.com/pay/x402_buy.py -o x402_buy.py\npython3 x402_buy.py https://loopholetape.com/fees/pack --json '{}' --quote\npython3 -m pip install solders\npython3 x402_buy.py https://loopholetape.com/fees/pack --json '{}' --max-usdc 1 --keypair BUYER.json"}