-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtests.txt
More file actions
executable file
·2017 lines (1825 loc) · 62 KB
/
tests.txt
File metadata and controls
executable file
·2017 lines (1825 loc) · 62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
index
STRIPE_JS
Use client-side stripe.js in browser
✓ default unset
✓ Integer
MAXIMUM_STRIPE_RETRIES
Retry Stripe web requests
✓ default 0
✓ Integer
SUBSCRIPTION_WEBHOOK_ENDPOINT_SECRET
Secret provided by Stripe to sign webhooks
✓ String
STRIPE_KEY
The `sk_test_xxx` key from Stripe
✓ String
STRIPE_PUBLISHABLE_KEY
The `pk_test_xxx` key from Stripe
✓ String
REQUIRE_SUBSCRIPTION
Users must create subscription to access application
✓ default unset
✓ Boolean
REQUIRE_PAYMENT
Users must resolve unpaid invoices to access application
✓ default unset
✓ Boolean
REQUIRE_PAYMENT_CONFIRMATION
Users must resolve payment confirmations to access application
✓ default unset
✓ Boolean
OVERDUE_INVOICE_THRESHOLD
Duration in days to allow open invoices before enforcing payment
✓ default 1
✓ Integer
START_SUBSCRIPTION_PATH
Alternate URL path to your start subscription flow
✓ default /account/subscriptions/start-subscription
✓ String
server/stripe-subscriptions/bind-stripekey
after
✓ should bind data to req (62ms)
server/stripe-subscriptions/require-payment-confirmation
after
✓ should ignore guests
✓ should ignore user with pending confirmations requesting account pages (6238ms)
✓ should ignore administrators with pending confirmations requesting administration pages (6294ms)
✓ should ignore user without pending confirmation (7103ms)
✓ should require user confirm payment (6222ms)
server/stripe-subscriptions/require-payment
after
✓ should ignore guests
✓ should ignore user with amount owed requesting account pages (2480ms)
✓ should ignore administrator with amount owed requesting administration pages (2969ms)
✓ should ignore user without amount owed
✓ should ignore user with open but not overdue invoice (5506ms)
✓ should require user pay overdue invoice (4870ms)
server/stripe-subscriptions/require-subscription
after
✓ should ignore guests
✓ should ignore user without subscription requesting account pages
✓ should ignore administrator without subscription requesting administration pages
✓ should ignore user with active subscription (7245ms)
✓ should require user create subscription (51ms)
/account/subscriptions/add-payment-method
view
✓ should present the form for no stripe.js (1058ms)
✓ should present the form for stripe.js v3 (1774ms)
submit
✓ should require name for no stripe.js (6152ms)
✓ should require CVC for no stripe.js (6201ms)
✓ should require card number for no stripe.js (5848ms)
✓ should require expiration month for no stripe.js (6155ms)
✓ should require expiration year for no stripe.js (6194ms)
✓ should add payment information no stripe.js (screenshots) (66620ms)
✓ should add payment information stripe.js v3 (21253ms)
/account/subscriptions/billing-profile
before
✓ should reject invalid customer (260ms)
✓ should reject other account's customer (288ms)
✓ should bind data to req (241ms)
view
✓ should have row for customer (screenshots) (18931ms)
/account/subscriptions/billing-profiles
before
✓ should bind data to req
view
✓ should return one page (screenshots)
✓ should change page size
✓ should change offset
/account/subscriptions/cancel-subscription
exceptions
✓ should reject missing subscription
✓ should reject invalid subscription
✓ should reject canceled subscription
✓ should reject other account's subscription
before
✓ should bind data to req
view
✓ should present the form
✓ should show fields for free plan cancelations
✓ should show fields for free trial cancelations
✓ should show fields for cancelation with credit or refund
submit
✓ should cancel free subscription immediately (screenshots)
✓ should cancel free subscription at period end
✓ should cancel free trial immediately
✓ should cancel free trial at period end
✓ should cancel paid subscription and credit account
✓ should cancel paid subscription and show refund
/account/subscriptions/change-plan
before
✓ should bind data to req
view
✓ should present the form
✓ should remove the form if there are no plans
submit
✓ should apply plan update (screenshots)
errors
✓ should reject paid plan without payment information
/account/subscriptions/confirm-payment
before
✓ should bind data to req (7120ms)
view
✓ should display stripe.js confirmation
/account/subscriptions/confirm-subscription
exceptions
✓ invalid-planid (175ms)
✓ invalid-plan
before
✓ should bind data to req
view
✓ should present the form
submit
✓ should start subscription (screenshots)
errors
✓ invalid-paymentmethodid
/account/subscriptions/create-billing-profile
view
✓ should present the form for no stripe.js (608ms)
✓ should present the form for stripe.js v3 (1430ms)
submit
✓ should require description for no stripe.js (6731ms)
✓ should require email for no stripe.js (6647ms)
✓ should require name for no stripe.js (6903ms)
✓ should require CVC for no stripe.js (7199ms)
✓ should require card number for no stripe.js (6465ms)
✓ should require expiration month for no stripe.js (7087ms)
✓ should require expiration year for no stripe.js (7135ms)
✓ should require description for stripe.js v3 (18682ms)
✓ should require email for stripe.js v3 (18467ms)
✓ should create billing profile for no stripe.js (8489ms)
✓ should create billing profile for stripe.js v3 (screenshots) (109159ms)
/account/subscriptions/delete-billing-profile
exceptions
✓ invalid-customerid
✓ invalid-account
before
✓ should bind data to req
view
✓ should present the form
submit
✓ should delete billing profile (screenshots)
/account/subscriptions
before
✓ should bind data to req
view
✓ should have row for each invoice
✓ should have row for each customer
✓ should have row for each subscription
/account/subscriptions/invoice
exceptions
✓ invalid-invoiceid
✓ invalid-account
before
✓ should bind data to req
view
✓ should have row for invoice (screenshots)
/account/subscriptions/invoices
before
✓ should bind data to req
view
✓ should return one page (screenshots)
✓ should change page size
✓ should change offset
/account/subscriptions/pay-invoice
exceptions
✓ should reject invalid invoice
✓ invalid-account
✓ should reject paid invoice
before
✓ should bind data to req
view
✓ should present the form
submit
✓ should pay invoice (screenshots)
/account/subscriptions/plan
before
✓ should reject invalid plan (157ms)
✓ should reject never published plan (680ms)
✓ should reject unpublished plan (856ms)
✓ should bind data to req (625ms)
view
✓ should have row for plan (screenshots) (18000ms)
/account/subscriptions/plans
before
✓ should bind data to req
view
✓ should return one page (screenshots)
✓ should change page size
✓ should change offset
/account/subscriptions/refund-invoice
exceptions
✓ invalid-invoiceid
✓ invalid-account
before
✓ should bind data to req
view
✓ should present the form
submit
✓ should cancel subscription (screenshots)
/account/subscriptions/refunds
before
✓ should bind data to req
view
✓ should return one page (screenshots)
✓ should change page size
✓ should change offset
/account/subscriptions/request-refund
exceptions
✓ invalid-invoice
✓ invalid-account
before
✓ should bind data to req
view
✓ should present the form
submit
✓ should create refund request (screenshots)
/account/subscriptions/subscription
exceptions
✓ invalid-subscriptionid (655ms)
✓ invalid-account
before
✓ should bind data to req
view
✓ should present the subscription table (screenshots)
/account/subscriptions/subscriptions
before
✓ should bind data to req
view
✓ should return one page (screenshots)
✓ should change page size
✓ should change offset
/administrator/subscriptions/apply-customer-coupon
exceptions
✓ should reject invalid customer (161ms)
✓ should reject customer with coupon (2021ms)
before
✓ should bind data to req (773ms)
view
✓ should present the form (1584ms)
submit
✓ should apply coupon (screenshots) (32409ms)
/administrator/subscriptions/apply-subscription-coupon
exceptions
✓ should reject invalid subscription (159ms)
✓ should reject canceling subscription (8698ms)
✓ should reject free subscription (6170ms)
✓ should reject subscription with coupon (7819ms)
before
✓ should bind data to req (8201ms)
view
✓ should present the form (9020ms)
submit
✓ should apply coupon (screenshots) (37454ms)
/administrator/subscriptions/charge
before
✓ should reject invalid charge (786ms)
✓ should bind data to req (7587ms)
view
✓ should present the charge table (screenshots) (27182ms)
/administrator/subscriptions/charges
before
✓ should bind data to req
view
✓ should return one page (screenshots)
✓ should change page size
✓ should change offset
/administrator/subscriptions/coupon
before
✓ should reject invalid coupon (158ms)
✓ should bind data to req (335ms)
view
✓ should present the coupon table (screenshots) (21259ms)
/administrator/subscriptions/coupons
before
✓ should bind data to req
view
✓ should return one page (screenshots)
✓ should change page size
✓ should change offset
/administrator/subscriptions/create-coupon
view
✓ should present the form (660ms)
submit
✓ should reject missing couponid (1309ms)
✓ should enforce couponid length (2252ms)
✓ should reject duplicate couponid (2047ms)
✓ should reject missing duration (1718ms)
✓ should enforce invalid duration (1726ms)
✓ should require valid amount off (1804ms)
✓ should require valid percent off (1692ms)
✓ should require valid max redemptions (1729ms)
✓ should require amount or percent off (1613ms)
✓ should require valid duration in months if repeating (1824ms)
✓ should require valid redeem_by if provided (2046ms)
✓ should create coupon (screenshots) (27635ms)
/administrator/subscriptions/create-plan
view
✓ should present the form (832ms)
submit
✓ should reject missing planid (1587ms)
✓ should enforce planid length (2479ms)
✓ should reject missing productid (1710ms)
✓ should reject never published product (2084ms)
✓ should reject unpublished product (2152ms)
✓ should reject missing currency (1938ms)
✓ should reject invalid currency (1959ms)
✓ should reject missing usage_type (1939ms)
✓ should reject missing amount (1856ms)
✓ should reject invalid amount (1959ms)
✓ should reject missing interval (1965ms)
✓ should reject invalid interval (1975ms)
✓ should reject invalid interval_count (1954ms)
✓ should reject invalid trial_period_days (2130ms)
✓ should create plan (screenshots) (28204ms)
/administrator/subscriptions/create-product
view
✓ should present the form (499ms)
submit
✓ should reject missing name (1291ms)
✓ should enforce name length (2207ms)
✓ should reject missing statement_descriptor (1212ms)
✓ should create product (screenshots) (27422ms)
/administrator/subscriptions/customer
before
✓ should reject invalid customer (391ms)
✓ should bind data to req (442ms)
view
✓ should present the customer table (screenshots) (18430ms)
/administrator/subscriptions/customers
before
✓ should bind data to req
view
✓ should return one page (screenshots)
✓ should change page size
✓ should change offset
/administrator/subscriptions/delete-coupon
exceptions
✓ should reject invalid couponid (156ms)
before
✓ should bind data to req (313ms)
view
✓ should present the form (817ms)
submit
✓ should delete coupon (screenshots) (32041ms)
/administrator/subscriptions/delete-plan
exceptions
✓ should reject invalid planid (148ms)
before
✓ should bind data to req (643ms)
view
✓ should present the form (1116ms)
submit
✓ should delete plan (screenshots) (32440ms)
/administrator/subscriptions/delete-product
exceptions
✓ should reject invalid productid (174ms)
before
✓ should bind data to req (302ms)
view
✓ should present the form (764ms)
submit
✓ should delete product (screenshots) (31046ms)
/administrator/subscriptions/delete-subscription
exceptions
✓ should reject missing subscription
✓ should reject invalid subscription
✓ should reject canceled subscription
before
✓ should bind data to req
view
✓ should present the form
✓ should show fields for free plan cancelations
✓ should show fields for free trial cancelations
✓ should show fields for cancelation with credit or refund
submit
✓ should cancel free subscription immediately (screenshots) (5246ms)
✓ should cancel free subscription at period end
✓ should cancel free trial immediately
✓ should cancel free trial at period end
✓ should cancel paid subscription and credit account
✓ should cancel paid subscription and show refund
/administrator/subscriptions/deny-refund
exceptions
✓ should reject invalid chargeid (163ms)
✓ should reject charge without refund request (8403ms)
✓ should reject denied refund (8191ms)
before
✓ should bind data to req (7345ms)
view
✓ should present the form (8925ms)
submit
✓ should deny refund (screenshots) (44848ms)
/administrator/subscriptions/edit-coupon
before
✓ should reject invalid couponid
✓ should reject unpublished coupon (506ms)
✓ should bind data to req (511ms)
view
✓ should present the form (916ms)
submit
✓ should reject missing name (1104ms)
✓ should update coupon (screenshots) (32562ms)
/administrator/subscriptions/edit-plan
before
✓ should reject invalid planid (157ms)
✓ should reject unpublished plan (844ms)
✓ should bind data to req (753ms)
view
✓ should present the form (1130ms)
submit
✓ should reject missing productid (1526ms)
✓ should reject invalid trial period (2111ms)
✓ should update plan (screenshots) (32322ms)
/administrator/subscriptions/edit-product
before
✓ should reject invalid productid (182ms)
✓ should reject unpublished product (517ms)
✓ should bind data to req (342ms)
view
✓ should present the form (765ms)
submit
✓ should reject missing name (1447ms)
✓ should enforce name length (2352ms)
✓ should reject missing statement_descriptor (1341ms)
✓ should reject invalid unit_label (1749ms)
✓ should update product (screenshots) (35426ms)
/administrator/subscriptions/flag-charge
exceptions
✓ should reject invalid chargeid (166ms)
✓ should reject flagged charge
before
✓ should bind data to req
view
✓ should present the form
submit
✓ should flag charge (screenshots)
/administrator/subscriptions/forgive-invoice
exceptions
✓ should reject invalid invoiceid (154ms)
✓ should reject paid invoice (7129ms)
✓ should reject uncollectible invoice (3491ms)
before
✓ should bind data to req (2427ms)
view
✓ should present the form (2948ms)
submit
✓ should forgive invoice (screenshots) (31593ms)
/administrator/subscriptions
before
✓ should bind data to req (8198ms)
view
✓ should have row for each plan (1469ms)
✓ should have row for each coupon (1089ms)
✓ should have row for each subscription (screenshots) (23507ms)
/administrator/subscriptions/invoice
before
✓ should reject invalid invoiceid (239ms)
✓ should bind data to req (9855ms)
view
✓ should present the invoice table (screenshots) (27381ms)
/administrator/subscriptions/invoices
before
✓ should bind data to req
view
✓ should return one page (screenshots)
✓ should change page size
✓ should change offset
/administrator/subscriptions/payment-intent
before
✓ should reject invalid paymentintentid
✓ should bind data to req (1782ms)
view
✓ should have row for payment intent (screenshots) (23507ms)
/administrator/subscriptions/payment-intents
before
✓ should bind data to req
view
✓ should return one page (screenshots)
✓ should change page size
✓ should change offset
/administrator/subscriptions/payment-method
before
✓ should reject invalid paymentmethodid
✓ should bind data to req (1663ms)
view
✓ should have row for payment method (screenshots) (23597ms)
/administrator/subscriptions/payment-methods
before
✓ should bind data to req
view
✓ should return one page (screenshots)
✓ should change page size
✓ should change offset
/administrator/subscriptions/payout
before
✓ should reject invalid payoutid (166ms)
/administrator/subscriptions/plan
before
✓ should reject invalid planid (167ms)
✓ should bind data to req (635ms)
view
✓ should present the plan table (screenshots) (21561ms)
/administrator/subscriptions/plans
before
✓ should bind data to req
view
✓ should return one page (screenshots)
✓ should change page size
✓ should change offset
/administrator/subscriptions/product
before
✓ should reject invalid productid (155ms)
✓ should bind data to req (297ms)
view
✓ should have row for product (screenshots) (20577ms)
/administrator/subscriptions/products
before
✓ should bind data to req
view
✓ should return one page (screenshots)
✓ should change page size
✓ should change offset
/administrator/subscriptions/publish-coupon
exceptions
✓ should reject invalid couponid (165ms)
✓ should reject published coupon (309ms)
before
✓ should bind data to req (297ms)
view
✓ should present the form (808ms)
submit
✓ should publish coupon (screenshots) (31625ms)
/administrator/subscriptions/publish-plan
exceptions
✓ should reject invalid planid (157ms)
✓ should reject published plan (632ms)
before
✓ should bind data to req (631ms)
view
✓ should present the form (1120ms)
submit
✓ should publish plan (screenshots) (32068ms)
/administrator/subscriptions/publish-product
exceptions
✓ should reject invalid productid (169ms)
✓ should reject published product (330ms)
before
✓ should bind data to req (359ms)
view
✓ should present the form (797ms)
submit
✓ should publish product (screenshots) (30878ms)
/administrator/subscriptions/refund-charge
exceptions
✓ should reject invalid chargeid (159ms)
✓ should reject refunded charge
before
✓ should bind data to req
view
✓ should present the form
submit
✓ should refund charge (screenshots)
/administrator/subscriptions/refund-requests
before
✓ should bind data to req
view
✓ should return one page (screenshots)
✓ should change page size
✓ should change offset
/administrator/subscriptions/refund
before
✓ should reject invalid refundid (166ms)
✓ should bind data to req (8617ms)
view
✓ should have row for refund (screenshots) (41602ms)
/administrator/subscriptions/refunds
before
✓ should bind data to req
view
✓ should return one page (screenshots)
✓ should change page size
✓ should change offset
/administrator/subscriptions/revoke-customer-coupon
exceptions
✓ should reject invalid customer (164ms)
✓ should reject customer without discount (952ms)
before
✓ should bind data to req (1314ms)
view
✓ should present the form (1979ms)
submit
✓ should remove coupon (screenshots) (31296ms)
/administrator/subscriptions/revoke-subscription-coupon
exceptions
✓ should reject invalid subscription (167ms)
✓ should reject subscription without discount (9310ms)
before
✓ should bind data to req (8470ms)
view
✓ should present the form (10657ms)
submit
✓ should remove coupon (screenshots) (38999ms)
/administrator/subscriptions/setup-intent
before
✓ should reject invalid setupintentid
✓ should bind data to req (4654ms)
view
✓ should have row for setup intent (screenshots) (24159ms)
/administrator/subscriptions/setup-intents
before
✓ should bind data to req
view
✓ should return one page (screenshots)
✓ should change page size
✓ should change offset
/administrator/subscriptions/subscription
before
✓ should reject invalid subscriptionid (158ms)
✓ should bind data to req (7742ms)
view
✓ should present the subscription table (screenshots) (28052ms)
/administrator/subscriptions/subscriptions
before
✓ should bind data to req
view
✓ should return one page (screenshots)
✓ should change page size
✓ should change offset
/administrator/subscriptions/unpublish-coupon
exceptions
✓ should reject invalid couponid (153ms)
✓ should reject never published coupon (319ms)
✓ should reject unpublished coupon (533ms)
before
✓ should bind data to req (364ms)
view
✓ should present the form (783ms)
submit
✓ should unpublish coupon (screenshots) (31674ms)
/administrator/subscriptions/unpublish-plan
exceptions
✓ should reject invalid planid (169ms)
✓ should never published plan (610ms)
✓ should reject unpublished plan (868ms)
before
✓ should bind data to req (647ms)
view
✓ should present the form (1109ms)
submit
✓ should unpublish plan (screenshots) (31933ms)
/administrator/subscriptions/unpublish-product
exceptions
✓ should reject invalid productid (154ms)
✓ should never published product (298ms)
✓ should reject unpublished product (448ms)
before
✓ should bind data to req (297ms)
view
✓ should present the form (775ms)
submit
✓ should unpublish product (screenshots) (30845ms)
/api/administrator/subscriptions/charge
exceptions
invalid-chargeid
✓ missing querystring chargeid
✓ invalid querystring chargeid (175ms)
returns
✓ object (7217ms)
/api/administrator/subscriptions/charges-count
returns
✓ integer (23669ms)
/api/administrator/subscriptions/charges
receives
✓ optional querystring offset (integer)
✓ optional querystring limit (integer)
✓ optional querystring all (boolean)
returns
✓ array
configuration
✓ environment PAGE_SIZE
/api/administrator/subscriptions/coupon
exceptions
invalid-couponid
✓ missing querystring couponid
✓ invalid querystring couponid (152ms)
returns
✓ object (315ms)
/api/administrator/subscriptions/coupons-count
returns
✓ integer (517ms)
/api/administrator/subscriptions/coupons
receives
✓ optional querystring offset (integer)
✓ optional querystring limit (integer)
✓ optional querystring all (boolean)
returns
✓ array
configuration
✓ environment PAGE_SIZE
/api/administrator/subscriptions/create-cancelation-refund
exceptions
invalid-subscriptionid
✓ missing querystring subscriptionid
✓ invalid querystring subscriptionid (163ms)
invalid-subscription
✓ ineligible querystring subscription is not active (8660ms)
returns
✓ object (9680ms)
/api/administrator/subscriptions/create-coupon
exceptions
invalid-couponid
✓ missing posted couponid
✓ invalid posted couponid is not alphanumeric_
invalid-amount_off
✓ missing posted amount_off
✓ invalid posted amount_off
invalid-currency
✓ missing posted currency
✓ invalid posted currency
invalid-percent_off
✓ invalid posted percent_off
invalid-duration
✓ invalid posted duration
invalid-duration_in_months
✓ missing posted duration_in_months
✓ invalid posted duration_in_months
invalid-redeem_by_meridiem
✓ invalid posted redeem_by_meridiem
invalid-redeem_by
✓ invalid posted redeem_by
receives
✓ required posted duration
✓ optionally-required posted amount_off (integer, or percent_off)
✓ optionally-required posted currency (string, if amount_off)
✓ optionally-required posted percent_off (integer, or amount_off)
✓ optionally-required posted expire date
✓ optionally-required posted duration_in_months
returns
✓ object (185ms)
/api/administrator/subscriptions/create-plan
exceptions
invalid-planid
✓ invalid posted planid is not alphanumeric_ (201ms)
invalid-planid-length
✓ posted planid is too short (193ms)
✓ posted planid is too long (178ms)
invalid-productid
✓ missing posted productid (191ms)
✓ invalid posted productid (330ms)
invalid-product
✓ ineligible posted product is not published (303ms)
invalid-amount
✓ missing posted amount (282ms)
✓ invalid posted amount (568ms)
invalid-currency
✓ missing posted currency (168ms)
✓ invalid posted currency (163ms)
invalid-interval
✓ missing posted interval (395ms)
✓ invalid posted interval (306ms)
invalid-interval-count
✓ missing posted interval_count (298ms)
✓ invalid posted interval_count (325ms)
invalid-trial_period
✓ invalid posted trial_period (339ms)
invalid-usage_type
✓ invalid posted usage_type (308ms)
receives
✓ optional posted published (boolean) (544ms)
✓ optional posted trial_period_days (integer) (490ms)
✓ optional posted usage_type (licensed|metered) (502ms)
returns
✓ object (504ms)
configuration
✓ environment MINIMUM_PLANID_LENGTH (175ms)
✓ environment MAXIMUM_PLANID_LENGTH (277ms)
/api/administrator/subscriptions/create-product
exceptions
invalid-name
✓ missing posted name
invalid-product-name-length
✓ posted name too short
✓ posted name too long
invalid-statement_descriptor
✓ missing posted statement_descriptor
receives
✓ optional posted published (boolean) (350ms)
returns
✓ object (360ms)
configuration
✓ environment MINIMUM_PRODUCT_NAME_LENGTH
✓ environment MAXIMUM_PRODUCT_NAME_LENGTH
/api/administrator/subscriptions/create-refund
exceptions
invalid-chargeid
✓ missing querystring chargeid
✓ invalid querystring chargeid (154ms)
invalid-amount
✓ missing posted amount
✓ invalid posted amount
✓ invalid posted amount is negative
✓ invalid posted amount exceeds charge
returns
✓ object
/api/administrator/subscriptions/customer
exceptions
invalid-customerid
✓ missing querystring customerid
✓ invalid querystring customerid (162ms)
returns
✓ object (3047ms)
/api/administrator/subscriptions/customers-count
returns
✓ integer (551ms)
/api/administrator/subscriptions/customers
receives
✓ optional querystring offset (integer)
✓ optional querystring limit (integer)
✓ optional querystring all (boolean)
returns
✓ array
configuration
✓ environment PAGE_SIZE
/api/administrator/subscriptions/delete-coupon
exceptions
invalid-couponid
✓ missing querystring couponid
✓ invalid querystring couponid (157ms)
returns
✓ boolean (490ms)
/api/administrator/subscriptions/delete-plan
exceptions
invalid-planid
✓ missing querystring planid
✓ invalid querystring planid (166ms)
returns
✓ boolean (853ms)
/api/administrator/subscriptions/delete-product
exceptions
invalid-productid
✓ missing querystring productid
✓ invalid querystring productid (156ms)
returns
✓ boolean (490ms)
/api/administrator/subscriptions/delete-subscription
exceptions
invalid-subscriptionid
✓ missing querystring subscriptionid
✓ invalid querystring subscriptionid (163ms)
invalid-subscription
✓ ineligible querystring subscription is not active (8659ms)
returns
✓ boolean (8000ms)
/api/administrator/subscriptions/invoice
exceptions
invalid-invoiceid
✓ missing querystring invoiceid
✓ invalid querystring invoiceid (158ms)
returns
✓ object (6929ms)
/api/administrator/subscriptions/invoices-count
returns
✓ integer (30361ms)
/api/administrator/subscriptions/invoices
receives
✓ optional querystring offset (integer)
✓ optional querystring limit (integer)
✓ optional querystring all (boolean)
returns
✓ array
configuration
✓ environment PAGE_SIZE
/api/administrator/subscriptions/payment-intent
exceptions
invalid-paymentintentid
✓ missing querystring paymentintentid
✓ invalid querystring paymentintentid
returns
✓ object (2184ms)
/api/administrator/subscriptions/payment-intents-count
returns