Gatepay Public SDK
Gatepay Public SDK
Section titled “Gatepay Public SDK”The Gatepay SDK provides a type-safe, developer-friendly interface for all API operations.
Installation
Section titled “Installation”npm install gatepay-sdk
Initialization
Section titled “Initialization”import { Gatepay } from "gatepay-sdk"
const gatepay = new Gatepay({ apiToken: "your-api-token" })
Key Features
Section titled “Key Features”- TypeScript types for all requests and responses
- Convenience methods for common flows (e.g.,
createLink
) - Full API coverage (links, payments, accounts, networks)
Example: Create a Link
Section titled “Example: Create a Link”const link = await gatepay.createLink({ name: "Premium Content", description: "Access to exclusive premium content",
// Resource configuration resource: { type: "link", data: { url: "https://example.com/premium-content", }, },
// Payment configuration toll: { tollPaymentRequirements: [ { assetNetwork: "base", amount: "1000000", // 1 USDC assetAddress: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", destinationAddress: "your-wallet-address", }, ], },})