-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspecs.yaml
3518 lines (3232 loc) · 126 KB
/
specs.yaml
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
openapi: 3.0.3
info:
title: Fraud Prevention Service
version: v2
description: Fraud & Risk APIs to detect fraud
contact:
name: Risk Tech Verge
email: [email protected]
x-eg-lifecycle: PLANNED
servers:
- url: https://api.expediagroup.com/fraud-prevention/v2
- url: https://api.sandbox.expediagroup.com/fraud-prevention/v2
- url: https://test-api.expediagroup.com/fraud-prevention/v2
- url: https://test-api.sandbox.expediagroup.com/fraud-prevention/v2
tags:
- name: OrderPurchaseScreen
- name: OrderPurchaseUpdate
- name: AccountScreen
- name: AccountUpdate
paths:
/fraud-prevention/v2/order/purchase/screen:
post:
tags:
- screenOrderPurchase
description: "The Order Purchase API gives a Fraud recommendation for a
transaction. A recommendation can be Accept, Reject, or Review. A
transaction is marked as Review whenever there are insufficient signals
to recommend Accept or Reject. These incidents are manually reviewed,
and a corrected recommendation is made asynchronously. "
summary: Run fraud screening for one transaction
operationId: screenOrderPurchase
security:
- orderPurchaseScreenAuth:
- fraudandrisk.fraud.order-purchase-screen
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/OrderPurchaseScreenRequest"
responses:
"200":
description: The OrderPurchaseScreenRequest was successfully received and the
order screening is complete.
content:
application/json:
schema:
$ref: "#/components/schemas/OrderPurchaseScreenResponse"
"400":
description: Bad request
content:
application/json:
schema:
$ref: "#/components/schemas/BadRequestError"
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/UnauthorizedError"
"403":
description: Forbidden
content:
application/json:
schema:
$ref: "#/components/schemas/ForbiddenError"
"404":
description: Not Found
content:
application/json:
schema:
$ref: "#/components/schemas/NotFoundError"
"429":
description: Too many requests
content:
application/json:
schema:
$ref: "#/components/schemas/TooManyRequestsError"
"500":
description: Internal server error
content:
application/json:
schema:
$ref: "#/components/schemas/InternalServerError"
"502":
description: Bad gateway
content:
application/json:
schema:
$ref: "#/components/schemas/BadGatewayError"
"503":
description: Retryable Order Purchase Screen Failure
content:
application/json:
schema:
$ref: "#/components/schemas/RetryableOrderPurchaseScreenFailure"
"504":
description: Gateway timeout
content:
application/json:
schema:
$ref: "#/components/schemas/GatewayTimeoutError"
/fraud-prevention/v2/order/purchase/update:
post:
tags:
- updateOrderPurchase
description: >
The Order Purchase Update API is called when the status of the order has
changed.
For example, if the customer cancels the reservation, changes reservation in any way, or adds additional products or travelers to the reservation, the Order Purchase Update API is called to notify Expedia Group about the change.
The Order Purchase Update API is also called when the merchant cancels or changes an order based on a Fraud recommendation.
summary: Send an update for a transaction
operationId: updateOrderPurchase
security:
- orderPurchaseUpdateAuth:
- fraudandrisk.fraud.order-purchase-update
requestBody:
required: true
description: >
An OrderPurchaseUpdate request may be of one of the following types
`ORDER_UPDATE`, `CHARGEBACK_FEEDBACK`, `INSULT_FEEDBACK`,
`REFUND_UPDATE`, `PAYMENT_UPDATE`.
content:
application/json:
schema:
$ref: "#/components/schemas/OrderPurchaseUpdateRequest"
examples:
OrderUpdate:
summary: Sample OrderUpdate Request
value:
type: ORDER_UPDATE
risk_id: "1234324324"
acquirer_reference_number: "12345"
order_status: COMPLETED
cancellation_reason:
primary_reason_description: string
ChargebackFeedback:
summary: Sample ChargebackFeedback Request
value:
type: CHARGEBACK_FEEDBACK
risk_id: "1234324324"
chargeback_detail:
chargeback_status: RECEIVED
chargeback_reason: FRAUD
chargeback_amount:
value: 123.45
currency_code: USD
InsultFeedback:
summary: Sample InsultFeedback Request
value:
type: INSULT_FEEDBACK
risk_id: "1234324324"
RefundUpdate:
summary: Sample RefundUpdate Request
value:
type: REFUND_UPDATE
risk_id: "1234324324"
refund_status: SETTLED
refund_details:
acquirer_reference_number: "12345"
refund_deposit_date_time: 2022-07-24T01:01:01.111Z
refund_settlement_date_time: 2022-07-24T01:01:01.111Z
settlement_id: "12345"
refund_settled_amount:
value: 123.32
currency_code: USD
PaymentUpdate:
summary: Sample PaymentUpdate Request
value:
type: PAYMENT_UPDATE
risk_id: "1234324324"
merchant_order_code: "12345"
responses:
"200":
description: The OrderUpdateRequest was successful.
content:
application/json:
schema:
$ref: "#/components/schemas/OrderPurchaseUpdateResponse"
"400":
description: Bad request
content:
application/json:
schema:
$ref: "#/components/schemas/BadRequestError"
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/UnauthorizedError"
"403":
description: Forbidden
content:
application/json:
schema:
$ref: "#/components/schemas/ForbiddenError"
"404":
description: Order Purchase Update Not Found
content:
application/json:
schema:
$ref: "#/components/schemas/OrderPurchaseUpdateNotFoundError"
"429":
description: Too many requests
content:
application/json:
schema:
$ref: "#/components/schemas/TooManyRequestsError"
"500":
description: Internal server error
content:
application/json:
schema:
$ref: "#/components/schemas/InternalServerError"
"502":
description: Bad gateway
content:
application/json:
schema:
$ref: "#/components/schemas/BadGatewayError"
"503":
description: Retryable Order Purchase Update Failure
content:
application/json:
schema:
$ref: "#/components/schemas/RetryableOrderPurchaseUpdateFailure"
"504":
description: Gateway timeout
content:
application/json:
schema:
$ref: "#/components/schemas/GatewayTimeoutError"
/fraud-prevention/v2/account/screen:
post:
tags:
- screenAccount
description: The Account Screen API gives a Fraud recommendation for an account
transaction. A recommendation can be ACCEPT, CHALLENGE, or REJECT. A
transaction is marked as CHALLENGE whenever there are insufficient
signals to recommend ACCEPT or REJECT. These CHALLENGE incidents are
manually reviewed, and a corrected recommendation is made
asynchronously.
summary: Run fraud screening for one transaction
operationId: screenAccount
security:
- accountScreenAuth:
- fraudandrisk.fraud.account-screen
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/AccountScreenRequest"
responses:
"200":
description: The AccountScreenRequest was successfully received and the account
screening is complete.
content:
application/json:
schema:
$ref: "#/components/schemas/AccountScreenResponse"
"400":
description: Bad request
content:
application/json:
schema:
$ref: "#/components/schemas/AccountTakeoverBadRequestError"
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/AccountTakeoverUnauthorizedError"
"403":
description: Forbidden
content:
application/json:
schema:
$ref: "#/components/schemas/ForbiddenError"
"404":
description: Not Found
content:
application/json:
schema:
$ref: "#/components/schemas/NotFoundError"
"429":
description: Too many requests
content:
application/json:
schema:
$ref: "#/components/schemas/TooManyRequestsError"
"500":
description: Internal server error
content:
application/json:
schema:
$ref: "#/components/schemas/InternalServerError"
"502":
description: Bad gateway
content:
application/json:
schema:
$ref: "#/components/schemas/BadGatewayError"
"503":
description: Service unavailable
content:
application/json:
schema:
$ref: "#/components/schemas/ServiceUnavailableError"
"504":
description: Gateway timeout
content:
application/json:
schema:
$ref: "#/components/schemas/GatewayTimeoutError"
/fraud-prevention/v2/account/update:
post:
tags:
- updateAccount
description: The Account Update API is called when there is an account lifecycle
transition such as a challenge outcome, account restoration, or
remediation action completion. For example, if a user's account is
disabled, deleted, or restored, the Account Update API is called to
notify Expedia Group about the change. The Account Update API is also
called when a user responds to a login Multi-Factor Authentication based
on a Fraud recommendation.
summary: Send an update as a result of an account screen transaction
operationId: updateAccount
security:
- accountUpdateAuth:
- fraudandrisk.fraud.account-update
requestBody:
required: true
description: An AccountUpdate request may be of one of the following types
`MULTI_FACTOR_AUTHENTICATION_UPDATE`, `REMEDIATION_UPDATE`.
content:
application/json:
schema:
$ref: "#/components/schemas/AccountUpdateRequest"
examples:
MultiFactorAuthenticationUpdate:
summary: Sample MultiFactorAuthenticationUpdate Request
value:
type: MULTI_FACTOR_AUTHENTICATION_UPDATE
risk_id: "1234324324"
multi_factor_authentication_attempts:
- delivery_method: SMS
status: SUCCESS
reference_id: "1234324324"
provider_name: DUO
attempt_count: 2
update_start_date_time: 2022-07-24T01:01:01.111Z
update_end_date_time: 2022-07-24T01:02:01.111Z
telephone:
country_access_code: "1"
area_code: "234"
phone_number: "5678910"
RemediationUpdate:
summary: Sample RemediationUpdate Request
value:
type: REMEDIATION_UPDATE
risk_id: "1234324324"
remediation_update_actions:
- action_name: PASSWORD_RESET
status: SUCCESS
update_end_date_time: 2022-07-24T01:02:01.111Z
responses:
"200":
description: The AccountUpdateResponse was successful.
content:
application/json:
schema:
$ref: "#/components/schemas/AccountUpdateResponse"
"400":
description: Bad request
content:
application/json:
schema:
$ref: "#/components/schemas/AccountTakeoverBadRequestError"
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/AccountTakeoverUnauthorizedError"
"403":
description: Forbidden
content:
application/json:
schema:
$ref: "#/components/schemas/ForbiddenError"
"404":
description: Account Update Not Found
content:
application/json:
schema:
$ref: "#/components/schemas/AccountUpdateNotFoundError"
"429":
description: Too many requests
content:
application/json:
schema:
$ref: "#/components/schemas/TooManyRequestsError"
"500":
description: Internal server error
content:
application/json:
schema:
$ref: "#/components/schemas/InternalServerError"
"502":
description: Bad gateway
content:
application/json:
schema:
$ref: "#/components/schemas/BadGatewayError"
"503":
description: Service unavailable
content:
application/json:
schema:
$ref: "#/components/schemas/ServiceUnavailableError"
"504":
description: Gateway timeout
content:
application/json:
schema:
$ref: "#/components/schemas/GatewayTimeoutError"
components:
schemas:
Error:
description: The object used to describe an error, containing both
human-readable and machine-readable information.
type: object
properties:
code:
description: Snake cased all caps error code interpreted from the HTTP status
code that can programmatically be acted upon.
type: string
example: BAD_REQUEST
enum:
- UNAUTHORIZED
- FORBIDDEN
- NOT_FOUND
- ORDER_PURCHASE_UPDATE_NOT_FOUND
- TOO_MANY_REQUESTS
- INTERNAL_SERVER_ERROR
- BAD_GATEWAY
- RETRYABLE_ORDER_PURCHASE_SCREEN_FAILURE
- RETRYABLE_ORDER_PURCHASE_UPDATE_FAILURE
- GATEWAY_TIMEOUT
- BAD_REQUEST
message:
description: A human-readable explanation of the error, specific to this error
occurrence.
type: string
example: An input validation error was encountered. Please see causes for more
details.
required:
- code
- message
UnauthorizedError:
description: Indicates that the token sent in the 'Authorization' header is
either invalid or missing. Please check the value in the token field
along with the token expiration time before retrying.
example:
code: UNAUTHORIZED
message: Invalid EG token provided. Please provide a valid token in the
Authorization header.
allOf:
- $ref: "#/components/schemas/Error"
ForbiddenError:
description: Indicates that the API cannot fulfill the request because while the
client is correctly authenticated, the client doesn't have the
permission to execute the specified operation. This error type does not
imply that the request is valid, or that the resource against which the
operation being performed exists or satisfies other pre-conditions.
example:
code: FORBIDDEN
message: Insufficient permissions to perform the request.
allOf:
- $ref: "#/components/schemas/AccountTakeoverError"
NotFoundError:
description: Indicates that the API cannot find the resource that is either
being requested or against which the operation is being performed.
Please check the request again to make sure that the request is valid.
example:
code: NOT_FOUND
message: The requested resource does not exist.
allOf:
- $ref: "#/components/schemas/AccountTakeoverError"
OrderPurchaseUpdateNotFoundError:
description: Indicates that the API cannot find the resource that is either
being requested or against which the operation is being performed.
example:
code: ORDER_PURCHASE_UPDATE_NOT_FOUND
message: The request failed because the Order Screen event for this booking is
missing. Please send a new Order Screen event again.
allOf:
- $ref: "#/components/schemas/Error"
TooManyRequestsError:
description: Indicates that the API cannot fulfill the request because server
resources have been exhausted. Perhaps the client has sent too many
requests in a given amount of time or has reached some specific quota.
Please check the rate limits for the product and adjust as necessary
before retries. If you believe the rate limit was incorrect or if you
need a different rate limit, please reach out to the <support team>
regarding the next steps.
example:
code: TOO_MANY_REQUESTS
message: The request failed because the server resources for this client have
been exhausted.
allOf:
- $ref: "#/components/schemas/AccountTakeoverError"
InternalServerError:
description: Indicates that the API encountered an unexpected condition that
prevented it from fulfilling the request. Sometimes used as a generic
catch-allerror type when no other error types can be used. Retrying the
same request will usually result in the same error. Please reach out to
support team as next step for this error resolution.
example:
code: INTERNAL_SERVER_ERROR
message: The server encountered an internal error.
allOf:
- $ref: "#/components/schemas/AccountTakeoverError"
BadGatewayError:
description: Indicates that the server received an invalid response from the
upstream server. Causes could be incorrectly configured target server at
gateway, EOF exception, incorrectly configured keep-alive timeouts.
Please reach out to support team as next step for this error resolution.
example:
code: BAD_GATEWAY
message: The server received an invalid response from an upstream server.
allOf:
- $ref: "#/components/schemas/AccountTakeoverError"
RetryableOrderPurchaseScreenFailure:
description: >
Indicates that the API is either down for maintenance or overloaded and
cannot fulfill the request at the current time. This is a temporary
error and retrying the same request after a certain delay could
eventually result in success.
There will be a Retry-After HTTP header in API response specifying how long to wait to retry the request. If there is no Retry-After HTTP header then retry can happen immediately. If the error persists after retrying with delay, please reach out to <support team>."
example:
code: RETRYABLE_ORDER_PURCHASE_SCREEN_FAILURE
message: A temporary internal error occurred. You can safely retry your call
using the same order details.
allOf:
- $ref: "#/components/schemas/Error"
RetryableOrderPurchaseUpdateFailure:
description: >
Indicates that the API is either down for maintenance or overloaded and
cannot fulfill the request at the current time. This is a temporary
error and retrying the same request after a certain delay could
eventually result in success.
There will be a Retry-After HTTP header in API response specifying how long to wait to retry the request. If there is no Retry-After HTTP header then retry can happen immediately. If the error persists after retrying with delay, please reach out to <support team>."
example:
code: RETRYABLE_ORDER_PURCHASE_UPDATE_FAILURE
message: A temporary internal error occurred. You can safely retry your call
using the same order details.
allOf:
- $ref: "#/components/schemas/Error"
GatewayTimeoutError:
description: Indicates that the API gateway has issues completing the request on
time. Request can be retried if it is idempotent, If the issue persists,
please reach out to support. For non-idempotent requests, please reach
out to <support team> to know the status of your request before
attempting retries.
example:
code: GATEWAY_TIMEOUT
message: The server timed out while trying to complete the request.
allOf:
- $ref: "#/components/schemas/AccountTakeoverError"
BadRequestError:
description: Indicates that a bad request occurred. Typically it is an invalid
parameter.
example:
code: BAD_REQUEST
message: An input validation error was encountered. Please see causes for more
details.
causes:
code: MISSING_MANDATORY_PARAM
field: $.transaction.customer_account.account_type
message: The value of a field should not be null.
allOf:
- $ref: "#/components/schemas/Error"
- type: object
properties:
causes:
type: array
items:
type: object
properties:
code:
type: string
example: MISSING_MANDATORY_PARAM
enum:
- MISSING_MANDATORY_PARAM
- INVALID_PARAM
- INVALID_FORMAT
field:
type: string
description: A JSON Path expression indicating which field, in the request body,
caused the error.
example: $.transaction.customer_account.account_type
message:
type: string
example: The value of a field should not be null.
OrderPurchaseUpdateRequest:
title: OrderPurchaseUpdateRequest
description: >
The `type` field value is used as a discriminator, with the following
mapping:
* `ORDER_UPDATE`: `OrderUpdate`
* `CHARGEBACK_FEEDBACK`: `ChargebackFeedback`
* `INSULT_FEEDBACK`: `InsultFeedback`
* `REFUND_UPDATE`: `RefundUpdate`
* `PAYMENT_UPDATE`: `PaymentUpdate`
type: object
required:
- risk_id
- type
properties:
type:
$ref: "#/components/schemas/UpdateType"
risk_id:
description: The `risk_id` provided by Expedia's Fraud Prevention Service in the
`OrderPurchaseScreenResponse`.
type: string
maxLength: 200
example: "123456789"
discriminator:
propertyName: type
mapping:
ORDER_UPDATE: OrderUpdate
CHARGEBACK_FEEDBACK: ChargebackFeedback
INSULT_FEEDBACK: InsultFeedback
REFUND_UPDATE: RefundUpdate
PAYMENT_UPDATE: PaymentUpdate
UpdateType:
title: UpdateType
description: Transaction type associated with the update event.
type: string
enum:
- ORDER_UPDATE
- CHARGEBACK_FEEDBACK
- INSULT_FEEDBACK
- REFUND_UPDATE
- PAYMENT_UPDATE
OrderUpdate:
title: OrderUpdate
description: Order related data that should be updated.
allOf:
- $ref: "#/components/schemas/OrderPurchaseUpdateRequest"
- type: object
required:
- order_status
properties:
order_status:
$ref: "#/components/schemas/Status"
acquirer_reference_number:
description: >
A unique number that tags a credit or debit card transaction
when it goes from the merchant's bank through to the
cardholder's bank.
`acquirer_reference_number` is a required field only if `order_status` = `COMPLETED`
Typically, merchants can get this number from their payment processors.
This number is used when dealing with disputes/chargebacks on original transactions.
type: string
maxLength: 200
cancellation_reason:
$ref: "#/components/schemas/CancellationReason"
CancellationReason:
title: CancellationReason
description: Reason of order update cancellation.
type: object
properties:
primary_reason_code:
description: Primary cancellation reason code.
type: string
maxLength: 200
sub_reason_code:
description: Substitute cancellation reason code.
type: string
maxLength: 200
primary_reason_description:
description: Primary cancellation reason code. Required if `order_status =
CANCELLED`.
type: string
maxLength: 200
sub_reason_description:
description: Substitute cancellation reason description.
type: string
maxLength: 200
ChargebackFeedback:
title: ChargebackFeedback
description: Feedback from EG external partners if they receive a chargeback for
a false negative recommendation from Fraud Prevention system.
allOf:
- $ref: "#/components/schemas/OrderPurchaseUpdateRequest"
- type: object
properties:
chargeback_detail:
$ref: "#/components/schemas/ChargebackDetail"
InsultFeedback:
title: InsultFeedback
description: Feedback from EG external partners regarding a false positive
recommendation that from Fraud Prevention system gave for their
customer.
allOf:
- $ref: "#/components/schemas/OrderPurchaseUpdateRequest"
- type: object
properties:
insult_detail:
$ref: "#/components/schemas/InsultDetail"
RefundUpdate:
title: RefundUpdate
description: Refund related data. Update should be sent when refund is issued or
settled. Amounts should include all fees and taxes.
discriminator:
propertyName: refund_status
mapping:
ISSUED: IssuedRefundUpdate
SETTLED: SettledRefundUpdate
allOf:
- $ref: "#/components/schemas/OrderPurchaseUpdateRequest"
- type: object
required:
- refund_status
properties:
refund_status:
description: |
Identifies the refund status. Possible values are:
-`ISSUED` - The refund was issued.
-`SETTLED` - The refund was settled.
type: string
enum:
- ISSUED
- SETTLED
IssuedRefundUpdate:
title: IssuedRefundUpdate
description: Data related to the issued refund that should be updated.
allOf:
- $ref: "#/components/schemas/RefundUpdate"
- type: object
required:
- refund_status
properties:
refund_details:
$ref: "#/components/schemas/IssuedRefundUpdateDetails"
SettledRefundUpdate:
title: SettledRefundUpdate
description: Data related to the settled refund that should be updated.
allOf:
- $ref: "#/components/schemas/RefundUpdate"
- type: object
required:
- refund_status
properties:
refund_details:
$ref: "#/components/schemas/SettledRefundUpdateDetails"
IssuedRefundUpdateDetails:
title: IssuedRefundUpdateDetails
description: Data that describes issued refund that should be updated.
type: object
required:
- refund_issued_date_time
- refund_issued_amount
properties:
refund_issued_date_time:
description: Date and time when the 3rd party payment processor confirmed that a
previously submitted payment refund has issued at the participating
financial institutions.
type: string
format: date-time
refund_issued_amount:
$ref: "#/components/schemas/Amount"
SettledRefundUpdateDetails:
title: SettledRefundUpdateDetails
description: Data that describes settled refund that should be updated.
type: object
required:
- refund_settlement_date_time
- refund_deposit_date_time
- acquirer_reference_number
- settlement_id
- refund_settled_amount
properties:
refund_settlement_date_time:
description: Date and time when the 3rd party payment processor confirmed that a
previously submitted payment refund has settled at the participating
financial institutions.
type: string
format: date-time
refund_deposit_date_time:
description: Date and time when the refund was deposited to the original form of
payment.
type: string
format: date-time
acquirer_reference_number:
description: >
A unique number that tags a credit or debit card transaction when it
goes from the merchant's bank through to the cardholder's bank.
Typically, merchants can get this number from their payment processors.
This number is used when dealing with disputes/chargebacks on original transactions.
type: string
maxLength: 200
settlement_id:
description: Unique settlement identifier specific to the payment processor for
the settlement transaction generated for a previously submitted
payment refund.
type: string
maxLength: 200
refund_settled_amount:
$ref: "#/components/schemas/Amount"
PaymentUpdate:
title: PaymentUpdate
description: Payment related data that should be updated.
allOf:
- $ref: "#/components/schemas/OrderPurchaseUpdateRequest"
- type: object
required:
- merchant_order_code
properties:
merchant_order_code:
description: Reference code passed to acquiring bank at the time of payment.
This code is the key ID that ties back to payments data at the
payment level.
type: string
maxLength: 200
ChargebackDetail:
title: ChargebackDetail
type: object
description: Details related to the chargeback.
required:
- chargeback_status
- chargeback_reason
- chargeback_amount
properties:
chargeback_status:
type: string
enum:
- RECEIVED
- REVERSAL
description: |
Identifies the chargeback status. Possible values are:
-`RECEIVED` - The chargeback was received.
-`REVERSAL` - The chargeback reversal was received.
chargeback_reason:
type: string
enum:
- FRAUD
- NON_FRAUD
description: Reason for chargeback which can be `Fraud` or `Non Fraud`.
chargeback_amount:
$ref: "#/components/schemas/Amount"
bank_reason_code:
type: string
description: Unique code provided by the acquiring bank for the category of fraud.
maxLength: 200
chargeback_reported_date_time:
type: string
format: date-time
description: Date and time when the chargeback was reported to the partner, in
ISO-8601 date and time format `yyyy-MM-ddTHH:mm:ss.SSSZ`.
InsultDetail:
title: InsultDetail
type: object
description: Details related to the insult.
properties:
insult_reported_date_time:
type: string
format: date-time
description: Date and time when the insult was reported to the partner, in
ISO-8601 date and time format `yyyy-MM-ddTHH:mm:ss.SSSZ`.
Status:
title: Status
description: >
Defines the current state of the Order.
Generally, OrderPurchaseScreenRequest is followed by an OrderUpdate reflecting the change in current order status. From `IN_PROGRESS` to any of below possible values:
* `COMPLETED` is used when the order has been processed fully. For example, inventory has been reserved, and the payment has been settled.
* `CHANGE_COMPLETED` is like `COMPLETED` but on a changed order.
* `CANCELLED` is used when the order is cancelled. This could be acustomer initiated cancel or based on Fraud recommendation.
* `FAILED` is used when order failed due to any errors on Partner system. This could be followed by another OrderUpdate call with any `order_status` once the order is recovered, abandoned, or cancelled.
* `CHANGE_FAILED` is like `FAILED` but on a changed order.
*
* `CHANGE_COMPLETED` or `CHANGE_FAILED` are applicable if OrderPurchaseScreen Fraud API was called via a change in order which is through `transaction.transaction_details.order_type` = `CHANGE`
* `COMPLETED` or `CANCELLED` order status indicates the completion of lifecycle on an order.
type: string
enum:
- COMPLETED
- CHANGE_COMPLETED
- CANCELLED
- FAILED
- CHANGE_FAILED
maxLength: 200
OrderPurchaseUpdateResponse:
title: OrderPurchaseUpdateResponse
type: object
properties:
risk_id:
type: string
description: Unique identifier of transaction that was updated.
maxLength: 200
example: "1234567"
OrderPurchaseScreenRequest:
title: OrderPurchaseScreenRequest
type: object
properties:
transaction:
$ref: "#/components/schemas/OrderPurchaseTransaction"
required:
- transaction
OrderPurchaseTransaction:
title: OrderPurchaseTransaction
type: object
required:
- site_info
- device_details
- customer_account
- transaction_details
properties:
site_info:
$ref: "#/components/schemas/SiteInfo"
device_details:
$ref: "#/components/schemas/DeviceDetails"
customer_account:
$ref: "#/components/schemas/CustomerAccount"
transaction_details:
$ref: "#/components/schemas/TransactionDetails"
OrderPurchaseScreenResponse:
title: OrderPurchaseScreenResponse
type: object
properties:
risk_id:
type: string
description: Unique identifier assigned to the transaction by Expedia's Fraud
Prevention Service.
maxLength: 200
example: "1234567"
decision:
$ref: "#/components/schemas/FraudDecision"
FraudDecision:
title: FraudDecision
type: string
enum:
- ACCEPT
- REVIEW
- REJECT
SiteInfo:
title: SiteInfo
type: object
required:
- country_code
- agent_assisted
properties:
country_code:
description: The alpha-3 ISO code that represents a country name.
pattern: ^[A-Z]{3}$
type: string
example: USA
agent_assisted:
description: Identifies if an agent assisted in booking travel for the customer.
`False` if the order was directly booked by customer.
type: boolean
DeviceDetails:
title: DeviceDetails
required:
- ip_address
type: object
properties:
source:
type: string
maxLength: 50
description: Source of the device_box. Default value is `TrustWidget`.
device_box: