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",
  "paymentMethods": [
    "CRYPTO",
    "CARD"
  ],
  "description": "Monthly premium membership",
  "frequencyInDays": 30,
  "isCustomPrice": false,
  "priceCents": "999",
  "currency": "EUR",
  "platform": "WEB",
  "acceptedAssets": [
    "USDC",
    "USDT"
  ],
  "acceptedChains": [
    8453,
    42161
  ],
  "supply": 100,
  "imageUrl": "https://example.com/product.png"
}
'
{
  "success": true,
  "data": {
    "id": "pro_abc123",
    "name": "Premium Access",
    "description": "<string>",
    "status": "ACTIVE",
    "platform": "WEB",
    "frequencyInDays": 123,
    "isCustomPrice": true,
    "priceCents": "999",
    "currency": "USD",
    "supply": 123,
    "imageUrl": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "paymentMethods": [
      "CRYPTO"
    ],
    "acceptedAssets": [
      {
        "symbol": "<string>",
        "decimals": 123
      }
    ],
    "acceptedChains": [
      {
        "id": 123,
        "name": "<string>"
      }
    ]
  }
}

Authorizations

X-Suby-Api-Key
string
header
required

API key authentication

Body

application/json
name
string
required

Product display name

Required string length: 1 - 100
Example:

"Premium Access"

paymentMethods
enum<string>[]
required

Payment methods to enable:

  • CRYPTO — wallet connect and QR code (requires merchant receiving address)
  • CARD — credit/debit card (requires merchant verification + payout address)
Minimum array length: 1
Available options:
CRYPTO,
CARD
Example:
["CRYPTO", "CARD"]
description
string

Product description visible to customers

Maximum string length: 500
Example:

"Monthly premium membership"

frequencyInDays
integer | null

Billing cycle in days. Omit or set to null for one-time products. Common values: 7 (weekly), 30 (monthly), 90 (quarterly), 365 (yearly)

Required range: x >= 1
Example:

30

isCustomPrice
boolean
default:false

Set to true for dynamic pricing. When enabled, priceCents must NOT be set on the product. Instead, the price is provided per-payment via priceCents when creating a payment or subscription.

Example:

false

priceCents
string

Price in cents as a string. Required when isCustomPrice is false (default). Must NOT be provided when isCustomPrice is true. For CARD payments, minimum is "200" (2.00 USD/EUR).

Example:

"999"

currency
enum<string>

Price currency. Required when isCustomPrice is false (default). Must NOT be provided when isCustomPrice is true.

Available options:
USD,
EUR
Example:

"EUR"

platform
enum<string>
default:WEB

Target platform. Defaults to WEB

Available options:
WEB,
INVOICE
Example:

"WEB"

acceptedAssets
string[]

Crypto only. Ignored when paymentMethods is ["CARD"] only. Token symbols to accept (e.g. ["USDC", "USDT"]). Automatically resolved across all accepted chains. If omitted, all active assets are enabled.

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

Crypto only. Ignored when paymentMethods is ["CARD"] only. Blockchain chain IDs to accept. Common IDs: 8453 (Base), 42161 (Arbitrum), 1 (Ethereum), 56 (BSC), 101 (Solana). If omitted, all active chains matching your merchant addresses are enabled.

Example:
[8453, 42161]
supply
integer

Maximum number of subscriptions or one-time purchases available. Omit for unlimited.

Required range: x >= 1
Example:

100

imageUrl
string<uri>

Product image URL displayed on checkout

Example:

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

Response

Product created successfully

success
boolean
Example:

true

data
object