Create a subscription payment
Creates a subscription payment for a recurring product (frequencyInDays is set).
Returns a checkout URL to redirect your customer to.
For custom price products (isCustomPrice: true), provide priceCents and currency.
One-time products? Use
POST /api/payment/createinstead.
Documentation Index
Fetch the complete documentation index at: https://documentation.suby.fi/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
API key authentication
Body
ID of a subscription product
"pro_sub456"
Optional. If provided, a user account is created (or reused) immediately and linked to the payment. If omitted, the payment is created without a customer; the email is collected on the hosted checkout page and the user is linked at that moment.
"customer@example.com"
Optional. Customer first name. Used to prefill checkout fields. Ignored when customerEmail is omitted.
100"John"
Optional. Customer last name. Used to prefill checkout fields. Ignored when customerEmail is omitted.
100"Doe"
Price in cents as a string.
Required when the product has isCustomPrice: true. Must NOT be provided for fixed-price products.
This price is locked for all future renewals.
"999"
Currency for the price. Required when priceCents is provided, ignored otherwise.
USD, EUR 255"sub_ref_001"
Extra fields shown on the checkout page to collect information from the customer
(e.g. Discord username, referral source, terms acceptance).
Fields are collected on the initial checkout only — renewal payments do not
re-prompt the customer. The initial payment webhook carries the responses in
context.customFieldsResponse; renewal webhooks have it set to null.
Maximum 10 fields per subscription.
10
