Skip to main content
POST
billing.plan.create

Authorizations

Authorization
string
header
required

API key: sk_live_…

Headers

Idempotency-Key
string
required

Required: this capability has an external effect.

Maximum string length: 255
Pramaan-Account
string

Optional. One of your account ids (GET /v1/accounts): run on that account, whatever your routing rules say. The response header X-Pramaan-Account names the account that ran.

Pramaan-End-User
string

Optional. Your own tag for your end user: a sticky: end_user rule keeps them on the account that first served them.

Maximum string length: 256
Pramaan-End-User-Group
string

Optional. Your end user's group, matched by rules with endUserGroup.

Maximum string length: 64

Body

application/json
planId
string
required

Your plan record ID.

Required string length: 1 - 128
Pattern: ^[A-Za-z0-9_-]+$
name
string
required

Plan name.

Required string length: 1 - 40
type
enum<string>
required

Automatic recurring or separately requested charges.

Available options:
periodic,
on_demand
maxAmount
object
required
recurringAmount
object
interval
enum<string>

Unit of the recurring interval.

Available options:
day,
week,
month,
year
intervalCount
integer

Interval units per cycle.

Required range: 1 <= x <= 365
maxCycles
integer

Maximum cycles, when limited.

Required range: 1 <= x <= 100000
note
string

Plan note.

Required string length: 1 - 200

Response

The result

planId
string
required

Your plan record ID, for follow-up calls.

Required string length: 1 - 128
Pattern: ^[A-Za-z0-9_-]+$
name
string
required

Plan name.

Required string length: 1 - 100
type
enum<string>
required

Automatic periodic charges or charges requested individually.

Available options:
periodic,
on_demand,
unknown
status
enum<string>
required

Account's reported plan state.

Available options:
active,
inactive,
unknown
maxAmount
object
required

Maximum permitted charge, in minor units.

recurringAmount
object

Amount per cycle for a periodic plan.

interval
enum<string>

Unit of the recurring interval.

Available options:
day,
week,
month,
year
intervalCount
integer

Number of interval units per cycle.

Required range: x <= 9007199254740991
maxCycles
integer

Maximum cycles, when limited.

Required range: x <= 9007199254740991