Skip to main content

What is a Price?

A Price defines how a SKU is billed. It can be a one-time payment or a recurring subscription with different billing intervals.
Identifier format: price_ followed by 36 alphanumeric characters.Example: price_abc123def456ghi789jkl012mno345

SKU → Price Relationship

A SKU can have multiple prices for different pricing strategies:
SKU "Pro Course"
├── Price €99 one-time (single payment)
├── Price €19/month (monthly subscription)
├── Price €199/year (yearly subscription with savings)
└── Price 65,000 XOF one-time (African market)
This flexibility allows you to offer multiple payment options for the same product and manage multiple currencies.

Price Attributes

Main Attributes

AttributeTypeDescription
idstringUnique price identifier
skuIdstringReference to parent SKU
amountnumberAmount in whole units
currencystringCurrency code (EUR, XOF, USD, etc.)
typeenumone_time or recurring
activebooleanPrice active and usable

Recurring Attributes (subscriptions)

AttributeTypeDescription
billingIntervalenumday, week, month, year
billingIntervalCountnumberNumber of intervals (e.g., 3 = every 3 months)
trialPeriodDaysnumber | nullFree trial days

Pricing Types

One-Time (one_time)

The customer pays once to access the product.Use cases:
  • One-off purchases
  • Physical products
  • Digital downloads
  • Lifetime access
curl -X POST https://api.yabetoo.com/v1/skus/sku_abc123/prices \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 99,
    "currency": "EUR",
    "type": "one_time"
  }'

Billing Intervals

For recurring prices, define the billing frequency:
IntervalCountDescriptionExample
day1DailyBilled every day
week1WeeklyBilled every week
week2Bi-weeklyBilled every 2 weeks
month1MonthlyBilled every month
month3QuarterlyBilled every 3 months
month6Semi-annualBilled every 6 months
year1AnnualBilled every year
// Quarterly billing
{
  "type": "recurring",
  "billingInterval": "month",
  "billingIntervalCount": 3,
  "amount": 45
}

Trial Periods

Offer a free trial period to attract new customers:
{
  "type": "recurring",
  "billingInterval": "month",
  "billingIntervalCount": 1,
  "amount": 29,
  "currency": "EUR",
  "trialPeriodDays": 14
}
1

Subscription start

Customer signs up and starts their free trial period
2

Trial period

For 14 days, customer has full access without being charged
3

Trial end

At the end of the trial period, the first payment is automatically charged
4

Recurring cycle

Subsequent payments are charged according to the defined interval
Make sure to clearly inform your customers about the trial duration and the amount that will be charged afterward.

Multi-Currency Management

Create multiple prices for the same SKU in different currencies:
{
  "sku": "sku_formation_pro",
  "prices": [
    {
      "amount": 99,
      "currency": "EUR",
      "type": "one_time"
    },
    {
      "amount": 109,
      "currency": "USD",
      "type": "one_time"
    },
    {
      "amount": 65000,
      "currency": "XOF",
      "type": "one_time"
    }
  ]
}

Supported Currencies

CodeCurrencyCountry/Region
EUREuroEurope
USDUS DollarUnited States
XOFCFA Franc BCEAOWest Africa
XAFCFA Franc BEACCentral Africa
GNFGuinean FrancGuinea
CDFCongolese FrancDR Congo
All amounts are expressed in whole units. For example: 99 EUR = €99, 65000 XOF = 65,000 XOF.

API Response

{
  "id": "price_abc123def456ghi789",
  "object": "price",
  "skuId": "sku_xyz789abc123def456",
  "amount": 99,
  "currency": "EUR",
  "type": "one_time",
  "billingInterval": null,
  "billingIntervalCount": null,
  "trialPeriodDays": null,
  "active": true,
  "createdAt": "2024-01-15T10:30:00.000Z",
  "updatedAt": "2024-01-15T10:30:00.000Z"
}

Common Operations

Create a price

curl -X POST https://api.yabetoo.com/v1/skus/sku_abc123/prices \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 29,
    "currency": "EUR",
    "type": "recurring",
    "billingInterval": "month",
    "billingIntervalCount": 1
  }'

Retrieve a price

curl https://api.yabetoo.com/v1/prices/price_abc123 \
  -H "Authorization: Bearer sk_live_..."

Deactivate a price

Prices cannot be deleted if they are associated with active subscriptions. Use deactivation instead.
curl -X PATCH https://api.yabetoo.com/v1/prices/price_abc123 \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "active": false
  }'

List prices for a SKU

curl https://api.yabetoo.com/v1/skus/sku_abc123/prices \
  -H "Authorization: Bearer sk_live_..."

Pricing Strategies

Monthly vs Annual Offer

Offer a discount for annual subscription:
{
  "sku": "sku_saas_pro",
  "prices": [
    {
      "amount": 29,
      "currency": "EUR",
      "type": "recurring",
      "billingInterval": "month",
      "billingIntervalCount": 1
    },
    {
      "amount": 290,
      "currency": "EUR",
      "type": "recurring",
      "billingInterval": "year",
      "billingIntervalCount": 1
    }
  ]
}
€29/month vs €290/year represents about 2 free months, which encourages customers to commit for the year.

Tiered Pricing

Create different SKUs for each service level:
{
  "product": "Cloud App",
  "skus": [
    {
      "skuCode": "CLOUD-STARTER",
      "prices": [{ "amount": 9, "currency": "EUR", "type": "recurring", "billingInterval": "month" }]
    },
    {
      "skuCode": "CLOUD-PRO",
      "prices": [{ "amount": 29, "currency": "EUR", "type": "recurring", "billingInterval": "month" }]
    },
    {
      "skuCode": "CLOUD-ENTERPRISE",
      "prices": [{ "amount": 99, "currency": "EUR", "type": "recurring", "billingInterval": "month" }]
    }
  ]
}

Useful Getters

The Price model provides getters to facilitate checks:
// Check price type
price.isRecurring  // true if type === 'recurring'
price.isOneTime    // true if type === 'one_time'

Best Practices

Amounts are expressed in whole units of the currency:
  • EUR: 99 = €99
  • USD: 109 = $109
  • XOF: 65000 = 65,000 XOF
  • Deactivate old prices rather than deleting them
  • Keep active prices to the minimum necessary
  • Use different prices for promotions
  • 7 to 14 days is generally optimal
  • Too short: not enough time to evaluate
  • Too long: potential revenue loss
  • Adjust prices for each market (not simple conversion)
  • Consider local purchasing power
  • Use psychological pricing (€29 rather than €28.73)

Next Steps

Create promotions

Apply discounts with coupons and promo codes

Manage subscriptions

Understand the subscription lifecycle