Integrar
Cobra en cripto en tu sitio
Elige una forma. Copia, pega y listo.
Tres formas
- 1
Crea un producto
New product
Name
1,000 API creditsPrice
24.00USD1,000 API credits$24.00Active - 2
Copia su enlace
Linkpay.perly.io/l/your-linkOr print the QR.
Link copied - 3
Pégalo donde quieras
Bio, mensaje, correo, botón, QR en el mostrador.
Dónde va el enlace
Instagram, TikTok Editar perfil → Enlaces → pegar Telegram, WhatsApp Pégalo en un mensaje o en una publicación del canal Correo Pégalo en el texto o bajo una palabra Wix Botón → Enlace → Dirección web → pegar Tilda Bloque de botón → Contenido → Enlace del botón → pegar Webflow Botón → Configuración → Link → URL → pegar WordPress Bloque Botones → Enlace → pegar Shopify Personalizar tema → Botón → Enlace → pegar Notion Selecciona el texto → Link → pegar En un creador de sitios: añade un botón y pon su enlace.
kestrel.testAI models, paid by the credit.
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
El comprador paga
1,000 API credits
$24.00
BTCUSDCUSDTUSDC · Base24.000000 USDC
Paid
- 1
Obtén una clave de prueba
La clave secreta se queda en tu servidor. Nunca en una página.
API keys
Local dev
sk_test_…
Copy it now. It is shown once.
sk_test_•••••••••••••••• - 2
Instala el SDK
npm i perly-pay~/shop $ npm i perly-pay
added 1 package in 1s
0 dependencies · TypeScript types included
ready
- 3
Crea una factura y envía al comprador a ella
import { PerlyPay } from "perly-pay"; const pay = new PerlyPay(process.env.PERLY_PAY_SECRET_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
Entérate del pago: un webhook
Verifica el cuerpo en bruto. Envía el pedido con invoice.fulfilled: llega una vez, tras la revisión.
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
Qué pasa, en orden
Primero llega invoice.paid; invoice.fulfilled, cuando ya puedes enviar.
CompradorTu sitioPerly PayRedTu servidorComprar
POST /invoices
invoice.url
Redirige a /i/…
Paga a tu dirección
Visto, confirmado
invoice.paid · invoice.fulfilled
Recibo
Enviar
Pruébalo y luego pasa a real
- 1
Modo de prueba activo
Kestrel AITestTest networks. Nothing real moves. - 2
Simulate payment
Test mode · No real money moves.
USDC · Base SepoliaPaid24.000000
Short or over
- 3
Mira el webhook y el recibo
Webhooks
invoice.paid200deliveredinvoice.fulfilled200deliveredreceipt.created200deliveredReceipt
TEST-KS-2026-000124
1,000 API credits$24.00PDF - 4
En real: verifica tu billetera
Compara la primera dirección en la pantalla de tu propia billetera.
Wallets · live · first address
bc1q9h7…x7f2
Verify address
bc1q9h7…x7f2
Live