@gofynd/fdk-client-javascript 0.1.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (277) hide show
  1. package/.github/workflows/on_create_release.yml +23 -0
  2. package/.github/workflows/on_merge_main.yml +38 -0
  3. package/.github/workflows/on_pull_request.yml +35 -0
  4. package/.prettierrc +5 -0
  5. package/LICENSE +21 -0
  6. package/README.md +118 -0
  7. package/application.d.ts +3 -0
  8. package/application.js +6 -0
  9. package/common.d.ts +4 -0
  10. package/common.js +9 -0
  11. package/documentation/application/CART.md +7290 -0
  12. package/documentation/application/CATALOG.md +9570 -0
  13. package/documentation/application/COMMON.md +448 -0
  14. package/documentation/application/COMMUNICATION.md +463 -0
  15. package/documentation/application/CONFIGURATION.md +2902 -0
  16. package/documentation/application/CONTENT.md +3350 -0
  17. package/documentation/application/FILESTORAGE.md +491 -0
  18. package/documentation/application/LEAD.md +1891 -0
  19. package/documentation/application/LOGISTIC.md +439 -0
  20. package/documentation/application/ORDER.md +3428 -0
  21. package/documentation/application/PAYMENT.md +5035 -0
  22. package/documentation/application/POSCART.md +7889 -0
  23. package/documentation/application/README.md +21 -0
  24. package/documentation/application/REWARDS.md +714 -0
  25. package/documentation/application/SHARE.md +729 -0
  26. package/documentation/application/THEME.md +5796 -0
  27. package/documentation/application/USER.md +4326 -0
  28. package/documentation/platform/ANALYTICS.md +1150 -0
  29. package/documentation/platform/AUDITTRAIL.md +572 -0
  30. package/documentation/platform/BILLING.md +2396 -0
  31. package/documentation/platform/CART.md +5539 -0
  32. package/documentation/platform/CATALOG.md +21624 -0
  33. package/documentation/platform/COMMON.md +448 -0
  34. package/documentation/platform/COMMUNICATION.md +5714 -0
  35. package/documentation/platform/COMPANYPROFILE.md +2141 -0
  36. package/documentation/platform/CONFIGURATION.md +7335 -0
  37. package/documentation/platform/CONTENT.md +8989 -0
  38. package/documentation/platform/DISCOUNT.md +773 -0
  39. package/documentation/platform/FILESTORAGE.md +994 -0
  40. package/documentation/platform/INVENTORY.md +1775 -0
  41. package/documentation/platform/LEAD.md +4736 -0
  42. package/documentation/platform/ORDER.md +3764 -0
  43. package/documentation/platform/PARTNER.md +216 -0
  44. package/documentation/platform/PAYMENT.md +3444 -0
  45. package/documentation/platform/README.md +27 -0
  46. package/documentation/platform/REWARDS.md +871 -0
  47. package/documentation/platform/SHARE.md +602 -0
  48. package/documentation/platform/THEME.md +35725 -0
  49. package/documentation/platform/USER.md +2305 -0
  50. package/documentation/platform/WEBHOOK.md +587 -0
  51. package/documentation/public/CONFIGURATION.md +448 -0
  52. package/documentation/public/INVENTORY.md +686 -0
  53. package/documentation/public/WEBHOOK.md +348 -0
  54. package/index.d.ts +10 -0
  55. package/index.js +18 -0
  56. package/jest.config.d.ts +4 -0
  57. package/jest.config.js +6 -0
  58. package/package.json +35 -0
  59. package/platform.d.ts +3 -0
  60. package/platform.js +6 -0
  61. package/public.d.ts +3 -0
  62. package/public.js +6 -0
  63. package/sdk/application/ApplicationAPIClient.d.ts +11 -0
  64. package/sdk/application/ApplicationAPIClient.js +44 -0
  65. package/sdk/application/ApplicationClient.d.ts +40 -0
  66. package/sdk/application/ApplicationClient.js +84 -0
  67. package/sdk/application/ApplicationConfig.d.ts +19 -0
  68. package/sdk/application/ApplicationConfig.js +55 -0
  69. package/sdk/application/ApplicationModels.d.ts +826 -0
  70. package/sdk/application/ApplicationModels.js +10474 -0
  71. package/sdk/application/client/CartApplicationClient.d.ts +432 -0
  72. package/sdk/application/client/CartApplicationClient.js +1066 -0
  73. package/sdk/application/client/CatalogApplicationClient.d.ts +694 -0
  74. package/sdk/application/client/CatalogApplicationClient.js +1629 -0
  75. package/sdk/application/client/CommonApplicationClient.d.ts +38 -0
  76. package/sdk/application/client/CommonApplicationClient.js +105 -0
  77. package/sdk/application/client/CommunicationApplicationClient.d.ts +39 -0
  78. package/sdk/application/client/CommunicationApplicationClient.js +131 -0
  79. package/sdk/application/client/ConfigurationApplicationClient.d.ts +210 -0
  80. package/sdk/application/client/ConfigurationApplicationClient.js +649 -0
  81. package/sdk/application/client/ContentApplicationClient.d.ts +256 -0
  82. package/sdk/application/client/ContentApplicationClient.js +785 -0
  83. package/sdk/application/client/FileStorageApplicationClient.d.ts +88 -0
  84. package/sdk/application/client/FileStorageApplicationClient.js +214 -0
  85. package/sdk/application/client/LeadApplicationClient.d.ts +90 -0
  86. package/sdk/application/client/LeadApplicationClient.js +264 -0
  87. package/sdk/application/client/LogisticApplicationClient.d.ts +42 -0
  88. package/sdk/application/client/LogisticApplicationClient.js +128 -0
  89. package/sdk/application/client/OrderApplicationClient.d.ts +190 -0
  90. package/sdk/application/client/OrderApplicationClient.js +479 -0
  91. package/sdk/application/client/PaymentApplicationClient.d.ts +454 -0
  92. package/sdk/application/client/PaymentApplicationClient.js +1378 -0
  93. package/sdk/application/client/PosCartApplicationClient.d.ts +449 -0
  94. package/sdk/application/client/PosCartApplicationClient.js +1123 -0
  95. package/sdk/application/client/RewardsApplicationClient.d.ts +93 -0
  96. package/sdk/application/client/RewardsApplicationClient.js +293 -0
  97. package/sdk/application/client/ShareApplicationClient.d.ts +87 -0
  98. package/sdk/application/client/ShareApplicationClient.js +268 -0
  99. package/sdk/application/client/ThemeApplicationClient.d.ts +52 -0
  100. package/sdk/application/client/ThemeApplicationClient.js +161 -0
  101. package/sdk/application/client/UserApplicationClient.d.ts +446 -0
  102. package/sdk/application/client/UserApplicationClient.js +1275 -0
  103. package/sdk/application/constructUrl.d.ts +5 -0
  104. package/sdk/application/constructUrl.js +13 -0
  105. package/sdk/application/index.d.ts +2 -0
  106. package/sdk/application/index.js +4 -0
  107. package/sdk/application/models/CartValidator.d.ts +29 -0
  108. package/sdk/application/models/CartValidator.js +223 -0
  109. package/sdk/application/models/CatalogValidator.d.ts +33 -0
  110. package/sdk/application/models/CatalogValidator.js +233 -0
  111. package/sdk/application/models/CommonValidator.d.ts +5 -0
  112. package/sdk/application/models/CommonValidator.js +18 -0
  113. package/sdk/application/models/CommunicationValidator.d.ts +6 -0
  114. package/sdk/application/models/CommunicationValidator.js +20 -0
  115. package/sdk/application/models/ConfigurationValidator.d.ts +19 -0
  116. package/sdk/application/models/ConfigurationValidator.js +88 -0
  117. package/sdk/application/models/ContentValidator.d.ts +22 -0
  118. package/sdk/application/models/ContentValidator.js +106 -0
  119. package/sdk/application/models/FileStorageValidator.d.ts +6 -0
  120. package/sdk/application/models/FileStorageValidator.js +24 -0
  121. package/sdk/application/models/LeadValidator.d.ts +10 -0
  122. package/sdk/application/models/LeadValidator.js +48 -0
  123. package/sdk/application/models/LogisticValidator.d.ts +6 -0
  124. package/sdk/application/models/LogisticValidator.js +22 -0
  125. package/sdk/application/models/OrderValidator.d.ts +15 -0
  126. package/sdk/application/models/OrderValidator.js +87 -0
  127. package/sdk/application/models/PaymentValidator.d.ts +40 -0
  128. package/sdk/application/models/PaymentValidator.js +235 -0
  129. package/sdk/application/models/PosCartValidator.d.ts +30 -0
  130. package/sdk/application/models/PosCartValidator.js +232 -0
  131. package/sdk/application/models/RewardsValidator.d.ts +10 -0
  132. package/sdk/application/models/RewardsValidator.js +43 -0
  133. package/sdk/application/models/ShareValidator.d.ts +10 -0
  134. package/sdk/application/models/ShareValidator.js +44 -0
  135. package/sdk/application/models/ThemeValidator.d.ts +7 -0
  136. package/sdk/application/models/ThemeValidator.js +27 -0
  137. package/sdk/application/models/UserValidator.d.ts +38 -0
  138. package/sdk/application/models/UserValidator.js +233 -0
  139. package/sdk/common/AxiosHelper.d.ts +1 -0
  140. package/sdk/common/AxiosHelper.js +141 -0
  141. package/sdk/common/Constant.d.ts +294 -0
  142. package/sdk/common/Constant.js +332 -0
  143. package/sdk/common/FDKError.d.ts +26 -0
  144. package/sdk/common/FDKError.js +51 -0
  145. package/sdk/common/Logger.d.ts +2 -0
  146. package/sdk/common/Logger.js +85 -0
  147. package/sdk/common/Paginator.d.ts +16 -0
  148. package/sdk/common/Paginator.js +26 -0
  149. package/sdk/common/RequestSigner.d.ts +1 -0
  150. package/sdk/common/RequestSigner.js +306 -0
  151. package/sdk/common/Utility.d.ts +9 -0
  152. package/sdk/common/Utility.js +86 -0
  153. package/sdk/common/utils.d.ts +14 -0
  154. package/sdk/common/utils.js +165 -0
  155. package/sdk/platform/OAuthClient.d.ts +26 -0
  156. package/sdk/platform/OAuthClient.js +221 -0
  157. package/sdk/platform/PlatformAPIClient.d.ts +12 -0
  158. package/sdk/platform/PlatformAPIClient.js +43 -0
  159. package/sdk/platform/PlatformApplicationClient.d.ts +24398 -0
  160. package/sdk/platform/PlatformApplicationClient.js +23185 -0
  161. package/sdk/platform/PlatformApplicationModels.d.ts +333 -0
  162. package/sdk/platform/PlatformApplicationModels.js +21262 -0
  163. package/sdk/platform/PlatformClient.d.ts +9535 -0
  164. package/sdk/platform/PlatformClient.js +12336 -0
  165. package/sdk/platform/PlatformConfig.d.ts +29 -0
  166. package/sdk/platform/PlatformConfig.js +36 -0
  167. package/sdk/platform/PlatformModels.d.ts +1396 -0
  168. package/sdk/platform/PlatformModels.js +19222 -0
  169. package/sdk/platform/client/AnalyticsPlatformClient.d.ts +84 -0
  170. package/sdk/platform/client/AnalyticsPlatformClient.js +215 -0
  171. package/sdk/platform/client/AuditTrailPlatformClient.d.ts +38 -0
  172. package/sdk/platform/client/AuditTrailPlatformClient.js +133 -0
  173. package/sdk/platform/client/BillingPlatformClient.d.ts +109 -0
  174. package/sdk/platform/client/BillingPlatformClient.js +381 -0
  175. package/sdk/platform/client/CatalogPlatformClient.d.ts +806 -0
  176. package/sdk/platform/client/CatalogPlatformClient.js +2462 -0
  177. package/sdk/platform/client/CommonPlatformClient.d.ts +30 -0
  178. package/sdk/platform/client/CommonPlatformClient.js +84 -0
  179. package/sdk/platform/client/CommunicationPlatformClient.d.ts +26 -0
  180. package/sdk/platform/client/CommunicationPlatformClient.js +72 -0
  181. package/sdk/platform/client/CompanyProfilePlatformClient.d.ts +182 -0
  182. package/sdk/platform/client/CompanyProfilePlatformClient.js +540 -0
  183. package/sdk/platform/client/ConfigurationPlatformClient.d.ts +277 -0
  184. package/sdk/platform/client/ConfigurationPlatformClient.js +806 -0
  185. package/sdk/platform/client/DiscountPlatformClient.d.ts +118 -0
  186. package/sdk/platform/client/DiscountPlatformClient.js +364 -0
  187. package/sdk/platform/client/FileStoragePlatformClient.d.ts +111 -0
  188. package/sdk/platform/client/FileStoragePlatformClient.js +268 -0
  189. package/sdk/platform/client/InventoryPlatformClient.d.ts +125 -0
  190. package/sdk/platform/client/InventoryPlatformClient.js +409 -0
  191. package/sdk/platform/client/LeadPlatformClient.d.ts +150 -0
  192. package/sdk/platform/client/LeadPlatformClient.js +439 -0
  193. package/sdk/platform/client/OrderPlatformClient.d.ts +190 -0
  194. package/sdk/platform/client/OrderPlatformClient.js +521 -0
  195. package/sdk/platform/client/PaymentPlatformClient.d.ts +98 -0
  196. package/sdk/platform/client/PaymentPlatformClient.js +331 -0
  197. package/sdk/platform/client/WebhookPlatformClient.d.ts +64 -0
  198. package/sdk/platform/client/WebhookPlatformClient.js +207 -0
  199. package/sdk/platform/index.d.ts +2 -0
  200. package/sdk/platform/index.js +4 -0
  201. package/sdk/platform/models/AnalyticsValidator.d.ts +7 -0
  202. package/sdk/platform/models/AnalyticsValidator.js +36 -0
  203. package/sdk/platform/models/AuditTrailValidator.d.ts +7 -0
  204. package/sdk/platform/models/AuditTrailValidator.js +26 -0
  205. package/sdk/platform/models/BillingValidator.d.ts +15 -0
  206. package/sdk/platform/models/BillingValidator.js +72 -0
  207. package/sdk/platform/models/CartValidator.d.ts +0 -0
  208. package/sdk/platform/models/CartValidator.js +0 -0
  209. package/sdk/platform/models/CatalogValidator.d.ts +74 -0
  210. package/sdk/platform/models/CatalogValidator.js +484 -0
  211. package/sdk/platform/models/CommonValidator.d.ts +5 -0
  212. package/sdk/platform/models/CommonValidator.js +18 -0
  213. package/sdk/platform/models/CommunicationValidator.d.ts +4 -0
  214. package/sdk/platform/models/CommunicationValidator.js +11 -0
  215. package/sdk/platform/models/CompanyProfileValidator.d.ts +17 -0
  216. package/sdk/platform/models/CompanyProfileValidator.js +93 -0
  217. package/sdk/platform/models/ConfigurationValidator.d.ts +21 -0
  218. package/sdk/platform/models/ConfigurationValidator.js +134 -0
  219. package/sdk/platform/models/ContentValidator.d.ts +0 -0
  220. package/sdk/platform/models/ContentValidator.js +0 -0
  221. package/sdk/platform/models/DiscountValidator.d.ts +13 -0
  222. package/sdk/platform/models/DiscountValidator.js +75 -0
  223. package/sdk/platform/models/FileStorageValidator.d.ts +9 -0
  224. package/sdk/platform/models/FileStorageValidator.js +44 -0
  225. package/sdk/platform/models/InventoryValidator.d.ts +15 -0
  226. package/sdk/platform/models/InventoryValidator.js +81 -0
  227. package/sdk/platform/models/LeadValidator.d.ts +14 -0
  228. package/sdk/platform/models/LeadValidator.js +78 -0
  229. package/sdk/platform/models/OrderValidator.d.ts +14 -0
  230. package/sdk/platform/models/OrderValidator.js +110 -0
  231. package/sdk/platform/models/PartnerValidator.d.ts +0 -0
  232. package/sdk/platform/models/PartnerValidator.js +0 -0
  233. package/sdk/platform/models/PaymentValidator.d.ts +13 -0
  234. package/sdk/platform/models/PaymentValidator.js +65 -0
  235. package/sdk/platform/models/RewardsValidator.d.ts +0 -0
  236. package/sdk/platform/models/RewardsValidator.js +0 -0
  237. package/sdk/platform/models/ShareValidator.d.ts +0 -0
  238. package/sdk/platform/models/ShareValidator.js +0 -0
  239. package/sdk/platform/models/ThemeValidator.d.ts +0 -0
  240. package/sdk/platform/models/ThemeValidator.js +0 -0
  241. package/sdk/platform/models/UserValidator.d.ts +0 -0
  242. package/sdk/platform/models/UserValidator.js +0 -0
  243. package/sdk/platform/models/WebhookValidator.d.ts +9 -0
  244. package/sdk/platform/models/WebhookValidator.js +42 -0
  245. package/sdk/public/PublicAPIClient.d.ts +11 -0
  246. package/sdk/public/PublicAPIClient.js +38 -0
  247. package/sdk/public/PublicClient.d.ts +12 -0
  248. package/sdk/public/PublicClient.js +24 -0
  249. package/sdk/public/PublicConfig.d.ts +10 -0
  250. package/sdk/public/PublicConfig.js +12 -0
  251. package/sdk/public/PublicModels.d.ts +50 -0
  252. package/sdk/public/PublicModels.js +712 -0
  253. package/sdk/public/client/ConfigurationPublicClient.d.ts +38 -0
  254. package/sdk/public/client/ConfigurationPublicClient.js +102 -0
  255. package/sdk/public/client/InventoryPublicClient.d.ts +81 -0
  256. package/sdk/public/client/InventoryPublicClient.js +239 -0
  257. package/sdk/public/client/WebhookPublicClient.d.ts +28 -0
  258. package/sdk/public/client/WebhookPublicClient.js +92 -0
  259. package/sdk/public/constructUrl.d.ts +5 -0
  260. package/sdk/public/constructUrl.js +13 -0
  261. package/sdk/public/index.d.ts +2 -0
  262. package/sdk/public/index.js +4 -0
  263. package/sdk/public/models/ConfigurationValidator.d.ts +5 -0
  264. package/sdk/public/models/ConfigurationValidator.js +18 -0
  265. package/sdk/public/models/InventoryValidator.d.ts +9 -0
  266. package/sdk/public/models/InventoryValidator.js +43 -0
  267. package/sdk/public/models/WebhookValidator.d.ts +5 -0
  268. package/sdk/public/models/WebhookValidator.js +14 -0
  269. package/tests/application/catalog.spec.js +47 -0
  270. package/tests/common/action-url.spec.js +35 -0
  271. package/tests/common/schema/action-url.json +163 -0
  272. package/tests/common/schema/url-action.json +667 -0
  273. package/tests/common/url-action.spec.js +48 -0
  274. package/tests/helpers/cookie.helper.js +31 -0
  275. package/tests/helpers/oauth.helper.js +43 -0
  276. package/tests/platform/catalog.spec.js +49 -0
  277. package/tests/public/location.spec.js +39 -0
