Skip to content

Payment REST API - Schema

  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
{
  "$schema": "http://json-schema.org/draft-06/schema#",
  "type": "object",
  "required": [
    "amount",
    "transactionChannel"
  ],
  "properties": {
    "orderDescription": {
      "type": "string",
      "description": "The OrderDescription can be used in some Soft Descriptor scenarios.",
      "example": "Some descriptive text.",
      "maxLength": 100
    },
    "orderDetailedDescription": {
      "type": "string",
      "description": "Can sometimes be used in Soft Descriptor scenarios.",
      "example": "Some descriptive text with details.",
      "maxLength": 100
    },
    "paymentMethodId": {
      "type": "integer",
      "description": "The payment method Id. Examples of acceptable values are 1 = 'Nordea', 10 = 'Bank Austria'.",
      "default": 1000,
      "examples": [
        1,
        10
      ]
    },
    "amount": {
      "$ref": "order-definitions.json#/definitions/money"
    },
    "payInfo": {
      "type": "object",
      "description": "Additional data related to payment processing.",
      "properties": {
        "tax": {
          "$ref": "order-definitions.json#/definitions/tax"
        },
        "paymentPlanCode": {
          "type": "integer",
          "description": "Reference to code for installments.",
          "example": 58
        }
      }
    },
    "lineItems": {
      "type": "array",
      "description": "Line items in an order.",
      "items": {
        "$ref": "order-definitions.json#/definitions/lineItem"
      }
    },
    "autoCapture": {
      "type": "boolean",
      "description": "Defaults to false. If set to true the system will automatically capture the payment of the order for card payments. For redirect payments this is simply an indicator to the partner bank whether to withdraw funds automatically or not. Not all partner banks support this.",
      "example": true
    },
    "transactionChannel": {
      "$ref": "order-definitions.json#/definitions/transactionChannel"
    },
    "cardInfo": {
      "$ref": "order-definitions.json#/definitions/cardInfo"
    },
    "cardVerificationInfo": {
      "$ref": "order-definitions.json#/definitions/cardVerificationInfo"
    },
    "billingInfo": {
      "$ref": "order-definitions.json#/definitions/billingInfo"
    },
    "shippingInfo": {
      "$ref": "order-definitions.json#/definitions/shippingInfo"
    },
    "bankBillingInfo": {
      "$ref": "order-definitions.json#/definitions/bankBillingInfo"
    },
    "fraudControl": {
      "$ref": "order-definitions.json#/definitions/fraudControl"
    },
    "requestId": {
      "type": "string",
      "example": "123441kljj",
      "description": "Request identifier, set by the merchant. Evaluated against [A-Za-z0-9_-]{0,50}",
      "maxLength": 50,
      "pattern": "[A-Za-z0-9_-]{0,50}"
    },
    "createToken": {
      "type": "boolean",
      "default": false,
      "example": true,
      "description": "Should a token be created for the passed PAN"
    },
    "token": {
      "type": "string",
      "example": "9000123412341234",
      "description": "Payment instrument Token. Referring to a previously stored payment instrument such as a card number.",
      "maxLength": 64
    },
    "browserInfo": {
      "$ref": "order-definitions.json#/definitions/browserInfo"
    },
    "merchantInfo": {
      "$ref": "order-definitions.json#/definitions/merchantInfo"
    },
    "subMerchantInfo": {
      "$ref": "order-definitions.json#/definitions/subMerchant"
    },
    "cardPresentAuthInfo": {
      "$ref": "order-definitions.json#/definitions/cardPresent"
    },
    "recurringInfo": {
      "$ref": "order-definitions.json#/definitions/recurring"
    },
    "fraudScreeningData": {
      "$ref": "order-definitions.json#/definitions/fraudScreeningData"
    },
    "redirectInfo": {
      "$ref": "order-definitions.json#/definitions/redirectInfo"
    }
  }
}
1
2
3
4
5
6
7
8
9
{
  "$schema" : "http://json-schema.org/draft-06/schema#",
  "type" : "object",
  "properties" : {
    "amount": {
      "$ref": "order-definitions.json#/definitions/money"
    }
  }
}
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
{
  "$schema" : "http://json-schema.org/draft-06/schema#",
  "type" : "object",
  "properties" : {
    "requestId" : {
      "type": "string",
      "description": "Unique identifier for this request, used for idempotency",
      "maxLength": 50
    }
  }
}
 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
{
  "$schema": "http://json-schema.org/draft-06/schema#",
  "type": "object",
  "properties": {
    "amount": {
      "description": "Only set when over refunding. 'unlimitedRefundAmount' must be set to true when doing so.",
      "$ref": "order-definitions.json#/definitions/money"
    },
    "unlimitedRefundAmount": {
      "type": "boolean",
      "description": "Set to true only if unlimited refund is intended."
    },
    "transactionChannel": {
      "$ref": "order-definitions.json#/definitions/transactionChannel"
    },
    "bankBillingInfo": {
      "$ref": "order-definitions.json#/definitions/bankBillingInfo"
    },
    "cardInfo": {
      "$ref": "order-definitions.json#/definitions/cardInfo"
    },
    "token": {
      "type": "string",
      "example": "9000123412341234",
      "description": "Payment instrument Token. Referring to a previously stored payment instrument such as a card number.",
      "maxLength": 64
    }
  }
}
 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
{
  "$schema": "http://json-schema.org/draft-06/schema#",
  "type": "object",
  "properties": {
    "mid": {
      "type": "number",
      "description": "Merchant Id. This will be replaced by required 'mid' in the path",
      "example": 1234567890
    },
    "orderId": {
      "type": "string",
      "description": "Order Id. Identifier of the order.",
      "example": "order_123"
    },
    "orderDetailDescription": {
      "type": "string"
    },
    "orderDescription": {
      "type": "string"
    },
    "orderAmount": {
      "type": "number",
      "description": "The expected total amount of the order.",
      "example": 49.95
    },
    "fulfilmentAmount": {
      "type": "number",
      "description": "Total amount reserved. When this value is set, it is a signal to the merchant that goods may be shipped. E.g. For card transactions, this is the amount that has been authorized. For EFTs, the actual funded amount is used.",
      "example": 49.95
    },
    "capturedAmount": {
      "type": "number",
      "description": "Total amount captured by the merchant.",
      "example": 49.95
    },
    "refundedAmount": {
      "type": "number",
      "description": "Total amount refunded.",
      "example": 49.95
    },
    "currency": {
      "type": "string",
      "example": "EUR",
      "description": "Alphabetic ISO 4217 three letter currency code. Evaluated against [A-Z]{3}",
      "pattern": "[A-Z]{3}"
    },
    "capturable": {
      "type": "boolean",
      "description": "Set to true if the merchant can Capture more funds on the transactions on the order.",
      "example": false
    },
    "cancelable": {
      "type": "boolean",
      "description" : "Indicates whether the order as whole or partially is cancelable",
      "example": false
    },
    "refundable": {
      "type": "boolean",
      "description" : "Indicates whether the order as whole or partially is refundable",
      "example": false
    },
    "transactionReferences": {
      "type": "array",
      "items": {
        "$ref": "order-definitions.json#/definitions/transactionReference"
      }
    }
  }
}
  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
{
  "$schema": "http://json-schema.org/draft-06/schema#",
  "type": "object",
  "definitions": {
    "money": {
      "type": "object",
      "description": "Currency may be represented by either currency or numericCurrency, not both.",
      "required": [
        "amount"
      ],
      "properties": {
        "currency": {
          "type": "string",
          "example": "EUR",
          "description": "Alphabetic ISO 4217 three letter currency code. Evaluated against [A-Z]{3}",
          "pattern": "[A-Z]{3}"
        },
        "numericCurrency": {
          "type": "integer",
          "example": 978,
          "description": "Numeric ISO 4217 currency code. Evaluated against [0-9]{2,3}",
          "pattern": "[0-9]{2,3}"
        },
        "amount": {
          "type": "number",
          "example": 1.50,
          "description": "A decimal amount. Only the currency's significant number of decimals will be used."
        }
      }
    },
    "tax": {
      "$id": "#/definitions/tax",
      "description": "Tax, if set, either of them may be used, not both.",
      "type": "object",
      "properties": {
        "taxAmount": {
          "type": "number",
          "example": 47.11,
          "description": "The amount of tax in processing currency units"
        },
        "taxRate": {
          "type": "number",
          "example": 0.25,
          "description": "The tax expressed as a fraction of the total processing amount"
        }
      }
    },
    "lineItem": {
      "$id": "#/definitions/lineItem",
      "type": "object",
      "required": [
        "productId",
        "quantity",
        "price"
      ],
      "properties": {
        "productId": {
          "type": "string",
          "description": "Merchant ProductId. The identifier of the product that is being sold used for reporting and export control.",
          "example": "Fallout 4"
        },
        "description": {
          "type": "string",
          "example": "PS4G-F4"
        },
        "quantity": {
          "type": "integer",
          "description": "The quantity of same products that are sold and are grouped on this line. Minium is always 1 unit.",
          "example": 2
        },
        "price": {
          "description": "The final price of the product including tax and after discount. This is the amount that applies to 1 unit of product. If none exists then zero. For an initiatePayment containing LineItems to succeed, the sum of (ItemAmount * Quantity) for all LineItems must equal the Amount in the money element in the Payment request.",
          "$ref": "order-definitions.json#/definitions/money"
        },
        "tax": {
          "description": "Tax part of original amount, after discount.",
          "$ref": "order-definitions.json#/definitions/tax"
        },
        "discount": {
          "type": "number",
          "description": "Discount in percentage of the original amount.",
          "example": 10.00
        }
      }
    },
    "cardInfo": {
      "$id": "#/definitions/cardInfo",
      "type": "object",
      "description": "Card related information. Although all elements are optional in this data type, some elements are mandatory for some transaction types and for some card types.",
      "properties": {
        "cardNumber": {
          "type": "string",
          "example": "5120456127894561",
          "maxLength": 50,
          "description": "The Primary Account Number (PAN) aka card number. Evaluated against [0-9]{9,50}",
          "pattern": "[0-9]{9,50}"
        },
        "expirationDate": {
          "type": "string",
          "example": "05-2020",
          "maxLength": 7,
          "description": "The expiration date of the card. Format MM-YYYY. Evaluated against [0-9]{2}-[0-9]{4}",
          "pattern": "[0-9]{2}-[0-9]{4}"
        },
        "issue": {
          "type": "integer",
          "example": 1,
          "description": "Issue number is required when it exists on the card. Currently only applicable on some UK domestic cards."
        },
        "startDate": {
          "type": "string",
          "example": "05-2018",
          "description": "Card validity starting date, i.e. the card is invalid prior to this date. Currently only applicable on some UK domestic cards.",
          "pattern": "[0-9]{2}-[0-9]{4}"
        },
        "originatingAccountType": {
          "type": "string",
          "example": "CHEQUE_ACCOUNT",
          "default": "UNSPECIFIED",
          "description": "Indicates the type of account to charge for the transaction. UNSPECIFIED is the default. CHEQUE_ACCOUNT uses the card as a debit card. CREDIT_FACILITY uses the card as a credit card. Note: Some banks default all cards to debit cards if nothing else is specified. This can lead to a declined transaction if you do not let the cardholder specify the originating account type.",
          "enum": [
            "UNSPECIFIED",
            "SAVINGS_ACCOUNT",
            "CHEQUE_ACCOUNT",
            "CREDIT_FACILITY",
            "UNIVERSAL_ACCOUNT",
            "INVESTMENT_ACCOUNT",
            "ELECTRONIC_PURSE_CARD_ACCOUNT"
          ]
        },
        "authorizationType": {
          "type": "string",
          "example": "PRE_AUTHORIZATION",
          "default": "UNDEFINED",
          "description": "Authorization type: Mastercard and Visa now require merchants to define authorization attempts as either a pre-authorization or a final-authorization. Final-authorizaton is not supported by Visa, but only applicable for Mastercard.",
          "enum": [
            "PRE_AUTHORIZATION",
            "FINAL_AUTHORIZATION",
            "UNDEFINED"
          ]
        }
      }
    },
    "cardVerificationInfo": {
      "$id": "#/definitions/cardVerificationInfo",
      "type": "object",
      "properties": {
        "xid": {
          "type": "string",
          "example": "asc234",
          "description": "The unique 3D secure transaction identifier obtained using 3D secure authentication prior to sending the transaction. Must be submitted if you have one."
        },
        "cavv": {
          "type": "string",
          "example": "ADDS123",
          "description": "Cardholder Authentication Verification Value. Known as CAVV for Verified by Visa and AAV for MasterCard SecureCode. Note: If you have a successful 3D secure authentication or a successful merchant attempt, you must provide the b64 encoded ACS Verification ID here to claim a 3D secure liability shift."
        },
        "eci": {
          "type": "integer",
          "example": "123",
          "description": "Electronic Commerce Indicator. The ECI specifies whether the cardholder completed 3D secure authentication correctly or not. Check with the appropriate card association for the correct values. Note: if you do not set the ECI in your authorize or debit transaction, you cannot claim a 3D secure liability shift"
        },
        "cvCode": {
          "type": "string",
          "example": "123",
          "description": "The cvv/cvc code present on the card Evaluated against [0-9]{2,4}",
          "pattern": "[0-9]{2,4}"
        },
        "cvCodeState": {
          "type": "string",
          "example": "USED",
          "default": "NOT_IMPLEMENTED",
          "description": "Indicates if the card has cvv/cvc code, it to use it or if its not possible to provide it",
          "enum": [
            "USED",
            "NO_CVCODE_ON_CARD",
            "ILLEGIBLE",
            "NOT_IMPLEMENTED"
          ]
        },
        "authenticationResult": {
          "type": "string",
          "example": "O",
          "description": "Payer Authentication Result Response.",
          "maxLength": 1
        },
        "acsVerificationFlavor": {
          "type": "string",
          "example": "2",
          "description": "Algorithm indicator used to generate a CAVV communicated in the MPI during 3-D Secure payments.",
          "maxLength": 1
        },
        "useAvs": {
          "type": "boolean",
          "example": false,
          "description": "Address Verification System. If set to true, BillingInfo Contact details will be used. For AVS, only the first address line is used, having a street number and street name, an optional PoBox, an optional AptNo, zipCode and City."
        }
      }
    },
    "recurring": {
      "$id": "#/definitions/recurring",
      "type": "object",
      "properties": {
        "recurringIndicator": {
          "type": "string",
          "example": "FIRST_RECURRING",
          "description": "Indicates if this is a recurring transaction and if so, also which in the order of recurring transaction it is",
          "enum": [
            "NOT_RECURRING",
            "FIRST_RECURRING",
            "LAST_RECURRING",
            "SUBSEQUENT_RECURRING"
          ]
        },
        "subscriptionId": {
          "type": "string",
          "example": "123",
          "description": "Identifier of underlying subscription.",
          "maxLength": 20
        }
      }
    },
    "redirectInfo": {
      "$id": "#/definitions/redirectInfo",
      "type": "object",
      "properties": {
        "postUrl": {
          "type": "string",
          "example": "https://somehost.com",
          "description": "Return URL for HTTP POST",
          "maxLength": 1024
        },
        "getUrl": {
          "type": "string",
          "example": "https://somehost.com",
          "description": "Return URL for HTTP GET",
          "maxLength": 1024
        }
      }
    },
    "contactInfo": {
      "$id": "#/definitions/contactInfo",
      "type": "object",
      "documentation": "Contact information, such as the invoicing address to a card holder.",
      "properties": {
        "firstName": {
          "type": "string",
          "example": "Anna",
          "description": "First name of a person",
          "maxLength": 25
        },
        "lastName": {
          "type": "string",
          "example": "Latvi",
          "description": "Last name of a person",
          "maxLength": 25
        },
        "fullName": {
          "type": "string",
          "example": "Anna Latvi",
          "description": "Full name of a person. If first and last name are populated, leave this empty.",
          "maxLength": 51
        },
        "addressLine1": {
          "type": "string",
          "example": "Bana street 1",
          "description": "Line 1 of street address. Cannot be set if streetName is set.",
          "maxLength": 100
        },
        "addressLine2": {
          "type": "string",
          "example": "Line 2 of street address.",
          "description": "",
          "maxLength": 100
        },
        "addressLine3": {
          "type": "string",
          "example": "Bana street 3",
          "description": "Line 3 of street address.",
          "maxLength": 100
        },
        "city": {
          "type": "string",
          "example": "Stockholm",
          "description": "City of the address.",
          "maxLength": 80
        },
        "stateProvince": {
          "type": "string",
          "example": "STO",
          "description": "ISO 3166-2 state or province code (up to 3 characters).",
          "maxLength": 3
        },
        "zipCode": {
          "type": "string",
          "example": "113 50",
          "description": "The zip or postal code",
          "maxLength": 30
        },
        "countryCode": {
          "type": "string",
          "example": "SE",
          "description": "ISO-3166 A2 country code.",
          "pattern": "[A-Za-z]{2}"
        },
        "phone": {
          "type": "string",
          "example": "004678912456",
          "description": "Phone number",
          "maxLength": 25
        },
        "mobilePhone": {
          "type": "string",
          "example": "07345678912",
          "description": "Mobile phone number. Should be a Mobile Station International Subscriber Directory Number (MSISDN) in E.164 format.",
          "maxLength": 25
        },
        "emailAddress": {
          "type": "string",
          "example": "myaddress@domain.com",
          "description": "Email address",
          "maxLength": 120
        },
        "companyName": {
          "type": "string",
          "example": "Digital River World Payments",
          "description": "Company name",
          "maxLength": 100
        },
        "careOf": {
          "type": "string",
          "example": "Sand street 1",
          "description": "In care of, could be a person or a company name.",
          "maxLength": 100
        },
        "streetName": {
          "type": "string",
          "example": "Blue street",
          "description": "Street name.",
          "maxLength": 100
        },
        "houseNumber": {
          "type": "string",
          "example": "10",
          "description": "House number.",
          "maxLength": 10
        },
        "houseExtension": {
          "type": "string",
          "example": "1202",
          "description": "House extension.",
          "maxLength": 10
        },
        "automaticNumberIdentification": {
          "type": "string",
          "example": "123456",
          "description": "Automatic Telephone Number Identification.",
          "maxLength": 30
        },
        "telephoneCallType": {
          "type": "string",
          "example": "BankStreet 1",
          "description": "Telephone company-provided information identifier type.",
          "enum": [
            "CALL_TYPE_POTS",
            "CALL_TYPE_CELLULAR",
            "CALL_TYPE_PAYPHONE",
            "CALL_TYPE_TOLLFREE"
          ]
        },
        "birthDate": {
          "type": "string",
          "description": "Card holder's birth date. Evaluated as ISO-date",
          "example": "1960-05-20"
        },
        "language": {
          "type": "string",
          "example": "EN",
          "maxLength": 2
        },
        "gender": {
          "type": "string",
          "example": "FEMALE",
          "description": "Gender of consumer: MALE or FEMALE.",
          "enum": [
            "FEMALE",
            "MALE"
          ]
        }
      }
    },
    "billingInfo": {
      "$id": "#/definitions/billingInfo",
      "type": "object",
      "documentation": "Billing information, such as the invoicing address to a card holder.",
      "properties": {
        "contactInfo": {
          "description": "Contact information for billing",
          "$ref": "order-definitions.json#/definitions/contactInfo"
        },
        "ssn": {
          "type": "string",
          "example": "19760145-4578",
          "description": "Social Security Number of card holder, or personal number where applicable.",
          "maxLength": 30
        },
        "driversLicenseEnding": {
          "type": "string",
          "example": "201808",
          "description": "Last numbers on driver's license.",
          "maxLength": 8
        },
        "driversLicenseState": {
          "type": "string",
          "example": "NY",
          "description": "State that issued driver's license.",
          "maxLength": 2
        },
        "buyerVATNumber": {
          "type": "string",
          "example": "10",
          "description": "This is the number issued to the customer by a taxing authority for tax purposes when VAT is included on the sale. This is reported to the regulatory agency and used to calculate the input and output vat of particpants in the sale. Also known as the Tax Registration Number. Not used in all integrations.",
          "maxLength": 25
        },
        "buyerType": {
          "type": "string",
          "description": "Tells if the customer VAT number is for a business or for an individual purchase. Not used in all integrations.",
          "example": "INDIVIDUAL",
          "enum": ["INDIVIDUAL", "BUSINESS"]

        },
        "companyTaxId": {
          "type": "string",
          "example": "456789",
          "description": "Country specific tax ID. E.g. for Brazil, a number, or 'ISENTO'.",
          "maxLength": 50
        },
        "companyResponsibleFullName": {
          "type": "string",
          "example": "Jerry Smith",
          "description": "Company representative's full name.",
          "maxLength": 50
        },
        "companyResponsibleBirthDate": {
          "type": "string",
          "description": "Company representative's birth date. Evaluated as ISO-date",
          "example": "1975-04-16"
        },
        "companyResponsibleVATNumber": {
          "type": "string",
          "example": "45678",
          "description": "Company representative's Vat Number.This is the number issued to the company responsible by a taxing authority for tax purposes when VAT is included on the sale. This is reported to the regulatory agency and used to calculate the input and output vat of particpants in the sale. Also known as the Tax Registration Number. Not used in all integrations.",
          "maxLength": 25
        },
        "newCustomer": {
          "type": "boolean",
          "description": "New Customer, true or false",
          "example": true
        }
      }
    },
    "shippingInfo": {
      "$id": "#/definitions/shippingInfo",
      "type": "object",
      "documentation": "Shipping information, such as the invoicing address to a card holder.",
      "properties": {
        "contactInfo": {
          "description": "Contact information for shipping",
          "$ref": "order-definitions.json#/definitions/contactInfo"
        },
        "shippingMethod": {
          "type": "string",
          "example": "SHIP_SAME_DAY",
          "enum": [
            "SHIP_SAME_DAY",
            "SHIP_NEXT_DAY",
            "SHIP_PRIORITY",
            "SHIP_GROUND",
            "SHIP_ELECTRONIC",
            "SHIP_TO_STORE"
          ]
        }
      }
    },
    "bankBillingInfo": {
      "$id": "#/definitions/bankBillingInfo",
      "type": "object",
      "properties": {
        "iban": {
          "type": "string",
          "example": "SE123456",
          "description": "Identifier for a specific bank account across all markets.",
          "maxLength": 50
        },
        "swiftBIC": {
          "type": "string",
          "example": "ESSESESS",
          "description": "Used in conjunction with IBAN supplying extra routing info.",
          "maxLength": 25
        }
      }
    },
    "merchantInfo": {
      "$id": "#/definitions/merchantInfo",
      "type": "object",
      "properties": {
        "posId": {
          "type": "string",
          "example": "0",
          "description": "Point of sale ID. Identifies the point of sales from which the transaction was sent. Case sensitive",
          "maxLength": 20
        },
        "posDescription": {
          "type": "string",
          "example": "Some description",
          "description": "Point of sale description",
          "maxLength": 50
        },
        "mcc": {
          "type": "string",
          "example": "44",
          "description": "Merchant category code",
          "maxLength": 5
        },
        "subMerchantId": {
          "type": "string",
          "example": "SubMerchantId",
          "maxLength": 50
        }
      }
    },
    "subMerchant": {
      "$id": "#/definitions/subMerchant",
      "type": "object",
      "properties": {
        "sellerId": {
          "type": "string",
          "example": "1241",
          "description": "For aggregators, sellerId is used to pass sub merchant ID to the acquirer.",
          "maxLength": 30
        },
        "dbaName": {
          "type": "string",
          "example": "Some name",
          "description": "Doing Business As name. Note that different acquirers has varying restrictions on the length of DBA name. AMEX has 38.",
          "maxLength": 50
        },
        "addressLine1": {
          "type": "string",
          "example": "Some Address",
          "description": "Street address line 1",
          "maxLength": 50
        },
        "addressLine2": {
          "type": "string",
          "example": "Some Address line 2",
          "description": "Street address line 2",
          "maxLength": 50
        },
        "city": {
          "type": "string",
          "example": "Stockholm",
          "description": "City name",
          "maxLength": 50
        },
        "zipCode": {
          "type": "string",
          "example": "14140",
          "description": "Zip code",
          "maxLength": 15
        },
        "stateProvince": {
          "type": "string",
          "example": "CA",
          "maxLength": 3
        },
        "countryCode": {
          "type": "string",
          "example": "SE",
          "description": "If present validated against [A-Z]{2}",
          "maxLength": 2
        },
        "phone": {
          "type": "string",
          "example": "+46708667788",
          "maxLength": 25
        },
        "emailAddress": {
          "type": "string",
          "example": "someone@somewhere.com",
          "maxLength": 120
        }
      }
    },
    "browserInfo": {
      "$id": "#/definitions/browserInfo",
      "type": "object",
      "description": "Information relating to browser and traffic routing.",
      "properties": {
        "ipAddress": {
          "type": "string",
          "example": "172.77.32.11",
          "description": "Originating IP address of the consumer."
        },
        "httpAccept": {
          "type": "string",
          "example": "application/json"
        },
        "httpAcceptLanguage": {
          "type": "string",
          "example": "en"
        },
        "httpUserAgent": {
          "type": "string",
          "example": "Mozilla"
        },
        "deviceOs": {
          "type": "string",
          "example": "iOS"
        },
        "siteHostName": {
          "type": "string",
          "example": "somehost.com"
        },
        "aciDeviceFingerprint": {
          "type": "string",
          "example": "32e12jlkpo3123",
          "maxLength": 6000
        },
        "ebanxDeviceFingerprint": {
          "type": "string",
          "example": "123dfs12f",
          "maxLength": 16
        }
      }
    },
    "fraudControl": {
      "$id": "#/definitions/fraudControl",
      "type": "object",
      "properties": {
        "fraudScreening": {
          "type": "string",
          "example": "Screen",
          "description": "Control fraud screening behaviour",
          "enum": [
            "Screen",
            "Bypass",
            "Passive"
          ]
        },
        "fraudScreeningPreAuth": {
          "type": "boolean",
          "default": true,
          "example": true,
          "description": "Apply fraud screening prior to Authorization"
        },
        "fraudScreeningOn3DSLiabilityShift": {
          "type": "boolean",
          "default": false,
          "example": true,
          "description": "Bypass Fraud screening on successful 3DS liability shift, true or false"
        },
        "fraudScreeningActionOnHold": {
          "type": "string",
          "example": "PASSED",
          "description": "Action upon Hold fraud screen response",
          "enum": [
            "BLOCKED",
            "PASSED"
          ]
        }
      }
    },
    "cardPresent": {
      "$id": "#/definitions/cardPresent",
      "type": "object",
      "required": [
        "pointOfServiceDataCode"
      ],
      "properties": {
        "pointOfServiceDataCode": {
          "type": "string",
          "maxLength": 12,
          "description": "For EMV, 12 elements (ISO8583, field 22): 1 Card Data Input Capability, 2 Cardholder Authentication Capability, 3  Card Capture Capability, 4 Operating Environment, 5 Cardholder Present, 6 Card Present, 7 Card Data Input Mode, 8 Cardmember Authentication Mode, 9 Cardmember Authentication Entity, 10 Card Data Output Capability, 11 Terminal Output Capability, 12 PIN Capture Capability"
        },
        "terminalId": {
          "type": "string",
          "example": "123456789012345",
          "maxLength": 16,
          "description": "For EMV, Card Acceptor Terminal Identification is a static format size field of one element with specific format type. The terminal id originates from the terminal itself."
        },
        "track1": {
          "type": "string",
          "maxLength": 78,
          "description": "Most of swipe devices have capability to pick up either Track 1 and Track 2, or only Track 1. Whenever the Track 1, that will be passed on to Worldline to pass to Amex. Otherwise it will be default to Track 2. All EMV transactions will have Track 2. Key transactions will have either Track 1 or Track 2."
        },
        "track2": {
          "type": "string",
          "maxLength": 40,
          "description": "Track2 from the magnetic stripe."
        },
        "onlinePINData": {
          "type": "string",
          "maxLength": 16,
          "description": "For EMV, It will be pass the encrypted PIN information when the verification method is PIN, and the chip on the card AND the terminal both support online PIN verification. If the chip and terminal don’t support online PIN, then this field will not be populated."
        },
        "emvData": {
          "type": "string",
          "maxLength": 510,
          "description": "For EMV, ICC System Related Data – This is where the EMV data from the chip will be passed. This field is used both in the request and response message."
        }
      }
    },
    "fraudScreeningData": {
      "$id": "#/definitions/fraudScreeningData",
      "type": "object",
      "properties": {
        "userId": {
          "type": "string",
          "example": "someusername",
          "maxLength": 64,
          "description": "Unique identifier for the user account from which the transaction originated."
        },
        "customScreeningData": {
          "type": "object",
          "properties": {
            "typeName": {
              "type": "string",
              "description": "Fraud screening provider.",
              "example": "ReD"
            }
          }
        }
      }
    },
    "transaction": {
      "$id": "#/definitions/transaction",
      "type": "object",
      "properties": {
        "transactionId": {
          "type": "number",
          "description": "The transaction id of the payment when status is processed",
          "example": 42
        },
        "status": {
          "type": "string",
          "description": "Status of the transaction [Processed|Declined|Registered|System Error] ",
          "example": "Processed"
        },
        "statusCode": {
          "type": "integer",
          "description": "Status code of the transaction",
          "example": 27001
        },
        "description": {
          "type": "string",
          "description": "Description of the transaction",
          "example": ""
        },
        "transactionType": {
          "type": "string",
          "description": "Type of transaction",
          "example": ""
        },
        "paymentMethodType": {
          "type": "string",
          "description": "Type of payment method",
          "example": ""
        },
        "paymentMethodId": {
          "type": "integer",
          "description": "Id of the payment method",
          "example": ""
        },
        "paymentMethodName": {
          "type": "string",
          "description": "Name of the payment method",
          "example": ""
        },
        "timestamp": {
          "type": "number",
          "description": "The timestamp when the transaction was processed, expressed in EPOC millis (milliseconds since UNIX epoc)",
          "example": ""
        },
        "amount": {
          "type": "number",
          "description": "Amount of the transaction",
          "example": 99.95
        },
        "currency": {
          "type": "string",
          "description": "Transaction processing currency as a ISO 4217 currency code.",
          "example": "EUR"
        },
        "posId": {
          "type": "string",
          "description": "Point of sale ID. Identifies the point of sales from which the transaction was sent. The posId is set up with the merchant during client integrations. Default 0 for transaction types Authorize and Debit, optional for other transaction types.",
          "example": "0"
        },
        "posDescripion": {
          "type": "string",
          "description": "Description of the point of sale",
          "example": ""
        },
        "refTransactionId": {
          "type": "number",
          "description": "Reference transaction id",
          "example": 41
        }
      }
    },
    "tokenizationResult": {
      "$id": "#/definitions/tokenizationResult",
      "type": "object",
      "properties": {
        "token": {
          "type": "string",
          "description": "Token from tokenization result",
          "example": ""
        },
        "maskedAccountNumber": {
          "type": "string",
          "description": "Masked account number of the tokenization",
          "example": ""
        },
        "expirationDate": {
          "type": "number",
          "description": "The expiration date when the tokenization result expires, expressed in EPOC millis (milliseconds since UNIX epoc)",
          "example": ""
        }
      }
    },
    "transactionChannel": {
      "$id": "#/definitions/transactionChannel",
      "type": "string",
      "default": "Web Online",
      "description": "A String with the name of transaction channel used to process the transaction. Case sensitive, space must be included where applicable.",
      "example": "Web Online",
      "enum": [
        "Web Online",
        "Cash Register",
        "Telephone",
        "Mail",
        "FaceToFace",
        "Digital Wallet",
        "In-app",
        "Voice Recognition",
        "MOTO"
      ]
    },
    "transactionReference": {
      "$id": "#/definitions/transactionReference",
      "type": "object",
      "properties": {
        "transactionId": {
          "type": "number"
        },
        "transactionTypeId": {
          "type": "integer"
        },
        "mid": {
          "type": "number",
          "description": "Merchant Id. This will be replaced by required 'mid' in the path",
          "example": 1234567890
        },
        "orderId": {
          "type": "string",
          "description": "Order Id. Identifier of the order.",
          "example": "order_123"
        },
        "transactionType": {
          "type": "string"
        },
        "transactionDate": {
          "type": "string",
          "description": "ISO-8601 Zulu datetime.",
          "example": "2018-11-07T11:27:34.279Z"
        },
        "refTransactionId": {
          "type": "number",
          "description": "Reference to which transaction this action is related to. For example the Authorize when doing a Capture",
          "example": 1234567890
        },
        "transactionDesc": {
          "type": "string",
          "description": "Textual description of the status code"
        },
        "statusCode": {
          "type": "integer",
          "description": "Answer code providing potential more details about status.",
          "example": 0
        },
        "status": {
          "type": "string",
          "description": "Text enumeration of transaction status",
          "enum": [
            "Processed",
            "Declined",
            "Registered",
            "System Error"
          ],
          "example": "Processed"
        },
        "amount": {
          "type": "number",
          "example": 49.95
        },
        "currency": {
          "type": "string",
          "example": "EUR",
          "description": "Alphabetic ISO 4217 three letter currency code. Evaluated against [A-Z]{3}",
          "pattern": "[A-Z]{3}"
        },
        "paymentMethod": {
          "type": "string",
          "description": "Textual name of payment method",
          "example": "Visa"
        },
        "paymentMethodId": {
          "type": "integer",
          "description": "Payment method identifier.",
          "example": 1001
        },
        "acquirerAuthorizationCode": {
          "type": "string",
          "description": "The Authorization Code for the transaction from the acquirer."
        },
        "acquirerReferenceId": {
          "type": "string",
          "description": "The reference to the transaction from the acquiring bank."
        },
        "acquirerAnswerDescription": {
          "type": "string",
          "description": "Answer description as stated by acquirer or bank."
        },
        "acquirerAnswerCode": {
          "type": "string",
          "description": "The acquirer's Answer Code for the transaction."
        },
        "bankReferenceId": {
          "type": "string",
          "description": "Reference id returned from the bank."
        },
        "bankAnswerCode": {
          "type": "string",
          "description": "Answer code returned from the bank."
        },
        "token": {
          "type": "string",
          "example": "9000123412341234",
          "description": "Payment instrument Token. Referring to a previously stored payment instrument such as a card number."
        },
        "maskedAccountNumber": {
          "type": "string",
          "description": "The maskedAccountNumber can be a bank account number or a card number, masked in order to be compliant with relevant security standards."
        },
        "cardExpiryDate": {
          "type": "string",
          "description": "Card expiry date in format MM-yyyy",
          "example": "05-2020"
        },
        "cvResponse": {
          "type": "string",
          "description": "This is the acquirer's response to the CV code supplied with the transaction. If the acquirer did not have a response this will be an empty string. Maximum length: 50 (although this field is typically shorter)"
        },
        "cvAnswerCode": {
          "type": "integer",
          "description": "Result code mapped by Worldline for the CV code supplied with the transaction."
        },
        "fraudStatus": {
          "type": "string",
          "enum": [
            "PASSED",
            "BLOCKED",
            "HOLD",
            "NOT SCREENED"
          ],
          "description": "Fraud screening result."
        },
        "fraudCode": {
          "type": "string",
          "description": "Response code from fraud detection service."
        },
        "fraudMessage": {
          "type": "string",
          "description": "Human readable description of fraud screening result."
        },
        "avsResponse": {
          "type": "string",
          "description": "This is the acquirer's response to the AVS information supplied with the transaction."
        },
        "avsAnswerCode": {
          "type": "integer",
          "description": "Result code mapped by Worldline for the AVS information supplied with the transaction."
        }
      }
    }
  }
}
 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
{
  "$schema": "http://json-schema.org/draft-06/schema#",
  "definitions": {
    "errorStatus": {
      "$id": "#/definitions/errorStatus",
      "type": "object",
      "properties": {
        "description": {
          "type": "string",
          "description": "Description of the error",
          "example": "Order not found"
        },
        "field": {
          "type": "string",
          "description": "In case of validation error, the name of the field that failed, if not applicable, may be null",
          "example": "currency"
        }
      }
    }
  },
  "type": "object",
  "properties": {
    "status": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/errorStatus"
      }
    }
  }
}