PLUS Pay for developers

Accept USDT (BNB Chain) and PLUS directly into your own wallet. PLUS Pay never holds funds: customers pay your wallet, and our server checks each payment on-chain (asset, address, amount, time) before an invoice turns PAID. PLUS Pay is in preview; there is no PLUS Pay fee, only network gas paid by the customer.

1. Get an API key and webhook secret

Connect the wallet that should receive payments and sign a message. Signing is free (no transaction). Doing it again replaces the old key and secret.

2. Create invoices from your server

With your API key the invoice always pays your wallet, can carry your orderId, and is marked "source": "api". Assets: USDT_BSC or PLUS. Each invoice can be paid for 30 minutes.

curl -X POST https://plusmain.net/api/pay/invoice \
  -H "Authorization: Bearer pp_sk_..." \
  -H "Content-Type: application/json" \
  -d '{"asset":"USDT_BSC","amount":"25.00","orderId":"1001","merchantName":"My Shop","memo":"2 coffees"}'

# -> { "ok": true, "url": "https://plusmain.net/pay/i/<id>", "invoice": { "id": "...", "status": "pending", ... } }
# Send the customer to "url". Status: GET /api/pay/invoice/<id>

3. Receive signed webhooks

When an invoice to your wallet is verified as paid we POST { id, type: "invoice.paid", created, data: invoice } to your webhook, signed with PlusPay-Signature: t=…,v1=HMAC-SHA256(secret, t + "." + body). We retry up to 3 times right away. If your server was down, resend it with POST /api/pay/invoice/<id>/webhook (API key), or read the status with GET /api/pay/invoice/<id>. Send a test event with POST /api/pay/merchant/test.

Anyone can create a payment link to any wallet address. Before you ship an order, check that the paid invoice is yours: source is "api", the orderId matches, and asset and amountUnits match the order.
// Node.js (Express): verify a PLUS Pay webhook
import crypto from "crypto";

app.post("/pluspay/webhook", express.raw({ type: "application/json" }), (req, res) => {
  const header = req.get("PlusPay-Signature") || "";          // "t=1700000000,v1=hex..."
  const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
  const expected = crypto.createHmac("sha256", process.env.PLUSPAY_WEBHOOK_SECRET)
    .update(parts.t + "." + req.body.toString("utf8")).digest("hex");
  const ok = parts.v1 && parts.v1.length === expected.length &&
    crypto.timingSafeEqual(Buffer.from(parts.v1), Buffer.from(expected));
  if (!ok || Math.abs(Date.now() / 1000 - Number(parts.t)) > 300) return res.status(400).end();

  const event = JSON.parse(req.body);
  if (event.type === "invoice.paid") {
    const inv = event.data;
    // Check it against YOUR order before shipping:
    //   inv.source === "api", inv.orderId, inv.asset, inv.amountUnits, inv.merchant
    // Handle duplicates: the same invoice can be delivered more than once (use inv.id).
  }
  res.status(200).end();
});

4. No server? Use the button widget

For donations, tips or simple shops. The button creates a payment link to your wallet and opens it in a new tab. The amount comes from your page, so it is not proof of an order: confirm such payments yourself.

<script src="https://plusmain.net/pluspay.js" async></script>

<button data-pluspay-merchant="0xYourWallet"
        data-pluspay-amount="25"
        data-pluspay-asset="USDT_BSC"
        data-pluspay-name="My Shop"
        data-pluspay-memo="Order 1001">Pay with crypto</button>

On-chain payments cannot be reversed. Refunds are sent by the merchant from their own wallet. Merchants are responsible for the laws that apply to their business.