@@ -0,0 +1,2396 @@
1
+
2
+
3
+
4
+
5
+ ##### [Back to Platform docs](./README.md)
6
+
7
+ ## Billing Methods
8
+ Handle platform subscription
9
+ * [checkCouponValidity](#checkcouponvalidity)
10
+ * [createSubscriptionCharge](#createsubscriptioncharge)
11
+ * [getSubscriptionCharge](#getsubscriptioncharge)
12
+ * [cancelSubscriptionCharge](#cancelsubscriptioncharge)
13
+ * [getInvoices](#getinvoices)
14
+ * [getInvoiceById](#getinvoicebyid)
15
+ * [getCustomerDetail](#getcustomerdetail)
16
+ * [upsertCustomerDetail](#upsertcustomerdetail)
17
+ * [getSubscription](#getsubscription)
18
+ * [getFeatureLimitConfig](#getfeaturelimitconfig)
19
+ * [activateSubscriptionPlan](#activatesubscriptionplan)
20
+ * [cancelSubscriptionPlan](#cancelsubscriptionplan)
21
+
22
+
23
+
24
+ ## Methods with example and description
25
+
26
+
27
+ ### checkCouponValidity
28
+ Check coupon validity
29
+
30
+
31
+
32
+ ```javascript
33
+ // Promise
34
+ const promise = client.billing.checkCouponValidity({ plan : value,
35
+ couponCode : value });
36
+
37
+ // Async/Await
38
+ const data = await client.billing.checkCouponValidity({ plan : value,
39
+ couponCode : value });
40
+ ```
41
+
42
+
43
+
44
+
45
+
46
+ | Argument | Type | Required | Description |
47
+ | --------- | ----- | -------- | ----------- |
48
+ | plan | string | yes | ID of the plan. |
49
+ | couponCode | string | yes | Coupon code. |
50
+
51
+
52
+
53
+ Check coupon validity.
54
+
55
+ *Returned Response:*
56
+
57
+
58
+
59
+
60
+ [CheckValidityResponse](#CheckValidityResponse)
61
+
62
+ Success
63
+
64
+
65
+
66
+
67
+ <details>
68
+ <summary><i>&nbsp; Example:</i></summary>
69
+
70
+ ```json
71
+
72
+ ```
73
+ </details>
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+
82
+
83
+ ---
84
+
85
+
86
+ ### createSubscriptionCharge
87
+ Create subscription charge
88
+
89
+
90
+
91
+ ```javascript
92
+ // Promise
93
+ const promise = client.billing.createSubscriptionCharge({ extensionId : value,
94
+ body : value });
95
+
96
+ // Async/Await
97
+ const data = await client.billing.createSubscriptionCharge({ extensionId : value,
98
+ body : value });
99
+ ```
100
+
101
+
102
+
103
+
104
+
105
+ | Argument | Type | Required | Description |
106
+ | --------- | ----- | -------- | ----------- |
107
+ | extensionId | string | yes | Extension _id |
108
+ | body | [CreateSubscriptionCharge](#CreateSubscriptionCharge) | yes | Request body |
109
+
110
+
111
+ Register subscription charge for a seller of your extension.
112
+
113
+ *Returned Response:*
114
+
115
+
116
+
117
+
118
+ [CreateSubscriptionResponse](#CreateSubscriptionResponse)
119
+
120
+ Success
121
+
122
+
123
+
124
+
125
+ <details>
126
+ <summary><i>&nbsp; Example:</i></summary>
127
+
128
+ ```json
129
+
130
+ ```
131
+ </details>
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+ ---
142
+
143
+
144
+ ### getSubscriptionCharge
145
+ Get subscription charge details
146
+
147
+
148
+
149
+ ```javascript
150
+ // Promise
151
+ const promise = client.billing.getSubscriptionCharge({ extensionId : value,
152
+ subscriptionId : value });
153
+
154
+ // Async/Await
155
+ const data = await client.billing.getSubscriptionCharge({ extensionId : value,
156
+ subscriptionId : value });
157
+ ```
158
+
159
+
160
+
161
+
162
+
163
+ | Argument | Type | Required | Description |
164
+ | --------- | ----- | -------- | ----------- |
165
+ | extensionId | string | yes | Extension _id |
166
+ | subscriptionId | string | yes | Subscription charge _id |
167
+
168
+
169
+
170
+ Get created subscription charge details
171
+
172
+ *Returned Response:*
173
+
174
+
175
+
176
+
177
+ [EntitySubscription](#EntitySubscription)
178
+
179
+ Success
180
+
181
+
182
+
183
+
184
+ <details>
185
+ <summary><i>&nbsp; Example:</i></summary>
186
+
187
+ ```json
188
+
189
+ ```
190
+ </details>
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+ ---
201
+
202
+
203
+ ### cancelSubscriptionCharge
204
+ Cancel subscription charge
205
+
206
+
207
+
208
+ ```javascript
209
+ // Promise
210
+ const promise = client.billing.cancelSubscriptionCharge({ extensionId : value,
211
+ subscriptionId : value });
212
+
213
+ // Async/Await
214
+ const data = await client.billing.cancelSubscriptionCharge({ extensionId : value,
215
+ subscriptionId : value });
216
+ ```
217
+
218
+
219
+
220
+
221
+
222
+ | Argument | Type | Required | Description |
223
+ | --------- | ----- | -------- | ----------- |
224
+ | extensionId | string | yes | Extension _id |
225
+ | subscriptionId | string | yes | Subscription charge _id |
226
+
227
+
228
+
229
+ Cancel subscription and attached charges.
230
+
231
+ *Returned Response:*
232
+
233
+
234
+
235
+
236
+ [EntitySubscription](#EntitySubscription)
237
+
238
+ Success
239
+
240
+
241
+
242
+
243
+ <details>
244
+ <summary><i>&nbsp; Example:</i></summary>
245
+
246
+ ```json
247
+
248
+ ```
249
+ </details>
250
+
251
+
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+ ---
260
+
261
+
262
+ ### getInvoices
263
+ Get invoices
264
+
265
+
266
+
267
+ ```javascript
268
+ // Promise
269
+ const promise = client.billing.getInvoices();
270
+
271
+ // Async/Await
272
+ const data = await client.billing.getInvoices();
273
+ ```
274
+
275
+
276
+
277
+
278
+
279
+
280
+ Get invoices.
281
+
282
+ *Returned Response:*
283
+
284
+
285
+
286
+
287
+ [Invoices](#Invoices)
288
+
289
+ Success
290
+
291
+
292
+
293
+
294
+ <details>
295
+ <summary><i>&nbsp; Examples:</i></summary>
296
+
297
+
298
+ <details>
299
+ <summary><i>&nbsp; default</i></summary>
300
+
301
+ ```json
302
+ {
303
+ "value": {
304
+ "data": [
305
+ {
306
+ "_id": "5f7acb709e76da30e3b92cdb",
307
+ "client": {
308
+ "name": "RELIANCE RETAIL LTD",
309
+ "email": "ZAK@GMAIL.COM",
310
+ "phone": "91 1234567890",
311
+ "address_lines": [
312
+ "TV TOWER, Foot Over Bridge Khar",
313
+ null,
314
+ "Mumbai, 400079, Maharashtra, India"
315
+ ]
316
+ },
317
+ "auto_advance": true,
318
+ "currency": "INR",
319
+ "paid": true,
320
+ "attemp": 3,
321
+ "collection_method": "charge_automatically",
322
+ "subscriber_id": "5ee773e1351e5e84289ed9cf",
323
+ "invoice_url": "",
324
+ "number": "FP-1-72020-736",
325
+ "pg_data": {},
326
+ "period": {
327
+ "start": "2020-08-17T13:45:36.722Z",
328
+ "end": "2020-09-17T13:45:36.722Z"
329
+ },
330
+ "receipt_number": "5fd9b08464dc6ac048a08988",
331
+ "statement_descriptor": "RELIANCE RETAIL LTD",
332
+ "current_status": "paid",
333
+ "status_trail": [
334
+ {
335
+ "_id": "5f7ad29bd562744eab216379",
336
+ "value": "draft",
337
+ "timestamp": "2020-10-05T08:00:27.753Z"
338
+ },
339
+ {
340
+ "_id": "5fcf40ce1613c029aff417dd",
341
+ "value": "open",
342
+ "timestamp": "2020-12-08T09:01:02.038Z"
343
+ },
344
+ {
345
+ "_id": "5fd9b08664dc6a1ad0a08989",
346
+ "value": "paid",
347
+ "timestamp": "2020-12-16T07:00:22.973Z"
348
+ }
349
+ ],
350
+ "subtotal": 15720.08,
351
+ "total": 15720.08,
352
+ "subscription": "5f3a8a00668947663b7fbd38",
353
+ "next_action_time": "2020-10-05T09:00:27.754Z",
354
+ "created_at": "2020-10-05T07:29:52.876Z",
355
+ "modified_at": "2020-12-16T07:00:22.980Z",
356
+ "hash_identifier": "575999aca03e36f0fa54db5235bc7f25",
357
+ "payment_method": {
358
+ "pg_payment_method_id": null
359
+ },
360
+ "invoice_items": [
361
+ {
362
+ "_id": "5f7acb709e76da48b1b92cdd",
363
+ "currency": "INR",
364
+ "plan": {
365
+ "recurring": {
366
+ "interval": "month",
367
+ "interval_count": 1
368
+ },
369
+ "is_trial_plan": false,
370
+ "plan_group": "default",
371
+ "tag_lines": [],
372
+ "currency": "INR",
373
+ "is_active": true,
374
+ "is_visible": true,
375
+ "trial_period": 0,
376
+ "addons": [],
377
+ "tags": [],
378
+ "type": "public",
379
+ "country": "IN",
380
+ "_id": "5f3a8786c90d780037723a14",
381
+ "name": "Professional",
382
+ "description": "Professional",
383
+ "amount": 1499,
384
+ "product_suite_id": "5f3a8786c90d7800377239f3",
385
+ "created_at": "2020-08-17T13:35:02.802Z",
386
+ "modified_at": "2020-08-17T13:35:02.802Z"
387
+ },
388
+ "name": "Professional",
389
+ "quantity": 1,
390
+ "description": "Professional",
391
+ "period": {
392
+ "start": "2020-08-17T13:45:36.722Z",
393
+ "end": "2020-10-05T07:29:52.868Z"
394
+ },
395
+ "unit_amount": 2356.77,
396
+ "amount": 2356.77,
397
+ "type": "subscription",
398
+ "invoice_id": "5f7acb709e76da30e3b92cdb",
399
+ "created_at": "2020-10-05T07:29:52.886Z",
400
+ "modified_at": "2020-10-05T07:29:52.886Z"
401
+ },
402
+ {
403
+ "_id": "5f7acf199aa6830c4fe5e984",
404
+ "currency": "INR",
405
+ "plan": {
406
+ "recurring": {
407
+ "interval": "month",
408
+ "interval_count": 1
409
+ },
410
+ "is_trial_plan": false,
411
+ "plan_group": "default",
412
+ "tag_lines": [],
413
+ "currency": "INR",
414
+ "is_active": true,
415
+ "is_visible": true,
416
+ "trial_period": 0,
417
+ "addons": [],
418
+ "tags": [
419
+ "popular"
420
+ ],
421
+ "type": "public",
422
+ "country": "IN",
423
+ "_id": "5f3a8786c90d780037723a13",
424
+ "name": "Premium",
425
+ "description": "Premium",
426
+ "amount": 2499,
427
+ "product_suite_id": "5f3a8786c90d7800377239f3",
428
+ "created_at": "2020-08-17T13:35:02.547Z",
429
+ "modified_at": "2020-08-17T13:35:02.547Z"
430
+ },
431
+ "name": "Premium",
432
+ "quantity": 1,
433
+ "description": "Premium",
434
+ "period": {
435
+ "start": "2020-08-17T13:45:36.722Z",
436
+ "end": "2020-10-05T07:45:29.755Z"
437
+ },
438
+ "unit_amount": 3929.87,
439
+ "amount": 3929.87,
440
+ "type": "subscription",
441
+ "invoice_id": "5f7acb709e76da30e3b92cdb",
442
+ "created_at": "2020-10-05T07:45:29.765Z",
443
+ "modified_at": "2020-10-05T07:45:29.765Z"
444
+ },
445
+ {
446
+ "_id": "5f7acf7da10a707fc502dcd4",
447
+ "currency": "INR",
448
+ "plan": {
449
+ "recurring": {
450
+ "interval": "month",
451
+ "interval_count": 1
452
+ },
453
+ "is_trial_plan": false,
454
+ "plan_group": "default",
455
+ "tag_lines": [],
456
+ "currency": "INR",
457
+ "is_active": true,
458
+ "is_visible": true,
459
+ "trial_period": 0,
460
+ "addons": [],
461
+ "tags": [],
462
+ "type": "public",
463
+ "country": "IN",
464
+ "_id": "5f3a8786c90d780037723a16",
465
+ "name": "Ultra Premium",
466
+ "description": "Ultra Premium",
467
+ "amount": 2999,
468
+ "product_suite_id": "5f3a8786c90d7800377239f3",
469
+ "created_at": "2020-08-17T13:35:02.802Z",
470
+ "modified_at": "2020-08-17T13:35:02.802Z"
471
+ },
472
+ "name": "Ultra Premium",
473
+ "quantity": 1,
474
+ "description": "Ultra Premium",
475
+ "period": {
476
+ "start": "2020-08-17T13:45:36.722Z",
477
+ "end": "2020-10-05T07:47:09.532Z"
478
+ },
479
+ "unit_amount": 4716.27,
480
+ "amount": 4716.27,
481
+ "type": "subscription",
482
+ "invoice_id": "5f7acb709e76da30e3b92cdb",
483
+ "created_at": "2020-10-05T07:47:09.541Z",
484
+ "modified_at": "2020-10-05T07:47:09.541Z"
485
+ },
486
+ {
487
+ "_id": "5f7ad29bd56274f23321637a",
488
+ "currency": "INR",
489
+ "plan": {
490
+ "recurring": {
491
+ "interval": "month",
492
+ "interval_count": 1
493
+ },
494
+ "is_trial_plan": false,
495
+ "plan_group": "default",
496
+ "tag_lines": [],
497
+ "currency": "INR",
498
+ "is_active": true,
499
+ "is_visible": true,
500
+ "trial_period": 0,
501
+ "addons": [],
502
+ "tags": [],
503
+ "type": "public",
504
+ "country": "IN",
505
+ "_id": "5f3a8786c90d780037723a16",
506
+ "name": "Ultra Premium",
507
+ "description": "Ultra Premium",
508
+ "amount": 2999,
509
+ "product_suite_id": "5f3a8786c90d7800377239f3",
510
+ "created_at": "2020-08-17T13:35:02.802Z",
511
+ "modified_at": "2020-08-17T13:35:02.802Z"
512
+ },
513
+ "name": "Ultra Premium",
514
+ "quantity": 1,
515
+ "description": "Ultra Premium",
516
+ "period": {
517
+ "start": "2020-08-17T13:45:36.722Z",
518
+ "end": "2020-10-05T08:00:27.753Z"
519
+ },
520
+ "unit_amount": 4717.17,
521
+ "amount": 4717.17,
522
+ "type": "subscription",
523
+ "invoice_id": "5f7acb709e76da30e3b92cdb",
524
+ "created_at": "2020-10-05T08:00:27.768Z",
525
+ "modified_at": "2020-10-05T08:00:27.768Z"
526
+ }
527
+ ]
528
+ }
529
+ ],
530
+ "start": 0,
531
+ "end": 10,
532
+ "limit": 10,
533
+ "page": 1,
534
+ "total": 1
535
+ }
536
+ }
537
+ ```
538
+ </details>
539
+
540
+ </details>
541
+
542
+
543
+
544
+
545
+
546
+
547
+
548
+
549
+
550
+ ---
551
+
552
+
553
+ ### getInvoiceById
554
+ Get invoice by id
555
+
556
+
557
+
558
+ ```javascript
559
+ // Promise
560
+ const promise = client.billing.getInvoiceById({ invoiceId : value });
561
+
562
+ // Async/Await
563
+ const data = await client.billing.getInvoiceById({ invoiceId : value });
564
+ ```
565
+
566
+
567
+
568
+
569
+
570
+ | Argument | Type | Required | Description |
571
+ | --------- | ----- | -------- | ----------- |
572
+ | invoiceId | string | yes | Invoice id |
573
+
574
+
575
+
576
+ Get invoice by id.
577
+
578
+ *Returned Response:*
579
+
580
+
581
+
582
+
583
+ [Invoice](#Invoice)
584
+
585
+ Success
586
+
587
+
588
+
589
+
590
+ <details>
591
+ <summary><i>&nbsp; Examples:</i></summary>
592
+
593
+
594
+ <details>
595
+ <summary><i>&nbsp; default</i></summary>
596
+
597
+ ```json
598
+ {
599
+ "value": {
600
+ "invoice": {
601
+ "period": {
602
+ "start": "2020-08-17T13:45:36.722Z",
603
+ "end": "2020-09-17T13:45:36.722Z"
604
+ },
605
+ "client": {
606
+ "address_lines": [
607
+ "TV TOWER, Foot Over Bridge Khar",
608
+ null,
609
+ "Mumbai, 400079, Maharashtra, India"
610
+ ],
611
+ "name": "RELIANCE RETAIL LTD",
612
+ "email": "ZAK@GMAIL.COM",
613
+ "phone": "91 1234567890"
614
+ },
615
+ "auto_advance": true,
616
+ "currency": "INR",
617
+ "paid": true,
618
+ "attemp": 3,
619
+ "_id": "5f7acb709e76da30e3b92cdb",
620
+ "collection_method": "charge_automatically",
621
+ "subscriber_id": "5ee773e1351e5e84289ed9cf",
622
+ "invoice_url": "",
623
+ "number": "FP-1-72020-736",
624
+ "pg_data": {},
625
+ "receipt_number": "5fd9b08464dc6ac048a08988",
626
+ "statement_descriptor": "RELIANCE RETAIL LTD",
627
+ "current_status": "paid",
628
+ "status_trail": [
629
+ {
630
+ "_id": "5f7ad29bd562744eab216379",
631
+ "value": "draft",
632
+ "timestamp": "2020-10-05T08:00:27.753Z"
633
+ },
634
+ {
635
+ "_id": "5fcf40ce1613c029aff417dd",
636
+ "value": "open",
637
+ "timestamp": "2020-12-08T09:01:02.038Z"
638
+ },
639
+ {
640
+ "_id": "5fd9b08664dc6a1ad0a08989",
641
+ "value": "paid",
642
+ "timestamp": "2020-12-16T07:00:22.973Z"
643
+ }
644
+ ],
645
+ "subtotal": 15720.08,
646
+ "total": 15720.08,
647
+ "subscription": "5f3a8a00668947663b7fbd38",
648
+ "next_action_time": "2020-10-05T09:00:27.754Z",
649
+ "created_at": "2020-10-05T07:29:52.876Z",
650
+ "modified_at": "2020-12-16T07:00:22.980Z",
651
+ "hash_identifier": "575999aca03e36f0fa54db5235bc7f25",
652
+ "payment_method": {
653
+ "pg_payment_method_id": null
654
+ }
655
+ },
656
+ "invoice_items": [
657
+ {
658
+ "_id": "5f7acb709e76da48b1b92cdd",
659
+ "currency": "INR",
660
+ "plan": {
661
+ "recurring": {
662
+ "interval": "month",
663
+ "interval_count": 1
664
+ },
665
+ "is_trial_plan": false,
666
+ "plan_group": "default",
667
+ "tag_lines": [],
668
+ "currency": "INR",
669
+ "is_active": true,
670
+ "is_visible": true,
671
+ "trial_period": 0,
672
+ "addons": [],
673
+ "tags": [],
674
+ "type": "public",
675
+ "country": "IN",
676
+ "_id": "5f3a8786c90d780037723a14",
677
+ "name": "Professional",
678
+ "description": "Professional",
679
+ "amount": 1499,
680
+ "product_suite_id": "5f3a8786c90d7800377239f3",
681
+ "created_at": "2020-08-17T13:35:02.802Z",
682
+ "modified_at": "2020-08-17T13:35:02.802Z"
683
+ },
684
+ "name": "Professional",
685
+ "quantity": 1,
686
+ "description": "Professional",
687
+ "period": {
688
+ "start": "2020-08-17T13:45:36.722Z",
689
+ "end": "2020-10-05T07:29:52.868Z"
690
+ },
691
+ "unit_amount": 2356.77,
692
+ "amount": 2356.77,
693
+ "type": "subscription",
694
+ "invoice_id": "5f7acb709e76da30e3b92cdb",
695
+ "created_at": "2020-10-05T07:29:52.886Z",
696
+ "modified_at": "2020-10-05T07:29:52.886Z"
697
+ },
698
+ {
699
+ "_id": "5f7acf199aa6830c4fe5e984",
700
+ "currency": "INR",
701
+ "plan": {
702
+ "recurring": {
703
+ "interval": "month",
704
+ "interval_count": 1
705
+ },
706
+ "is_trial_plan": false,
707
+ "plan_group": "default",
708
+ "tag_lines": [],
709
+ "currency": "INR",
710
+ "is_active": true,
711
+ "is_visible": true,
712
+ "trial_period": 0,
713
+ "addons": [],
714
+ "tags": [
715
+ "popular"
716
+ ],
717
+ "type": "public",
718
+ "country": "IN",
719
+ "_id": "5f3a8786c90d780037723a13",
720
+ "name": "Premium",
721
+ "description": "Premium",
722
+ "amount": 2499,
723
+ "product_suite_id": "5f3a8786c90d7800377239f3",
724
+ "created_at": "2020-08-17T13:35:02.547Z",
725
+ "modified_at": "2020-08-17T13:35:02.547Z"
726
+ },
727
+ "name": "Premium",
728
+ "quantity": 1,
729
+ "description": "Premium",
730
+ "period": {
731
+ "start": "2020-08-17T13:45:36.722Z",
732
+ "end": "2020-10-05T07:45:29.755Z"
733
+ },
734
+ "unit_amount": 3929.87,
735
+ "amount": 3929.87,
736
+ "type": "subscription",
737
+ "invoice_id": "5f7acb709e76da30e3b92cdb",
738
+ "created_at": "2020-10-05T07:45:29.765Z",
739
+ "modified_at": "2020-10-05T07:45:29.765Z"
740
+ },
741
+ {
742
+ "_id": "5f7acf7da10a707fc502dcd4",
743
+ "currency": "INR",
744
+ "plan": {
745
+ "recurring": {
746
+ "interval": "month",
747
+ "interval_count": 1
748
+ },
749
+ "is_trial_plan": false,
750
+ "plan_group": "default",
751
+ "tag_lines": [],
752
+ "currency": "INR",
753
+ "is_active": true,
754
+ "is_visible": true,
755
+ "trial_period": 0,
756
+ "addons": [],
757
+ "tags": [],
758
+ "type": "public",
759
+ "country": "IN",
760
+ "_id": "5f3a8786c90d780037723a16",
761
+ "name": "Ultra Premium",
762
+ "description": "Ultra Premium",
763
+ "amount": 2999,
764
+ "product_suite_id": "5f3a8786c90d7800377239f3",
765
+ "created_at": "2020-08-17T13:35:02.802Z",
766
+ "modified_at": "2020-08-17T13:35:02.802Z"
767
+ },
768
+ "name": "Ultra Premium",
769
+ "quantity": 1,
770
+ "description": "Ultra Premium",
771
+ "period": {
772
+ "start": "2020-08-17T13:45:36.722Z",
773
+ "end": "2020-10-05T07:47:09.532Z"
774
+ },
775
+ "unit_amount": 4716.27,
776
+ "amount": 4716.27,
777
+ "type": "subscription",
778
+ "invoice_id": "5f7acb709e76da30e3b92cdb",
779
+ "created_at": "2020-10-05T07:47:09.541Z",
780
+ "modified_at": "2020-10-05T07:47:09.541Z"
781
+ },
782
+ {
783
+ "_id": "5f7ad29bd56274f23321637a",
784
+ "currency": "INR",
785
+ "plan": {
786
+ "recurring": {
787
+ "interval": "month",
788
+ "interval_count": 1
789
+ },
790
+ "is_trial_plan": false,
791
+ "plan_group": "default",
792
+ "tag_lines": [],
793
+ "currency": "INR",
794
+ "is_active": true,
795
+ "is_visible": true,
796
+ "trial_period": 0,
797
+ "addons": [],
798
+ "tags": [],
799
+ "type": "public",
800
+ "country": "IN",
801
+ "_id": "5f3a8786c90d780037723a16",
802
+ "name": "Ultra Premium",
803
+ "description": "Ultra Premium",
804
+ "amount": 2999,
805
+ "product_suite_id": "5f3a8786c90d7800377239f3",
806
+ "created_at": "2020-08-17T13:35:02.802Z",
807
+ "modified_at": "2020-08-17T13:35:02.802Z"
808
+ },
809
+ "name": "Ultra Premium",
810
+ "quantity": 1,
811
+ "description": "Ultra Premium",
812
+ "period": {
813
+ "start": "2020-08-17T13:45:36.722Z",
814
+ "end": "2020-10-05T08:00:27.753Z"
815
+ },
816
+ "unit_amount": 4717.17,
817
+ "amount": 4717.17,
818
+ "type": "subscription",
819
+ "invoice_id": "5f7acb709e76da30e3b92cdb",
820
+ "created_at": "2020-10-05T08:00:27.768Z",
821
+ "modified_at": "2020-10-05T08:00:27.768Z"
822
+ }
823
+ ]
824
+ }
825
+ }
826
+ ```
827
+ </details>
828
+
829
+ </details>
830
+
831
+
832
+
833
+
834
+
835
+
836
+
837
+
838
+
839
+ ---
840
+
841
+
842
+ ### getCustomerDetail
843
+ Get subscription customer detail
844
+
845
+
846
+
847
+ ```javascript
848
+ // Promise
849
+ const promise = client.billing.getCustomerDetail();
850
+
851
+ // Async/Await
852
+ const data = await client.billing.getCustomerDetail();
853
+ ```
854
+
855
+
856
+
857
+
858
+
859
+
860
+ Get subscription customer detail.
861
+
862
+ *Returned Response:*
863
+
864
+
865
+
866
+
867
+ [SubscriptionCustomer](#SubscriptionCustomer)
868
+
869
+ Success
870
+
871
+
872
+
873
+
874
+ <details>
875
+ <summary><i>&nbsp; Examples:</i></summary>
876
+
877
+
878
+ <details>
879
+ <summary><i>&nbsp; default</i></summary>
880
+
881
+ ```json
882
+ {
883
+ "value": {
884
+ "phone": {
885
+ "phone_number": "1234567890",
886
+ "phone_country_code": "91"
887
+ },
888
+ "billing_address": {
889
+ "country": "India",
890
+ "state": "Maharastra",
891
+ "city": "Mumbai",
892
+ "line1": "test1",
893
+ "line2": "test2",
894
+ "postal_code": "400059"
895
+ },
896
+ "_id": "5ee773e1351e5e84289ed9cf",
897
+ "unique_id": "1",
898
+ "type": "company",
899
+ "name": "test retail",
900
+ "email": "test@gmail.com",
901
+ "created_at": "2020-06-15T13:13:05.267Z",
902
+ "modified_at": "2021-02-04T00:58:45.356Z",
903
+ "data": {
904
+ "pg_user_exists": true,
905
+ "id": 2
906
+ }
907
+ }
908
+ }
909
+ ```
910
+ </details>
911
+
912
+ </details>
913
+
914
+
915
+
916
+
917
+
918
+
919
+
920
+
921
+
922
+ ---
923
+
924
+
925
+ ### upsertCustomerDetail
926
+ Upsert subscription customer detail
927
+
928
+
929
+
930
+ ```javascript
931
+ // Promise
932
+ const promise = client.billing.upsertCustomerDetail({ body : value });
933
+
934
+ // Async/Await
935
+ const data = await client.billing.upsertCustomerDetail({ body : value });
936
+ ```
937
+
938
+
939
+
940
+
941
+
942
+ | Argument | Type | Required | Description |
943
+ | --------- | ----- | -------- | ----------- |
944
+ | body | [SubscriptionCustomerCreate](#SubscriptionCustomerCreate) | yes | Request body |
945
+
946
+
947
+ Upsert subscription customer detail.
948
+
949
+ *Returned Response:*
950
+
951
+
952
+
953
+
954
+ [SubscriptionCustomer](#SubscriptionCustomer)
955
+
956
+ Success
957
+
958
+
959
+
960
+
961
+ <details>
962
+ <summary><i>&nbsp; Examples:</i></summary>
963
+
964
+
965
+ <details>
966
+ <summary><i>&nbsp; default</i></summary>
967
+
968
+ ```json
969
+ {
970
+ "value": {
971
+ "phone": {
972
+ "phone_number": "1234567890",
973
+ "phone_country_code": "91"
974
+ },
975
+ "billing_address": {
976
+ "country": "India",
977
+ "state": "Maharastra",
978
+ "city": "Mumbai",
979
+ "line1": "test1",
980
+ "line2": "test2",
981
+ "postal_code": "400059"
982
+ },
983
+ "_id": "5ee773e1351e5e84289ed9cf",
984
+ "unique_id": "1",
985
+ "type": "company",
986
+ "name": "test retail",
987
+ "email": "test@gmail.com",
988
+ "created_at": "2020-06-15T13:13:05.267Z",
989
+ "modified_at": "2021-02-04T00:58:45.356Z",
990
+ "data": {
991
+ "pg_user_exists": true,
992
+ "id": 2
993
+ }
994
+ }
995
+ }
996
+ ```
997
+ </details>
998
+
999
+ </details>
1000
+
1001
+
1002
+
1003
+
1004
+
1005
+
1006
+
1007
+
1008
+
1009
+ ---
1010
+
1011
+
1012
+ ### getSubscription
1013
+ Get current subscription detail
1014
+
1015
+
1016
+
1017
+ ```javascript
1018
+ // Promise
1019
+ const promise = client.billing.getSubscription();
1020
+
1021
+ // Async/Await
1022
+ const data = await client.billing.getSubscription();
1023
+ ```
1024
+
1025
+
1026
+
1027
+
1028
+
1029
+
1030
+ If subscription is active then it will return is_enabled true and return subscription object. If subscription is not active then is_enabled false and message.
1031
+
1032
+
1033
+ *Returned Response:*
1034
+
1035
+
1036
+
1037
+
1038
+ [SubscriptionStatus](#SubscriptionStatus)
1039
+
1040
+ Success
1041
+
1042
+
1043
+
1044
+
1045
+ <details>
1046
+ <summary><i>&nbsp; Examples:</i></summary>
1047
+
1048
+
1049
+ <details>
1050
+ <summary><i>&nbsp; Active subscription</i></summary>
1051
+
1052
+ ```json
1053
+ {
1054
+ "value": {
1055
+ "is_enabled": true,
1056
+ "subscription": {
1057
+ "current_period": {
1058
+ "start": "2020-12-17T13:45:36.722Z",
1059
+ "end": "2021-01-17T13:45:36.722Z"
1060
+ },
1061
+ "pause_collection": {},
1062
+ "trial": {},
1063
+ "invoice_settings": {
1064
+ "generation": true,
1065
+ "charging": true
1066
+ },
1067
+ "is_active": true,
1068
+ "cancel_at_period_end": false,
1069
+ "_id": "5f3a8a00668947663b7fbd38",
1070
+ "subscriber_id": "5ee773e1351e5e84289ed9cf",
1071
+ "plan_id": "5f3a8786c90d780037723a12",
1072
+ "product_suite_id": "5f3a8786c90d7800377239f3",
1073
+ "plan_data": {
1074
+ "recurring": {
1075
+ "interval": "month",
1076
+ "interval_count": 1
1077
+ },
1078
+ "is_trial_plan": false,
1079
+ "plan_group": "default",
1080
+ "tag_lines": [],
1081
+ "currency": "INR",
1082
+ "is_active": true,
1083
+ "is_visible": true,
1084
+ "trial_period": 0,
1085
+ "addons": [],
1086
+ "tags": [],
1087
+ "type": "public",
1088
+ "country": "IN",
1089
+ "_id": "5f3a8786c90d780037723a12",
1090
+ "name": "Standard",
1091
+ "description": "Standard",
1092
+ "amount": 999,
1093
+ "product_suite_id": "5f3a8786c90d7800377239f3",
1094
+ "created_at": "2020-08-17T13:35:02.547Z",
1095
+ "modified_at": "2020-08-17T13:35:02.547Z"
1096
+ },
1097
+ "current_status": "active",
1098
+ "collection_method": "charge_automatically",
1099
+ "created_at": "2020-08-17T13:45:36.731Z",
1100
+ "modified_at": "2020-12-17T11:01:15.960Z",
1101
+ "latest_invoice": "5fdb3a7bfc849c2153b944d5"
1102
+ }
1103
+ }
1104
+ }
1105
+ ```
1106
+ </details>
1107
+
1108
+ <details>
1109
+ <summary><i>&nbsp; Inactive subscription</i></summary>
1110
+
1111
+ ```json
1112
+ {
1113
+ "value": {
1114
+ "is_enabled": true,
1115
+ "message": "Subscription not enabled"
1116
+ }
1117
+ }
1118
+ ```
1119
+ </details>
1120
+
1121
+ </details>
1122
+
1123
+
1124
+
1125
+
1126
+
1127
+
1128
+
1129
+
1130
+
1131
+ ---
1132
+
1133
+
1134
+ ### getFeatureLimitConfig
1135
+ Get subscription subscription limits
1136
+
1137
+
1138
+
1139
+ ```javascript
1140
+ // Promise
1141
+ const promise = client.billing.getFeatureLimitConfig();
1142
+
1143
+ // Async/Await
1144
+ const data = await client.billing.getFeatureLimitConfig();
1145
+ ```
1146
+
1147
+
1148
+
1149
+
1150
+
1151
+
1152
+ Get subscription subscription limits.
1153
+
1154
+ *Returned Response:*
1155
+
1156
+
1157
+
1158
+
1159
+ [SubscriptionLimit](#SubscriptionLimit)
1160
+
1161
+ Success
1162
+
1163
+
1164
+
1165
+
1166
+ <details>
1167
+ <summary><i>&nbsp; Examples:</i></summary>
1168
+
1169
+
1170
+ <details>
1171
+ <summary><i>&nbsp; default</i></summary>
1172
+
1173
+ ```json
1174
+ {
1175
+ "value": {
1176
+ "application": {
1177
+ "enabled": true,
1178
+ "hard_limit": 25,
1179
+ "soft_limit": 25
1180
+ },
1181
+ "marketplace": {
1182
+ "enabled": true
1183
+ },
1184
+ "other_platform": {
1185
+ "enabled": true
1186
+ },
1187
+ "team": {
1188
+ "limit": -1
1189
+ },
1190
+ "products": {
1191
+ "bulk": true,
1192
+ "limit": -1
1193
+ },
1194
+ "extensions": {
1195
+ "enabled": true,
1196
+ "limit": -1
1197
+ },
1198
+ "integrations": {
1199
+ "enabled": true,
1200
+ "limit": -1
1201
+ },
1202
+ "is_trial_plan": false
1203
+ }
1204
+ }
1205
+ ```
1206
+ </details>
1207
+
1208
+ </details>
1209
+
1210
+
1211
+
1212
+
1213
+
1214
+
1215
+
1216
+
1217
+
1218
+ ---
1219
+
1220
+
1221
+ ### activateSubscriptionPlan
1222
+ Activate subscription
1223
+
1224
+
1225
+
1226
+ ```javascript
1227
+ // Promise
1228
+ const promise = client.billing.activateSubscriptionPlan({ body : value });
1229
+
1230
+ // Async/Await
1231
+ const data = await client.billing.activateSubscriptionPlan({ body : value });
1232
+ ```
1233
+
1234
+
1235
+
1236
+
1237
+
1238
+ | Argument | Type | Required | Description |
1239
+ | --------- | ----- | -------- | ----------- |
1240
+ | body | [SubscriptionActivateReq](#SubscriptionActivateReq) | yes | Request body |
1241
+
1242
+
1243
+ It will activate subscription plan for customer
1244
+
1245
+ *Returned Response:*
1246
+
1247
+
1248
+
1249
+
1250
+ [SubscriptionActivateRes](#SubscriptionActivateRes)
1251
+
1252
+ Success
1253
+
1254
+
1255
+
1256
+
1257
+ <details>
1258
+ <summary><i>&nbsp; Examples:</i></summary>
1259
+
1260
+
1261
+ <details>
1262
+ <summary><i>&nbsp; default</i></summary>
1263
+
1264
+ ```json
1265
+ {
1266
+ "value": {
1267
+ "success": true,
1268
+ "data": {
1269
+ "pause_collection": {},
1270
+ "trial": {},
1271
+ "invoice_settings": {
1272
+ "generation": true,
1273
+ "charging": true
1274
+ },
1275
+ "is_active": true,
1276
+ "cancel_at_period_end": false,
1277
+ "_id": "601b8e4a32d3e837ec662f5c",
1278
+ "subscriber_id": "5ef5f810961ddf004c1457ac",
1279
+ "plan_id": "5f3a8786c90d780037723a12",
1280
+ "product_suite_id": "5f3a8786c90d7800377239f3",
1281
+ "plan_data": {
1282
+ "recurring": {
1283
+ "interval": "month",
1284
+ "interval_count": 1
1285
+ },
1286
+ "is_trial_plan": false,
1287
+ "plan_group": "default",
1288
+ "tag_lines": [],
1289
+ "currency": "INR",
1290
+ "is_active": true,
1291
+ "is_visible": true,
1292
+ "trial_period": 0,
1293
+ "addons": [],
1294
+ "tags": [],
1295
+ "type": "public",
1296
+ "country": "IN",
1297
+ "_id": "5f3a8786c90d780037723a12",
1298
+ "name": "Standard",
1299
+ "description": "Standard",
1300
+ "amount": 999,
1301
+ "product_suite_id": "5f3a8786c90d7800377239f3",
1302
+ "created_at": "2020-08-17T13:35:02.547Z",
1303
+ "modified_at": "2020-08-17T13:35:02.547Z"
1304
+ },
1305
+ "current_period": {
1306
+ "start": "2021-02-04T06:03:54.567Z",
1307
+ "end": "2021-03-04T06:03:54.567Z"
1308
+ },
1309
+ "current_status": "active",
1310
+ "collection_method": "charge_automatically",
1311
+ "created_at": "2021-02-04T06:03:54.580Z",
1312
+ "modified_at": "2021-02-04T06:03:54.580Z"
1313
+ }
1314
+ }
1315
+ }
1316
+ ```
1317
+ </details>
1318
+
1319
+ </details>
1320
+
1321
+
1322
+
1323
+
1324
+
1325
+
1326
+
1327
+
1328
+
1329
+ ---
1330
+
1331
+
1332
+ ### cancelSubscriptionPlan
1333
+ Cancel subscription
1334
+
1335
+
1336
+
1337
+ ```javascript
1338
+ // Promise
1339
+ const promise = client.billing.cancelSubscriptionPlan({ body : value });
1340
+
1341
+ // Async/Await
1342
+ const data = await client.billing.cancelSubscriptionPlan({ body : value });
1343
+ ```
1344
+
1345
+
1346
+
1347
+
1348
+
1349
+ | Argument | Type | Required | Description |
1350
+ | --------- | ----- | -------- | ----------- |
1351
+ | body | [CancelSubscriptionReq](#CancelSubscriptionReq) | yes | Request body |
1352
+
1353
+
1354
+ It will cancel current active subscription.
1355
+
1356
+ *Returned Response:*
1357
+
1358
+
1359
+
1360
+
1361
+ [CancelSubscriptionRes](#CancelSubscriptionRes)
1362
+
1363
+ Success
1364
+
1365
+
1366
+
1367
+
1368
+ <details>
1369
+ <summary><i>&nbsp; Examples:</i></summary>
1370
+
1371
+
1372
+ <details>
1373
+ <summary><i>&nbsp; default</i></summary>
1374
+
1375
+ ```json
1376
+ {
1377
+ "value": {
1378
+ "success": true,
1379
+ "data": {
1380
+ "current_period": {
1381
+ "start": "2021-02-04T06:03:54.567Z",
1382
+ "end": "2021-03-04T06:03:54.567Z"
1383
+ },
1384
+ "pause_collection": {},
1385
+ "trial": {},
1386
+ "invoice_settings": {
1387
+ "generation": true,
1388
+ "charging": true
1389
+ },
1390
+ "is_active": false,
1391
+ "cancel_at_period_end": false,
1392
+ "_id": "601b8e4a32d3e837ec662f5c",
1393
+ "subscriber_id": "5ef5f810961ddf004c1457ac",
1394
+ "plan_id": "5f3a8786c90d780037723a12",
1395
+ "product_suite_id": "5f3a8786c90d7800377239f3",
1396
+ "plan_data": {
1397
+ "recurring": {
1398
+ "interval": "month",
1399
+ "interval_count": 1
1400
+ },
1401
+ "is_trial_plan": false,
1402
+ "plan_group": "default",
1403
+ "tag_lines": [],
1404
+ "currency": "INR",
1405
+ "is_active": true,
1406
+ "is_visible": true,
1407
+ "trial_period": 0,
1408
+ "addons": [],
1409
+ "tags": [],
1410
+ "type": "public",
1411
+ "country": "IN",
1412
+ "_id": "5f3a8786c90d780037723a12",
1413
+ "name": "Standard",
1414
+ "description": "Standard",
1415
+ "amount": 999,
1416
+ "product_suite_id": "5f3a8786c90d7800377239f3",
1417
+ "created_at": "2020-08-17T13:35:02.547Z",
1418
+ "modified_at": "2020-08-17T13:35:02.547Z"
1419
+ },
1420
+ "current_status": "canceled",
1421
+ "collection_method": "charge_automatically",
1422
+ "created_at": "2021-02-04T06:03:54.580Z",
1423
+ "modified_at": "2021-02-04T08:52:25.806Z",
1424
+ "cancel_at": "2021-02-04T08:52:25.802Z",
1425
+ "canceled_at": "2021-02-04T08:52:25.802Z"
1426
+ }
1427
+ }
1428
+ }
1429
+ ```
1430
+ </details>
1431
+
1432
+ </details>
1433
+
1434
+
1435
+
1436
+
1437
+
1438
+
1439
+
1440
+
1441
+
1442
+ ---
1443
+
1444
+
1445
+
1446
+ ### Schemas
1447
+
1448
+
1449
+
1450
+ #### [Page](#Page)
1451
+
1452
+ | Properties | Type | Nullable | Description |
1453
+ | ---------- | ---- | -------- | ----------- |
1454
+ | item_total | number | no | |
1455
+ | next_id | string | no | |
1456
+ | has_previous | boolean | no | |
1457
+ | has_next | boolean | no | |
1458
+ | current | number | no | |
1459
+ | type | string | yes | |
1460
+ | size | number | no | |
1461
+
1462
+ ---
1463
+
1464
+
1465
+
1466
+
1467
+ #### [UnauthenticatedUser](#UnauthenticatedUser)
1468
+
1469
+ | Properties | Type | Nullable | Description |
1470
+ | ---------- | ---- | -------- | ----------- |
1471
+ | message | string | no | Failure message. |
1472
+
1473
+ ---
1474
+
1475
+
1476
+
1477
+
1478
+ #### [UnauthenticatedApplication](#UnauthenticatedApplication)
1479
+
1480
+ | Properties | Type | Nullable | Description |
1481
+ | ---------- | ---- | -------- | ----------- |
1482
+ | message | string | no | Failure message. |
1483
+
1484
+ ---
1485
+
1486
+
1487
+
1488
+
1489
+ #### [BadRequest](#BadRequest)
1490
+
1491
+ | Properties | Type | Nullable | Description |
1492
+ | ---------- | ---- | -------- | ----------- |
1493
+ | message | string | no | Failure message. |
1494
+
1495
+ ---
1496
+
1497
+
1498
+
1499
+
1500
+ #### [ResourceNotFound](#ResourceNotFound)
1501
+
1502
+ | Properties | Type | Nullable | Description |
1503
+ | ---------- | ---- | -------- | ----------- |
1504
+ | message | string | no | Resource not found with {id} |
1505
+
1506
+ ---
1507
+
1508
+
1509
+
1510
+
1511
+ #### [InternalServerError](#InternalServerError)
1512
+
1513
+ | Properties | Type | Nullable | Description |
1514
+ | ---------- | ---- | -------- | ----------- |
1515
+ | message | string | no | Internal server Server error |
1516
+ | code | string | no | Error code |
1517
+
1518
+ ---
1519
+
1520
+
1521
+
1522
+
1523
+ #### [CheckValidityResponse](#CheckValidityResponse)
1524
+
1525
+ | Properties | Type | Nullable | Description |
1526
+ | ---------- | ---- | -------- | ----------- |
1527
+ | is_valid | boolean | no | |
1528
+ | discount_amount | number | no | |
1529
+
1530
+ ---
1531
+
1532
+
1533
+
1534
+
1535
+ #### [PlanRecurring](#PlanRecurring)
1536
+
1537
+ | Properties | Type | Nullable | Description |
1538
+ | ---------- | ---- | -------- | ----------- |
1539
+ | interval | string | no | |
1540
+ | interval_count | number | no | |
1541
+
1542
+ ---
1543
+
1544
+
1545
+
1546
+
1547
+ #### [Plan](#Plan)
1548
+
1549
+ | Properties | Type | Nullable | Description |
1550
+ | ---------- | ---- | -------- | ----------- |
1551
+ | recurring | [PlanRecurring](#PlanRecurring) | no | |
1552
+ | is_trial_plan | boolean | no | |
1553
+ | plan_group | string | no | |
1554
+ | tag_lines | [string] | no | |
1555
+ | currency | string | no | |
1556
+ | is_active | boolean | no | |
1557
+ | is_visible | boolean | no | |
1558
+ | trial_period | number | no | |
1559
+ | addons | [string] | no | |
1560
+ | tags | [string] | no | |
1561
+ | type | string | no | |
1562
+ | country | string | no | |
1563
+ | _id | string | no | |
1564
+ | name | string | no | |
1565
+ | description | string | no | |
1566
+ | amount | number | no | |
1567
+ | product_suite_id | string | no | |
1568
+ | created_at | string | no | |
1569
+ | modified_at | string | no | |
1570
+
1571
+ ---
1572
+
1573
+
1574
+
1575
+
1576
+ #### [DetailedPlanComponents](#DetailedPlanComponents)
1577
+
1578
+ | Properties | Type | Nullable | Description |
1579
+ | ---------- | ---- | -------- | ----------- |
1580
+ | name | string | no | |
1581
+ | slug | string | no | |
1582
+ | description | string | no | |
1583
+ | group | string | no | |
1584
+ | icon | string | no | |
1585
+ | links | string | no | |
1586
+ | enabled | boolean | no | |
1587
+ | display_text | string | no | |
1588
+
1589
+ ---
1590
+
1591
+
1592
+
1593
+
1594
+ #### [DetailedPlan](#DetailedPlan)
1595
+
1596
+ | Properties | Type | Nullable | Description |
1597
+ | ---------- | ---- | -------- | ----------- |
1598
+ | recurring | [PlanRecurring](#PlanRecurring) | no | |
1599
+ | is_trial_plan | boolean | no | |
1600
+ | plan_group | string | no | |
1601
+ | tag_lines | [string] | no | |
1602
+ | currency | string | no | |
1603
+ | is_active | boolean | no | |
1604
+ | is_visible | boolean | no | |
1605
+ | trial_period | number | no | |
1606
+ | addons | [string] | no | |
1607
+ | tags | [string] | no | |
1608
+ | type | string | no | |
1609
+ | country | string | no | |
1610
+ | _id | string | no | |
1611
+ | name | string | no | |
1612
+ | description | string | no | |
1613
+ | amount | number | no | |
1614
+ | product_suite_id | string | no | |
1615
+ | created_at | string | no | |
1616
+ | modified_at | string | no | |
1617
+ | components | [[DetailedPlanComponents](#DetailedPlanComponents)] | no | |
1618
+
1619
+ ---
1620
+
1621
+
1622
+
1623
+
1624
+ #### [SubscriptionTrialPeriod](#SubscriptionTrialPeriod)
1625
+
1626
+ | Properties | Type | Nullable | Description |
1627
+ | ---------- | ---- | -------- | ----------- |
1628
+ | start_date | string | no | |
1629
+ | end_date | string | no | |
1630
+
1631
+ ---
1632
+
1633
+
1634
+
1635
+
1636
+ #### [EntityChargePrice](#EntityChargePrice)
1637
+
1638
+ | Properties | Type | Nullable | Description |
1639
+ | ---------- | ---- | -------- | ----------- |
1640
+ | amount | number | yes | Amount for price. Minimum value 1 |
1641
+ | currency_code | string | yes | |
1642
+
1643
+ ---
1644
+
1645
+
1646
+
1647
+
1648
+ #### [EntityChargeRecurring](#EntityChargeRecurring)
1649
+
1650
+ | Properties | Type | Nullable | Description |
1651
+ | ---------- | ---- | -------- | ----------- |
1652
+ | interval | string | yes | |
1653
+
1654
+ ---
1655
+
1656
+
1657
+
1658
+
1659
+ #### [ChargeLineItem](#ChargeLineItem)
1660
+
1661
+ | Properties | Type | Nullable | Description |
1662
+ | ---------- | ---- | -------- | ----------- |
1663
+ | name | string | yes | |
1664
+ | term | string | yes | |
1665
+ | pricing_type | string | yes | |
1666
+ | price | [EntityChargePrice](#EntityChargePrice) | yes | |
1667
+ | recurring | [EntityChargeRecurring](#EntityChargeRecurring) | no | |
1668
+ | capped_amount | number | no | |
1669
+ | trial_days | number | no | |
1670
+ | is_test | boolean | no | |
1671
+ | metadata | string | no | |
1672
+
1673
+ ---
1674
+
1675
+
1676
+
1677
+
1678
+ #### [CreateSubscriptionCharge](#CreateSubscriptionCharge)
1679
+
1680
+ | Properties | Type | Nullable | Description |
1681
+ | ---------- | ---- | -------- | ----------- |
1682
+ | name | string | yes | |
1683
+ | trial_days | number | no | |
1684
+ | line_items | [[ChargeLineItem](#ChargeLineItem)] | yes | |
1685
+ | is_test | boolean | no | |
1686
+ | return_url | string | yes | |
1687
+
1688
+ ---
1689
+
1690
+
1691
+
1692
+
1693
+ #### [CurrentPeriod](#CurrentPeriod)
1694
+
1695
+ | Properties | Type | Nullable | Description |
1696
+ | ---------- | ---- | -------- | ----------- |
1697
+ | start_date | string | no | |
1698
+ | end_date | string | no | |
1699
+
1700
+ ---
1701
+
1702
+
1703
+
1704
+
1705
+ #### [SubscriptionCharge](#SubscriptionCharge)
1706
+
1707
+ | Properties | Type | Nullable | Description |
1708
+ | ---------- | ---- | -------- | ----------- |
1709
+ | _id | string | no | |
1710
+ | name | string | no | |
1711
+ | term | string | no | |
1712
+ | pricing_type | string | no | |
1713
+ | price | [EntityChargePrice](#EntityChargePrice) | no | |
1714
+ | recurring | [EntityChargeRecurring](#EntityChargeRecurring) | no | |
1715
+ | capped_amount | number | no | |
1716
+ | activated_on | string | no | |
1717
+ | cancelled_on | string | no | |
1718
+ | billing_date | string | no | |
1719
+ | current_period | [CurrentPeriod](#CurrentPeriod) | no | |
1720
+ | status | string | no | |
1721
+ | is_test | boolean | no | |
1722
+ | metadata | string | no | |
1723
+
1724
+ ---
1725
+
1726
+
1727
+
1728
+
1729
+ #### [EntitySubscription](#EntitySubscription)
1730
+
1731
+ | Properties | Type | Nullable | Description |
1732
+ | ---------- | ---- | -------- | ----------- |
1733
+ | _id | string | no | |
1734
+ | name | string | no | |
1735
+ | status | string | no | |
1736
+ | company_id | number | no | |
1737
+ | activated_on | string | no | |
1738
+ | cancelled_on | string | no | |
1739
+ | trial_days | number | no | |
1740
+ | trial_period | [SubscriptionTrialPeriod](#SubscriptionTrialPeriod) | no | |
1741
+ | metadata | string | no | |
1742
+ | line_items | [[SubscriptionCharge](#SubscriptionCharge)] | no | |
1743
+
1744
+ ---
1745
+
1746
+
1747
+
1748
+
1749
+ #### [CreateSubscriptionResponse](#CreateSubscriptionResponse)
1750
+
1751
+ | Properties | Type | Nullable | Description |
1752
+ | ---------- | ---- | -------- | ----------- |
1753
+ | subscription | [EntitySubscription](#EntitySubscription) | no | |
1754
+ | confirm_url | string | no | |
1755
+
1756
+ ---
1757
+
1758
+
1759
+
1760
+
1761
+ #### [InvoiceDetailsPeriod](#InvoiceDetailsPeriod)
1762
+
1763
+ | Properties | Type | Nullable | Description |
1764
+ | ---------- | ---- | -------- | ----------- |
1765
+ | start | string | no | |
1766
+ | end | string | no | |
1767
+
1768
+ ---
1769
+
1770
+
1771
+
1772
+
1773
+ #### [InvoiceDetailsClient](#InvoiceDetailsClient)
1774
+
1775
+ | Properties | Type | Nullable | Description |
1776
+ | ---------- | ---- | -------- | ----------- |
1777
+ | address_lines | [string] | no | |
1778
+ | name | string | no | |
1779
+ | email | string | no | |
1780
+ | phone | string | no | |
1781
+
1782
+ ---
1783
+
1784
+
1785
+
1786
+
1787
+ #### [InvoiceDetailsStatusTrail](#InvoiceDetailsStatusTrail)
1788
+
1789
+ | Properties | Type | Nullable | Description |
1790
+ | ---------- | ---- | -------- | ----------- |
1791
+ | _id | string | no | |
1792
+ | value | string | no | |
1793
+ | timestamp | string | no | |
1794
+
1795
+ ---
1796
+
1797
+
1798
+
1799
+
1800
+ #### [InvoiceDetailsPaymentMethodsDataChecks](#InvoiceDetailsPaymentMethodsDataChecks)
1801
+
1802
+ | Properties | Type | Nullable | Description |
1803
+ | ---------- | ---- | -------- | ----------- |
1804
+ | cvc_check | string | no | |
1805
+ | address_line1_check | string | no | |
1806
+ | address_postal_code_check | string | no | |
1807
+
1808
+ ---
1809
+
1810
+
1811
+
1812
+
1813
+ #### [InvoiceDetailsPaymentMethodsDataNetworks](#InvoiceDetailsPaymentMethodsDataNetworks)
1814
+
1815
+ | Properties | Type | Nullable | Description |
1816
+ | ---------- | ---- | -------- | ----------- |
1817
+ | available | [string] | no | |
1818
+ | preferred | string | no | |
1819
+
1820
+ ---
1821
+
1822
+
1823
+
1824
+
1825
+ #### [InvoiceDetailsPaymentMethodsDataThreeDSecureUsage](#InvoiceDetailsPaymentMethodsDataThreeDSecureUsage)
1826
+
1827
+ | Properties | Type | Nullable | Description |
1828
+ | ---------- | ---- | -------- | ----------- |
1829
+ | supported | boolean | no | |
1830
+
1831
+ ---
1832
+
1833
+
1834
+
1835
+
1836
+ #### [InvoiceDetailsPaymentMethodsData](#InvoiceDetailsPaymentMethodsData)
1837
+
1838
+ | Properties | Type | Nullable | Description |
1839
+ | ---------- | ---- | -------- | ----------- |
1840
+ | brand | string | no | |
1841
+ | last4 | string | no | |
1842
+ | checks | [InvoiceDetailsPaymentMethodsDataChecks](#InvoiceDetailsPaymentMethodsDataChecks) | no | |
1843
+ | wallet | string | no | |
1844
+ | country | string | no | |
1845
+ | funding | string | no | |
1846
+ | exp_year | number | no | |
1847
+ | networks | [InvoiceDetailsPaymentMethodsDataNetworks](#InvoiceDetailsPaymentMethodsDataNetworks) | no | |
1848
+ | exp_month | number | no | |
1849
+ | fingerprint | string | no | |
1850
+ | generated_from | string | no | |
1851
+ | three_d_secure_usage | [InvoiceDetailsPaymentMethodsDataThreeDSecureUsage](#InvoiceDetailsPaymentMethodsDataThreeDSecureUsage) | no | |
1852
+
1853
+ ---
1854
+
1855
+
1856
+
1857
+
1858
+ #### [InvoiceDetailsPaymentMethods](#InvoiceDetailsPaymentMethods)
1859
+
1860
+ | Properties | Type | Nullable | Description |
1861
+ | ---------- | ---- | -------- | ----------- |
1862
+ | id | number | no | |
1863
+ | type | string | no | |
1864
+ | pg_payment_method_id | string | no | |
1865
+ | data | [InvoiceDetailsPaymentMethodsData](#InvoiceDetailsPaymentMethodsData) | no | |
1866
+ | is_default | boolean | no | |
1867
+
1868
+ ---
1869
+
1870
+
1871
+
1872
+
1873
+ #### [InvoicePaymentMethod](#InvoicePaymentMethod)
1874
+
1875
+ | Properties | Type | Nullable | Description |
1876
+ | ---------- | ---- | -------- | ----------- |
1877
+ | pg_payment_method_id | string | no | |
1878
+
1879
+ ---
1880
+
1881
+
1882
+
1883
+
1884
+ #### [InvoiceDetails](#InvoiceDetails)
1885
+
1886
+ | Properties | Type | Nullable | Description |
1887
+ | ---------- | ---- | -------- | ----------- |
1888
+ | period | [InvoiceDetailsPeriod](#InvoiceDetailsPeriod) | no | |
1889
+ | client | [InvoiceDetailsClient](#InvoiceDetailsClient) | no | |
1890
+ | auto_advance | boolean | no | |
1891
+ | currency | string | no | |
1892
+ | paid | boolean | no | |
1893
+ | attemp | number | no | |
1894
+ | _id | string | no | |
1895
+ | collection_method | string | no | |
1896
+ | subscriber_id | string | no | |
1897
+ | invoice_url | string | no | |
1898
+ | number | string | no | |
1899
+ | pg_data | string | no | |
1900
+ | receipt_number | string | no | |
1901
+ | statement_descriptor | string | no | |
1902
+ | current_status | string | no | |
1903
+ | status_trail | [[InvoiceDetailsStatusTrail](#InvoiceDetailsStatusTrail)] | no | |
1904
+ | subtotal | number | no | |
1905
+ | total | number | no | |
1906
+ | subscription | string | no | |
1907
+ | next_action_time | string | no | |
1908
+ | created_at | string | no | |
1909
+ | modified_at | string | no | |
1910
+ | hash_identifier | string | no | |
1911
+ | payment_method | [InvoicePaymentMethod](#InvoicePaymentMethod) | no | |
1912
+
1913
+ ---
1914
+
1915
+
1916
+
1917
+
1918
+ #### [InvoiceItemsPlanRecurring](#InvoiceItemsPlanRecurring)
1919
+
1920
+ | Properties | Type | Nullable | Description |
1921
+ | ---------- | ---- | -------- | ----------- |
1922
+ | interval | string | no | |
1923
+ | interval_count | number | no | |
1924
+
1925
+ ---
1926
+
1927
+
1928
+
1929
+
1930
+ #### [InvoiceItemsPlan](#InvoiceItemsPlan)
1931
+
1932
+ | Properties | Type | Nullable | Description |
1933
+ | ---------- | ---- | -------- | ----------- |
1934
+ | recurring | [InvoiceItemsPlanRecurring](#InvoiceItemsPlanRecurring) | no | |
1935
+ | is_trial_plan | boolean | no | |
1936
+ | plan_group | string | no | |
1937
+ | tag_lines | [string] | no | |
1938
+ | currency | string | no | |
1939
+ | is_active | boolean | no | |
1940
+ | is_visible | boolean | no | |
1941
+ | trial_period | number | no | |
1942
+ | addons | [string] | no | |
1943
+ | tags | [string] | no | |
1944
+ | type | string | no | |
1945
+ | country | string | no | |
1946
+ | _id | string | no | |
1947
+ | name | string | no | |
1948
+ | description | string | no | |
1949
+ | amount | number | no | |
1950
+ | product_suite_id | string | no | |
1951
+ | created_at | string | no | |
1952
+ | modified_at | string | no | |
1953
+
1954
+ ---
1955
+
1956
+
1957
+
1958
+
1959
+ #### [InvoiceItemsPeriod](#InvoiceItemsPeriod)
1960
+
1961
+ | Properties | Type | Nullable | Description |
1962
+ | ---------- | ---- | -------- | ----------- |
1963
+ | start | string | no | |
1964
+ | end | string | no | |
1965
+
1966
+ ---
1967
+
1968
+
1969
+
1970
+
1971
+ #### [InvoiceItems](#InvoiceItems)
1972
+
1973
+ | Properties | Type | Nullable | Description |
1974
+ | ---------- | ---- | -------- | ----------- |
1975
+ | _id | string | no | |
1976
+ | currency | string | no | |
1977
+ | plan | [InvoiceItemsPlan](#InvoiceItemsPlan) | no | |
1978
+ | name | string | no | |
1979
+ | quantity | number | no | |
1980
+ | description | string | no | |
1981
+ | period | [InvoiceItemsPeriod](#InvoiceItemsPeriod) | no | |
1982
+ | unit_amount | number | no | |
1983
+ | amount | number | no | |
1984
+ | type | string | no | |
1985
+ | invoice_id | string | no | |
1986
+ | created_at | string | no | |
1987
+ | modified_at | string | no | |
1988
+
1989
+ ---
1990
+
1991
+
1992
+
1993
+
1994
+ #### [Invoice](#Invoice)
1995
+
1996
+ | Properties | Type | Nullable | Description |
1997
+ | ---------- | ---- | -------- | ----------- |
1998
+ | invoice | [InvoiceDetails](#InvoiceDetails) | no | |
1999
+ | invoice_items | [[InvoiceItems](#InvoiceItems)] | no | |
2000
+
2001
+ ---
2002
+
2003
+
2004
+
2005
+
2006
+ #### [InvoicesDataClient](#InvoicesDataClient)
2007
+
2008
+ | Properties | Type | Nullable | Description |
2009
+ | ---------- | ---- | -------- | ----------- |
2010
+ | name | string | no | |
2011
+ | email | string | no | |
2012
+ | phone | string | no | |
2013
+ | address_lines | [string] | no | |
2014
+
2015
+ ---
2016
+
2017
+
2018
+
2019
+
2020
+ #### [InvoicesDataPeriod](#InvoicesDataPeriod)
2021
+
2022
+ | Properties | Type | Nullable | Description |
2023
+ | ---------- | ---- | -------- | ----------- |
2024
+ | start | string | no | |
2025
+ | end | string | no | |
2026
+
2027
+ ---
2028
+
2029
+
2030
+
2031
+
2032
+ #### [InvoicesDataPaymentMethod](#InvoicesDataPaymentMethod)
2033
+
2034
+ | Properties | Type | Nullable | Description |
2035
+ | ---------- | ---- | -------- | ----------- |
2036
+ | pg_payment_method_id | string | no | |
2037
+
2038
+ ---
2039
+
2040
+
2041
+
2042
+
2043
+ #### [InvoicesData](#InvoicesData)
2044
+
2045
+ | Properties | Type | Nullable | Description |
2046
+ | ---------- | ---- | -------- | ----------- |
2047
+ | _id | string | no | |
2048
+ | client | [InvoicesDataClient](#InvoicesDataClient) | no | |
2049
+ | auto_advance | boolean | no | |
2050
+ | currency | string | no | |
2051
+ | paid | boolean | no | |
2052
+ | attemp | number | no | |
2053
+ | collection_method | string | no | |
2054
+ | subscriber_id | string | no | |
2055
+ | invoice_url | string | no | |
2056
+ | number | string | no | |
2057
+ | pg_data | string | no | |
2058
+ | period | [InvoicesDataPeriod](#InvoicesDataPeriod) | no | |
2059
+ | receipt_number | string | no | |
2060
+ | statement_descriptor | string | no | |
2061
+ | current_status | string | no | |
2062
+ | status_trail | [[InvoiceDetailsStatusTrail](#InvoiceDetailsStatusTrail)] | no | |
2063
+ | subtotal | number | no | |
2064
+ | total | number | no | |
2065
+ | subscription | string | no | |
2066
+ | next_action_time | string | no | |
2067
+ | created_at | string | no | |
2068
+ | modified_at | string | no | |
2069
+ | hash_identifier | string | no | |
2070
+ | payment_method | [InvoicesDataPaymentMethod](#InvoicesDataPaymentMethod) | no | |
2071
+ | invoice_items | [[InvoiceItems](#InvoiceItems)] | no | |
2072
+
2073
+ ---
2074
+
2075
+
2076
+
2077
+
2078
+ #### [Invoices](#Invoices)
2079
+
2080
+ | Properties | Type | Nullable | Description |
2081
+ | ---------- | ---- | -------- | ----------- |
2082
+ | data | [[InvoicesData](#InvoicesData)] | no | |
2083
+ | start | number | no | |
2084
+ | end | number | no | |
2085
+ | limit | number | no | |
2086
+ | page | number | no | |
2087
+ | total | number | no | |
2088
+
2089
+ ---
2090
+
2091
+
2092
+
2093
+
2094
+ #### [Phone](#Phone)
2095
+
2096
+ | Properties | Type | Nullable | Description |
2097
+ | ---------- | ---- | -------- | ----------- |
2098
+ | phone_number | string | no | |
2099
+ | phone_country_code | string | no | |
2100
+
2101
+ ---
2102
+
2103
+
2104
+
2105
+
2106
+ #### [SubscriptionBillingAddress](#SubscriptionBillingAddress)
2107
+
2108
+ | Properties | Type | Nullable | Description |
2109
+ | ---------- | ---- | -------- | ----------- |
2110
+ | country | string | no | |
2111
+ | state | string | no | |
2112
+ | city | string | no | |
2113
+ | line1 | string | no | |
2114
+ | line2 | string | no | |
2115
+ | postal_code | string | no | |
2116
+
2117
+ ---
2118
+
2119
+
2120
+
2121
+
2122
+ #### [SubscriptionCustomer](#SubscriptionCustomer)
2123
+
2124
+ | Properties | Type | Nullable | Description |
2125
+ | ---------- | ---- | -------- | ----------- |
2126
+ | phone | [Phone](#Phone) | no | |
2127
+ | billing_address | [SubscriptionBillingAddress](#SubscriptionBillingAddress) | no | |
2128
+ | _id | string | no | |
2129
+ | unique_id | string | no | |
2130
+ | type | string | no | |
2131
+ | name | string | no | |
2132
+ | email | string | no | |
2133
+ | created_at | string | no | |
2134
+ | modified_at | string | no | |
2135
+ | data | string | no | |
2136
+
2137
+ ---
2138
+
2139
+
2140
+
2141
+
2142
+ #### [SubscriptionCustomerCreate](#SubscriptionCustomerCreate)
2143
+
2144
+ | Properties | Type | Nullable | Description |
2145
+ | ---------- | ---- | -------- | ----------- |
2146
+ | phone | [Phone](#Phone) | no | |
2147
+ | billing_address | [SubscriptionBillingAddress](#SubscriptionBillingAddress) | no | |
2148
+ | unique_id | string | no | |
2149
+ | type | string | no | |
2150
+ | name | string | no | |
2151
+ | email | string | no | |
2152
+
2153
+ ---
2154
+
2155
+
2156
+
2157
+
2158
+ #### [SubscriptionCurrentPeriod](#SubscriptionCurrentPeriod)
2159
+
2160
+ | Properties | Type | Nullable | Description |
2161
+ | ---------- | ---- | -------- | ----------- |
2162
+ | start | string | no | |
2163
+ | end | string | no | |
2164
+
2165
+ ---
2166
+
2167
+
2168
+
2169
+
2170
+ #### [SubscriptionPauseCollection](#SubscriptionPauseCollection)
2171
+
2172
+ | Properties | Type | Nullable | Description |
2173
+ | ---------- | ---- | -------- | ----------- |
2174
+ | behavior | string | no | |
2175
+ | resume_at | string | no | |
2176
+
2177
+ ---
2178
+
2179
+
2180
+
2181
+
2182
+ #### [SubscriptionTrial](#SubscriptionTrial)
2183
+
2184
+ | Properties | Type | Nullable | Description |
2185
+ | ---------- | ---- | -------- | ----------- |
2186
+ | start | string | no | |
2187
+ | end | string | no | |
2188
+
2189
+ ---
2190
+
2191
+
2192
+
2193
+
2194
+ #### [SubscriptionInvoiceSettings](#SubscriptionInvoiceSettings)
2195
+
2196
+ | Properties | Type | Nullable | Description |
2197
+ | ---------- | ---- | -------- | ----------- |
2198
+ | generation | boolean | no | |
2199
+ | charging | boolean | no | |
2200
+
2201
+ ---
2202
+
2203
+
2204
+
2205
+
2206
+ #### [Subscription](#Subscription)
2207
+
2208
+ | Properties | Type | Nullable | Description |
2209
+ | ---------- | ---- | -------- | ----------- |
2210
+ | current_period | [SubscriptionCurrentPeriod](#SubscriptionCurrentPeriod) | no | |
2211
+ | pause_collection | [SubscriptionPauseCollection](#SubscriptionPauseCollection) | no | |
2212
+ | trial | [SubscriptionTrial](#SubscriptionTrial) | no | |
2213
+ | invoice_settings | [SubscriptionInvoiceSettings](#SubscriptionInvoiceSettings) | no | |
2214
+ | is_active | boolean | no | |
2215
+ | cancel_at_period_end | boolean | no | |
2216
+ | _id | string | no | |
2217
+ | subscriber_id | string | no | |
2218
+ | plan_id | string | no | |
2219
+ | product_suite_id | string | no | |
2220
+ | plan_data | [Plan](#Plan) | no | |
2221
+ | current_status | string | no | |
2222
+ | collection_method | string | no | |
2223
+ | created_at | string | no | |
2224
+ | modified_at | string | no | |
2225
+ | latest_invoice | string | no | |
2226
+
2227
+ ---
2228
+
2229
+
2230
+
2231
+
2232
+ #### [SubscriptionStatus](#SubscriptionStatus)
2233
+
2234
+ | Properties | Type | Nullable | Description |
2235
+ | ---------- | ---- | -------- | ----------- |
2236
+ | is_enabled | boolean | no | |
2237
+ | subscription | [Subscription](#Subscription) | no | |
2238
+
2239
+ ---
2240
+
2241
+
2242
+
2243
+
2244
+ #### [SubscriptionLimitApplication](#SubscriptionLimitApplication)
2245
+
2246
+ | Properties | Type | Nullable | Description |
2247
+ | ---------- | ---- | -------- | ----------- |
2248
+ | enabled | boolean | no | |
2249
+ | hard_limit | number | no | |
2250
+ | soft_limit | number | no | |
2251
+
2252
+ ---
2253
+
2254
+
2255
+
2256
+
2257
+ #### [SubscriptionLimitMarketplace](#SubscriptionLimitMarketplace)
2258
+
2259
+ | Properties | Type | Nullable | Description |
2260
+ | ---------- | ---- | -------- | ----------- |
2261
+ | enabled | boolean | no | |
2262
+
2263
+ ---
2264
+
2265
+
2266
+
2267
+
2268
+ #### [SubscriptionLimitOtherPlatform](#SubscriptionLimitOtherPlatform)
2269
+
2270
+ | Properties | Type | Nullable | Description |
2271
+ | ---------- | ---- | -------- | ----------- |
2272
+ | enabled | boolean | no | |
2273
+
2274
+ ---
2275
+
2276
+
2277
+
2278
+
2279
+ #### [SubscriptionLimitTeam](#SubscriptionLimitTeam)
2280
+
2281
+ | Properties | Type | Nullable | Description |
2282
+ | ---------- | ---- | -------- | ----------- |
2283
+ | limit | number | no | |
2284
+
2285
+ ---
2286
+
2287
+
2288
+
2289
+
2290
+ #### [SubscriptionLimitProducts](#SubscriptionLimitProducts)
2291
+
2292
+ | Properties | Type | Nullable | Description |
2293
+ | ---------- | ---- | -------- | ----------- |
2294
+ | bulk | boolean | no | |
2295
+ | limit | number | no | |
2296
+
2297
+ ---
2298
+
2299
+
2300
+
2301
+
2302
+ #### [SubscriptionLimitExtensions](#SubscriptionLimitExtensions)
2303
+
2304
+ | Properties | Type | Nullable | Description |
2305
+ | ---------- | ---- | -------- | ----------- |
2306
+ | enabled | boolean | no | |
2307
+ | limit | number | no | |
2308
+
2309
+ ---
2310
+
2311
+
2312
+
2313
+
2314
+ #### [SubscriptionLimitIntegrations](#SubscriptionLimitIntegrations)
2315
+
2316
+ | Properties | Type | Nullable | Description |
2317
+ | ---------- | ---- | -------- | ----------- |
2318
+ | enabled | boolean | no | |
2319
+ | limit | number | no | |
2320
+
2321
+ ---
2322
+
2323
+
2324
+
2325
+
2326
+ #### [SubscriptionLimit](#SubscriptionLimit)
2327
+
2328
+ | Properties | Type | Nullable | Description |
2329
+ | ---------- | ---- | -------- | ----------- |
2330
+ | application | [SubscriptionLimitApplication](#SubscriptionLimitApplication) | no | |
2331
+ | marketplace | [SubscriptionLimitMarketplace](#SubscriptionLimitMarketplace) | no | |
2332
+ | other_platform | [SubscriptionLimitOtherPlatform](#SubscriptionLimitOtherPlatform) | no | |
2333
+ | team | [SubscriptionLimitTeam](#SubscriptionLimitTeam) | no | |
2334
+ | products | [SubscriptionLimitProducts](#SubscriptionLimitProducts) | no | |
2335
+ | extensions | [SubscriptionLimitExtensions](#SubscriptionLimitExtensions) | no | |
2336
+ | integrations | [SubscriptionLimitIntegrations](#SubscriptionLimitIntegrations) | no | |
2337
+ | is_trial_plan | boolean | no | |
2338
+
2339
+ ---
2340
+
2341
+
2342
+
2343
+
2344
+ #### [SubscriptionActivateReq](#SubscriptionActivateReq)
2345
+
2346
+ | Properties | Type | Nullable | Description |
2347
+ | ---------- | ---- | -------- | ----------- |
2348
+ | unique_id | string | no | |
2349
+ | type | string | no | |
2350
+ | product_suite | string | no | |
2351
+ | plan_id | string | no | |
2352
+ | payment_method | string | no | |
2353
+
2354
+ ---
2355
+
2356
+
2357
+
2358
+
2359
+ #### [SubscriptionActivateRes](#SubscriptionActivateRes)
2360
+
2361
+ | Properties | Type | Nullable | Description |
2362
+ | ---------- | ---- | -------- | ----------- |
2363
+ | success | boolean | no | |
2364
+ | data | [Subscription](#Subscription) | no | |
2365
+
2366
+ ---
2367
+
2368
+
2369
+
2370
+
2371
+ #### [CancelSubscriptionReq](#CancelSubscriptionReq)
2372
+
2373
+ | Properties | Type | Nullable | Description |
2374
+ | ---------- | ---- | -------- | ----------- |
2375
+ | unique_id | string | no | |
2376
+ | type | string | no | |
2377
+ | product_suite | string | no | |
2378
+ | subscription_id | string | no | |
2379
+
2380
+ ---
2381
+
2382
+
2383
+
2384
+
2385
+ #### [CancelSubscriptionRes](#CancelSubscriptionRes)
2386
+
2387
+ | Properties | Type | Nullable | Description |
2388
+ | ---------- | ---- | -------- | ----------- |
2389
+ | success | boolean | no | |
2390
+ | data | [Subscription](#Subscription) | no | |
2391
+
2392
+ ---
2393
+
2394
+
2395
+
2396
+