Skip to content

Quick Start

Follow these steps to start using Gatepay and accept crypto payments for your content or services.

  • In your dashboard, navigate to the Profile section.
  • Keep your token secure—never expose it in public code.
Terminal window
npm install gatepay-sdk
import { Gatepay } from "gatepay-sdk"
const gatepay = new Gatepay({ apiToken: "your-api-token" })
const link = await gatepay.createLink({
name: "Premium Content",
alias: "myfirstlink"
description: "Access to exclusive premium content",
// Resource configuration - what users get after payment
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",
},
],
},
})
console.log(`Payment link: ${link.url}`)
// Payment link: https://link.gatepay.cloud/myfirstlink
  • Distribute your payment link to your users.
  • When a user pays, Gatepay verifies the payment and grants access.

Next steps: