Skip to main content

Get All Subscription Plans

GET 

/plans

Returns a list of all subscription plans with pagination based on the filters passed on as query parameters.

info

The request must provide the following header: x-api-key: {merchantKey}

info

If a query parameter not listed below is included in the request, it will be ignored. Similarly, any query parameter with an invalid value will also be disregarded.

tip

Gte: Greater Than or Equal >=
Lte: Lower Than or Equal <=

Request​

Query Parameters

    page integer

    Number of the desired page for which data should be returned. Page numbers use zero-based numbering e.g., to get the 10th page, you need to set page=9.

    pageSize integer

    Number of Plans per Page requested (e.g., 10).

    createdAtLte string<date-time>

    Created before the provided date & time. Format: yyyy-MM-dd'T'HH:mm:ss.SS'Z'

    createdAtGte string<date-time>

    Created after the provided date & time. Format: yyyy-MM-dd'T'HH:mm:ss.SS'Z'

    updatedAtLte string<date-time>

    Updated before the provided date & time. Format: yyyy-MM-dd'T'HH:mm:ss.SS'Z'

    updatedAtGte string<date-time>

    Updated after the provided date & time. Format: yyyy-MM-dd'T'HH:mm:ss.SS'Z'

    deleted string

    Possible values: [true, false]

    Possible values: TRUE, FALSE.

    name string

    Name of the Plan.

Header Parameters

    Content-Type stringrequired

    Must be application/json

    Accept-Language stringrequired

    Must be be en-US

    Origin stringrequired

    The origin of the request

    User-Agent stringrequired

    The client making the request

    x-api-key stringrequired

    x-api-key: {merchantKey}

Responses​

Successful response

Schema
    pageinteger
    pageSizeinteger
    countinteger
    totalPagesinteger
    data object[]
  • Array [
  • idstring

    Unique Identifier of the Subscription Plan. Format: SubscriptionPlan + - + <UUID>

    Example: SubscriptionPlan-12033695-99d8-4dc6-bf51-db64ef27620b
    createdAtstring<date-time>

    Timestamp of when the Subscription Plan was created.

    Example: 2021-03-17T17:18:53.01Z
    updatedAtstring<date-time>

    Timestamp of when the Subscription Plan was last updated.

    Example: 2021-03-17T17:18:53.01Z
    deletedAtstring<date-time>nullable

    Timestamp of when the Subscription Plan was deleted (if applicable).

    namestringrequired

    Name of the Subscription Plan.

    Possible values: <= 255 characters

    Example: Premium
    descriptionstringrequired

    Description of the Subscription Plan.

    Possible values: <= 255 characters

    Example: Premium sub for only 90.99 EUR!
    recurrentAmountnumber<decimal>required

    Amount to be billed recurrently.

    Possible values: <= 60 characters

    Example: 90.99
    currencyIsoCodestringrequired

    Currency code. Format ISO 4217.

    Possible values: >= 3 characters and <= 3 characters

    Example: EUR
    trialDurationPeriodintegernullable

    Period of the trial. MinValue 1, MaxValue 28.

    Possible values: >= 1 and <= 28

    Example: 1
    trialDurationUnitstringnullable

    Unit of the trial period.

    Possible values: [day, month, year]

    Example: day
    billingOccurrenceintegernullablerequired

    Recurrence of the billing occurrences.

    Example: 1
    billingUnitstringnullablerequired

    Unit of the billing recurrence.

    Possible values: [day, month, year]

    Example: month
    billingCyclesintegerrequired

    Number of the billing occurrences. -1 for unlimited subscription.

    Possible values: >= -1 and <= 120

    Example: 4
    prepaidboolean

    The value would be true for pre-paid and false for post-paid.

    Default value: true
    Example: true
    merchantMetadatastringnullable

    Field that allows the merchant to store specific metadata linked with the subscription plan.

    Possible values: <= 255 characters

    Example: {"orderId": "1asd265jh4", "usageTracking": false, "referenceId": "s125jkwh2321"}
  • ]