-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathopenapi.yaml
More file actions
8215 lines (8164 loc) · 294 KB
/
openapi.yaml
File metadata and controls
8215 lines (8164 loc) · 294 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.1
info:
title: SumUp REST API
version: 1.0.0
description: |-
SumUp’s REST API operates with [JSON](https://www.json.org/json-en.html) HTTP requests and responses. The request bodies are sent through resource-oriented URLs and use the standard [HTTP response codes](https://developer.mozilla.org/docs/Web/HTTP/Status).
You can experiment and work on your integration in a sandbox that doesn't affect your regular data and doesn't process real transactions. To create a sandbox merchant account visit the [dashboard](https://me.sumup.com/settings/developer). To use the sandbox when interacting with SumUp APIs [create an API](https://me.sumup.com/settings/api-keys) key and use it for [authentication](https://developer.sumup.com/api/authentication).
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
- url: https://api.sumup.com
description: Production server
paths:
/v0.1/merchants/{merchant_code}/payment-methods:
get:
operationId: GetPaymentMethods
summary: Get available payment methods
description: Get payment methods available for the given merchant to use with a checkout.
parameters:
- name: merchant_code
in: path
description: The SumUp merchant code.
required: true
schema:
type: string
example: MH4H92C7
- name: amount
in: query
description: The amount for which the payment methods should be eligible, in major units.
required: false
schema:
type: number
example: 9.99
- name: currency
in: query
description: The currency for which the payment methods should be eligible.
required: false
schema:
type: string
example: EUR
responses:
'200':
description: Available payment methods
content:
application/json:
schema:
type: object
properties:
available_payment_methods:
type: array
items:
type: object
required:
- id
properties:
id:
description: The ID of the payment method.
type: string
example: qr_code_pix
example:
- id: apple_pay
- id: blik
examples:
success:
description: Available payment methods
value:
available_payment_methods:
- id: apple_pay
- id: blik
'400':
description: The request is invalid for the submitted query parameters.
content:
application/json:
schema:
$ref: '#/components/schemas/DetailsError'
examples:
Invalid_Parameter:
description: One or more of the parameters are invalid.
value:
failed_constraints:
- message: Currency must also be specified when filtering by amount
reference: currency
status: 400
title: Bad Request
security:
- apiKey: []
- oauth2: []
tags:
- Checkouts
x-codegen:
method_name: list_available_payment_methods
x-scopes: []
/v0.1/checkouts:
post:
operationId: CreateCheckout
summary: Create a checkout
description: |-
Creates a new payment checkout resource. The unique `checkout_reference` created by this request, is used for further manipulation of the checkout.
For 3DS checkouts, add the `redirect_url` parameter to your request body schema.
Follow by processing a checkout to charge the provided payment instrument.
requestBody:
description: Details for creating a checkout resource.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CheckoutCreateRequest'
examples:
Checkout:
description: Standard request body for creating a checkout
value:
checkout_reference: f00a8f74-b05d-4605-bd73-2a901bae5802
amount: 10.1
currency: EUR
merchant_code: MH4H92C7
description: Purchase
valid_until: 2020-02-29T10:56:56+00:00
redirect_url: https://sumup.com
Checkout3DS:
description: Create a 3DS checkout
value:
checkout_reference: f00a8f74-b05d-4605-bd73-2a901bae5802
amount: 10.1
currency: EUR
merchant_code: MH4H92C7
description: Purchase
return_url: http://example.com/
customer_id: 831ff8d4cd5958ab5670
redirect_url: https://mysite.com/completed_purchase
CheckoutAPM:
description: Create an Alternative Payment Method checkout
value:
checkout_reference: f00a8f74-b05d-4605-bd73-2a901bae5802
amount: 10.1
currency: EUR
merchant_code: MH4H92C7
redirect_url: https://mysite.com/completed_purchase
responses:
'201':
description: Returns the created checkout resource.
content:
application/json:
schema:
$ref: '#/components/schemas/Checkout'
examples:
Checkout:
description: Standard response body for a successfully created checkout
value:
checkout_reference: 8ea25ec3-3293-40e9-a165-6d7f3b3073c5
amount: 10.1
currency: EUR
merchant_code: MH4H92C7
merchant_country: DE
description: My Checkout
return_url: http://example.com
id: 88fcf8de-304d-4820-8f1c-ec880290eb92
status: PENDING
date: 2020-02-29T10:56:56+00:00
valid_until: 2020-02-29T10:56:56+00:00
customer_id: 831ff8d4cd5958ab5670
mandate:
type: recurrent
status: active
merchant_code: MH4H92C7
transactions:
- id: 410fc44a-5956-44e1-b5cc-19c6f8d727a4
transaction_code: TEENSK4W2K
amount: 10.1
currency: EUR
timestamp: 2020-02-29T10:56:56.876Z
status: SUCCESSFUL
payment_type: ECOM
installments_count: 1
merchant_code: MH4H92C7
vat_amount: 6
tip_amount: 3
entry_mode: CUSTOMER_ENTRY
auth_code: '012345'
Checkout3DS:
description: Response body for a successfully created 3DS checkout
value:
checkout_reference: 8ea25ec3-3293-40e9-a165-6d7f3b3073c5
amount: 10.1
currency: EUR
description: My Checkout
return_url: http://example.com
id: 88fcf8de-304d-4820-8f1c-ec880290eb92
status: PENDING
date: 2020-02-29T10:56:56+00:00
valid_until: 2020-02-29T10:56:56+00:00
customer_id: 831ff8d4cd5958ab5670
redirect_url: https://mysite.com/completed_purchase
transactions:
- id: 410fc44a-5956-44e1-b5cc-19c6f8d727a4
transaction_code: TEENSK4W2K
amount: 10.1
currency: EUR
timestamp: 2020-02-29T10:56:56.876Z
status: SUCCESSFUL
payment_type: ECOM
installments_count: 1
merchant_code: MH4H92C7
vat_amount: 6
tip_amount: 3
entry_mode: CUSTOMER_ENTRY
auth_code: '012345'
CheckoutAPM:
description: Response body for APMs, including Blik, iDeal, ...
value:
checkout_reference: 8ea25ec3-3293-40e9-a165-6d7f3b3073c5
amount: 10.1
currency: EUR
merchant_code: MH4H92C7
description: My Checkout
return_url: http://example.com
id: 88fcf8de-304d-4820-8f1c-ec880290eb92
status: PENDING
date: 2021-06-29T11:08:36.000+00:00
merchant_name: My company
merchant_country: DE
redirect_url: https://sumup.com
purpose: CHECKOUT
transactions:
- id: 410fc44a-5956-44e1-b5cc-19c6f8d727a4
transaction_code: TEENSK4W2K
amount: 10.1
currency: EUR
timestamp: 2020-02-29T10:56:56.876Z
status: SUCCESSFUL
payment_type: ECOM
installments_count: 1
merchant_code: MH4H92C7
vat_amount: 6
tip_amount: 3
entry_mode: CUSTOMER_ENTRY
auth_code: '012345'
'400':
description: The request body is invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorExtended'
examples:
Missing_Parameter:
description: A required parameter is missing.
value:
message: Validation error
error_code: MISSING
param: merchant_code
'401':
description: The request is not authorized.
content:
application/json:
schema:
$ref: '#/components/schemas/Problem'
examples:
Problem_Details:
description: Unauthorized response returned by API gateway.
value:
detail: Unauthorized.
status: 401
title: Unauthorized
trace_id: 3c77294349d3b5647ea2d990f0d8f017
type: https://developer.sumup.com/problem/unauthorized
'403':
description: The request isn't sufficiently authorized to create a checkout.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorForbidden'
examples:
Forbidden:
description: You do not have the required permission for making this request.
value:
error_message: checkout_payments_not_allowed
error_code: FORBIDDEN
status_code: '403'
'409':
description: A checkout already exists for the provided unique parameters.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
Existing_Checkout:
description: A resource with the specified parameters already exists on the server.
value:
error_code: DUPLICATED_CHECKOUT
message: Checkout with this checkout reference and pay to email already exists
security:
- apiKey: []
- oauth2:
- payments
tags:
- Checkouts
x-codegen:
method_name: create
x-scopes:
- payments
get:
operationId: ListCheckouts
summary: List checkouts
description: Lists created checkout resources according to the applied `checkout_reference`.
parameters:
- name: checkout_reference
in: query
description: Filters the list of checkout resources by the unique ID of the checkout.
required: false
schema:
type: string
responses:
'200':
description: Returns a list of checkout resources.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/CheckoutSuccess'
example:
- checkout_reference: f00a8f74-b05d-4605-bd73-2a901bae5802
amount: 10.1
currency: EUR
merchant_code: MH4H92C7
description: Purchase
id: 4e425463-3e1b-431d-83fa-1e51c2925e99
status: PENDING
date: 2020-02-29T10:56:56+00:00
'401':
description: The request is not authorized.
content:
application/json:
schema:
$ref: '#/components/schemas/Problem'
examples:
Problem_Details:
description: Unauthorized response returned by API gateway.
value:
detail: Unauthorized.
status: 401
title: Unauthorized
trace_id: 3c77294349d3b5647ea2d990f0d8f017
type: https://developer.sumup.com/problem/unauthorized
security:
- apiKey: []
- oauth2:
- payments
tags:
- Checkouts
x-codegen:
method_name: list
x-scopes:
- payments
/v0.1/checkouts/{id}:
parameters:
- name: id
in: path
description: Unique ID of the checkout resource.
required: true
schema:
type: string
get:
operationId: GetCheckout
summary: Retrieve a checkout
description: Retrieves an identified checkout resource. Use this request after processing a checkout to confirm its status and inform the end user respectively.
responses:
'200':
description: Returns the requested checkout resource.
content:
application/json:
schema:
$ref: '#/components/schemas/CheckoutSuccess'
example:
checkout_reference: f00a8f74-b05d-4605-bd73-2a901bae5802
amount: 10.1
currency: EUR
merchant_code: MH4H92C7
description: Purchase
id: 4e425463-3e1b-431d-83fa-1e51c2925e99
status: PENDING
date: 2020-02-29T10:56:56+00:00
transaction_code: TEENSK4W2K
transaction_id: 410fc44a-5956-44e1-b5cc-19c6f8d727a4
'401':
description: The request is not authorized.
content:
application/json:
schema:
$ref: '#/components/schemas/Problem'
examples:
Problem_Details:
description: Unauthorized response returned by API gateway.
value:
detail: Unauthorized.
status: 401
title: Unauthorized
trace_id: 3c77294349d3b5647ea2d990f0d8f017
type: https://developer.sumup.com/problem/unauthorized
'404':
description: The requested resource does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
Not_Found:
description: The identified resource is not found on the server.
value:
error_code: NOT_FOUND
message: Resource not found
security:
- apiKey: []
- oauth2:
- payments
tags:
- Checkouts
x-codegen:
method_name: get
x-scopes:
- payments
put:
operationId: ProcessCheckout
summary: Process a checkout
description: |-
Processing a checkout will attempt to charge the provided payment instrument for the amount of the specified checkout resource initiated in the `Create a checkout` endpoint.
Follow this request with `Retrieve a checkout` to confirm its status.
requestBody:
description: Details of the payment instrument for processing the checkout.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ProcessCheckout'
examples:
ProcessCard:
description: Process a checkout with a card
value:
payment_type: card
installments: 1
mandate:
type: recurrent
user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Safari/537.36
user_ip: 172.217.169.174
card:
type: VISA
name: John Doe
number: '1234567890123456'
expiry_year: '2023'
expiry_month: '01'
cvv: '123'
zip_code: '12345'
ProcessToken:
description: Process a checkout with a token
value:
payment_type: card
installments: 1
token: ba85dfee-c3cf-48a6-84f5-d7d761fbba50
customer_id: MEDKHDTI
ProcessBoleto:
description: Process a checkout with Boleto
value:
payment_type: boleto
personal_details:
email: user@example.com
first_name: John
last_name: Doe
tax_id: 423.378.593-47
address:
country: BR
city: São Paulo
line1: Rua Gilberto Sabino, 215
state: SP
postal_code: 05425-020
ProcessiDeal:
description: Process a checkout with iDeal
value:
payment_type: ideal
personal_details:
email: user@example.com
first_name: John
last_name: Doe
address:
country: NL
ProcessBancontact:
description: Process a checkout with Bancontact
value:
payment_type: bancontact
personal_details:
email: user@example.com
first_name: John
last_name: Doe
address:
country: BE
responses:
'200':
description: Returns the checkout resource after a processing attempt.
content:
application/json:
schema:
$ref: '#/components/schemas/CheckoutSuccess'
examples:
CheckoutSuccessCard:
description: Successfully processed checkout with a card
value:
checkout_reference: f00a8f74-b05d-4605-bd73-2a901bae5802
amount: 10.1
currency: EUR
merchant_code: MH4H92C7
description: Purchase
return_url: http://example.com
id: 4e425463-3e1b-431d-83fa-1e51c2925e99
status: PENDING
date: 2020-02-29T10:56:56+00:00
valid_until: 2020-02-29T10:56:56+00:00
customer_id: 831ff8d4cd5958ab5670
mandate:
type: recurrent
status: active
merchant_code: MH4H92C7
transactions:
- id: 410fc44a-5956-44e1-b5cc-19c6f8d727a4
transaction_code: TEENSK4W2K
amount: 10.1
currency: EUR
timestamp: 2020-02-29T10:56:56.876Z
status: SUCCESSFUL
payment_type: ECOM
installments_count: 1
merchant_code: MH4H92C7
vat_amount: 6
tip_amount: 3
entry_mode: CUSTOMER_ENTRY
auth_code: '053201'
transaction_code: TEENSK4W2K
transaction_id: 410fc44a-5956-44e1-b5cc-19c6f8d727a4
CheckoutSuccessToken:
description: Successfully processed checkout with a token
value:
checkout_reference: f00a8f74-b05d-4605-bd73-2a901bae5802
amount: 10.1
currency: EUR
merchant_code: MH4H92C7
description: Purchase with token
id: 4e425463-3e1b-431d-83fa-1e51c2925e99
status: PENDING
date: 2020-02-29T10:56:56+00:00
transaction_code: TEENSK4W2K
transaction_id: 410fc44a-5956-44e1-b5cc-19c6f8d727a4
merchant_name: Sample Merchant
redirect_url: https://mysite.com/completed_purchase
customer_id: 831ff8d4cd5958ab5670
payment_instrument:
token: e76d7e5c-9375-4fac-a7e7-b19dc5302fbc
transactions:
- id: 410fc44a-5956-44e1-b5cc-19c6f8d727a4
transaction_code: TEENSK4W2K
amount: 10.1
currency: EUR
timestamp: 2020-02-29T10:56:56.876Z
status: SUCCESSFUL
payment_type: ECOM
installments_count: 1
merchant_code: MH4H92C7
vat_amount: 6
tip_amount: 3
entry_mode: CUSTOMER_ENTRY
auth_code: '053201'
CheckoutSuccessBoleto:
description: Successfully processed checkout with Boleto
value:
checkout_reference: f00a8f74-b05d-4605-bd73-2a901bae5802
amount: 10.1
currency: BRL
merchant_code: MH4H92C7
description: Boleto checkout
id: 4e425463-3e1b-431d-83fa-1e51c2925e99
status: PENDING
date: 2021-07-06T12:34:02.000+00:00
merchant_name: Sample shop
boleto:
barcode: '34191090081790614310603072340007886840000000200'
url: https://checkouts.sample.com/v0.1/checkouts/2e7a36cc-7897-446b-a966-952ab5f049ea/boleto
redirect_url: https://website.com
purpose: CHECKOUT
transactions:
- id: debd2986-9852-4e86-8a8e-7ea9c87dd679
transaction_code: TEN3E696NP
merchant_code: MH4H92C9
amount: 10.1
vat_amount: 6
tip_amount: 3
currency: BRL
timestamp: 2021-07-06T12:34:16.460+00:00
status: PENDING
payment_type: BOLETO
entry_mode: BOLETO
installments_count: 1
CheckoutSuccessiDeal:
description: Successfully processed checkout with iDeal
value:
next_step:
url: https://r3.girogate.de/ti/simideal
method: GET
payload:
tx: '961473700'
rs: ILnaUeQTKJ184fVrjGILrLjePX9E4rmz
cs: c8bc0ea231f8372431ca22d6f8319f8de0263d0b1705759ed27155f245f193c5
full: https://r3.girogate.de/ti/simideal?tx=961473700&rs=ILnaUeQTKJ184fVrjGILrLjePX9E4rmz&cs=c8bc0ea231f8372431ca22d6f8319f8de0263d0b1705759ed27155f245f193c5
mechanism:
- browser
CheckoutSuccessBancontact:
description: Successfully processed checkout with Bancontact
value:
next_step:
url: https://r3.girogate.de/ti/simbcmc
method: GET
payload:
tx: '624788471'
rs: 5MioXoKt2Gwj9dLgqAX1bMRBuT5xTSdB
cs: 697edacdd9175f3f99542500fa0ff08280b66aaff3c2641a2e212e4b039473cc
full: https://r3.girogate.de/ti/simbcmc?tx=624788471&rs=5MioXoKt2Gwj9dLgqAX1bMRBuT5xTSdB&cs=697edacdd9175f3f99542500fa0ff08280b66aaff3c2641a2e212e4b039473cc
mechanism:
- browser
'202':
description: Returns the next required action for asynchronous checkout processing.
content:
application/json:
schema:
$ref: '#/components/schemas/CheckoutAccepted'
'400':
description: The request body is invalid for processing the checkout.
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/ErrorExtended'
- type: array
description: List of error messages.
items:
$ref: '#/components/schemas/ErrorExtended'
examples:
Invalid_Parameter:
description: A required parameter has an invalid value.
value:
message: Validation error
error_code: INVALID
param: card.expiry_year
Multiple_Invalid_Parameters:
description: Multiple required parameters have invalid values.
value:
- error_code: INVALID
message: Validation error
param: card.name
- error_code: INVALID
message: Validation error
param: card.number
- error_code: INVALID
message: Validation error
param: card.expiry_year
'401':
description: The request is not authorized.
content:
application/json:
schema:
$ref: '#/components/schemas/Problem'
examples:
Problem_Details:
description: Unauthorized response returned by API gateway.
value:
detail: Unauthorized.
status: 401
title: Unauthorized
trace_id: 3c77294349d3b5647ea2d990f0d8f017
type: https://developer.sumup.com/problem/unauthorized
'404':
description: The requested resource does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
Not_Found:
description: The identified resource is not found on the server.
value:
error_code: NOT_FOUND
message: Resource not found
'409':
description: The request conflicts with the current state of the resource.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
Checkout_Processed:
description: The identified checkout resource is already processed.
value:
error_code: CHECKOUT_PROCESSED
message: Checkout is already processed
security:
- apiKey: []
- oauth2: []
tags:
- Checkouts
x-codegen:
method_name: process
x-scopes: []
delete:
operationId: DeactivateCheckout
summary: Deactivate a checkout
description: Deactivates an identified checkout resource. If the checkout has already been processed it can not be deactivated.
responses:
'200':
description: Returns the checkout object after successful deactivation.
content:
application/json:
schema:
$ref: '#/components/schemas/Checkout'
example:
checkout_reference: f00a8f74-b05d-4605-bd73-2a901bae5802
id: 817340ce-f1d9-4609-b90a-6152f8ee267j
amount: 2
currency: EUR
merchant_code: MH4H92C7
description: Deletion example
purpose: CHECKOUT
status: EXPIRED
date: 2020-02-29T10:56:56+00:00
valid_until: 2020-02-29T10:56:56+00:00
merchant_name: Sample Merchant
transactions: []
'401':
description: The request is not authorized.
content:
application/json:
schema:
$ref: '#/components/schemas/Problem'
examples:
Problem_Details:
description: Unauthorized response returned by API gateway.
value:
detail: Unauthorized.
status: 401
title: Unauthorized
trace_id: 3c77294349d3b5647ea2d990f0d8f017
type: https://developer.sumup.com/problem/unauthorized
'404':
description: The requested resource does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
Not_Found:
description: The identified resource is not found on the server.
value:
error_code: NOT_FOUND
message: Resource not found
'409':
description: The request conflicts with the current state of the resource.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
Checkout_Processed:
description: The identified checkout resource is already processed.
value:
error_code: CHECKOUT_PROCESSED
message: Checkout is already processed
security:
- apiKey: []
- oauth2:
- payments
tags:
- Checkouts
x-codegen:
method_name: deactivate
x-scopes:
- payments
/v0.2/checkouts/{id}/apple-pay-session:
put:
operationId: CreateApplePaySession
summary: Create an Apple Pay session
description: |
Creates an Apple Pay merchant session for the specified checkout.
Use this endpoint after the customer selects Apple Pay and before calling
`ApplePaySession.completeMerchantValidation(...)` in the browser.
SumUp validates the merchant session request and returns the Apple Pay
session object that your frontend should pass to Apple's JavaScript API.
parameters:
- name: id
in: path
description: Unique ID of the checkout resource.
required: true
schema:
type: string
requestBody:
description: The data needed to create an apple pay session for a checkout.
content:
application/json:
schema:
type: object
properties:
context:
description: the context to create this apple pay session.
type: string
format: hostname
example: example.com
target:
description: The target url to create this apple pay session.
type: string
format: uri
example: https://apple-pay-gateway-cert.apple.com/paymentservices/startSession
required:
- context
- target
responses:
'200':
description: |
Successful request. Returns the Apple Pay merchant session object
that should be forwarded to the Apple Pay JS SDK to complete merchant
validation and continue the payment flow.
content:
application/json:
schema:
type: object
example:
displayName: Test Account
domainName: pay.sumup.com
epochTimestamp: 1775323532665
expiresAt: 1775327132665
merchantIdentifier: 7801D328E6637EFC1ADE6CE01C671D2CD318E32CA4ED1F9FC390D170D827D9AB
merchantSessionIdentifier: SSH92CC412E5FCF4FAB88684914C953C0D4_916523AAED1343F5BC5815E12BEE9250AFFDC1A17C46B0DE5A943F0F94927C24
nonce: a968a2bf
operationalAnalyticsIdentifier: Test Account:7801D328E6637EFC1ADE6CE01C671D2CD318E32CA4ED1F9FC390D170D827D9AB
pspId: 7801D328E6637EFC1ADE6CE01C671D2CD318E32CA4ED1F9FC390D170D827D9AB
retries: 0
signature: <apple-pay-signature>
'400':
description: Bad Request
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/Error'
- type: array
description: List of error messages.
items:
$ref: '#/components/schemas/Error'
example:
error_code: INVALID
message: Bad Request
'404':
description: The requested resource does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
Not_Found:
description: The identified resource is not found on the server.
value:
error_code: NOT_FOUND
message: Resource not found
security:
- apiKey: []
- oauth2: []
tags:
- Checkouts
x-codegen:
method_name: create_apple_pay_session
x-scopes: []
/v0.1/customers:
post:
operationId: CreateCustomer
summary: Create a customer
description: Creates a new saved customer resource which you can later manipulate and save payment instruments to.
requestBody:
description: Details of the customer.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Customer'
responses:
'201':
description: Returns the customer resource.
content:
application/json:
schema:
$ref: '#/components/schemas/Customer'
'400':
description: The request body is invalid.
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/ErrorExtended'
- type: object
required:
- instance
- error_code
- error_message
properties:
instance:
type: string
error_code:
type: string
error_message:
type: string
examples:
Missing_Customer_ID:
description: The required customer identifier is missing.
value:
error_code: INVALID
message: Validation error
param: customer_id
'401':
description: The request is not authorized.
content:
application/json:
schema:
$ref: '#/components/schemas/Problem'
examples:
Problem_Details:
description: Unauthorized response returned by API gateway.
value:
detail: Unauthorized.
status: 401
title: Unauthorized
trace_id: 3c77294349d3b5647ea2d990f0d8f017
type: https://developer.sumup.com/problem/unauthorized
'403':
description: The request is authenticated but not permitted for this operation.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorForbidden'
examples:
Forbidden:
description: You do not have required scopes for making this request.
value:
error_message: request_not_allowed
error_code: FORBIDDEN
status_code: '403'
'409':
description: A customer with the provided identifier already exists.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
Existing_Customer:
description: A resource with the specified identifier already exists on the server.
value:
message: Customer already exists
error_code: CUSTOMER_ALREADY_EXISTS
security:
- apiKey: []
- oauth2:
- payment_instruments
tags:
- Customers
x-codegen:
method_name: create
x-scopes:
- payment_instruments
/v0.1/customers/{customer_id}:
parameters:
- name: customer_id
in: path
description: Unique ID of the saved customer resource.
required: true
schema:
type: string
get:
operationId: GetCustomer
summary: Retrieve a customer
description: Retrieves an identified saved customer resource through the unique `customer_id` parameter, generated upon customer creation.
responses:
'200':
description: Returns the customer resource.
content:
application/json:
schema:
$ref: '#/components/schemas/Customer'
'401':
description: The request is not authorized.
content:
application/json:
schema:
$ref: '#/components/schemas/Problem'
examples:
Problem_Details: