DEVELOPERS

Accept USDC with Boss Pay.

Invoices, hosted checkout, a drop-in button and signed webhooks. Customers pay your own wallet directly — Boss never holds the funds.

Overview

Boss Pay lets you accept USDC on Solana or Base with invoices, a hosted checkout page, a drop-in button and signed webhooks. Customers pay your own wallet directly — Boss watches the chain and tells you when an invoice is paid, but never holds the funds.

Non-custodial

Payments land in your wallet, not ours.

1% per payment

No monthly fee and no setup fee.

Any wallet

Boss Stash QR, Solana Pay and EIP-681 links.

Quick start

1 · Get keys

Open Boss Stash → Security → Business → Boss Pay for merchants. Payouts go to that wallet. You get a secret key (sk_live_…, server-side only) and a webhook secret (whsec_…).

2 · Create an invoice

Your server creates an invoice for an amount in USDC on Solana or Base, and sends the customer to checkout.

3 · Get paid

We watch the chain and call your webhook when the invoice is paid or expires.

Authentication

Send your secret key as a bearer token: Authorization: Bearer sk_live_…. Keys are shown once — store them in your server’s secrets. Rotate a key any time in the app; the old key stops working immediately. Never put a secret key in a browser, app or public repository.

Create an invoice

POST /merchant/invoices
curl -X POST https://api.bossstash.com/merchant/invoices \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"amount":"25.00","asset":"usdc-sol","orderId":"1042",
       "memo":"Order 1042","redirectUrl":"https://shop.example/thanks",
       "expiresInMin":60}'
FIELDTYPEDESCRIPTION
amountstring, requiredAmount in USDC, e.g. "25.00".
assetstring"usdc-sol" (default) or "usdc-base".
orderIdstringYour order reference, returned in webhooks.
memostringShown to the customer at checkout.
redirectUrlstringWhere checkout sends the customer after paying.
expiresInMinnumberMinutes until the invoice expires: 5 to 10,080 (7 days). Default 60.
Response (abridged)
{
  "id": "inv_...",
  "status": "open",
  "amount": "25.00",
  "merchantReceives": "25.00",
  "customerPays": "25.25",
  "checkoutUrl": "https://api.bossstash.com/checkout/inv_...",
  "bossPayUri": "bosspay:...",      // Boss Stash QR
  "walletUri": "solana:..."          // Solana Pay / EIP-681 for any wallet
}

customerPays includes the 1% fee; merchantReceives is what lands in your wallet.

Endpoints

Base URL: https://api.bossstash.com. All responses are JSON unless noted.

METHODPATHAUTHWHAT IT DOES
POST/merchant/invoicesSecret keyCreate an invoice
GET/merchant/invoices?status=open|paid|expiredSecret keyList invoices
GET/merchant/invoices/:idSecret keyGet one invoice
GET/checkout/:idPublicHosted checkout page
GET/checkout/:id.jsonPublicInvoice status (for your page or the button)
GET/widget.jsPublicDrop-in pay button
GET/merchantSecret keyMerchant dashboard

Checkout and button

Send the customer to checkoutUrl, show bossPayUri as a QR code for Boss Stash, or use walletUri for any Solana Pay or EIP-681 wallet. Or drop in the button — it opens checkout and fires bosspay:paid when the payment arrives.

HTML
<script src="https://api.bossstash.com/widget.js" data-invoice="inv_..."></script>
<script>
  document.addEventListener('bosspay:paid', (e) => {
    // show your thank-you state; confirm on your server via the webhook
  });
</script>

Webhooks

We POST to your webhook URL with a Boss-Signature: t=<unix>,v1=<hex> header, where v1 = HMAC-SHA256(whsec, "<t>.<raw body>"). Events are invoice.paid and invoice.expired. We retry until your endpoint returns 2xx, so handle duplicates by invoice id. Reject signatures older than 10 minutes.

Event body
{
  "type": "invoice.paid",            // or "invoice.expired"
  "invoice": { "id": "inv_...", "status": "paid", "orderId": "1042", ... }
}
Verify a webhook (Node.js)
import crypto from 'node:crypto';

// header: Boss-Signature: t=<unix>,v1=<hex>
export function verify(rawBody, header, whsec) {
  const parts = Object.fromEntries(header.split(',').map((p) => p.split('=')));
  const age = Math.floor(Date.now() / 1000) - Number(parts.t);
  if (!(age >= 0 && age < 600)) return false;            // older than 10 min
  const expected = crypto.createHmac('sha256', whsec)
    .update(`${parts.t}.${rawBody}`).digest('hex');
  const got = Buffer.from(parts.v1 ?? '', 'hex');
  const want = Buffer.from(expected, 'hex');
  return got.length === want.length && crypto.timingSafeEqual(got, want);
}

Payment matching

Solana

Each invoice has a unique reference key attached to the transfer (Solana Pay standard), so any amount sent with the right reference is matched.

Base

Each open invoice gets a unique amount (a few millionths of a dollar added). Customers must send the exact amount shown.

Test mode

In Boss Stash, turn on Security → Use testnet, then create your merchant account to get sk_test_… keys. Test invoices use USDC on Solana devnet and Base Sepolia, so you can run the whole flow — checkout, button and webhooks — with free test tokens.

Errors and limits

Errors return a non-2xx status with a JSON body: {"error": "message"}. 400 means a bad request (for example, amounts must look like 25.00 and be at least 0.10 USDC), 401 a missing or wrong key, 404 an unknown invoice and 429 too many requests. Each IP can make up to 60 requests per minute; back off and retry after a 429.

Plugins and tools

WooCommerce

Install the Boss Pay plugin, paste your keys, and orders are marked paid from the signed webhook. For USD-priced stores.

Merchant dashboard

api.bossstash.com/merchant — volume, open and paid invoices, create invoices, CSV export.

Shopify

Use a manual “Pay with USDC” method plus an order webhook that creates a Boss Pay invoice, until Shopify payments-partner approval.

Wallet SDK

@boss/wallet-core is the engine behind Boss Stash, available to licensed partners: BIP39 phrases, Bitcoin, Ethereum, Base and Solana, a PIN-encrypted vault, balances, signing, bridging and Boss Pay requests. Commercial use requires a signed licence — contact [email protected].

TypeScript
import { createMnemonic, deriveKeys, fetchBalances } from '@boss/wallet-core';

const phrase = createMnemonic(12);
const keys = deriveKeys(phrase, 'mainnet');
const { balances } = await fetchBalances(keys, 'mainnet');

Security

Report vulnerabilities to [email protected] — see our security policy and bug bounty. The Boss server and the WooCommerce plugin are in scope.