import { initializeT9n } from "@tineon/t9n";
const checkout = initializeT9n({
publicKey: "pk_live_xxx",
amountNgn: 35000,
currencies: ["BTC", "ETH", "TRX"],
customer: { email: "buyer@example.com", name: "Ada", reference: "order-123" },
metadata: { orderId: "order-123" },
theme: "system",
locale: "en",
onReady: () => console.log("ready"),
onSuccess: (payload) => console.log("paid", payload.reference),
onClose: () => console.log("closed"),
});Slimepay Merchant SDK
Everything you need to accept crypto from customers and settle in Naira directly into your recipient accounts with a single integration.
Embed injected checkout with real-time callbacks
Slimepay provides an injected checkout that can be mounted inline or opened as a modal. Use event handlers to sync your UI while checkout runs.
// Mount to a container
checkout.mount("#slimepay-checkout");
// Or open as a modal
checkout.open();Session handling
The SDK automatically creates a checkout session as soon as you open or mount the checkout component. Each session remains active for 15 minutes. During this period, the wallet address is continuously monitored for an incoming deposit that matches the expected payment details. If a valid deposit is detected before the session expires, the transaction is automatically labeled as successful. However, if no matching deposit is confirmed within the 15-minute window, the session expires and the transaction is marked as failed.