Defining Subscription Plan Details

Learn how to configure subscription plans with the right pricing, billing frequency, and settlement options.

Overview

Subscription plans are the foundation of your subscription service. They define how customers will be billed, what they’ll pay, and how you’ll receive the funds. Properly configuring your plans ensures smooth recurring billing and accurate settlement.

Create subscription plan in merchant dashboard

Plan Fields Reference

Required Fields

FieldTypeDescription
NamestringThe short description of the plan
CodestringThe unique identifier of the plan (no spaces)
IntervalenumThe frequency of billing (Monthly / Yearly)
AmountobjectThe base amount to be billed every interval

Optional Fields

FieldTypeDescription
DescriptionstringA explanation of the details of the plan
DurationnumberThe number of intervals the subscription will run until expiration. For example, if the frequency is monthly and the duration is 12, the subscription will expire after a year
TransactionobjectSolana Only - the on-chain transaction to be used for the payments
Settlement TypeenumHow you receive funds: USDC, EUROe, or Fiat

Creating a Plan via API

1// API Reference: /api-reference/api-reference/merchant-subscription/create-plan
2
3const response = await fetch(
4 'https://api-sandbox.coinflow.cash/api/merchant/subscription/plans',
5 {
6 method: 'POST',
7 headers: {
8 'Authorization': 'YOUR_API_KEY',
9 'Content-Type': 'application/json'
10 },
11 body: JSON.stringify({
12 name: 'Premium Monthly Plan',
13 code: 'premium-monthly',
14 description: 'Access to all premium features with monthly billing',
15 interval: 'Monthly',
16 duration: null,
17 amount: {
18 currency: 'USD',
19 cents: 2999
20 },
21 settlementType: 'USDC'
22 })
23 }
24);
25
26const plan = await response.json();

Best Practices

Plan Naming

  • Keep names short and descriptive
  • Include billing frequency for clarity
  • Use customer-friendly language

Plan Codes

  • Use lowercase with hyphens (e.g., premium-monthly)
  • Make it URL-safe
  • Keep it memorable for developers

Pricing

  • Use psychological pricing (.99 endings)
  • Consider offering both monthly and yearly options
  • Yearly plans typically offer 15-20% discount

Settlement Types

Choose based on your business needs:

  • USDC/EUROe: Best for crypto-native businesses
  • Fiat: Best for traditional businesses with simpler accounting