forked from tonderio/tonder-docs-v3
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yml
More file actions
1913 lines (1913 loc) · 85.2 KB
/
openapi.yml
File metadata and controls
1913 lines (1913 loc) · 85.2 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
x-stoplight:
id: mpmva0671drqf
info:
title: Tonder
description: Tonder API
termsOfService: https://www.google.com/policies/terms/
contact:
email: hello@tonder.io
version: v1
servers:
- url: https://stage.tonder.io/api/v1
description: Stage server
- url: https://stoplight.io/mocks/tonder/tonder-api-v1-2/3152148
description: Stoplight server
security: []
paths:
"/payments/business/{api_key}":
get:
description: ''
parameters:
- in: path
description: Your Tonder API Key. You can recover it on Tonder's dashboard.
name: api_key
required: true
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
business:
type: object
description: Contains information about the business.
properties:
pk:
type: integer
example: 88
description: The primary key or identifier for the business.
name:
type: string
example: QA Test
description: The name of the business.
categories:
type: array
description: An array of categories associated with the business.
items:
type: object
properties:
pk:
type: integer
example: 6
description: The primary key or identifier for the category.
name:
type: string
example: E-commerce
description: The name of the category.
web:
type: string
format: uri
example: http://sitioinformatico.com/tonderwp
description: The website URL for the business.
logo:
type: string
format: uri
example: https://zplit-stage.s3.amazonaws.com/media/business_logos/ftrain_1.png
description: The URL of the business's logo.
full_logo_url:
type: string
format: uri
example: https://zplit-stage.s3.amazonaws.com/media/business_logos/ftrain_1.png
description: The URL of the business's full logo.
background_color:
type: string
example: "#004080"
description: The background color associated with the business.
primary_color:
type: string
example: "#47a76d"
description: The primary color associated with the business.
checkout_mode:
type: boolean
example: false
description: A boolean indicating whether the business has
a checkout mode.
textCheckoutColor:
type: string
example: "#ffffff"
description: The text color for the checkout.
textDetailsColor:
type: string
example: "#ed8201"
description: The text color for details.
checkout_logo:
type: string
format: uri
example:
description: The URL of the checkout logo.
openpay_keys:
type: object
description: Contains OpenPay keys for the business.
properties:
merchant_id:
type: string
example: mabkc7smuyermmueyxcl
description: The merchant ID associated with OpenPay.
public_key:
type: string
example: pk_707d2ac7cc5d43ee881de43be9eea22d
description: The public key associated with OpenPay.
fintoc_keys:
type: object
description: Contains Fintoc keys for the business.
properties:
public_key:
type: string
example: ''
description: The public key associated with Fintoc.
vault_id:
type: string
example: seaf898c927c4ee1a5b2c58315b6ee0d
description: The identifier for the vault.
vault_url:
type: string
format: uri
example: https://a370a9658141.vault.skyflowapis-preview.com
description: The URL for the vault.
reference:
type: integer
example: 520961
description: A reference number associated with the business.
is_installments_available:
type: boolean
example: false
description: A boolean indicating whether installments are available.
'403':
description: Forbidden
content:
application/json:
example:
detail: Invalid token.
'404':
description: Not found
content:
application/json:
example:
detail: Not found.
tags:
- payments
"/customer/":
post:
description: ''
parameters: []
requestBody:
content:
application/json:
schema:
type: object
properties:
email:
type: string
format: email
description: The client's email address.
required:
- email
responses:
'201':
description: Created
content:
application/jsons:
schema:
type: object
properties:
id:
type: integer
example: 766
description: The newly created client's unique identifier.
email:
type: string
format: email
example: jsmith@example.com
description: The newly created client's email address.
auth_token:
type: string
example: 86706c507e9ca032c91771a26819d69e91402fc9
description: The authorization token for the client.
'400':
description: Bad Request
content:
Bad Request:
example:
email:
- Enter a valid email address.
'403':
description: Forbidden
content:
application/json:
example:
detail: Invalid token.
tags:
- payments
"/orders/":
post:
description: ''
parameters: []
requestBody:
content:
application/json:
schema:
type: object
properties:
business:
type: string
default: "<YOUR_API_KEY>"
example: "<YOUR_API_KEY>"
description: Your Tonder API Key. You can retrieve it from the dashboard.
client:
type: string
default: "<YOUR_CLIENT_AUTH_TOKEN>"
example: "<YOUR_CLIENT_AUTH_TOKEN>"
description: 'The client authorization token: `auth_token`'
billing_address_id:
type: string
default:
example:
description: The identifier for the billing address.
shipping_address_id:
type: string
default:
example:
description: The identifier for the shipping address.
amount:
type: integer
description: The total monetary value of the transaction.
status:
type: string
description: A code indicating the status of the transaction.
reference:
type: string
description: A unique identifier or reference number associated
with the transaction.
is_oneclick:
type: boolean
description: A boolean value indicating whether the transaction
involves a one-click purchase.
items:
type: array
description: An array containing details about the items included
in the transaction.
items:
type: object
properties:
description:
type: string
description: A description for the item.
quantity:
type: integer
description: The quantity of the item added to the cart.
price_unit:
type: integer
description: The unit price of the item.
discount:
type: integer
description: The discount applied to the item.
taxes:
type: integer
description: The taxes associated with the item.
product_reference:
type: integer
description: A reference number or identifier for the product.
name:
type: string
description: " The name or title of the product."
amount_total:
type: integer
description: The total monetary value of this specific cart
item.
required:
- description
- quantity
- price_unit
- discount
- taxes
- product_reference
- name
- amount_total
required:
- business
- client
- amount
- status
- reference
- is_oneclick
- items
responses:
'201':
description: Successful response
content:
application/json:
schema:
type: object
properties:
id:
type: integer
example: 5910
description: An identifier associated with the order.
created:
type: string
format: date-time
example: '2024-01-18T10:09:36.499975-06:00'
description: The timestamp indicating the creation date and time
of the order.
amount:
type: string
example: '1200.0000'
description: The total monetary value of the order.
status:
type: string
example: Activa
description: The status of the order.
payment_method:
type: string
example:
description: The payment method used in the order.
reference:
type: string
example: '1234556'
description: A unique identifier or reference number associated
with the order.
is_oneclick:
type: boolean
example: true
description: A boolean value indicating whether the order involves
a one-click purchase.
items:
type: array
description: An array containing details about the items included
in the order.
items:
type: object
properties:
description:
type: string
example: description test
description: A description of the item in the order.
product_reference:
type: string
example: '1'
description: A reference number or identifier for the product
in the order.
quantity:
type: string
example: '1.0000'
description: The quantity of the item in the order.
price_unit:
type: string
example: '1.0000'
description: The unit price of the item in the order.
discount:
type: string
example: '0.0000'
description: The discount applied to the item in the order.
taxes:
type: string
example: '0.0000'
description: The taxes associated with the item in the order.
amount_total:
type: string
example: '1200.0000'
description: The total monetary value of the specific item
in the order.
billing_address:
type: string
description: The billing address information in the order.
shipping_address:
type: string
description: The shipping address information in the order.
client:
type: object
description: Contains information about the client.
properties:
email:
type: string
format: email
example: pruebas@sdk.com
description: The email address of the client.
name:
type: string
example: ''
description: The full name of the client.
first_name:
type: string
example: ''
description: The first name of the client.
last_name:
type: string
example: ''
description: The last name of the client.
client_profile:
type: object
properties:
gender:
type: string
example: ''
description: Gender information about the client.
date_birth:
type: string
format: date
example:
description: Date of birth of the client.
terms:
type: boolean
example: false
description: A boolean indicating whether the client has
agreed to terms.
phone:
type: string
example: ''
description: Phone number of the client.
'403':
description: Forbidden
content:
application/json:
example:
detail: Invalid token.
tags:
- payments
"/business/{business}/payments/":
post:
description: ''
parameters:
- in: path
name: business
description: A business unique identifier.
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
amount:
type: number
example: 1200
description: The total monetary value associated with the order.
date:
type: string
format: date-time
example: '2023-12-15T22:45:06.506Z'
description: The timestamp representing the date and time of the
order.
order:
type: integer
example: 5728
description: The unique identifier number for the order.
required:
- amount
- date
- order
responses:
'201':
description: Successful response
content:
application/json:
schema:
type: object
properties:
pk:
type: integer
example: 5943
description: The primary key or identifier associated with the
payment.
order:
type: integer
example:
description: The unique identifier number associated with the
order.
amount:
type: string
example: '1200.0000'
description: The total monetary value of the order.
status:
type: string
example: PENDING
description: The current status of the order.
date:
type: string
format: date-time
example: '2024-01-18T10:18:39.800536-06:00'
description: The timestamp indicating the date and time the payment
was created.
paid_date:
type: string
format: date-time
example:
description: The timestamp indicating the date and time the order
was paid, or null if not paid.
shipping_address:
type: object
description: Details of the shipping address in the order.
properties:
street:
type: string
example: N/a
description: The street address in the shipping information.
number:
type: string
example: N/a
description: The house or building number in the shipping
information.
suburb:
type: string
example: N/a
description: The suburb or district in the shipping information.
city:
type: object
properties:
name:
type: string
example: N/a
description: The name of the city in the shipping information.
required:
- name
description: The city information in the shipping details.
state:
type: object
properties:
name:
type: string
example: N/a
description: The name of the state or region in the shipping
information.
country:
type: object
properties:
name:
type: string
example: N/a
description: The name of the country in the shipping
information.
description: The country information in the shipping details.
description: The state information in the shipping details.
zip_code:
type: string
example: N/a
description: The ZIP code or postal code in the shipping information.
shipping_address_id:
type: integer
example:
description: The identifier associated with the shipping address
in the order.
billing_address:
type: object
description: Details of the billing address in the order.
properties:
street:
type: string
example: N/a
description: The street address in the billing information.
number:
type: string
example: N/a
description: The house or building number in the billing information.
suburb:
type: string
example: N/a
description: The suburb or district in the billing information.
city:
type: object
properties:
name:
type: string
example: N/a
description: The name of the city in the billing information.
description: The city information in the billing details.
state:
type: object
properties:
name:
type: string
example: N/a
description: The name of the state or region in the billing
information.
country:
type: object
properties:
name:
type: string
example: N/a
description: The name of the country in the billing
information.
description: The country information in the billing details.
description: The state information in the billing details.
zip_code:
type: string
example: N/a
description: The ZIP code or postal code in the billing information.
billing_address_id:
type: string
example:
description: The identifier associated with the billing address
in the order.
client:
type: string
example:
description: The identifier or reference associated with the client
or customer.
customer_order_reference:
type: string
example:
description: The customer's reference or identifier associated
with the order.
'403':
description: Forbidden
content:
application/json:
example:
detail: Invalid token.
tags:
- payments
"/checkout-router/":
post:
description: ''
parameters: []
requestBody:
content:
application/json:
schema:
type: object
properties:
card:
type: object
description: Contains information related to the payment card used
in the transaction.
properties:
cvv:
type: string
example: 69f4d206-ceb6-4be8-82d8-7a39dceb9f87
description: The Card Verification Value (CVV) associated with
the card.
skyflow_id:
type: string
example: 702faf3c-26f9-41c1-a287-cec20aa43929
description: The unique identifier associated with the card
in Skyflow's secure vault.
card_number:
type: string
example: 9230-0892-4469-1474
description: The card number.
cardholder_name:
type: string
example: 3b5d70a9-01b9-4001-8328-9b10168bac25
description: The name of the cardholder.
expiration_year:
type: string
example: 645a3174-340a-4849-ba5c-c4333d2967c9
description: The expiration year of the card.
expiration_month:
type: string
example: 5c6bef6c-9642-4403-9ce6-215b0d3f85b0
description: The expiration month of the card.
required:
- cvv
- skyflow_id
- card_number
- cardholder_name
- expiration_year
- expiration_month
name:
type: string
example: Jhon
description: The first name of the client.
last_name:
type: string
example: Doe
description: The last name of the client.
email_client:
type: string
format: email
example: pruebas@sdk.com
description: The email address of the client.
phone_number:
type: string
example: '6181234567'
description: The phone number of the client.
return_url:
type: string
format: uri
example: http://tonder.io
description: The URL to which the user will be redirected after
completing the transaction.
id_product:
type: string
example: no_id
description: The identifier for the product.
quantity_product:
type: integer
example: 1
description: The quantity of the product in the transaction.
id_ship:
type: string
example: '0'
description: The identifier for the shipping information.
instance_id_ship:
type: string
example: '0'
description: The instance identifier for the shipping information.
amount:
type: integer
example: 1200
description: The total monetary value of the transaction.
title_ship:
type: string
example: shipping
description: The title or type of shipping.
description:
type: string
example: transaction
description: A description of the transaction.
device_session_id:
type: string
example: VXJLx0H4Fxyz09Ssfbbv0QE8JXDjnKiW
description: The identifier for the device session.
token_id:
type: string
example: ''
description: A token identifier associated with the transaction.
order_id:
type: integer
example: 5730
description: An identifier or reference number for the order.
business_id:
type: integer
example: 89
description: The identifier for the business.
payment_id:
type: integer
example: 5744
description: The identifier for the payment.
source:
type: string
example: sdk
description: The source of the transaction.
required:
- card
- name
- last_name
- email_client
- phone_number
- return_url
- id_product
- quantity_product
- id_ship
- instance_id_ship
- amount
- title_ship
- description
- device_session_id
- order_id
- business_id
- payment_id
- source
responses:
'201':
description: Successful response
content:
application/json:
schema:
type: object
properties:
status:
type: string
example: '200'
description: The HTTP status code indicating the success or failure
of the response.
message:
type: string
example: Success
description: A message providing additional information about
the success or failure of the response.
psp_response:
type: object
description: The response from the payment service provider (PSP)
containing detailed information about the payment transaction.
properties:
id:
type: string
example: ch_3OZyPSK5zRUzLwaW0CyXUIVQ
description: A unique identifier for the payment transaction
within the payment service provider (PSP) system.
object:
type: string
example: charge
description: The type of object, representing the nature of
the transaction (e.g., 'charge' for a payment charge).
amount:
type: integer
example: 120000
description: The total amount of the transaction, expressed
in the smallest currency unit (e.g., cents or pence).
amount_captured:
type: integer
example: 120000
description: The amount that has been captured or collected
from the customer as part of the transaction.
amount_refunded:
type: integer
example: 0
description: The amount that has been refunded to the customer
as part of the transaction.
application:
type: string
example:
description: The identifier of the application associated
with the transaction, if applicable.
application_fee:
type: string
example:
description: The application fee, if any, applied to the transaction.
application_fee_amount:
type: string
example:
description: The amount of the application fee, if any, applied
to the transaction.
balance_transaction:
type: string
example: txn_3OZyPSK5zRUzLwaW0iZIaxjx
description: The identifier of the balance transaction associated
with the payment charge.
billing_details:
type: object
properties:
address:
type: object
properties:
city:
type: string
example:
description: The city associated with the billing
address.
country:
type: string
example:
description: The country associated with the billing
address.
line1:
type: string
example:
description: The first line of the billing address.
line2:
type: string
example:
description: The second line of the billing address.
postal_code:
type: string
example:
description: The postal code associated with the billing
address.
state:
type: string
example:
description: The state or region associated with the
billing address.
description: Object containing details about the address
in the billing details.
email:
type: string
example:
description: The email address associated with the billing
details.
name:
type: string
example:
description: The name associated with the billing details.
phone:
type: string
example:
description: The phone number associated with the billing
details.
description: Object containing details about the billing information.
calculated_statement_descriptor:
type: string
example: GOLFMANAGER.COM
description: The calculated statement descriptor associated
with the transaction.
captured:
type: boolean
example: true
description: Indicates whether the payment has been captured
(true) or not (false).
created:
type: integer
example: 1705595142
description: The timestamp representing the creation date
and time of the transaction.
currency:
type: string
example: mxn
description: The currency code associated with the transaction.
customer:
type: string
example: cus_PBoeaxFGw6mZFF
description: The identifier of the customer associated with
the transaction.
description:
type: string
example: transaction
description: A description or additional information about
the transaction.
destination:
type: string
example:
description: The destination of the transaction, if applicable.
dispute:
type: string
example:
description: The identifier of any dispute associated with
the transaction, if applicable.
disputed:
type: boolean
example: false
description: Indicates whether the transaction is disputed
(true) or not (false).
failure_balance_transaction:
type: string
example:
description: The identifier of the balance transaction in
case of failure, if applicable.
failure_code:
type: string
example:
description: The code associated with the failure, if applicable.
failure_message:
type: string
example:
description: A message providing details about the failure,
if applicable.
fraud_details:
type: object
example: {}
description: Details about any fraud associated with the transaction,
if applicable.
invoice:
type: string
example:
description: The identifier of the invoice associated with
the transaction, if applicable.
livemode:
type: boolean
example: false
description: Indicates whether the transaction was created
in live mode (true) or test mode (false).
metadata:
type: object
example: {}
description: Additional metadata associated with the transaction.
on_behalf_of:
type: string
example:
description: The identifier of the account on behalf of which
the transaction is performed, if applicable.
order:
type: string
example:
description: The identifier of the order associated with the
transaction, if applicable.
outcome:
type: object
description: Details about the outcome of the payment transaction.
properties:
network_status:
type: string
example: approved_by_network
description: The network status of the payment, indicating
whether it was approved by the payment network.
reason:
type: string
example:
description: The reason for the outcome, if available.
For example, it might contain details if the payment
was declined.
risk_level:
type: string
example: normal
description: The risk level associated with the payment,
indicating the perceived risk of the transaction.
risk_score:
type: integer
example: 15
description: The numerical risk score assigned to the
payment transaction, providing a quantitative measure
of risk.
seller_message: