Paybyte
DevelopersPBE Core 0.0.1 · Protocol 1.0
PBE-PAY

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

Shell
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

URL
https://paybyte.org/wallet/?pay=pbe%3Apbe1YOUR_MERCHANT_ADDRESS%3Famount%3D25%26ref%3Dorder_8f42d1%26confirmations%3D12%26label%3DGolden%2520Sword

The 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

Shell
curl "https://paybyte.org/rpc/commerce/payment/order_8f42d1?recipient=pbe1YOUR_MERCHANT_ADDRESS&amount=25&confirmations=12"
JSON
{
  "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.

Production recommendationUse signed Commerce webhooks for automatic fulfilment, but retain the payment tuple in your database and make fulfilment idempotent.

Working examples

Download the Coffee Mug polling example or Golden Sword webhook example from the Example downloads page.