
Company News
AWS Security Hub Adds Socket for Supply Chain Security
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.
@voidly/pay
Advanced tools
Voidly Pay SDK — agent-to-agent payments for AI agents. Sign envelopes, settle transfers, run x402 paywalls, verify webhooks.
Voidly Pay SDK for TypeScript / JavaScript. Agent-to-agent payments that AI agents actually want to use.
npm install @voidly/pay
import { VoidlyPay } from "@voidly/pay";
const pay = await VoidlyPay.create(); // mints + persists keypair
console.log("My DID:", pay.did); // did:voidly:...
await pay.transfer({ to: "did:voidly:provider", amount: 0.5 });
That's it. The SDK signs the envelope, hits https://api.voidly.ai, and settles.
| Primitive | Use case | Method |
|---|---|---|
| Transfer | One-shot payment | pay.transfer({ to, amount }) |
| Batch | Pay many at once, atomically | pay.batchTransfer([...]) |
| Escrow | Conditional hold | pay.openEscrow({ to, amount, deadlineHours }) |
| Stream | Per-token / per-second metering | pay.openStream({ provider, budget }) |
| Subscription | Recurring charge | pay.subscribe({ provider, amountPerPeriod, periodSeconds }) |
| x402 quote | Server-side paywall | pay.createQuote({ resource, amount }) |
| x402 verify | Server-side verify | pay.verifyPayment({ payment_header }) |
| x402 client | Pay-on-402 wrapper | pay.fetchWithPay(url) |
| Webhooks | Push notifications | pay.subscribeWebhook({ url, events }) |
import { VoidlyPay } from "@voidly/pay";
const pay = await VoidlyPay.create();
// In your HTTP handler:
async function handleRequest(req, res) {
const paymentHeader = req.headers["x-payment"];
if (!paymentHeader) {
const quote = await pay.createQuote({ resource: req.path, amount: 0.01 });
res.status(402).json(quote.payment_required_response);
return;
}
const v = await pay.verifyPayment({ payment_header: paymentHeader });
if (!v.ok) { res.status(402).json({ error: v.reason }); return; }
res.json({ data: "the goods" });
}
const response = await pay.fetchWithPay("https://api.example.com/expensive-resource", {
method: "POST",
body: JSON.stringify({ query: "hello" }),
}, { maxAmount: 0.05 }); // refuse to pay more than 0.05 credits
import { verifyWebhookSignature } from "@voidly/pay";
app.post("/voidly-webhook", async (req, res) => {
const ok = await verifyWebhookSignature({
body: req.rawBody,
signatureHeader: req.headers["x-voidly-signature"],
secret: process.env.VOIDLY_WEBHOOK_SECRET!,
});
if (!ok) return res.status(401).end();
// ... handle event
});
const pay = await VoidlyPay.create({
apiUrl: "https://api.voidly.ai", // override for self-hosted
secretKey: existingKey, // bring your own Ed25519 key
defaultExpiryMinutes: 30, // envelope expires_at window
});
Keys auto-persist to:
localStorage["voidly-pay-keypair-v1"]~/.voidly-pay/keypair.json (mode 0600)KeyStorage implementationMIT
FAQs
Voidly Pay SDK — agent-to-agent payments for AI agents. Sign envelopes, settle transfers, run x402 paywalls, verify webhooks.
The npm package @voidly/pay receives a total of 12 weekly downloads. As such, @voidly/pay popularity was classified as not popular.
We found that @voidly/pay demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.

Research
/Security News
Popular npm packages keyv and cacheable compromised.

Security News
A misconfiguration gave three Anthropic models internet access, and one, believing it was in a simulation, shipped a credential-stealing package to PyPI.