Inspect /api/payment-methods for the current list of enabled payment rails. Each rail has its own purchase and redemption contract.
/api/stripe/checkout with the product ID./web/stripe/success and redeem, or call /api/stripe/redeem?session_id=...&product=....curl -i https://YOUR-WORKER/api/data curl -H "X-Payment-Hash: HASH" -H "X-Payment-Preimage: PREIMAGE" https://YOUR-WORKER/api/data
import requests
r = requests.get(url)
challenge = r.json()
# Pay challenge["payment_request"] before continuing.
data = requests.get(url, headers={"X-Payment-Hash": challenge["payment_hash"], "X-Payment-Preimage": preimage}).json()const challenge = await (await fetch(url)).json();
// Pay challenge.payment_request before continuing.
const response = await fetch(url, {headers: {"X-Payment-Hash": challenge.payment_hash, "X-Payment-Preimage": preimage}});Important: invoices are mainnet, preimages are one-time receipts, and expired challenges require a new invoice. Always consult /api/payment-methods for the current enabled rails.
Need help? Email contact@tradedatahub.net