Integrate
Take crypto on your site
Pick a way. Copy, paste, done.
Three ways
- 1
Make a product
New product
Name
House Blend · 1 kgPrice
24.00USDHouse Blend · 1 kg$24.00Active - 2
Copy its link
Linkpay.perly.io/l/your-linkOr print the QR.
Link copied - 3
Paste it anywhere
Bio, message, email, button, QR on a counter.
Where the link goes
Instagram, TikTok Edit profile → Links → paste Telegram, WhatsApp Paste in a message or a channel post Email Paste in the text, or under a word Wix Button → Link → Web address → paste Tilda Button block → Content → Button link → paste Webflow Button → Settings → Link → URL → paste WordPress Buttons block → Link → paste Shopify Customize theme → Button → Link → paste Notion Select text → Link → paste On a site builder: add a button, set its link.
northwind.coffeeRoasted on Fridays.
pay.perly.io/l/your-link
Bio ChatHow do I pay?pay.perly.io/l/your-linkMessage Your orderPay here →Email Buy nowLink
pay.perly.io/l/your-link✓ Done
Site builder - 4
The buyer pays
House Blend · 1 kg
$24.00
BTCUSDCUSDTUSDC · Base24.000000 USDC
Paid
- 1
Get a test key
The secret key stays on your server. Never in a page.
API keys
Local dev
sk_test_…
Copy it now. It is shown once.
sk_test_•••••••••••••••• - 2
Install the SDK
npm i perly-pay~/shop $ npm i perly-pay
added 1 package in 1s
0 dependencies · TypeScript types included
ready
- 3
Make an invoice, send the buyer to it
import { PerlyPay } from "perly-pay"; const pay = new PerlyPay(process.env.PERLY_PAY_KEY); // sk_test_… app.post("/buy", async (req, res) => { const invoice = await pay.invoices.create({ line_items: [{ price: "price_…" }], return_url: "https://yourshop.com/thanks", metadata: { order: "1042" }, }); res.redirect(303, invoice.url); // https://pay.perly.io/i/<uuid> }); - 4
Hear about it: a webhook
Verify the raw body. Ship on invoice.fulfilled — it comes once, after screening.
app.post("/webhooks/perly", express.raw({ type: "application/json" }), (req, res) => { const event = pay.webhooks.verify( req.body, // the raw bytes, not parsed JSON req.header("Perly-Signature"), process.env.PERLY_PAY_WEBHOOK_SECRET, // whsec_… ); // throws if forged, or older than 5 minutes if (event.type === "invoice.fulfilled") { ship(event.data.object.metadata.order); // once, after screening } res.sendStatus(204); });Webhooks
Endpoint URL
yourshop.com/webhooks/perlyhttps://yourshop.com/webhooks/perlyOnwhsec_•••• · shown once
invoice.paid200deliveredinvoice.fulfilled200delivered - 5
What happens, in order
invoice.paid comes first; invoice.fulfilled when it's safe to ship.
BuyerYour sitePerly PayChainYour serverBuy
POST /invoices
invoice.url
Redirect to /i/…
Pays to your address
Seen, confirmed
invoice.paid · invoice.fulfilled
Receipt
Ship
Test it, then go live
- 1
Test mode on
Northwind CoffeeTestTest networks. Nothing real moves. - 2
Simulate payment
USDC · Base SepoliaPaid24.000000
Simulate payment - 3
See the webhook and the receipt
Webhooks
invoice.paid200deliveredinvoice.fulfilled200deliveredreceipt.created200deliveredReceipt
TEST-NW-2026-000124
House Blend · 1 kg$24.00PDF - 4
Go live: verify your wallet
Compare the first address on your wallet's own screen.
Wallets · live · first address
bc1q9h7…x7f2
Verify address
bc1q9h7…x7f2
Live