PayVerify docs
Add non-custodial "Pay with USDT on TON" to any product in an afternoon. Create an invoice, watch the chain, receive a signed webhook.
1. Create an invoice
Price in crypto (amount) or in fiat (fiat_amount — we lock a rate). The response includes a hosted checkout_url (address + QR + exact amount + live status).
curl -s -XPOST https://pay.p1n.ch/v1/invoices \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"order_id":"ord_123","chain":"USDT-TON","fiat_amount":"9.99"}'
2. Send the customer to checkout
Redirect to the returned checkout_url, or embed it. The page shows the exact amount, a QR, a countdown, and polls its own public status endpoint — no keys or merchant data exposed.
3. Receive a signed webhook
When the payment finalizes on-chain, PayVerify POSTs a signed event to your webhook_url. Deliveries are durable — retried with backoff until your server returns 2xx, surviving restarts. Verify the HMAC signature before trusting the body:
// pseudo — see WEBHOOKS.md for the exact scheme
const expected = hmacSHA256(rawBody, signingSecret);
if (!timingSafeEqual(expected, req.header("X-PayVerify-Signature"))) return 401;
// now trust: { event: "invoice.paid", invoice_id, order_id, amount, ... }
API reference
| Method | Path | Purpose |
|---|---|---|
| POST | /v1/invoices | Create an invoice (idempotent per open order) |
| GET | /v1/invoices/:id | Get invoice + payments |
| POST | /v1/plans | Create a subscription plan (amount, period, grace) |
| POST | /v1/subscriptions | Start a subscription → user-owned wallet + setup URL |
| POST | /v1/subscriptions/:id/authorize | Activate after the customer authorizes the plugin |
| GET | /v1/subscriptions/:id | Subscription status + charge history |
| GET | /dashboard | Merchant dashboard (MRR, subs, invoices) |
Modes
Mode A — Direct payment. One-off invoices; funds go straight to the merchant wallet.
Mode B — Recurring subscriptions. Non-custodial recurring billing on TON — see the subscriptions guide.
WEBHOOKS.md, DESIGN.md, SECURITY.md). Join the waitlist for API keys and onboarding.