Official TypeScript SDK for the Wire payment API. Zero runtime dependencies; works on Node 18+.
npm install @buildry-wire/wireimport { Wire } from "@buildry-wire/wire";
const wire = new Wire("sk_live_...");
const pi = await wire.paymentIntents.create({ amount: 50000, currency: "MNT" }); // minor units
console.log(pi.id, pi.status);for await (const charge of wire.charges.list({ limit: 50 })) {
console.log(charge.id);
}import { Wire, SIGNATURE_HEADER } from "@buildry-wire/wire";
const wire = new Wire("sk_live_...");
// rawBody must be the unparsed request body (string or Buffer)
const event = wire.webhooks.verify(rawBody, req.headers[SIGNATURE_HEADER.toLowerCase()], endpointSecret);
console.log(event.type);import { WireError } from "@buildry-wire/wire";
try {
await wire.paymentIntents.create({ amount: -1 });
} catch (e) {
if (e instanceof WireError) console.log(e.code, e.requestId, e.statusCode);
}MIT