Skip to main content
POST
Create Adjustment

Authorizations

Authorization
string
header
required

API key authentication

Path Parameters

id
string
required

The subscription ID

Body

application/json
type
enum<string>
required

The kind of adjustment. percentageDiscount reduces every discountable charge by a rate.

Available options:
percentageDiscount
percentageDiscount
string
required

The discount rate as a decimal fraction between 0 and 1, sent as a string. "0.35" means 35 percent. "1" means 100 percent, not 1 percent. At most 6 decimal places. A value of 0 or above 1 is rejected.

effectiveFrom
string<date-time>
required

The first instant the discount applies. Inclusive.

effectiveTo
string<date-time> | null

The instant the discount stops applying. Exclusive, so a window ending on the same date another begins neither overlaps nor leaves a gap. Null means the discount never stops, and it cannot be ended later — set an instant whenever the deal has a known end date. Must be after effectiveFrom.

description
string | null

The deal's own name, shown on each discount line of the invoice.

Maximum string length: 255
idempotencyKey
string

A key of your choosing that makes a retry safe. Sending the same key against the same subscription returns the adjustment already created and creates no second one. Without a key a retried request creates a second adjustment, and two percentage discounts compound — two of 0.35 bill 57.75 percent off, not 35 percent.

Required string length: 1 - 255
Example:

"adj_fy26_growth_001"

Response

An adjustment already exists for this idempotency key, and is returned unchanged. Nothing was created.

object
enum<string>
required
Available options:
subscriptionAdjustment
id
string
required

The adjustment ID

subscriptionId
string
required

Unique identifier for a subscription

Pattern: ^sub_[a-zA-Z0-9]+$
type
enum<string>
required
Available options:
percentageDiscount
percentageDiscount
string
required

The discount rate as a decimal fraction between 0 and 1. "0.35" means 35 percent.

effectiveFrom
string<date-time>
required

The first instant the discount applies. Inclusive.

effectiveTo
string<date-time> | null
required

The instant the discount stops applying. Exclusive. Null means the discount never stops.

description
string | null
required

The deal's own name, shown on each discount line of the invoice.

createdAt
string<date-time>
required