Integrate Pzylo

Five steps from an API key to your first settled payment, and the plan limits.

On this page

Everything you need, in five steps.

1. Get started

Install the package and you can start connecting wallets.

npm install @pzylo/connect

# server only, never in the browser
PZYLO_API=https://gateway.dev.passkallet.com/sepolia/api/v1/passkallet
PZYLO_KEY=pk_test_…
PZYLO_WEBHOOK_SECRET=…

2. Authentication

Every request carries your secret key. Never put it in the browser.

curl https://gateway.dev.passkallet.com/sepolia/api/v1/passkallet/baas/wallets \
  -H "x-api-key: pk_live_…"

3. Connect a wallet

Open the Pzylo window from an authorized domain. The person confirms with their fingerprint.

import { connect } from "@pzylo/connect"

// from a click, on an authorized domain
const wallet = await connect({ origin: location.origin })
console.log(wallet.llave) // @valeria.ortega7

// on your server: trust it only once the proof checks out
verifyWebhook(wallet.proof, null, PZYLO_WEBHOOK_SECRET) // event "wallet.connected"

4. Charge

Request a payment. The person sees how much and to whom, and approves it with their fingerprint. If it fails, nothing is charged. Then confirm it on your server, with the webhook or with GET /baas/payments/:id and your secret key: never from the browser alone.

const payment = await wallet.charge({
  amount: "38.00", coin: "USDC", reason: "Season pass",
})
// { id: "pay_…", status: "settled" }

// on your server
import { getPayment } from "@pzylo/connect/server"
const p = await getPayment(payment.id, { apiKey: PZYLO_KEY, baseUrl: PZYLO_API })

5. Events

We notify your server when something happens. Every notification is signed.

import { verifyWebhook } from "@pzylo/connect/server"

const event = verifyWebhook(rawBody, req.headers, PZYLO_WEBHOOK_SECRET)
// { "event": "payment.settled",
//   "data": { "id": "pay_81c", "amount": "38.00", "coin": "USDC" } }

Limits

  • Test plan: 5,000 requests a month
  • Rate: 20 per second
  • Webhooks: Retried for 24 h