Quick Start
First checkout with the SuiOutKit SDK and hosted API.
1. Install
npm install suioutkit
2. Open checkout
import { SuiOutKit } from "suioutkit";
const sdk = new SuiOutKit({
merchantAddress: "0xYOUR_MERCHANT_SUI_ADDRESS",
});
export function PayButton() {
async function handlePay() {
const session = await sdk.initCheckout({
amount: 45000,
currency: "NGN",
coinType: "0x2::sui::SUI", // optional
metadata: { orderId: "ORDER-123" },
});
sdk.openModal(session);
}
return <button type="button" onClick={handlePay}>Pay now</button>;
}
No server setup is required on your side - the SDK uses the hosted SuiOutKit API by default.
For local development use mode: "local" (or override with backendUrl):
const sdk = new SuiOutKit({
merchantAddress: "0xYOUR_MERCHANT_SUI_ADDRESS",
mode: "local",
});
Ensure merchantAddress is your merchant Sui address (required).
3. One-line button
sdk.wrapButton("#pay-btn", {
amount: 45000,
currency: "NGN",
coinType: "0x2::sui::SUI", // optional
});
What happens
- You call
initCheckout- the SDK creates a session. - The customer pays in the modal (bank, OPay, card, wallet, or outPay QR).
- SuiOutKit completes settlement on Sui; the modal polls until done.