@subpay/sdk
Coming soon

@subpay/sdk

It is the Stripe SDK of Polkadot payments: one import, any token, any chain within the Polkadot ecosystem, zero blockchain knowledge required.

SDK

Payment Links (Blinks)

import { SubPay } from "@subpay/sdk";

const link = await SubPay.createPaymentLink({
  to: "0xA879...",
  amount: 10,
  token: "USDT",
  memo: "Coffee"
});
// returns: https://subpay.xyz/pay/abc123
SDK

Direct Payments

await SubPay.send({
  to: "0xA879...",
  amount: 5,
  token: "PAS",
  currency: "usd"
});
SDK

Cross-Chain XCM

await SubPay.sendCrossChain({
  to: "0xA879...",
  amount: 10,
  token: "PAS",
  destination: "PeoplePaseo"
});
// handles EVM -> SS58 conversion internally
SDK

React Hooks

const { pay, status } = useSubPay();
const { createLink } = useSubPayLinks();
const { prices } = useSubPayPrices();
SDK

Verify Payment

const verified = await SubPay.verifyPayment(txHash);
// returns { success, amount, token, from, to, timestamp }