forked from twikey/snippets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
postman.json
2123 lines (2123 loc) · 133 KB
/
postman.json
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
{
"variables": [
{"key":"api_key","type":"string"},
{"key":"ct","type":"number"}
],
"info": {
"name": "Twikey API Test",
"_postman_id": "c4f6d2cf-0b20-6c95-5a18-aa13d11ce46e",
"description": "# Twikey API\nVersion: 1.0.0\n\n## General use\nTwikey has put in place a number of services enabling software partners, companies with own ERP or CRM systems, banks and other 3rd parties to exchange information . This page describes the different calls that are available to you. The calls allow integration in a number of ways.\n\nAll exchanges require a valid AuthorizationToken passed as a header named \"Authorization\". The AuthorizationToken can be retrieved via the login call and is valid for 24h. Exchanges can respond with both JSON & XML responses (based on the \"Accept\" header).\n\nSince there are numerous ways a company can allow its customers to pay, we provide a couple of high level use-cases to get you up and running in no time.\n\n## Sample use cases\n\n### The fitness scenario\n\nImagine you're going to the fitness where you exercise every once in a while. \nSince this doesn't come free you pay a monthly subscription fee. \nThis subscription fee is a recurring payment (we'll come back to that later). \nBut since all those exercises get you thirsty, you want to drink there too. \nBut of course, there are hotter and colder days. So how much you drink can vary.\n\nRegardless of what you consume, the fitness wants to get paid. \nBut you'd like to avoid getting out your wallet when you're all sweaty. \nSo your fitness made the great decision to use direct debits to allow you to pay. \nAt the end of the month they add the recurring amount to the one-off's (the drinks). \nThey send the payment request to the bank. Everyone's happy and relax.\n\nWhat did the fitness do to achieve this relaxed way of working:\n\nFirst of all, everything starts with a mandate. When a customer enrolls at the fitness he fills in the details for the internal bookkeeping of the fitness. The same information is sent to the prepare call. \nThis returns a URL (representing an unsigned mandate) that opens up after entering all details in the enrollment screen. \nSince the fitness has an internal subscription number they want to use to track payments and have \nmultiple subscriptions (eg. with and without personal trainer) they add both parameters in the prepare call. Making it visible in the mandate overview. \n\nOnce the customer filled in the account info and signed the mandate he's sent back to the fitness website with a \"thank you\" message. \nWhen a customer ask for a drink at the bar, the cash register calls the transaction endpoint with the details and amount. These are one-off transactions. Recurring transactions can either be handled the same way or if a subscription parameter was added in the prepare call, a recurring transaction is automatically added every month to get this subscription paid. At the end of each month, the file is created and sent to the bank manually via the collect call or automatically every night. \nYour bill is paid and the bank sends you the money. When the bank sends us back the account information, it is marked in your transaction overview that the transaction was paid. This information can be retrieved by the payment call. This call returns all new payment information since the last call. If a payment didn't succeed, you can configure what will happen next in the interface in the dunning section.\n\n### The parking app scenario\n\nBecause my customers don't like running in the rain looking for a parking meter while there's an app for that. \nHow can I use Twikey to get my parking fees paid? First of all, you need a mandate . \nThere are three possible options to have this mandate signed:\n\nUse an in-app browser with the link retrieved via the prepare call\nUse the sign call to invite the user to sign via an sms confirmation\nUse the sign call adding the manual signature as a png-image in the payload\nOnce the mandate is signed, in-app purchases can be sent from the backend of the app, collected the same way as mentioned in the fitness scenario.\n\n### The (off-line) webshop scenario\n\nI have a shop where people come in physically but I also have a webshop.\nI want people who signed a mandate (either online via the above flow or physically) to be able to purchase something \nfrom the online shop without requiring them to use their credit card and if possible give them the sameconvenience in the physical shop. \nThis way I can send them an invoice every month by only registering their purchases and collecting the payment via direct debit.\n\nIn the past, I had to send out all invoices and patiently waited for them to be paid. \nSince I'm not the most patient person on earth and even a bit chaotic at times, \nI'd rather collect the money directly from my customers. This way they can't forget to pay and I don't need to remind them to do so. \nHow convenient this is for both my customers and I.",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{
"name": "Login",
"description": "",
"item": [
{
"name": "Login",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"tests[\"Body has Authorization\"] = responseBody.has(\"Authorization\");",
"tests[\"Authorization Header is present\"] = postman.getResponseHeader(\"Authorization\");",
"var data = JSON.parse(responseBody);",
"postman.setEnvironmentVariable(\"Authorization\", data.Authorization);",
"tests[\"Authorization\"] = postman.getEnvironmentVariable(\"Authorization\");"
]
}
}
],
"request": {
"url": "https://api.twikey.com/creditor",
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/x-www-form-urlencoded",
"description": ""
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "apiToken",
"value": "{{api_key}}",
"type": "text",
"warning": ""
},
{
"key": "otp",
"value": "",
"type": "text",
"warning": ""
}
]
},
"description": "Login"
},
"response": []
}
]
},
{
"name": "Mandate",
"description": "",
"item": [
{
"name": "Fetch Mandates",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"var data = JSON.parse(responseBody);",
"tests[\"Body has GrpHdr\"] = data.GrpHdr;",
"tests[\"Body has Messages\"] = data.Messages;",
"",
"for(var i=0;i<data.Messages.length;i++){",
" if(data.Messages[i].CxlRsn){",
" postman.setEnvironmentVariable(\"Canceled\", data.Messages[i].OrgnlMndtId);",
" }",
" else {",
" postman.setEnvironmentVariable(\"Mandate\", data.Messages[i].Mndt.MndtId);",
" }",
"}",
"tests[\"Canceled\"] = postman.getEnvironmentVariable(\"Canceled\");",
"tests[\"Mandate\"] = postman.getEnvironmentVariable(\"Mandate\");"
]
}
}
],
"request": {
"url": "https://api.twikey.com/creditor/mandate",
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/x-www-form-urlencoded",
"description": ""
},
{
"key": "Authorization",
"value": "{{Authorization}}",
"description": ""
}
],
"body": {}
},
"response": []
},
{
"name": "Get Mandate Details",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"var data = JSON.parse(responseBody);",
"tests[\"Body has Mndt\"] = data.Mndt;",
"tests[\"Body has MndtId\"] = data.Mndt.MndtId;",
"tests[\"Body has SplmtryData\"] = data.Mndt.SplmtryData;"
]
}
}
],
"request": {
"url": {
"raw": "https://api.twikey.com/creditor/mandate/detail?mndtId=POSTM1",
"host": [
"https://api.twikey.com"
],
"path": [
"creditor",
"mandate",
"detail"
],
"query": [
{
"key": "mndtId",
"value": "POSTM1",
"equals": true,
"description": ""
}
],
"variable": []
},
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/x-www-form-urlencoded",
"description": ""
},
{
"key": "Authorization",
"value": "{{Authorization}}",
"description": ""
}
],
"body": {},
"description": "Get Mandate Details"
},
"response": []
},
{
"name": "Get Mandate Details signed",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"var data = JSON.parse(responseBody);",
"tests[\"Body has Mndt\"] = data.Mndt;",
"tests[\"Body has MndtId\"] = data.Mndt.MndtId;",
"tests[\"Body has SplmtryData\"] = data.Mndt.SplmtryData;"
]
}
}
],
"request": {
"url": {
"raw": "https://api.twikey.com/creditor/mandate/detail?mndtId=POSTM1&force=true",
"host": [
"https://api.twikey.com"
],
"path": [
"creditor",
"mandate",
"detail"
],
"query": [
{
"key": "mndtId",
"value": "POSTM1",
"equals": true,
"description": ""
},
{
"key": "force",
"value": "true",
"equals": true,
"description": ""
}
],
"variable": []
},
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/x-www-form-urlencoded",
"description": ""
},
{
"key": "Authorization",
"value": "{{Authorization}}",
"description": ""
}
],
"body": {},
"description": ""
},
"response": []
},
{
"name": "Get Mandate Details canceled",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"var data = JSON.parse(responseBody);",
"tests[\"Body has Mndt\"] = data.Mndt;",
"tests[\"Body has MndtId\"] = data.Mndt.MndtId;",
"tests[\"Body has SplmtryData\"] = data.Mndt.SplmtryData;"
]
}
}
],
"request": {
"url": {
"raw": "https://api.twikey.com/creditor/mandate/detail?mndtId=POSTM2&force=true",
"host": [
"https://api.twikey.com"
],
"path": [
"creditor",
"mandate",
"detail"
],
"query": [
{
"key": "mndtId",
"value": "POSTM2",
"equals": true,
"description": ""
},
{
"key": "force",
"value": "true",
"equals": true,
"description": ""
}
],
"variable": []
},
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/x-www-form-urlencoded",
"description": ""
},
{
"key": "Authorization",
"value": "{{Authorization}}",
"description": ""
}
],
"body": {},
"description": ""
},
"response": []
},
{
"name": "Get Mandate Details prepared",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"var data = JSON.parse(responseBody);",
"tests[\"Body has Mndt\"] = data.Mndt;",
"tests[\"Body has MndtId\"] = data.Mndt.MndtId;",
"tests[\"Body has SplmtryData\"] = data.Mndt.SplmtryData;"
]
}
}
],
"request": {
"url": {
"raw": "https://api.twikey.com/creditor/mandate/detail?mndtId=POSTM3&force=true",
"host": [
"https://api.twikey.com"
],
"path": [
"creditor",
"mandate",
"detail"
],
"query": [
{
"key": "mndtId",
"value": "POSTM3",
"equals": true,
"description": ""
},
{
"key": "force",
"value": "true",
"equals": true,
"description": ""
}
],
"variable": []
},
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/x-www-form-urlencoded",
"description": ""
},
{
"key": "Authorization",
"value": "{{Authorization}}",
"description": ""
}
],
"body": {},
"description": ""
},
"response": []
},
{
"name": "prepare mandate",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"tests[\"Body has mandateId\"] = responseBody.has(\"mndtId\");",
"tests[\"Body has URL\"] = responseBody.has(\"url\");",
"tests[\"Body has key\"] = responseBody.has(\"key\");",
"var data = JSON.parse(responseBody);",
"postman.setEnvironmentVariable(\"NewMandate\", data.mndtId);",
"tests[\"NewMandate\"] = postman.getEnvironmentVariable(\"NewMandate\");"
]
}
}
],
"request": {
"url": "https://api.twikey.com/creditor/prepare",
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/x-www-form-urlencoded",
"description": ""
},
{
"key": "Authorization",
"value": "{{Authorization}}",
"description": ""
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "ct",
"value": "{{ct}}",
"type": "text",
"description": ""
},
{
"key": "sendInvite",
"value": "false",
"type": "text",
"description": ""
},
{
"key": "l",
"value": "nl",
"type": "text",
"description": ""
},
{
"key": "email",
"value": "support@twikey.com",
"type": "text",
"description": ""
},
{
"key": "lastname",
"value": "Support",
"type": "text",
"description": ""
},
{
"key": "firstname",
"value": "Twikey",
"type": "text",
"description": ""
},
{
"key": "mobile",
"value": "+32479123123",
"type": "text",
"description": ""
},
{
"key": "address",
"value": "Derbystraat 43",
"type": "text",
"description": ""
},
{
"key": "zip",
"value": "9051",
"type": "text",
"description": ""
},
{
"key": "city",
"value": "Sint Denijs Westrem",
"type": "text",
"description": ""
},
{
"key": "country",
"value": "BE",
"type": "text",
"description": ""
}
]
},
"description": ""
},
"response": []
},
{
"name": "prepare mandate copy to cancel",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"tests[\"Body has mandateId\"] = responseBody.has(\"mndtId\");",
"tests[\"Body has URL\"] = responseBody.has(\"url\");",
"tests[\"Body has key\"] = responseBody.has(\"key\");",
"var data = JSON.parse(responseBody);",
"postman.setEnvironmentVariable(\"NewCancelMandate\", data.mndtId);",
"tests[\"NewCancelMandate\"] = postman.getEnvironmentVariable(\"NewCancelMandate\");"
]
}
}
],
"request": {
"url": "https://api.twikey.com/creditor/prepare",
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/x-www-form-urlencoded",
"description": ""
},
{
"key": "Authorization",
"value": "{{Authorization}}",
"description": ""
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "ct",
"value": "{{ct}}",
"type": "text",
"description": ""
},
{
"key": "sendInvite",
"value": "false",
"type": "text",
"description": ""
},
{
"key": "l",
"value": "nl",
"type": "text",
"description": ""
},
{
"key": "email",
"value": "cancel@twikey.com",
"type": "text",
"description": ""
},
{
"key": "lastname",
"value": "Support",
"type": "text",
"description": ""
},
{
"key": "firstname",
"value": "Twikey",
"type": "text",
"description": ""
},
{
"key": "mobile",
"value": "+32479123123",
"type": "text",
"description": ""
},
{
"key": "address",
"value": "Derbystraat 43",
"type": "text",
"description": ""
},
{
"key": "zip",
"value": "9051",
"type": "text",
"description": ""
},
{
"key": "city",
"value": "Sint Denijs Westrem",
"type": "text",
"description": ""
},
{
"key": "country",
"value": "BE",
"type": "text",
"description": ""
}
]
},
"description": ""
},
"response": []
},
{
"name": "Cancel prepared Mandate",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"tests[\"Status code is 200\"] = responseCode.code === 200;"
]
}
}
],
"request": {
"url": {
"raw": "https://api.twikey.com/creditor/mandate?mndtId={{NewCancelMandate}}&rsn=No+reason",
"host": [
"https://api.twikey.com"
],
"path": [
"creditor",
"mandate"
],
"query": [
{
"key": "mndtId",
"value": "{{NewCancelMandate}}",
"equals": true,
"description": ""
},
{
"key": "rsn",
"value": "No+reason",
"equals": true,
"description": ""
}
],
"variable": []
},
"method": "DELETE",
"header": [
{
"key": "Authorization",
"value": "{{Authorization}}",
"description": ""
},
{
"key": "Content-Type",
"value": "application/x-www-form-urlencoded",
"description": ""
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "mndtId",
"value": "POSTM0",
"type": "text",
"description": "",
"disabled": true
},
{
"key": "rsn",
"value": "No reason",
"type": "text",
"description": "",
"disabled": true
}
]
},
"description": ""
},
"response": []
},
{
"name": "import mandates",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"tests[\"Status code is 200\"] = responseCode.code === 200;"
]
}
}
],
"request": {
"url": "https://api.twikey.com/creditor/mandate",
"method": "POST",
"header": [
{
"key": "Authorization",
"value": "{{Authorization}}",
"description": ""
},
{
"key": "Content-Type",
"value": "application/x-www-form-urlencoded",
"description": ""
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"GrpHdr\": {\r\n \"CreDtTm\": \"2017-08-31T07:35:25Z\"\r\n },\r\n \"Messages\": [\r\n {\r\n \"Mndt\": {\r\n \"MndtId\": \"POSTM0\",\r\n \"LclInstrm\": \"CORE\",\r\n \"Ocrncs\": {\r\n \"SeqTp\": \"RCUR\",\r\n \"Frqcy\": \"ADHO\",\r\n \"Drtn\": {\r\n \"FrDt\": \"2017-08-30\"\r\n }\r\n },\r\n \"CdtrSchmeId\": \"EE07ZZZPOSTMANTEST\",\r\n \"Cdtr\": {\r\n \"Nm\": \"Postman \",\r\n \"PstlAdr\": {\r\n \"AdrLine\": \"Derbystraat 43\",\r\n \"PstCd\": \"9051\",\r\n \"TwnNm\": \"Sint Denijs Westrem\",\r\n \"Ctry\": \"EE\"\r\n },\r\n \"Id\": \"EEPOSTMANTEST\",\r\n \"CtryOfRes\": \"EE\",\r\n \"CtctDtls\": {\r\n \"EmailAdr\": \"jonathan@twikey.com\"\r\n }\r\n },\r\n \"Dbtr\": {\r\n \"Nm\": \"Dominique Adriansens\",\r\n \"PstlAdr\": {\r\n \"AdrLine\": \"Riet\",\r\n \"PstCd\": \"8020\",\r\n \"TwnNm\": \"Oostkamp\",\r\n \"Ctry\": \"BE\"\r\n },\r\n \"CtryOfRes\": \"BE\",\r\n \"CtctDtls\": {\r\n \"EmailAdr\": \"contact@twikey.com\",\r\n \"MobNb\": null\r\n }\r\n },\r\n \"DbtrAcct\": \"BE68068897250734\",\r\n \"DbtrAgt\": {\r\n \"FinInstnId\": {\r\n \"BICFI\": \"GKCCBEBB\",\r\n \"Nm\": \"BELFIUS BANK\"\r\n }\r\n },\r\n \"RfrdDoc\": \"Algemene voorwaarden\",\r\n \"SplmtryData\": [\r\n {\r\n \"Key\": \"MandateName\",\r\n \"Value\": \"SEPA Direct Debit\"\r\n },\r\n {\r\n \"Key\": \"TemplateId\",\r\n \"Value\": 1323\r\n },\r\n {\r\n \"Key\": \"FirstName\",\r\n \"Value\": \"Dominique\"\r\n },\r\n {\r\n \"Key\": \"LastName\",\r\n \"Value\": \"Adriansens\"\r\n },\r\n {\r\n \"Key\": \"TRACKER\",\r\n \"Value\": \"iJUo\"\r\n },\r\n {\r\n \"Key\": \"SignerMethod#0\",\r\n \"Value\": \"print\"\r\n },\r\n {\r\n \"Key\": \"Signer#0\",\r\n \"Value\": \"jonathan@twikey.com\"\r\n },\r\n {\r\n \"Key\": \"SignerPlace#0\",\r\n \"Value\": \"(Imported)\"\r\n },\r\n {\r\n \"Key\": \"SignerDate#0\",\r\n \"Value\": \"2017-08-30T16:37:05Z\"\r\n }\r\n ]\r\n },\r\n \"EvtTime\": \"2017-08-30T16:37:05Z\"\r\n }\r\n ]\r\n}"
},
"description": "importing mandates"
},
"response": []
},
{
"name": "Cancel Signed Mandate",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"tests[\"Status code is 200\"] = responseCode.code === 200;",
"tests[\"Response is empty\"] = responseBody.length === 0;"
]
}
}
],
"request": {
"url": {
"raw": "https://api.twikey.com/creditor/mandate?mndtId=POSTM0&rsn=No+reason",
"host": [
"https://api.twikey.com"
],
"path": [
"creditor",
"mandate"
],
"query": [
{
"key": "mndtId",
"value": "POSTM0",
"equals": true,
"description": ""
},
{
"key": "rsn",
"value": "No+reason",
"equals": true,
"description": ""
}
],
"variable": []
},
"method": "DELETE",
"header": [
{
"key": "Authorization",
"value": "{{Authorization}}",
"description": ""
},
{
"key": "Content-Type",
"value": "application/x-www-form-urlencoded",
"description": ""
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "mndtId",
"value": "POSTM0",
"type": "text",
"description": "",
"disabled": true
},
{
"key": "rsn",
"value": "No reason",
"type": "text",
"description": "",
"disabled": true
}
]
},
"description": ""
},
"response": []
},
{
"name": "Update Mandate Details",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"tests[\"Status code is 200\"] = responseCode.code === 200;",
"tests[\"Response is empty\"] = responseBody.length === 0;"
]
}
}
],
"request": {
"url": "https://api.twikey.com/creditor/mandate/update",
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/x-www-form-urlencoded",
"description": ""
},
{
"key": "Authorization",
"value": "{{Authorization}}",
"description": ""
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "mndtId",
"value": "{{Mandate}}",
"description": "",
"type": "text"
},
{
"key": "mobile",
"value": "+32479123123",
"description": "",
"type": "text"
}
]
},
"description": "Get Mandate Details"
},
"response": []
},
{
"name": "Cancel canceled Mandate",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"tests[\"Status code is 200\"] = responseCode.code === 200;",
"var jsonData = JSON.parse(responseBody);",
"tests[\"Response invalid state code\"] = jsonData.code === \"err_mandate_invalid_state\";",
"tests[\"Response invalid state message\"] = jsonData.message === \"One of the mandates had an invalid state\";"
]
}
}
],
"request": {
"url": {
"raw": "https://api.twikey.com/creditor/mandate?mndtId=POSTM2&rsn=No+reason",
"host": [
"https://api.twikey.com"
],
"path": [
"creditor",
"mandate"
],
"query": [
{
"key": "mndtId",
"value": "POSTM2",
"equals": true,
"description": ""
},
{
"key": "rsn",
"value": "No+reason",
"equals": true,
"description": ""
}
],
"variable": []
},
"method": "DELETE",
"header": [
{
"key": "Authorization",
"value": "{{Authorization}}",
"description": ""
},
{
"key": "Content-Type",
"value": "application/x-www-form-urlencoded",
"description": ""
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "mndtId",
"value": "POSTM0",
"type": "text",
"description": "",
"disabled": true
},
{
"key": "rsn",
"value": "No reason",
"type": "text",
"description": "",
"disabled": true
}
]
},
"description": ""
},
"response": []
},
{
"name": "Sign SMS",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"var jsonData = JSON.parse(responseBody);",
"tests[\"Has ok\"] = jsonData.Msg === \"ok\";",
"tests[\"Has sms\"] = responseBody.has(\"MndtId\");"
]
}
}
],
"request": {
"url": "https://api.twikey.com/creditor/sign",
"method": "POST",
"header": [
{
"key": "Authorization",
"value": "{{Authorization}}",
"description": ""
},
{
"key": "Content-Type",
"value": "application/x-www-form-urlencoded",
"description": ""
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "method",
"value": "sms",
"description": "",
"type": "text"
},
{
"key": "place",
"value": "Gent",
"description": "",
"type": "text"
},
{
"key": "ct",
"value": "{{ct}}",
"description": "",
"type": "text"
},
{
"key": "iban",
"value": "BE68068897250734",
"description": "",
"type": "text"
},
{
"key": "bic",
"value": "GKCCBEBB",
"description": "",
"type": "text"
},
{
"key": "email",
"value": "sms@twikey.com",
"description": "",
"type": "text"
},
{
"key": "lastname",
"value": "Twikey",
"description": "",
"type": "text"
},
{
"key": "firstname",
"value": "SMS",
"description": "",
"type": "text"
},
{
"key": "mobile",
"value": "+32479123123",
"description": "",
"type": "text"
},
{
"key": "address",
"value": "Derbystraat 43",
"description": "",
"type": "text"
},
{
"key": "city",
"value": "Gent",
"description": "",
"type": "text"
},
{
"key": "zip",
"value": "9051",
"description": "",
"type": "text"
},
{
"key": "country",
"value": "BE",
"description": "",
"type": "text"
}
]
},
"description": ""
},
"response": []