Premium PayGates

Premium PayGates allow users to purchase custom short codes (e.g., /amazon, /google) for their PayGates at a premium price of 100 USDC per year. Unlike regular PayGates which get auto-generated short codes, premium PayGates let users choose memorable, brandable URLs.

Key Features

Custom Short Codes

  • Choose your own memorable short code instead of auto-generated ones

  • Perfect for branding and easy sharing

  • Format: letters, numbers, underscore, and hyphen only (^[a-zA-Z0-9_-]+$)

Flexible Duration

  • Purchase for 1-1000 years at 100 USDC per year

  • Payment processed via x402 protocol

  • Immediate activation upon payment

Expiration and Renewal

  • Premium PayGates expire after the purchased period

  • Current owners can extend their premium PayGates before expiration

  • Expired premium PayGates become available for anyone to purchase

Protected Names

Certain short codes are reserved and cannot be purchased as premium PayGates:

  • API endpoints: api, health, tos, auth, paygates, dashboard, history, transfer, premium

  • System reserved: admin, root, www

API Endpoints

Create Premium PayGate

POST /api/v1/premium

Request Body:

{
  "shortCode": "your-custom-code",
  "years": 1,
  "payGateRequest": {
    "price": "1000000", // price in Wei USDC
    "paymentAddress": "0x...",
    "targetUrl": "https://example.com/api",
    "method": "GET",
    "title": "My Premium API",
    "description": "Custom branded API endpoint"
  }
}

Response:

{
  "id": "paygate-id",
  "shortCode": "your-custom-code",
  "accessUrl": "https://402ify.com/your-custom-code",
  "expiresAt": "2026-08-18T00:00:00Z",
  "isPremium": true
}

Extend Premium PayGate

PUT /api/v1/premium/{shortCode}/extend

Request Body:

{
  "years": 2
}

Only the current owner can extend their premium PayGate. Extension adds time to the current expiration date.

Management

Premium PayGates appear alongside regular PayGates in the standard PayGate management interface (GET /api/v1/paygates) with special indicators:

  • isPremium: true field in the response

  • expiresAt timestamp showing when the premium period ends

  • Clear visual distinction in the interface

Use Cases

  • Businesses: Branded short links for APIs (/api-docs, /support)

  • Content Creators: Memorable links for monetized content (/music, /merch)

  • Developers: Professional endpoints (/webhook, /callback)

Pricing

  • Cost: 100 USDC per year

  • Duration: 1-1000 years supported

  • Payment: Processed via x402 protocol with immediate activation

  • Calculation: Total cost = years × 100 USDC

Last updated