WebDollar Payment API

Base URL: https://pay.webdollar.cloudns.nz

Create payment session

POST /api/v1/payment/create
Content-Type: application/json

{
  "amount": 100.5,          // required — WEBD amount
  "merchant_id": "string",  // optional
  "webhook_url": "https://",// optional
  "redirect_url": "https://",// optional — redirect after payment
  "metadata": {}            // optional — any JSON object
}

Response 200:
{
  "payment_id": "uuid",
  "pay_to": "WEBD$...",
  "amount_webd": 100.5,
  "expires_at": "ISO8601",
  "payment_url": "https://pay.webdollar.cloudns.nz/p/uuid",
  "secret": "hex64"   // save this — used to verify webhook signatures
}

Check payment status

GET /api/v1/payment/{payment_id}/status

Response 200:
{
  "payment_id": "uuid",
  "status": "pending" | "paid" | "expired" | "overpaid",
  "amount_webd": 100.5,
  "paid_amount_webd": 100.5,
  "confirmations": 1,
  "tx_hash": "..."
}

Webhook verification

X-WEBD-Signature: sha256hex(secret + raw_body)

import hmac, hashlib
sig = hmac.new(secret.encode(), raw_body, hashlib.sha256).hexdigest()
assert sig == request.headers['X-WEBD-Signature']

Rate limits

Max 10 payment sessions per IP per hour. No authentication required.