Skip to content

One-click tier downgrade: takes effect at the start of the next cycle (owner)

POST
/v1/orgs/{org}/billing/downgrade
curl --request POST \
--url https://api.replifier.com/v1/orgs/org_01hx0000000000000000000000/billing/downgrade \
--header 'Content-Type: application/json' \
--data '{ "tierKey": "example" }'
org
required
string
/^org_[a-z0-9]{26}$/

Example

org_01hx0000000000000000000000
Media typeapplication/json
object
tierKey
required
string
<= 32 characters

Example generated

{
"tierKey": "example"
}

Billing after the action

Media typeapplication/json
object
state
required
string
Allowed values: trial free paid canceling
tierKey
required
string
cycle
required
string
nullable
Allowed values: month year
pendingTierKey
required

Requested downgrade: takes effect at the start of the next cycle

string
nullable
currentPeriodEnd
required

Renewal; if canceled, last day of paid access

string
nullable
paymentStatus
required
string
Allowed values: ok past_due
stripeAccount
required
string
nullable
Allowed values: us mx
country
required
string
nullable
price
required

Current cycle price (cents), computed server-side. brands = paid brands; total = a single invoice for the account

object
perBrand
required
integer
brands
required
integer
total
required
integer
currency
required
string
brands
required

M16.4: per-brand summary of what the account pays (empty without a paid plan)

Array<object>
object
brandId
required
string
name
required
string
billingStatus
required
string
Allowed values: paid free
unitAmount
required

Cents per cycle for that brand; null if Free

integer
nullable
preferential
required

Preferential price set by Replifier for that brand

boolean
agency
required
object
active
required

30 % agency discount and white label (5 or more paid brands)

boolean
until
required

If it dropped to 4 or fewer paid brands: until when it keeps the benefits (end of the paid period)

string
nullable

Example

{
"state": "trial",
"cycle": "month",
"paymentStatus": "ok",
"stripeAccount": "us",
"brands": [
{
"billingStatus": "paid"
}
]
}

Invalid data

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

No session, expired session, or invalid, expired or revoked API key

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Not allowed, API key missing the scope, IP not allowed, or request rejected (csrf_rejected)

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Does not exist or is not visible to you

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Conflict

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Internal error

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Service temporarily unavailable

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}