RapidCents Developer Documentation
Products & Prices API Guide
v1.0 · REST API

Products & Prices

Public API v1 · Catalog for one-time and recurring billing

Summary

Products describe what you sell. Prices attach an amount (and optional recurring cadence) to a product. Subscriptions reference a price id — amounts live on prices, not products.

💡

Typical flow: create a product → create one or more prices on that product → create a subscription with a price (and customer / payment method). See Recurring Payments.

Authentication

Server-to-server. Authenticate with a RapidCents rc_sk_ secret key.

Authorization: Bearer {rc_sk_secret_key}
Content-Type: application/json
Accept: application/json

Base URL patterns: /api/v1/products and /api/v1/prices. Business is resolved from the secret key. Currency on prices comes from the authenticated business and is not accepted in the request body.

Catalog Model

  • Product — name, description, active flag, metadata. Nested prices are returned when loaded.
  • Price — belongs to a product; unit_amount in the smallest currency unit (e.g. cents); optional recurring for subscriptions; omit recurring for a one-time price.
  • Immutability — after create, unit_amount, currency, and recurring cadence cannot change. Update only nickname, active, and metadata.

Product Object

Response shape
{
  "id": "product-uuid",
  "object": "product",
  "name": "Pro Plan",
  "description": "Monthly subscription",
  "active": true,
  "prices": [ { /* price objects */ } ],
  "metadata": {},
  "created": 1710000000
}

Create Product

POST /api/v1/products

Request Body

FieldTypeRequiredDescription
namestringYesProduct name (max 255)
descriptionstringNoLonger description (max 2000)
activebooleanNoDefault true
metadataobjectNoArbitrary key/value metadata
Request
POST /api/v1/products
Authorization: Bearer {rc_sk_...}

{
  "name": "Pro Plan",
  "description": "Monthly subscription"
}
Response — 201 Created
{
  "id": "product-uuid",
  "object": "product",
  "name": "Pro Plan",
  "description": "Monthly subscription",
  "active": true,
  "prices": [],
  "metadata": {},
  "created": 1710000000
}

List Products

GET /api/v1/products

Query Parameters

ParamTypeDescription
activebooleanFilter by active state
limitintegerPage size (1–100, default 10)
starting_afterstringCursor: return records after this id
ending_beforestringCursor: return records before this id
Response — 200 OK
{
  "object": "list",
  "data": [ { /* product with prices */ } ],
  "has_more": false
}

Get Product

GET /api/v1/products/{product}

Returns the product and its related prices.

Update Product

PATCH /api/v1/products/{product}

Request Body

FieldTypeRequiredDescription
namestringNoUpdate name
descriptionstring | nullNoUpdate description
activebooleanNoArchive or reactivate
metadataobject | nullNoReplace metadata
Request
PATCH /api/v1/products/{product}

{
  "name": "Pro Plan Updated",
  "description": "Updated description",
  "active": true
}

Price Object

Response shape
{
  "id": "price-uuid",
  "object": "price",
  "product": "product-uuid",
  "unit_amount": 2999,
  "currency": "usd",
  "recurring": {
    "interval": "month",
    "interval_count": 1
  },
  "nickname": "Pro monthly",
  "active": true,
  "metadata": {},
  "created": 1710000000
}

When recurring is omitted at create time, the response recurring field is null (one-time price).

Create Price

POST /api/v1/prices

Request Body

FieldTypeRequiredDescription
productstring (UUID)YesProduct this price belongs to
unit_amountintegerYesAmount in smallest currency unit (min 1)
recurringobjectNoBilling cadence for subscriptions; omit for one-time
recurring.intervalstringWith recurringday, week, month, or year
recurring.interval_countintegerNoDefault 1; must be a supported cadence
nicknamestringNoDisplay label (max 255)
activebooleanNoDefault true
metadataobjectNoArbitrary key/value metadata
Request — recurring monthly
POST /api/v1/prices
Authorization: Bearer {rc_sk_...}

{
  "product": "product-uuid",
  "unit_amount": 2999,
  "recurring": {
    "interval": "month",
    "interval_count": 1
  }
}
Response — 201 Created
{
  "id": "price-uuid",
  "object": "price",
  "product": "product-uuid",
  "unit_amount": 2999,
  "currency": "usd",
  "recurring": {
    "interval": "month",
    "interval_count": 1
  },
  "nickname": null,
  "active": true,
  "metadata": {},
  "created": 1710000000
}

Supported Recurring Cadences

Only these interval + interval_count pairs map to RapidCents billing sequences and are accepted:

intervalinterval_countBilling
day1Daily
week1Weekly
week2Bi-weekly
month1Monthly
month3Quarterly
month6Twice a year
year1Annually

Other combinations (for example month + 2) are rejected with a validation error on recurring.interval_count.

List Prices

GET /api/v1/prices

Query Parameters

ParamTypeDescription
productstringFilter to prices for this product id
activebooleanFilter by active state
limitintegerPage size (1–100, default 10)
starting_afterstringCursor: return records after this id
ending_beforestringCursor: return records before this id
Example
GET /api/v1/prices?product={product_id}&limit=10

Get Price

GET /api/v1/prices/{price}

Update Price

PATCH /api/v1/prices/{price}

Only presentation and state fields may change. You cannot change unit_amount, currency, or recurring after creation — create a new price instead.

Request Body

FieldTypeRequiredDescription
nicknamestring | nullNoDisplay label
activebooleanNoArchive or reactivate
metadataobject | nullNoReplace metadata
Request
PATCH /api/v1/prices/{price}

{
  "nickname": "Pro monthly",
  "active": true
}

All Endpoints

Products

MethodEndpointDescription
POST/api/v1/productsCreate product
GET/api/v1/productsList products
GET/api/v1/products/{id}Get product
PATCH/api/v1/products/{id}Update product

Prices

MethodEndpointDescription
POST/api/v1/pricesCreate price
GET/api/v1/pricesList prices
GET/api/v1/prices/{id}Get price
PATCH/api/v1/prices/{id}Update nickname / active / metadata

Error Handling

HTTP CodeScenarioDescription
422Validation errorMissing required fields or unsupported recurring cadence
404Not foundProduct or price does not exist for this business
401UnauthorizedMissing or invalid secret key