Skip to main content
POST
/
api
/
product
/
create
Create a product
curl --request POST \
  --url https://api.suby.fi/api/product/create \
  --header 'Content-Type: application/json' \
  --header 'X-Suby-Api-Key: <api-key>' \
  --data '
{
  "name": "Premium Access",
  "priceCents": "999",
  "currency": "EUR",
  "paymentMethods": [
    "CRYPTO",
    "CARD"
  ],
  "description": "Monthly premium membership with exclusive features",
  "frequencyInDays": 30,
  "platform": "WEB",
  "acceptedAssets": [
    "USDC",
    "USDT"
  ],
  "acceptedChains": [
    8453,
    42161
  ],
  "supply": 100,
  "imageUrl": "https://example.com/product.png",
  "discordGuildId": "123456789012345678",
  "discordRoleId": "987654321098765432",
  "discordRemindersId": "111222333444555666",
  "telegramGroupId": "-1001234567890"
}
'
{
  "success": true,
  "data": {
    "id": "pro_abc123",
    "name": "Premium Monthly Subscription",
    "description": "Monthly premium membership with exclusive features",
    "status": "ACTIVE",
    "platform": "WEB",
    "frequencyInDays": 30,
    "priceCents": "999",
    "currency": "EUR",
    "supply": 100,
    "imageUrl": "https://example.com/product.png",
    "createdAt": "2026-01-15T10:30:00.000Z",
    "paymentMethods": [
      "CRYPTO",
      "CARD"
    ],
    "acceptedAssets": [
      {
        "symbol": "USDC",
        "decimals": 6
      }
    ],
    "acceptedChains": [
      {
        "id": 8453,
        "name": "Base"
      }
    ],
    "discordGuildId": "123456789012345678",
    "discordRoleId": "987654321098765432",
    "discordRemindersId": "111222333444555666",
    "telegramGroupId": "-1001234567890"
  }
}

Authorizations

X-Suby-Api-Key
string
header
required

API key authentication. Include your API key in the X-Suby-Api-Key header:

X-Suby-Api-Key: your_api_key_here

Body

application/json
name
string
required

Product display name. Must be between 1 and 100 characters

Required string length: 1 - 100
Example:

"Premium Access"

priceCents
string
required

Price in cents as a string. Must be a positive integer. Examples: "999" = 9.99, "1500" = 15.00, "100" = 1.00. For CARD payments, minimum is "200" (2.00 USD/EUR)

Example:

"999"

currency
enum<string>
required

Price currency. Determines how the price is stored and displayed:

  • USD: Price stored in priceUsd field
  • EUR: Price stored in priceEur field. Card (Inflow) payments use EUR natively. Crypto payments are converted via EUR/USD Pyth oracle rate
Available options:
USD,
EUR
Example:

"EUR"

paymentMethods
enum<string>[]
required

Payment methods to enable for this product. At least one is required:

  • CRYPTO: Enables wallet connect and QR code payments. Requires merchant receiving address for the selected chains
  • CARD: Enables credit/debit card payments via Inflow. Requires merchant verification, payout address, and minimum price of 200 cents
Minimum array length: 1
Available options:
CRYPTO,
CARD
Example:
["CRYPTO", "CARD"]
description
string

Optional product description visible to customers. Maximum 500 characters

Maximum string length: 500
Example:

"Monthly premium membership with exclusive features"

frequencyInDays
integer | null

Billing frequency in days for recurring subscriptions. Common values: 7 (weekly), 30 (monthly), 90 (quarterly), 365 (yearly). Set to null or omit for one-time purchases

Required range: x >= 1
Example:

30

platform
enum<string>
default:WEB

Target platform for subscription access:

  • DISCORD: Grants a Discord role to subscribers
  • TELEGRAM: Grants access to a Telegram group/channel
  • WEB: Web application access (managed via webhooks)
  • INVOICE: Invoice-based billing Defaults to WEB if omitted. Status is ACTIVE for DISCORD/WEB/INVOICE, PENDING for TELEGRAM (requires bot setup)
Available options:
DISCORD,
TELEGRAM,
WEB,
INVOICE
Example:

"WEB"

acceptedAssets
string[]

Token symbols to accept for payment (e.g. ["USDC", "USDT", "ETH"]). Symbols are case-insensitive and are automatically resolved across all accepted chains. For example, "USDC" will enable USDC on Base, Arbitrum, Ethereum, etc. — whichever chains are accepted. If omitted, all active assets on the accepted chains are enabled

Example:
["USDC", "USDT"]
acceptedChains
integer[]

Blockchain chain IDs to accept for payment. Common IDs: 8453 (Base), 42161 (Arbitrum), 1 (Ethereum), 56 (BSC), 101 (Solana). If omitted, all active chains are enabled. Chains without matching assets are automatically excluded from the final product

Example:
[8453, 42161]
supply
integer

Maximum number of subscriptions allowed for this product. Checked on first purchase only, not on renewals. If omitted, defaults to unlimited

Required range: x >= 1
Example:

100

imageUrl
string<uri>

Direct URL to a product image. Displayed on the checkout page

Example:

"https://example.com/product.png"

discordGuildId
string

Discord server (guild) ID. Required when platform is DISCORD. You can find this by enabling Developer Mode in Discord and right-clicking your server

Example:

"123456789012345678"

discordRoleId
string

Discord role ID to grant to subscribers. Required when platform is DISCORD. The Suby bot must have a role higher than this role in the server hierarchy

Example:

"987654321098765432"

discordRemindersId
string

Discord channel ID where subscription renewal reminders will be sent. Optional, only used with DISCORD platform

Example:

"111222333444555666"

telegramGroupId
string

Telegram group or channel ID (negative number as string). Required when platform is TELEGRAM. The Suby bot must be an admin of the group/channel

Example:

"-1001234567890"

Response

Product created successfully

success
boolean
Example:

true

data
object

Product configuration and details. The response shape adapts based on the product's platform:

  • WEB/INVOICE: Base fields only
  • DISCORD: Base fields + discordGuildId, discordRoleId, discordRemindersId
  • TELEGRAM: Base fields + telegramGroupId