Object

Overview of the Plan APIs response object.

The table below lists the response objects received for the different Plan APIs.

Plan APIObject
Create PlanCreate Plan Response Object
Get All PlanGet All Plan Response Object
Get Specific PlanGet Specific Plan Response Object
Update PlanUpdate Plan Response Object

Create Plan Object

Shown below is a sample response returned through our Create Plan API.

{
  "plan_id": "v1-plan-4405071524-aa-qlAtAf",
  "status": "ACTIVE",
  "plan_name": "Monthly Plan",
  "plan_description": "Diwali dhammaka plan intended to attract customers on diwali time",
  "frequency": "Day",
  "amount": {
    "value": 100,
    "currency": "INR"
  },
  "max_limit_amount": {
    "value": 100,
    "currency": "INR"
  },
  "trial_period_in_days": 1,
  "start_date": "2022-02-01T17:32:28Z",
  "end_date": "2022-10-21T17:32:28Z",
  "merchant_metadata": {
    "key1": "DD",
    "key2": "XOF"
  },
  "merchant_plan_reference": "1234567890",
  "created_at": "2022-10-21T17:32:28Z",
  "modified_at": "2022-10-21T17:32:28Z"
}

The table below lists the various parameters returned in the Create Plan API response.

ParameterTypeDescription
plan_idstringUnique identifier for the subscription plan in the Plural database.

Example: v1-plan-4405071524-aa-qlAtAf
statusstringStatus of the plan.

Possible values:
  • ACTIVE: When the plan creation request is successfully completed and the plan's start time has already passed.
  • INACTIVE: When the plan is either disabled and cannot be used for new subscriptions, or when it has exceeded its validity period and is no longer available.
  • CREATED: When the plan creation request is successfully completed and the plan's start time is set for the future.
plan_namestringSubscription plan name.

Example: Monthly Plan
plan_descriptionstringCorresponding description for a plan.

Example: Diwali dhammaka plan intended to attract customers on diwali time
frequencystringFrequency of recurring transactions for this particular plan.
  • Day
  • Week
  • Month
  • Year
  • Bi-Monthly
  • Quarterly
  • Half-Yearly
  • AS
  • OT
  • Not Applicable
Example:Day
amountobjectAn object that contains the amount details.

Learn more about the amount child object.
max_limit_amountobjectAn object that contains the maximum limit amount details.

Learn more about the max_limi_amount child object.
trial_period_in_daysintegerWhen a trial period is offered for the plan, this defines the duration of the trial period.

Example: 1

Note: The trial period is always measured in days.
start_datestringThe ISO 8601 UTC Timestamp is the date when the subscription plan is active and available for use.

Example: 2022-02-01T17:32:28Z
end_datestringThe ISO 8601 UTC Timestamp is the date when the subscription plan expires and can no longer be used for new subscriptions.

Example: 2022-09-21T17:32:28Z
merchant_metadataobjectAn object of key-value pair that can be used to store additional information.
  • Each pair cannot exceed 256 characters.
  • Maximum 10 key-value pairs.
Example: "key1": "DD"
merchant_plan_referencestringUnique identifier of the merchant plan reference entered while creating a plan.
  • Minimum length: 1 character.
  • Maximum length: 50 characters.
Example: 1234567890
created_atstringThe ISO 8601 UTC Timestamp, when the create plan request was received by Plural.

Example: 2022-09-21T17:32:28Z
modified_atstringThe ISO 8601 UTC Timestamp, when the plan object is updated.

Example: 2022-09-21T17:32:28Z

Amount [Child Object]

The table below lists the various parameters in the amount child object. This is part of the create plan response object.

ParameterTypeDescription
valueintegerTransaction amount is Paisa.
  • Minimum value: 100 (₹1)
  • Maximum value: 100000000 (₹10 lakh).
Example: 1000
currencyStringType of currency.

Example: INR

Max Limit Amount [Child Object]

The table below lists the various parameters in the max_limit_amount child object. This is part of the create plan response object.

ParameterTypeDescription
valueintegerTransaction amount is Paisa.
  • Minimum value: 100 (₹1)
  • Maximum value: 100000000 (₹10 lakh).
Example: 1000
currencyStringType of currency.

Example: INR

Get All Plan

Shown below is a sample response returned through our Get All Plan API.

{
  "links": {
    "first": {
      "href": "https://api.pluralpay.in/api/v1/public /{resource}/?size=10&page=0&sort=id,asc"
    },
    "self": {
      "href": "https://api.pluralpay.in/api/v1/public /{resource}/?size=10&page=0&sort=id,asc"
    },
    "next": {
      "href": "https://api.pluralpay.in/api/v1/public /{resource}/?size=10&page=0&sort=id,asc"
    },
    "last": {
      "href": "https://api.pluralpay.in/api/v1/public /{resource}/?size=10&page=0&sort=id,asc"
    }
  },
  "page": {
    "size": 10,
    "total_elements": 50,
    "total_pages": 5,
    "number": 1
  },
  "plans": [
    {
      "plan_id": "v1-plan-4405071524-aa-qlAtAf",
      "status": "ACTIVE",
      "plan_name": "Monthly Plan",
      "plan_description": "Diwali dhammaka plan intended to attract customers on diwali time",
      "frequency": "Day",
      "amount": {
        "value": 100,
        "currency": "INR"
      },
      "max_limit_amount": {
        "value": 100,
        "currency": "INR"
      },
      "trial_period_in_days": 1,
      "start_date": "2022-02-01T17:32:28Z",
      "end_date": "2022-10-21T17:32:28Z",
      "merchant_metadata": {
        "key1": "DD",
        "key2": "XOF"
      },
      "merchant_plan_reference": "1234567890",
      "created_at": "2022-10-21T17:32:28Z",
      "modified_at": "2022-10-21T17:32:28Z"
    }
  ]
}

The table below lists the various parameters returned in the Get All Plan API response.

ParameterTypeDescription
linksObjectAn object that contains pagination links for navigation.

Learn more about the links child object.
pageobjectAn object that contains the page information.

Learn more about the page child object.
plansArray of ObjectsAn array of object that contain plan details.

Learn more about the Plans child object.

links [Child object]

The table below lists the various parameters in the links child object. This is part of the Get All Plan response object.

ParameterTypeDescription
firstobjectAn object that contains the URL information of the first page.

Learn more about the first child object.
selfobjectAn object that contains the URL information of the current page.

Learn more about the self child object.
nextobjectAn object that contains the URL information of the current page.

Learn more about the next child object.
lastobjectAn object that contains the URL information of the current page.

Learn more about the last child object.

First [Child Object]

The table below lists the various parameters in the first child object. This is part of the links object.

ParameterTypeDescription
hrefstringURL of the first page.

Example: https://api.pluralpay.in/api/v1/public/plans/?size=10&page=0&sort=id,asc

Self [Child Object]

The table below lists the various parameters in the self child object. This is part of the links object.

ParameterTypeDescription
hrefstringURL of the current page.

Example: "https://api.pluralpay.in/api/v1/public/plans/?size=10&page=0&sort=id,asc"

Next [Child Object]

The table below lists the various parameters in the next child object. This is part of the links object.

ParameterTypeDescription
hrefstringURL of the next page.

Example: "https://api.pluralpay.in/api/v1/public/plans/?size=10&page=0&sort=id,asc"

Last [Child Object]

The table below lists the various parameters in the last child object. This is part of the links object.

ParameterTypeDescription
hrefstringURL of the last page.

Example: "https://api.pluralpay.in/api/v1/public/plans/?size=10&page=0&sort=id,asc"

Page [Child Object]

The table below lists the various parameters in the page child object. This is part of the Get All Plan response object.

ParameterTypeDescription
sizeIntegerNumber of items per page.

Example: 10
total_elementsIntegerTotal number of elements.

Example: 50
total_pagesIntegerTotal number of pages.

Example: 5
numberIntegerPage number.

Example: 1

Plans [Child Object]

The table below lists the various parameters in the plans child object. This is part of the Get All Plan response object

ParameterTypeDescription
plan_idstringUnique identifier for the subscription plan in the Plural database.

Example: v1-plan-4405071524-aa-qlAtAf
statusstringStatus of the plan.

Possible values:
  • ACTIVE: When the plan creation request is successfully completed and the plan's start time has already passed.
  • INACTIVE: When the plan is either disabled and cannot be used for new subscriptions, or when it has exceeded its validity period and is no longer available.
  • CREATED: When the plan creation request is successfully completed and the plan's start time is set for the future.
plan_namestringSubscription plan name.

Example: Monthly Plan
plan_descriptionstringCorresponding description for a plan.

Example: Diwali dhammaka plan intended to attract customers on diwali time
frequencystringFrequency of recurring transactions for this particular plan.
  • Day
  • Week
  • Month
  • Year
  • Bi-Monthly
  • Quarterly
  • Half-Yearly
  • AS
  • OT
  • Not Applicable
Example:Day
amountobjectAn object that contains the amount details.

Learn more about the amount child object.
max_limit_amountobjectAn object that contains the maximum limit amount details.

Learn more about the max_limi_amount child object.
trial_period_in_daysintegerWhen a trial period is offered for the plan, this defines the duration of the trial period.

Example: 1

Note: The trial period is always measured in days.
start_datestringThe ISO 8601 UTC Timestamp is the date when the subscription plan is active and available for use.

Example: 2022-02-01T17:32:28Z
end_datestringThe ISO 8601 UTC Timestamp is the date when the subscription plan expires and can no longer be used for new subscriptions.

Example: 2022-09-21T17:32:28Z
merchant_metadatastringAn object of key-value pair that can be used to store additional information.
  • Each pair cannot exceed 256 characters.
  • Maximum 10 key-value pairs.
Example: "key1": "DD"
merchant_plan_referencestringUnique identifier of the merchant plan reference entered while creating a plan.
  • Minimum length: 1 character.
  • Maximum length: 50 characters.
Example: 1234567890
created_atstringThe ISO 8601 UTC Timestamp, when the create plan request was received by Plural.

Example: 2022-09-21T17:32:28Z
modified_atstringThe ISO 8601 UTC Timestamp, when the plan object is updated.

Example: 2022-09-21T17:32:28Z

Amount [Child Object]

The table below lists the various parameters in the amount child object. This is part of the Plans object.

ParameterTypeDescription
valueintegerTransaction amount is Paisa.
  • Minimum value: 100 (₹1)
  • Maximum value: 100000000 (₹10 lakh).
Example: 1000
currencyStringType of currency.

Example: INR

Max limit amount

The table below lists the various parameters in the max_limit_amount child object. This is part of the Plans object.

ParameterTypeDescription
valueintegerTransaction amount is Paisa.
  • Minimum value: 100 (₹1)
  • Maximum value: 100000000 (₹10 lakh).
Example: 1000
currencyStringType of currency.

Example: INR

Get Specific Plan

Shown below is a sample response returned through our Get Specific Plan API.

{
  "plan_id": "v1-plan-4405071524-aa-qlAtAf",
  "status": "ACTIVE",
  "plan_name": "Monthly Plan",
  "plan_description": "Diwali dhammaka plan intended to attract customers on diwali time",
  "frequency": "Day",
  "amount": {
    "value": 100,
    "currency": "INR"
  },
  "max_limit_amount": {
    "value": 100,
    "currency": "INR"
  },
  "trial_period_in_days": 1,
  "start_date": "2022-02-01T17:32:28Z",
  "end_date": "2022-10-21T17:32:28Z",
  "merchant_metadata": {
    "key1": "DD",
    "key2": "XOF"
  },
  "merchant_plan_reference": "1234567890",
  "created_at": "2022-10-21T17:32:28Z",
  "modified_at": "2022-10-21T17:32:28Z"
}
{
  "plan_id": "v1-plan-4405071524-aa-qlAtAf",
  "status": "ACTIVE",
  "plan_name": "Monthly Plan",
  "plan_description": "Diwali dhammaka plan intended to attract customers on diwali time",
  "frequency": "Day",
  "amount": {
    "value": 100,
    "currency": "INR"
  },
  "max_limit_amount": {
    "value": 100,
    "currency": "INR"
  },
  "trial_period_in_days": 1,
  "start_date": "2022-02-01T17:32:28Z",
  "end_date": "2022-10-21T17:32:28Z",
  "merchant_metadata": {
    "key1": "DD",
    "key2": "XOF"
  },
  "merchant_plan_reference": "1234567890",
  "created_at": "2022-10-21T17:32:28Z",
  "modified_at": "2022-10-21T17:32:28Z"
}

The table below lists the various parameters returned in the Get Specific Plan API & Update Plan API response.

ParameterTypeDescription
plan_idstringUnique identifier for the subscription plan in the Plural database.

Example: v1-plan-4405071524-aa-qlAtAf
statusstringStatus of the plan.

Possible values:
  • ACTIVE: When the plan creation request is successfully completed and the plan's start time has already passed.
  • INACTIVE: When the plan is either disabled and cannot be used for new subscriptions, or when it has exceeded its validity period and is no longer available.
  • CREATED: When the plan creation request is successfully completed and the plan's start time is set for the future.
plan_namestringSubscription plan name.

Example: Monthly Plan
plan_descriptionstringCorresponding description for a plan.

Example: Diwali dhammaka plan intended to attract customers on diwali time
frequencystringFrequency of recurring transactions for this particular plan.
  • Day
  • Week
  • Month
  • Year
  • Bi-Monthly
  • Quarterly
  • Half-Yearly
  • AS
  • OT
  • Not Applicable
Example:Day
amountobjectAn object that contains the amount details.

Learn more about the amount child object.
max_limit_amountobjectAn object that contains the maximum limit amount details.

Learn more about the max_limi_amount child object.
trial_period_in_daysintegerWhen a trial period is offered for the plan, this defines the duration of the trial period.

Example: 1

Note: The trial period is always measured in days.
start_datestringThe ISO 8601 UTC Timestamp is the date when the subscription plan is active and available for use.

Example: 2022-02-01T17:32:28Z
end_datestringThe ISO 8601 UTC Timestamp is the date when the subscription plan expires and can no longer be used for new subscriptions.

Example: 2022-09-21T17:32:28Z
merchant_metadataobjectAn object of key-value pair that can be used to store additional information.
  • Each pair cannot exceed 256 characters.
  • Maximum 10 key-value pairs.
Example: "key1": "DD"
merchant_plan_referencestringUnique identifier of the merchant plan reference entered while creating a plan.
  • Minimum length: 1 character.
  • Maximum length: 50 characters.
Example: 1234567890
created_atstringThe ISO 8601 UTC Timestamp, when the create plan request was received by Plural.

Example: 2022-09-21T17:32:28Z
modified_atstringThe ISO 8601 UTC Timestamp, when the plan object is updated.

Example: 2022-09-21T17:32:28Z

Amount [Child Object]

The table below lists the various parameters in the amount child object. This is part of the Get Specific Plan API & Update Plan API response object.

ParameterTypeDescription
valueintegerTransaction amount is Paisa.
  • Minimum value: 100 (₹1)
  • Maximum value: 100000000 (₹10 lakh).
Example: 1000
currencyStringType of currency.

Example: INR

Max limit amount [Child Object]

The table below lists the various parameters in the max_limit_amount child object. This is part of the Get Specific Plan & Update Plan API response object.

ParameterTypeDescription
valueintegerTransaction amount is Paisa.
  • Minimum value: 100 (₹1)
  • Maximum value: 100000000 (₹10 lakh).
Example: 1000
currencyStringType of currency.

Example: INR