Accept your first Paybyte payment.
Create a unique payment reference on your server, send the immutable request to the PBE wallet, then verify the exact reference, recipient and amount from a node before fulfilment.
1. Create a payment request
curl -X POST https://paybyte.org/rpc/commerce/payment-request \
-H "Content-Type: application/json" \
-d '{
"recipient":"pbe1YOUR_MERCHANT_ADDRESS",
"amount":"25",
"reference":"order_8f42d1",
"label":"Golden Sword",
"confirmations":12
}'The response includes a paymentUri, a walletPath and a server-side statusPath. References are signed into transaction v2 and may contain letters, numbers, dot, underscore, colon and hyphen, up to 64 bytes.
2. Open the wallet
https://paybyte.org/wallet/?pay=pbe%3Apbe1YOUR_MERCHANT_ADDRESS%3Famount%3D25%26ref%3Dorder_8f42d1%26confirmations%3D12%26label%3DGolden%2520SwordThe wallet displays the exact recipient, amount and reference before signing. The merchant page must not be trusted to mark itself paid.
3. Verify from your backend
curl "https://paybyte.org/rpc/commerce/payment/order_8f42d1?recipient=pbe1YOUR_MERCHANT_ADDRESS&amount=25&confirmations=12"{
"ok": true,
"payment": {
"state": "confirmed",
"canonical": true,
"txid": "...",
"recipient": "pbe1...",
"amount": "2500000000",
"amountPbe": "25",
"reference": "order_8f42d1",
"confirmations": 12,
"requiredConfirmations": 12,
"hardFinality": false,
"settlementModel": "canonical-chain-depth"
}
}4. Fulfil exactly once
Use your own order database. Lock the order row, verify the returned tuple matches what you stored, mark the order paid, grant the product, and commit in one transaction. A repeated status check or webhook must not grant the product twice.
Working examples
Download the Coffee Mug polling example or Golden Sword webhook example from the Example downloads page.
