GET /api/v1.3/subscription-plan/{planId} method is your endpoint to obtain the data of an existing subscription plan. Plan ID should be sent as a part of the URL.
Name | URL |
---|---|
Sandbox | https://pci-gw-test.praxispay.com/api/v1.3/subscription-plan/{planId} |
Live | https://gw.praxisgate.com/api/v1.3/subscription-plan/{planId} |
✓ - required value
? - optional, value or null
✕ - always appears as null
Variable | Type | Description | |
---|---|---|---|
merchant_id | varchar(50) | ✓ | Merchant API client account identifier |
application_key | varchar(32) | ✓ | Identifier of your application (website) |
version | varchar(4) | ✓ | API version. Default value - v1.3 |
timestamp | int(11) | ✓ | Response time (unix timestamp, seconds) |
Variable | Type | Description | |
---|---|---|---|
status | int | ✓ | API communication status - - 0 if the request was successful - Negative integer if internal server/network error occurs - Positive integer if application/logical error occurs |
description | varchar(256) | ✓ | Accurate description of the result. Return the actual error for any exception as it helps to diagnose issues in production |
plan_id | varchar(32) | ✓ | Subscription Plan ID |
plan_name | varchar(32) | ✓ | Subscription Plan name |
prices | varchar(256) | ✓ | Options with the amount/currency pairs in the subscription plan. Here is possible multiple pairs with different prices for different currencies. The currency parameter should be unique, meaning the record with two identical currencies cannot be created. The system should allow configuring only the currencies that exist in merchants gateway settings, considering only the gateways with MIT enabled. |
subscription_plan_status | varchar(8) | ? | Subscription Plan status |
expiration_cycles | int(2) | ? | Number of weeks after which billing cycle will be expired. |
subscription_status_failed_payments | varchar(8) | ? | Status of subscriptions in case of failure after all the retries. List of possible value: - inactive (that can be re-activated) - canceled (that can not be re-activated) |
billing_cycle | varchar(14) | ✓ | The frequency of charging within the subscription plan. List of possible values: - Weekly (weekly) - Monthly (monthly) - Every 3 months (every_3_months) - Every 6 months (every_6_months) - Yearly (yearly) |
retries_number | int(2) | ? | Number of retries in case of failure before disabling the plan for the customer. Default value - 3 |
retries_delay_days | int(2) | ? | Delay between the retries in days. Default value - 1 |
inactive_subscription_lifetime | int(2) | ? | Number of days before changing the subscription status from inactive to canceled. |
created | int(11) | ✓ | Created plan date (unix timestamp, seconds) |
modified | int(11) | ✓ | Last modified plan date (unix timestamp, seconds) |
version | varchar(3) | ✓ | API version |
timestamp | int(11) | ✓ | Response time (unix timestamp, seconds) |
To execute the request, it is necessary to undergo the authentication process. The general authentication algorithm can be found in the Authentication section.
Request signature parameters
merchant_id
application_key
timestamp
Response signature parameters
status
timestamp
/api/v1.3/subscription-plan/64918f7b507b5320?
merchant_id=API-Merchant&
application_key=test-application&
page=0&
per_page=20&
version=1.3&
timestamp=1680712861
{
"status": 0,
"description": "BASIC TEST PLAN DESCRIPTION",
"plan_id": "64918f7b507b5320",
"subscription_plan_status": "active",
"expiration_cycles": 12,
"subscription_status_failed_payments": "inactive",
"application_key": "test-application",
"retries_number": 3,
"billing_cycle": "weekly",
"prices": [
{
"price_id": "64918f7b51514uah19",
"currency": "USD",
"amount": 1232
}
],
"plan_name": "TEST PLAN",
"retries_delay_days": 1,
"merchant_id": "API-Merchant",
"inactive_subscription_lifetime": 14,
"timestamp": 1687503707,
"created": 1687261033,
"modified": 1687262116,
"version": "1.3"
}
{
"status": -1,
"description": "Validation failed. Application Key cannot be empty."
}