-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi.yaml
5649 lines (5615 loc) · 192 KB
/
openapi.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.1
info:
description: |
SumUp’s REST API operates with `application/json` HTTP requests and response. The request bodies are sent through resource-oriented URLs and use the standard HTTP response codes.
For testing our APIs make sure you have a SumUp Profile (you can create one [here](https://me.sumup.com)). To activate your SumUp Profile [follow these steps](https://help.sumup.com/en-GB/articles/7gSOGSm2wEwIHyAvjitrLF).
Once you have an active SumUp Profile, go to [developer.sumup.com](https://developer.sumup.com/) and click on “Create” On the top right side, click on “Profile” followed by “Test profiles” Select your business country Click “Create” Copy and store safely the user name (format: 32 [email protected]) and randomly generated unique password.
Note: You will not be able to access your password afterwards make sure to store it safely before dismissing the message
Note: SumUp merchants are able to create up to 20 test profiles
When you receive your test profile you can create your [client credentials](https://developer.sumup.com/docs/register-app/#3-create-oauth-client-credentials) and process different requests with real payment instruments, without charging them.
Legal note: We reserve the right to change, modify, or remove the contents of this Website and SumUp APIs at any time without notice.
title: SumUp REST API
version: 1.0.0
servers:
- description: Production server
url: 'https://api.sumup.com'
paths:
/authorize:
get:
operationId: Authorize
summary: Request authorization from users
description: |
Request authorization from users and grant your application access to resources associated with the user's profile.
parameters:
- name: response_type
in: query
description: The type of the expected response. The value must be `code` to indicate that you expect to receive an authorization code.
schema:
type: string
example: code
- name: client_id
in: query
description: 'The client ID of your application that was generated when you [registered it](https://developer.sumup.com/docs/register-app/).'
schema:
type: string
example: fOcmczrYtYMJ7Li5GjMLLcUeC9dN
- name: redirect_uri
in: query
description: 'The URI to which the merchant user is redirected after authorizing your application to access their user''s profile data and to which the authorization code is sent. The value must match exactly one of the [registered URIs](https://developer.sumup.com/docs/register-app#3-create-oauth-client-credentials) for your application.'
schema:
type: string
example: 'https://sample-app.example.com/callback'
- name: scope
in: query
description: 'A space-separated list of scopes for which you request authorization. If you don''t specify any scopes in the request, your application will be granted authorization for the default scopes.'
schema:
type: string
example: payments
- name: state
in: query
description: 'A unique local state that can be used for correlating requests and responses and for preventing [cross-site request forgery](https://tools.ietf.org/html/rfc6749#section-10.12).'
schema:
type: string
example: 2cFCsY36y95lFHk4
responses:
'200':
description: No Content
content:
application/json:
examples:
NoBody:
value: {}
schema:
type: object
tags:
- Authorization
/token:
post:
operationId: CreateToken
summary: Generate a token
description: |
Generate a token or a refresh token
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AuthToken'
responses:
'200':
description: OK
content:
application/json:
examples:
access_token:
description: Successfully created access token
value:
access_token: 565e2d19cef68203170ddadb952141326d14e03f4ccbd46daa079c26c910a864
expires_in: 3600
refresh_token: d180031bfe9bac36c336e5746637810272546865e9c9586012f462a56f3fe9af
token_type: Bearer
refresh_token:
description: Successfully created access token with the refresh token
value:
access_token: ec410d10ad7f06d3c2598473c9cd61189abcc016900a9938068542bcf9754073
expires_in: 3600
refresh_token: d180031bfe9bac36c336e5746637810272546865e9c9586012f462a56f3fe9af
scope: payments user.app-settings transactions.history user.profile_readonly
token_type: Bearer
schema:
type: object
properties:
access_token:
description: The access token that you need to use in your requests to the SumUp API.
type: string
example: ec410d10ad7f06d3c2598473c9cd61189abcc016900a9938068542bcf9754073
expires_in:
description: The validity of the access token in seconds.
type: integer
example: 3600
refresh_token:
description: The refresh token provided in the request call
type: string
example: d180031bfe9bac36c336e5746637810272546865e9c9586012f462a56f3fe9af
scope:
description: List of authorization scopes granted to your access token.
type: string
example: payments user.app-settings transactions.history user.profile_readonly
token_type:
description: The type of the token. The value is always `Bearer`.
type: string
example: Bearer
'400':
description: Bad Request
content:
application/json:
examples:
Invalid_Parameter:
description: A parameter is invalid or expired.
value:
error: invalid_grant
error_description: code parameter invalid or expired
Missing_Parameter:
description: A parameter is missing in the request.
value:
error: invalid_request
error_description: code parameter is missing
schema:
$ref: '#/components/schemas/Error'
tags:
- Authorization
/v0.1/checkouts:
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.
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/CheckoutSuccess'
'401':
description: Unauthorized
content:
application/json:
examples:
Invalid_Token:
description: The access token is invalid or has expired.
value:
error_code: NOT_AUTHORIZED
error_message: invalid access token
Missing_Token:
description: No access token is provided.
value:
error_code: NOT_AUTHORIZED
message: access token required
Not_Authorized_Token:
description: The access token is valid but the application is not authorized.
value:
error_code: NOT_AUTHORIZED
error_message: NOT_AUTHORIZED
schema:
$ref: '#/components/schemas/Error'
tags:
- Checkouts
x-codegen:
method_name: list
x-scopes:
- payments
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:
content:
application/json:
examples:
Checkout:
description: Standard request body for creating a checkout
value:
amount: 10.1
checkout_reference: f00a8f74-b05d-4605-bd73-2a901bae5802
currency: EUR
date: '2020-02-29T10:56:56+00:00'
description: Purchase
id: 2b79757a-de87-4a2e-90e4-b17c947c730d
merchant_code: MDUDGLR9
merchant_name: John Doe LTD
pay_to_email: [email protected]
redirect_url: 'https://sumup.com'
status: PAID
Checkout3DS:
description: Create a 3DS checkout
value:
amount: 10.1
checkout_reference: f00a8f74-b05d-4605-bd73-2a901bae5802
currency: EUR
customer_id: 831ff8d4cd5958ab5670
description: Purchase
merchant_code: MH4H92C7
pay_to_email: [email protected]
redirect_url: 'https://mysite.com/completed_purchase'
return_url: 'http://example.com/'
CheckoutAPM:
description: Create an Alternative Payment Method checkout
value:
amount: 10.1
checkout_reference: f00a8f74-b05d-4605-bd73-2a901bae5802
currency: EUR
merchant_code: MH4H92C7
redirect_url: 'https://mysite.com/completed_purchase'
schema:
$ref: '#/components/schemas/CheckoutCreateRequest'
responses:
'201':
description: Created
content:
application/json:
examples:
Checkout:
description: Standard response body for a successfully created checkout
value:
amount: 10.1
checkout_reference: 8ea25ec3-3293-40e9-a165-6d7f3b3073c5
currency: EUR
customer_id: 831ff8d4cd5958ab5670
date: '2020-02-29T10:56:56+00:00'
description: My Checkout
id: 88fcf8de-304d-4820-8f1c-ec880290eb92
mandate:
merchant_code: MDASYTPD
status: active
type: recurrent
merchant_code: MCNPLE22
merchant_country: DE
pay_to_email: [email protected]
return_url: 'http://example.com'
status: PENDING
transactions:
- amount: 10.1
auth_code: '012345'
currency: EUR
entry_mode: CUSTOMER_ENTRY
id: 410fc44a-5956-44e1-b5cc-19c6f8d727a4
installments_count: 1
internal_id: 0
merchant_code: MH4H92C7
payment_type: ECOM
status: SUCCESSFUL
timestamp: '2020-02-29T10:56:56.876Z'
tip_amount: 3
transaction_code: TEENSK4W2K
vat_amount: 6
valid_until: '2020-02-29T10:56:56+00:00'
Checkout3DS:
description: Response body for a successfully created 3DS checkout
value:
amount: 10.1
checkout_reference: 8ea25ec3-3293-40e9-a165-6d7f3b3073c5
currency: EUR
customer_id: 831ff8d4cd5958ab5670
date: '2020-02-29T10:56:56+00:00'
description: My Checkout
id: 88fcf8de-304d-4820-8f1c-ec880290eb92
pay_to_email: [email protected]
redirect_url: 'https://mysite.com/completed_purchase'
return_url: 'http://example.com'
status: PENDING
transactions:
- amount: 10.1
auth_code: '012345'
currency: EUR
entry_mode: CUSTOMER_ENTRY
id: 410fc44a-5956-44e1-b5cc-19c6f8d727a4
installments_count: 1
internal_id: 0
merchant_code: MH4H92C7
payment_type: ECOM
status: SUCCESSFUL
timestamp: '2020-02-29T10:56:56.876Z'
tip_amount: 3
transaction_code: TEENSK4W2K
vat_amount: 6
valid_until: '2020-02-29T10:56:56+00:00'
CheckoutAPM:
description: 'Response body for APMs, including Blik, iDeal, ...'
value:
amount: 10.1
checkout_reference: 8ea25ec3-3293-40e9-a165-6d7f3b3073c5
currency: EUR
date: '2021-06-29T11:08:36.000+00:00'
description: My Checkout
id: 88fcf8de-304d-4820-8f1c-ec880290eb92
merchant_code: MCNPLE22
merchant_country: DE
merchant_name: My company
pay_to_email: [email protected]
purpose: CHECKOUT
redirect_url: 'https://sumup.com'
return_url: 'http://example.com'
status: PENDING
transactions:
- amount: 10.1
auth_code: '012345'
currency: EUR
entry_mode: CUSTOMER_ENTRY
id: 410fc44a-5956-44e1-b5cc-19c6f8d727a4
installments_count: 1
internal_id: 0
merchant_code: MH4H92C7
payment_type: ECOM
status: SUCCESSFUL
timestamp: '2020-02-29T10:56:56.876Z'
tip_amount: 3
transaction_code: TEENSK4W2K
vat_amount: 6
schema:
$ref: '#/components/schemas/Checkout'
'400':
description: Bad Request
content:
application/json:
examples:
Missing_Parameter:
description: A required parameter is missing.
value:
error_code: MISSING
message: Validation error
param: pay_to_email
schema:
$ref: '#/components/schemas/ErrorExtended'
'401':
description: Unauthorized
content:
application/json:
examples:
Invalid_Token:
description: The access token is invalid or has expired.
value:
error_code: NOT_AUTHORIZED
error_message: invalid access token
Missing_Token:
description: No access token is provided.
value:
error_code: NOT_AUTHORIZED
message: access token required
Not_Authorized_Token:
description: The access token is valid but the application is not authorized.
value:
error_code: NOT_AUTHORIZED
error_message: NOT_AUTHORIZED
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden
content:
application/json:
examples:
Forbidden:
description: You do not have the required permission for making this request.
value:
error_code: FORBIDDEN
error_message: checkout_payments_not_allowed
status_code: '403'
schema:
$ref: '#/components/schemas/ErrorForbidden'
'409':
description: Conflict
content:
application/json:
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
schema:
$ref: '#/components/schemas/Error'
tags:
- Checkouts
x-codegen:
method_name: create
x-scopes:
- payments
'/v0.1/checkouts/{id}':
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: OK
content:
application/json:
examples:
DeletedCheckout:
description: Response body for a successfully deactivated checkout
value:
amount: 2
checkout_reference: f00a8f74-b05d-4605-bd73-2a901bae5802
currency: EUR
date: '2020-02-29T10:56:56+00:00'
description: Deletion example
id: 817340ce-f1d9-4609-b90a-6152f8ee267j
merchant_code: MH4H92C7
merchant_name: Sample Merchant
pay_to_email: [email protected]
purpose: CHECKOUT
status: EXPIRED
transactions: []
valid_until: '2020-02-29T10:56:56+00:00'
schema:
description: Details of the deleted checkout.
type: object
properties:
amount:
description: Amount of the payment.
type: number
format: float
checkout_reference:
description: Unique ID of the payment checkout specified by the client application when creating the checkout resource.
type: string
maxLength: 90
currency:
$ref: '#/components/schemas/Currency'
date:
description: 'Date and time of the creation of the payment checkout. Response format expressed according to [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) code.'
type: string
format: date-time
example: '2020-02-29T10:56:56+00:00'
readOnly: true
description:
description: 'Short description of the checkout visible in the SumUp dashboard. The description can contribute to reporting, allowing easier identification of a checkout.'
type: string
id:
description: Unique ID of the checkout resource.
type: string
readOnly: true
merchant_code:
description: Unique identifying code of the merchant profile.
type: string
merchant_country:
description: The merchant's country
type: string
merchant_name:
description: Merchant name
type: string
pay_to_email:
description: Email address of the registered user (merchant) to whom the payment is made. It is highly recommended to use `merchant_code` instead of `pay_to_email`.
type: string
format: email
purpose:
description: Purpose of the checkout creation initially
type: string
enum:
- SETUP_RECURRING_PAYMENT
- CHECKOUT
status:
description: Current status of the checkout.
type: string
enum:
- EXPIRED
readOnly: true
transactions:
description: List of transactions related to the payment.
type: array
items:
allOf:
- $ref: '#/components/schemas/TransactionMixinBase'
- $ref: '#/components/schemas/TransactionMixinCheckout'
readOnly: true
uniqueItems: true
valid_until:
description: 'Date and time of the checkout expiration before which the client application needs to send a processing request. If no value is present, the checkout does not have an expiration time.'
type: string
format: date-time
example: '2020-02-29T10:56:56+00:00'
nullable: true
readOnly: true
'401':
description: Unauthorized
content:
application/json:
examples:
Invalid_Token:
description: The access token is invalid or has expired.
value:
error_code: NOT_AUTHORIZED
error_message: invalid access token
Missing_Token:
description: No access token is provided.
value:
error_code: NOT_AUTHORIZED
message: access token required
Not_Authorized_Token:
description: The access token is valid but the application is not authorized.
value:
error_code: NOT_AUTHORIZED
error_message: NOT_AUTHORIZED
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found
content:
application/json:
examples:
Not_Found:
description: The identified resource is not found on the server.
value:
error_code: NOT_FOUND
message: Resource not found
schema:
$ref: '#/components/schemas/Error'
'409':
description: Conflict
content:
application/json:
examples:
Checkout_Processed:
description: The identified checkout resource is already processed.
value:
error_code: CHECKOUT_PROCESSED
message: Checkout is already processed
schema:
$ref: '#/components/schemas/Error'
tags:
- Checkouts
x-codegen:
method_name: deactivate
x-scopes:
- payments
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: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CheckoutSuccess'
'401':
description: Unauthorized
content:
application/json:
examples:
Invalid_Token:
description: The access token is invalid or has expired.
value:
error_code: NOT_AUTHORIZED
error_message: invalid access token
Missing_Token:
description: No access token is provided.
value:
error_code: NOT_AUTHORIZED
message: access token required
Not_Authorized_Token:
description: The access token is valid but the application is not authorized.
value:
error_code: NOT_AUTHORIZED
error_message: NOT_AUTHORIZED
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found
content:
application/json:
examples:
Not_Found:
description: The identified resource is not found on the server.
value:
error_code: NOT_FOUND
message: Resource not found
schema:
$ref: '#/components/schemas/Error'
tags:
- Checkouts
x-codegen:
method_name: get
x-scopes:
- payments
parameters:
- name: id
in: path
description: Unique ID of the checkout resource.
required: true
schema:
type: string
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.
content:
application/json:
examples:
ProcessBancontact:
description: Process a checkout with Bancontact
value:
payment_type: bancontact
personal_details:
address:
country: BE
email: [email protected]
first_name: John
last_name: Doe
ProcessBoleto:
description: Process a checkout with Boleto
value:
payment_type: boleto
personal_details:
address:
city: São Paulo
country: BR
line1: 'Rua Gilberto Sabino, 215'
postal_code: 05425-020
state: SP
email: [email protected]
first_name: John
last_name: Doe
tax_id: 423.378.593-47
ProcessCard:
description: Process a checkout with a card
value:
card:
cvv: '123'
expiry_month: '01'
expiry_year: '2023'
last_4_digits: '3456'
name: John Doe
number: '1234567890123456'
type: VISA
zip_code: '12345'
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
payment_type: card
ProcessToken:
description: Process a checkout with a token
value:
customer_id: MEDKHDTI
installments: 1
payment_type: card
token: ba85dfee-c3cf-48a6-84f5-d7d761fbba50
ProcessiDeal:
description: Process a checkout with iDeal
value:
payment_type: ideal
personal_details:
address:
country: NL
email: [email protected]
first_name: John
last_name: Doe
schema:
$ref: '#/components/schemas/CheckoutProcessMixin'
responses:
'200':
description: OK
content:
application/json:
examples:
CheckoutSuccessBancontact:
description: Successfully processed checkout with Bancontact
value:
next_step:
full: 'https://r3.girogate.de/ti/simbcmc?tx=624788471&rs=5MioXoKt2Gwj9dLgqAX1bMRBuT5xTSdB&cs=697edacdd9175f3f99542500fa0ff08280b66aaff3c2641a2e212e4b039473cc'
mechanism:
- browser
method: GET
payload:
cs: 697edacdd9175f3f99542500fa0ff08280b66aaff3c2641a2e212e4b039473cc
rs: 5MioXoKt2Gwj9dLgqAX1bMRBuT5xTSdB
tx: '624788471'
url: 'https://r3.girogate.de/ti/simbcmc'
CheckoutSuccessBoleto:
description: Successfully processed checkout with Boleto
value:
amount: 10.1
boleto:
barcode: '34191090081790614310603072340007886840000000200'
url: 'https://checkouts.sample.com/v0.1/checkouts/2e7a36cc-7897-446b-a966-952ab5f049ea/boleto'
checkout_reference: f00a8f74-b05d-4605-bd73-2a901bae5802
currency: BRL
date: '2021-07-06T12:34:02.000+00:00'
description: Boleto checkout
id: 4e425463-3e1b-431d-83fa-1e51c2925e99
merchant_code: MH4H92C7
merchant_name: Sample shop
pay_to_email: [email protected]
purpose: CHECKOUT
redirect_url: 'https://website.com'
status: PENDING
transactions:
- amount: 10.1
currency: BRL
entry_mode: BOLETO
id: debd2986-9852-4e86-8a8e-7ea9c87dd679
installments_count: 1
internal_id: 1763892018
merchant_code: MH4H92C9
payment_type: BOLETO
status: PENDING
timestamp: '2021-07-06T12:34:16.460+00:00'
tip_amount: 3
transaction_code: TEN3E696NP
vat_amount: 6
CheckoutSuccessCard:
description: Successfully processed checkout with a card
value:
amount: 10.1
checkout_reference: f00a8f74-b05d-4605-bd73-2a901bae5802
currency: EUR
customer_id: 831ff8d4cd5958ab5670
date: '2020-02-29T10:56:56+00:00'
description: Purchase
id: 4e425463-3e1b-431d-83fa-1e51c2925e99
mandate:
merchant_code: MDASYTPD
status: active
type: recurrent
merchant_code: MH4H92C7
pay_to_email: [email protected]
return_url: 'http://example.com'
status: PENDING
transaction_code: TEENSK4W2K
transaction_id: 410fc44a-5956-44e1-b5cc-19c6f8d727a4
transactions:
- amount: 10.1
auth_code: '053201'
currency: EUR
entry_mode: CUSTOMER_ENTRY
id: 410fc44a-5956-44e1-b5cc-19c6f8d727a4
installments_count: 1
internal_id: 1763892018
merchant_code: MH4H92C7
payment_type: ECOM
status: SUCCESSFUL
timestamp: '2020-02-29T10:56:56.876Z'
tip_amount: 3
transaction_code: TEENSK4W2K
vat_amount: 6
valid_until: '2020-02-29T10:56:56+00:00'
CheckoutSuccessToken:
description: Successfully processed checkout with a token
value:
amount: 10.1
checkout_reference: f00a8f74-b05d-4605-bd73-2a901bae5802
currency: EUR
customer_id: 831ff8d4cd5958ab5670
date: '2020-02-29T10:56:56+00:00'
description: Purchase with token
id: 4e425463-3e1b-431d-83fa-1e51c2925e99
merchant_code: MH4H92C7
merchant_name: Sample Merchant
pay_to_email: [email protected]
payment_instrument:
token: e76d7e5c-9375-4fac-a7e7-b19dc5302fbc
redirect_url: 'https://mysite.com/completed_purchase'
status: PENDING
transaction_code: TEENSK4W2K
transaction_id: 410fc44a-5956-44e1-b5cc-19c6f8d727a4
transactions:
- amount: 10.1
auth_code: '053201'
currency: EUR
entry_mode: CUSTOMER_ENTRY
id: 410fc44a-5956-44e1-b5cc-19c6f8d727a4
installments_count: 1
internal_id: 1763892018
merchant_code: MH4H92C7
payment_type: ECOM
status: SUCCESSFUL
timestamp: '2020-02-29T10:56:56.876Z'
tip_amount: 3
transaction_code: TEENSK4W2K
vat_amount: 6
CheckoutSuccessiDeal:
description: Successfully processed checkout with iDeal
value:
next_step:
full: 'https://r3.girogate.de/ti/simideal?tx=961473700&rs=ILnaUeQTKJ184fVrjGILrLjePX9E4rmz&cs=c8bc0ea231f8372431ca22d6f8319f8de0263d0b1705759ed27155f245f193c5'
mechanism:
- browser
method: GET
payload:
cs: c8bc0ea231f8372431ca22d6f8319f8de0263d0b1705759ed27155f245f193c5
rs: ILnaUeQTKJ184fVrjGILrLjePX9E4rmz
tx: '961473700'
url: 'https://r3.girogate.de/ti/simideal'
schema:
$ref: '#/components/schemas/CheckoutSuccess'
'400':
description: Bad Request
content:
application/json:
examples:
Invalid_Parameter:
description: A required parameter has an invalid value.
value:
error_code: INVALID
message: Validation error
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
schema:
oneOf:
- $ref: '#/components/schemas/ErrorExtended'
- description: List of error messages.
items:
$ref: '#/components/schemas/ErrorExtended'
type: array
'401':
description: Unauthorized
content:
application/json:
examples:
Invalid_Token:
description: The access token is invalid or has expired.
value:
error_code: NOT_AUTHORIZED
error_message: invalid access token
Missing_Token:
description: No access token is provided.
value:
error_code: NOT_AUTHORIZED
message: access token required
Not_Authorized_Token:
description: The access token is valid but the application is not authorized.
value:
error_code: NOT_AUTHORIZED
error_message: NOT_AUTHORIZED
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found
content:
application/json:
examples:
Not_Found:
description: The identified resource is not found on the server.
value:
error_code: NOT_FOUND
message: Resource not found
schema:
$ref: '#/components/schemas/Error'
'409':
description: Conflict
content:
application/json:
examples:
Checkout_Processed:
description: The identified checkout resource is already processed.
value:
error_code: CHECKOUT_PROCESSED
message: Checkout is already processed
schema:
$ref: '#/components/schemas/Error'
tags:
- Checkouts
x-codegen:
method_name: process
/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.
content:
application/json:
schema:
$ref: '#/components/schemas/Customer'
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/Customer'
'401':
description: Unauthorized
content:
application/json:
examples:
Invalid_Token:
description: The access token is invalid or has expired.
value:
error_code: NOT_AUTHORIZED
error_message: invalid access token
Missing_Token:
description: No access token is provided.
value:
error_code: NOT_AUTHORIZED
message: access token required
Not_Authorized_Token:
description: The access token is valid but the application is not authorized.
value:
error_code: NOT_AUTHORIZED
error_message: NOT_AUTHORIZED
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden
content:
application/json:
examples:
Forbidden:
description: You do not have required scopes for making this request.
value:
error_code: FORBIDDEN
error_message: request_not_allowed
status_code: '403'
schema:
$ref: '#/components/schemas/ErrorForbidden'
'409':
description: Conflict
content:
application/json:
examples:
Existing_Customer:
description: A resource with the specified identifier already exists on the server.
value:
error_code: CUSTOMER_ALREADY_EXISTS
message: Customer already exists
schema:
$ref: '#/components/schemas/Error'
tags:
- Customers
x-codegen:
method_name: create
x-scopes:
- payment_instruments
'/v0.1/customers/{customer_id}':
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: Created
content:
application/json:
schema:
$ref: '#/components/schemas/Customer'
'401':
description: Unauthorized
content:
application/json:
examples:
Invalid_Token:
description: The access token is invalid or has expired.
value:
error_code: NOT_AUTHORIZED
error_message: invalid access token
Missing_Token: