@biocrypt/gateway
v0.1.0
Published
Embeddable BioCrypt payment gateway SDK — drop-in widget and JS client for accepting ZBIO payments.
Maintainers
Readme
@biocrypt/gateway
Embeddable payment gateway SDK for accepting ZBIO (BioCrypt v1) payments on your site — a drop-in widget plus a small JS client.
Install
npm install @biocrypt/gatewayOr use the CDN build directly:
<script src="https://www.biocrypt.net/gateway/biocrypt-pay.js"></script>Quick start
import { BioCryptPay } from "@biocrypt/gateway";
const pay = new BioCryptPay({ apiBase: "https://www.biocrypt.net/api" });
const { paymentId, paymentUrl } = await pay.createPayment({
amount: 0.5,
recipientPublicKeyHash: "<your wallet pubkey hash>",
description: "Coffee",
});
pay.openCheckout(paymentUrl);
pay.waitForCompletion(paymentId).then((status) => {
console.log("paid!", status);
});License
MIT
