API Test Keys

Plans Entity

The Plans entity has the following parameters.

Is this page helpful?

Entity

1
{
2
"entity":"collection",
3
"count":2,
4
"items":[
5
{
6
"id":"plan_00000000000008",
7
"entity":"plan",
8
"interval":1,
9
"period":"weekly",
10
"item":{
11
"id":"item_00000000000005",
12
"active":true,
13
"name":"Test plan - Monthly",
14
"description":"Description for the test plan - Monthly",
15
"amount":89900,
16
"unit_amount":89900,
17
"currency":"MYR",
18
"type":"plan",
19
"unit":null,
20
"tax_inclusive":false,
21
"hsn_code":null,
22
"sac_code":null,
23
"tax_rate":null,
24
"tax_id":null,
25
"tax_group_id":null,
26
"created_at":1580220461,
27
"updated_at":1580220481
28
},
29
"notes":{
30
"notes_key_1":"Tea, Earl Grey, Hot",
31
"notes_key_2":"Tea, Earl Grey… decaf."
32
},
33
"created_at":1580220481
34
},
35
{
36
"id":"plan_00000000000009",
37
"entity":"plan",
38
"interval":1,
39
"period":"monthly",
40
"item":{
41
"id":"item_00000000000002",
42
"active":true,
43
"name":"Test plan - Annual",
44
"description":null,
45
"amount":79900,
46
"unit_amount":79900,
47
"currency":"MYR",
48
"type":"plan",
49
"unit":null,
50
"tax_inclusive":false,
51
"hsn_code":null,
52
"sac_code":null,
53
"tax_rate":null,
54
"tax_id":null,
55
"tax_group_id":null,
56
"created_at":1580220493,
57
"updated_at":1580220493
58
},
59
"notes":[
60
61
],
62
"created_at":1580220493
63
}
64
]
65
}
id
string

The unique identifier linked to a plan. This is used when creating a Subscription for customers.

entity
string

The entity being created. Here, it is plan.

interval
integer

This, combined with period, defines the frequency. If the billing cycle is 2 months, the value should be 2.

Handy Tips

For daily plans, the minimum value should be 7.

period
string

This, combined with interval, defines the frequency. Possible values:

  • daily
  • weekly
  • monthly
  • quarterly
  • yearly

If the billing cycle is 2 months, the value should be monthly.

Handy Tips

We allow custom frequencies while creating a plan (for example, once in 3 weeks).

item
object

Details of the plan.

Show child parameters (5)

notes
object

Notes you can enter for 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_at
integer

The Unix timestamp at which the plan was created.

Plans Entity

The Plans entity has the following parameters.

Is this page helpful?

id
string

The unique identifier linked to a plan. This is used when creating a Subscription for customers.

entity
string

The entity being created. Here, it is plan.

interval
integer

This, combined with period, defines the frequency. If the billing cycle is 2 months, the value should be 2.

Handy Tips

For daily plans, the minimum value should be 7.

period
string

This, combined with interval, defines the frequency. Possible values:

  • daily
  • weekly
  • monthly
  • quarterly
  • yearly

If the billing cycle is 2 months, the value should be monthly.

Handy Tips

We allow custom frequencies while creating a plan (for example, once in 3 weeks).

item
object

Details of the plan.

Show child parameters (5)

notes
object

Notes you can enter for 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_at
integer

The Unix timestamp at which the plan was created.

Entity

1
{
2
"entity":"collection",
3
"count":2,
4
"items":[
5
{
6
"id":"plan_00000000000008",
7
"entity":"plan",
8
"interval":1,
9
"period":"weekly",
10
"item":{
11
"id":"item_00000000000005",
12
"active":true,
13
"name":"Test plan - Monthly",
14
"description":"Description for the test plan - Monthly",
15
"amount":89900,
16
"unit_amount":89900,
17
"currency":"MYR",
18
"type":"plan",
19
"unit":null,
20
"tax_inclusive":false,
21
"hsn_code":null,
22
"sac_code":null,
23
"tax_rate":null,
24
"tax_id":null,
25
"tax_group_id":null,
26
"created_at":1580220461,
27
"updated_at":1580220481
28
},
29
"notes":{
30
"notes_key_1":"Tea, Earl Grey, Hot",
31
"notes_key_2":"Tea, Earl Grey… decaf."
32
},
33
"created_at":1580220481
34
},
35
{
36
"id":"plan_00000000000009",
37
"entity":"plan",
38
"interval":1,
39
"period":"monthly",
40
"item":{
41
"id":"item_00000000000002",
42
"active":true,
43
"name":"Test plan - Annual",
44
"description":null,
45
"amount":79900,
46
"unit_amount":79900,
47
"currency":"MYR",
48
"type":"plan",
49
"unit":null,
50
"tax_inclusive":false,
51
"hsn_code":null,
52
"sac_code":null,
53
"tax_rate":null,
54
"tax_id":null,
55
"tax_group_id":null,
56
"created_at":1580220493,
57
"updated_at":1580220493
58
},
59
"notes":[
60
61
],
62
"created_at":1580220493
63
}
64
]
65
}