API Test Keys
Fetch a Plan With ID
GET/v1/plans/:idClick to copy
Use this endpoint to retrieve the details of a plan using its unique identifier.
Is this page helpful?
1curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \2-X GET https://api.razorpay.com/v1/plans/plan_00000000000001 \
Success
Failure
1{2"id":"plan_00000000000001",3"entity":"plan",4"interval":1,5"period":"weekly",6"item":{7"id":"item_00000000000001",8"active":true,9"name":"Test plan - Weekly",10"description":"Description for the test plan - Weekly",11"amount":69900,12"unit_amount":69900,13"currency":"",14"type":"plan",15"unit":null,16"tax_inclusive":false,17"hsn_code":null,18"sac_code":null,19"tax_rate":null,20"tax_id":null,21"tax_group_id":null,22"created_at":1580220492,23"updated_at":158022049224},25"notes":{26"notes_key_1":"Tea, Earl Grey, Hot",27"notes_key_2":"Tea, Earl Grey… decaf."28},29"created_at":158022049230}
Path Parameters
id *
string The unique identifier of the plan. For example, plan_00000000000001.
Response Parameters
idstring The unique identifier linked to a plan. For example, plan_00000000000001. This ID is used when creating a subscription for a customer.
entitystring The entity being created. Here, it is plan.
intervalinteger Used together with period to define how often the customer should be charged.
periodstring Used together with interval to define how often the customer should be charged. Possible values:
dailyweeklymonthlyyearly
itemarrayDetails of the plan.
Show child parameters (5)
notesobject Notes you can enter of the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, "note_key": "Monthly Gym".
created_atintegerThe Unix timestamp at which the plan was created.
Errors
an_id%7D is not a valid id
Error Status: 400
This error occurs when you are not passing the plan_id in the API endpoint to fetch a plan based on the id.
Solution
Fetch a Plan With ID
GET/v1/plans/:idClick to copy
Use this endpoint to retrieve the details of a plan using its unique identifier.
Is this page helpful?
Path Parameters
id *
string The unique identifier of the plan. For example, plan_00000000000001.
Response Parameters
idstring The unique identifier linked to a plan. For example, plan_00000000000001. This ID is used when creating a subscription for a customer.
entitystring The entity being created. Here, it is plan.
intervalinteger Used together with period to define how often the customer should be charged.
periodstring Used together with interval to define how often the customer should be charged. Possible values:
dailyweeklymonthlyyearly
itemarrayDetails of the plan.
Show child parameters (5)
notesobject Notes you can enter of the contact for future reference. This is a key-value pair. You can enter a maximum of 15 key-value pairs. For example, "note_key": "Monthly Gym".
created_atintegerThe Unix timestamp at which the plan was created.
Errors
an_id%7D is not a valid id
Error Status: 400
This error occurs when you are not passing the plan_id in the API endpoint to fetch a plan based on the id.
Solution
1curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \2-X GET https://api.razorpay.com/v1/plans/plan_00000000000001 \
Success
Failure
1{2"id":"plan_00000000000001",3"entity":"plan",4"interval":1,5"period":"weekly",6"item":{7"id":"item_00000000000001",8"active":true,9"name":"Test plan - Weekly",10"description":"Description for the test plan - Weekly",11"amount":69900,12"unit_amount":69900,13"currency":"",14"type":"plan",15"unit":null,16"tax_inclusive":false,17"hsn_code":null,18"sac_code":null,19"tax_rate":null,20"tax_id":null,21"tax_group_id":null,22"created_at":1580220492,23"updated_at":158022049224},25"notes":{26"notes_key_1":"Tea, Earl Grey, Hot",27"notes_key_2":"Tea, Earl Grey… decaf."28},29"created_at":158022049230}