Skip to main content
POST
Create a price

Authorizations

X-API-KEY
string
header
required

Body

application/json

Price to create

amount
integer
required

Amount is the price amount in the currency's smallest unit (e.g. cents).

Example:

5000

productId
string<uuid>
required

ProductId is the product this price belongs to.

Example:

"d1f8c9e2-3b4a-4c5d-9e6f-7a8b9c0d1e2f"

currency
string
default:usd

Currency is the ISO currency code.

Example:

"usd"

interval
enum<string>

Interval is the billing period for recurring prices.

Available options:
day,
week,
month,
quarterly,
biannually,
year,
semiannually
Example:

"month"

intervalCount
integer

IntervalCount is the number of intervals between billings.

Example:

1

type
enum<string>

Type is whether the price is one-time or recurring.

Available options:
oneTime,
recurring
Example:

"recurring"

Response

OK

amount
integer

Amount is the price amount in the smallest currency unit (e.g. cents).

Example:

5000

createdAt
string
creatorId
string
currency
string
default:usd

Currency is the ISO-4217 currency code. Defaults to usd when omitted.

Example:

"usd"

data
string
id
string
identityId
string
interval
enum<string>

Interval is the recurring billing period. Omit for one-time prices.

Available options:
day,
week,
month,
quarterly,
biannually,
year,
semiannually
Example:

"month"

intervalCount
integer | null

IntervalCount is the number of intervals between billings for a recurring price.

Example:

1

isUsed
boolean

IsUsed indicates whether the price is already referenced by a subscription or invoice and therefore cannot be deleted.

Example:

false

object
string
portalId
string

PortalID is the ID of the portal that owns this price.

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

previousAttributes
object
productId
string<uuid>

ProductId is the ID of the product this price belongs to.

Example:

"d1f8c9e2-3b4a-4c5d-9e6f-7a8b9c0d1e2f"

ref
string
type
enum<string>

Type is a computed field and should not be used in any logic on BE or Webapp

Available options:
oneTime,
recurring
Example:

"recurring"

updatedAt
string