forked from supabase-community/chatgpt-your-files
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi2.json
More file actions
3529 lines (3529 loc) · 111 KB
/
openapi2.json
File metadata and controls
3529 lines (3529 loc) · 111 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
{
"components": {
"securitySchemes": {
"ApiKey": {
"description": "This security scheme requires an API Key to successfully authenticate.",
"in": "header",
"name": "X-Api-Key",
"type": "apiKey"
}
},
"schemas": {
"ReturnURL": {
"type": "string",
"format": "uri",
"description": "The URL to which the user is redirected at the end of the Hosted Checkout session. We will include the CheckoutSessionID, ExternalID and Status of the session, ie `?CheckoutSessionID={CheckoutSessionID}&ExternalID={ExternalID}&Status={Status}`",
"minLength": 10,
"maxLength": 1000
},
"GetPricesResponse": {
"type": "object",
"properties": {
"Items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PriceItem"
},
"x-go-type-skip-optional-pointer": true
}
},
"required": ["Items"]
},
"AccountType": {
"type": "string",
"example": "Current",
"description": "Type of account:\n * Current"
},
"GetChannelsResponse": {
"type": "object",
"properties": {
"Items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Channel"
},
"x-go-type-skip-optional-pointer": true
},
"PageToken": {
"type": "string"
}
},
"required": ["Items"]
},
"Channel": {
"type": "object",
"properties": {
"ID": {
"type": "string"
},
"PaymentMethodCategory": {
"$ref": "#/components/schemas/PaymentMethodCategory"
},
"PaymentMethodType": {
"$ref": "#/components/schemas/PaymentMethodType"
},
"FiatCurrency": {
"$ref": "#/components/schemas/FiatCurrencyCode"
},
"Country": {
"$ref": "#/components/schemas/CountryCode"
},
"Calculated": {
"$ref": "#/components/schemas/ChannelCalculated",
"description": "Calculated price information. Not returned if amount is not provided in the query."
},
"Limits": {
"$ref": "#/components/schemas/ChannelLimits",
"description": "Limits for the channel in requested currency."
},
"Rate": {
"$ref": "#/components/schemas/PositiveDecimal",
"description": "Rate used for the cryptocurrency being exchanged against the channel fiat currency. Does not include fees. It is not a quoted price and is subject to market fluctuations."
},
"PaymentMethods": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PaymentMethodDisplay"
},
"description": "Recent payment methods for the channel. Only returned if `CustomerID` was provided in the query."
},
"ProcessingSeconds": {
"type": "integer",
"description": "The time it takes to process a transaction through the channel",
"minimum": 1
},
"FormSchema": {
"$ref": "#/components/schemas/FormSchema",
"description": "Form schema which needs to be filled by the customer. If a PaymentMethodID was provided, only the missing fields are displayed in the schema."
}
},
"required": [
"ID",
"PaymentMethodCategory",
"PaymentMethodType",
"FiatCurrency",
"Country",
"Limits",
"Rate",
"ProcessingSeconds"
]
},
"ChannelCalculated": {
"type": "object",
"properties": {
"TotalFee": {
"$ref": "#/components/schemas/PositiveDecimal",
"description": "The total fee that will be charged for using the specific channel, always specified in the same currency as the requested fiat segment of the transaction."
}
},
"required": ["TotalFee"]
},
"ChannelLimits": {
"type": "object",
"properties": {
"MinLimit": {
"$ref": "#/components/schemas/PositiveDecimal",
"description": "The minimum amount that can be sent through the channel"
},
"MaxLimit": {
"$ref": "#/components/schemas/PositiveDecimal",
"description": "The maximum amount that can be sent through the channel"
}
},
"required": ["MinLimit"]
},
"ChannelsCountriesResponse": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FiatCurrencyCode"
}
},
"example": {
"AR": ["ARS"],
"BR": ["BRL"],
"MX": ["MXN"]
}
},
"BalanceResponse": {
"type": "object",
"properties": {
"AccountType": {
"$ref": "#/components/schemas/AccountType"
},
"CryptoCurrency": {
"$ref": "#/components/schemas/CryptoCurrencyCode"
},
"Available": {
"$ref": "#/components/schemas/PositiveDecimal",
"description": "Amount available to spend."
},
"Total": {
"$ref": "#/components/schemas/PositiveDecimal",
"description": "Amount including outflows that have not yet settled."
}
},
"required": ["AccountType", "CryptoCurrency", "Available", "Total"]
},
"GetBalancesResponse": {
"type": "object",
"properties": {
"Items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BalanceResponse"
},
"x-go-type-skip-optional-pointer": true
},
"PageToken": {
"type": "string"
}
},
"required": ["Items"]
},
"ExternalID": {
"type": "string",
"description": "A unique identifier used in the business system to store a reference for the transaction. This field allows businesses to track and manage transactions within their internal systems.",
"minLength": 1,
"maxLength": 36
},
"PaymentMethodID": {
"type": "string",
"description": "Existing payment method id to be used.",
"minLength": 1,
"maxLength": 150
},
"PaymentMethodDisplay": {
"type": "object",
"properties": {
"ID": {
"type": "string"
},
"PaymentMethodType": {
"$ref": "#/components/schemas/PaymentMethodType"
},
"Details": {
"$ref": "#/components/schemas/PaymentMethodDisplayDetails"
}
},
"required": ["ID", "PaymentMethodType", "Details"]
},
"FiatPaymentMethodBankDisplay": {
"type": "object",
"properties": {
"Type": {
"type": "string",
"enum": ["FiatPaymentMethodBankDisplay"]
},
"AccountNumber": {
"type": "string"
},
"BankCode": {
"type": "string"
}
},
"required": ["Type"]
},
"FiatPaymentMethodCardDisplay": {
"type": "object",
"properties": {
"Type": {
"type": "string",
"enum": ["FiatPaymentMethodCardDisplay"]
},
"Last4": {
"type": "string"
},
"Scheme": {
"$ref": "#/components/schemas/FiatPaymentCardScheme"
}
},
"required": ["Type", "Last4", "Scheme"]
},
"FiatPaymentRefund": {
"type": "object",
"properties": {
"RefundID": {
"type": "string",
"format": "uuid"
},
"RefundedAmount": {
"$ref": "#/components/schemas/FiatAmount"
},
"RequestedTime": {
"$ref": "#/components/schemas/DateTime"
},
"Status": {
"$ref": "#/components/schemas/FiatPaymentStatus"
}
},
"required": ["RefundID", "RefundedAmount", "RequestedTime", "Status"]
},
"SenderPaymentMethod": {
"type": "object",
"properties": {
"FullName": {
"type": "string"
},
"Details": {
"$ref": "#/components/schemas/PaymentMethodDisplayDetails"
}
},
"required": ["Details"]
},
"DepositSourceTriggerConditionInput": {
"type": "object",
"properties": {
"AmountConditions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AmountCondition"
},
"description": "Amount conditions for the rule."
},
"CryptoCurrency": {
"$ref": "#/components/schemas/CryptoCurrencyCode",
"description": "Cryptocurrency for the rule.",
"example": "USDC"
},
"Network": {
"$ref": "#/components/schemas/Network",
"description": "Account-based network (main/sandbox):\n * Ethereum/EthereumTestSepolia\n * PolygonPos/PolygonTestAmoy",
"example": "Ethereum"
}
},
"required": ["AmountConditions", "CryptoCurrency", "Network"]
},
"DepositSourceTriggerCondition": {
"type": "object",
"properties": {
"AmountConditions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AmountCondition"
},
"description": "Amount conditions for the rule."
},
"CryptoCurrency": {
"$ref": "#/components/schemas/CryptoCurrencyCode",
"description": "Cryptocurrency for the rule.",
"example": "USDC"
},
"Network": {
"$ref": "#/components/schemas/Network",
"description": "Account-based network (main/sandbox):\n * Ethereum/EthereumTestSepolia\n * PolygonPos/PolygonTestAmoy",
"example": "Ethereum"
},
"DestinationAddress": {
"$ref": "#/components/schemas/DestinationAddress",
"description": "The destination address to which the crypto currency should be transferred.",
"example": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
}
},
"required": ["AmountConditions", "CryptoCurrency", "Network", "DestinationAddress"]
},
"AmountCondition": {
"type": "object",
"properties": {
"ComparisonOperator": {
"$ref": "#/components/schemas/ComparisonOperator"
},
"Value": {
"$ref": "#/components/schemas/PositiveDecimal"
}
},
"required": ["ComparisonOperator", "Value"]
},
"FiatPaymentMethodIdentifierDisplay": {
"type": "object",
"properties": {
"Type": {
"type": "string",
"enum": ["FiatPaymentMethodIdentifierDisplay"]
},
"IdentifierType": {
"$ref": "#/components/schemas/PaymentMethodIdentifierType"
},
"Identifier": {
"type": "string"
}
},
"required": ["Type", "Identifier", "IdentifierType"]
},
"PaymentMethodDisplayDetails": {
"type": "object",
"description": "Contains information to display each payment method, with fields tailored to the specific type (e.g., last four digits or account number) to help identify the payment method.",
"oneOf": [
{
"$ref": "#/components/schemas/FiatPaymentMethodBankDisplay"
},
{
"$ref": "#/components/schemas/FiatPaymentMethodCardDisplay"
},
{
"$ref": "#/components/schemas/FiatPaymentMethodIdentifierDisplay"
}
],
"discriminator": {
"propertyName": "Type"
}
},
"FiatPaymentCardScheme": {
"type": "string",
"description": "The card scheme:\n * Mastercard\n * Visa\n",
"example": "Visa"
},
"PaymentMethodIdentifierType": {
"type": "string",
"description": "Identifier type:\n * PhoneNumber\n * Email\n * TaxID\n",
"example": "PhoneNumber"
},
"PaymentMethod": {
"type": "object",
"properties": {
"ID": {
"type": "string"
},
"CustomerID": {
"$ref": "#/components/schemas/CustomerID"
},
"Country": {
"$ref": "#/components/schemas/CountryCode"
},
"PaymentMethodCategory": {
"$ref": "#/components/schemas/PaymentMethodCategory"
},
"DisplayDetails": {
"$ref": "#/components/schemas/PaymentMethodDisplayDetails"
}
},
"required": ["ID", "PaymentMethodCategory", "DisplayDetails", "Country"]
},
"GetPaymentMethodsResponse": {
"type": "object",
"properties": {
"Items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PaymentMethod"
},
"x-go-type-skip-optional-pointer": true
},
"PageToken": {
"type": "string"
}
},
"required": ["Items"]
},
"PriceItem": {
"type": "object",
"properties": {
"PaymentMethodCategory": {
"$ref": "#/components/schemas/PaymentMethodCategory"
},
"Rate": {
"$ref": "#/components/schemas/PositiveDecimal",
"description": "Rate used to exchange currencies"
},
"UpdatedAt": {
"$ref": "#/components/schemas/DateTime"
},
"TotalFee": {
"$ref": "#/components/schemas/PositiveDecimal",
"description": "The total fee that will be charged for using the specific channel, always specified in the same currency as the requested fiat segment of the transaction."
},
"BusinessFee": {
"$ref": "#/components/schemas/PositiveDecimal",
"description": "The fee applied on behalf of the business to customer transactions, always specified in the same currency as the requested fiat segment of the transaction."
},
"SourceAmount": {
"$ref": "#/components/schemas/PositiveDecimal"
},
"DestinationAmount": {
"$ref": "#/components/schemas/PositiveDecimal"
},
"CryptoFeeBreakdown": {
"type": "array",
"description": "Total fee amount breakdown in cryptocurrency.",
"items": {
"$ref": "#/components/schemas/FeeBreakdownItem"
},
"x-go-type-skip-optional-pointer": true
}
},
"required": ["PaymentMethodCategory", "PaymentMethodType", "Rate", "UpdatedAt"]
},
"FeeBreakdownItem": {
"type": "object",
"properties": {
"Type": {
"$ref": "#/components/schemas/FeeBreakdownItemType"
},
"Amount": {
"$ref": "#/components/schemas/PositiveDecimal"
}
},
"required": ["Type", "Amount"]
},
"FeeBreakdownItemType": {
"type": "string",
"description": "What fee the items refers to:\n* ChannelFee\n* BusinessFee"
},
"PrepareSellRequest": {
"type": "object",
"properties": {
"ChannelID": {
"$ref": "#/components/schemas/ChannelID"
},
"PaymentMethodID": {
"$ref": "#/components/schemas/PaymentMethodID"
},
"CryptoCurrency": {
"$ref": "#/components/schemas/CryptoCurrencyCode",
"description": "Cryptocurrency to sell."
},
"CustomerID": {
"$ref": "#/components/schemas/CustomerID"
},
"FiatAmount": {
"$ref": "#/components/schemas/PositiveDecimal",
"description": "Amount sent to customer's payment method."
},
"Form": {
"$ref": "#/components/schemas/FormInput"
},
"DelayedSell": {
"type": "boolean",
"description": "When enabled, balance checks are deferred until the final sell request, allowing the order to be prepared now and executed later."
}
},
"required": ["ChannelID", "CryptoCurrency", "FiatAmount"]
},
"SellRequest": {
"type": "object",
"properties": {
"CryptoCurrency": {
"$ref": "#/components/schemas/CryptoCurrencyCode",
"description": "Cryptocurrency to sell."
},
"FiatAmount": {
"$ref": "#/components/schemas/PositiveDecimal",
"description": "Amount sent to customer's payment method."
},
"CryptoAuthorizedAmount": {
"$ref": "#/components/schemas/PositiveDecimal",
"description": "Maximum amount that can be charged for this transaction."
},
"FormSessionID": {
"$ref": "#/components/schemas/FormSessionID"
},
"Nonce": {
"$ref": "#/components/schemas/Nonce"
},
"ExternalID": {
"$ref": "#/components/schemas/ExternalID"
}
},
"required": [
"CryptoAuthorizedAmount",
"CryptoCurrency",
"FiatAmount",
"FormSessionID",
"Nonce"
]
},
"BankDepositToOnchainAddressRequest": {
"type": "object",
"properties": {
"CustomerID": {
"$ref": "#/components/schemas/CustomerID"
},
"FiatCurrency": {
"$ref": "#/components/schemas/FiatCurrencyCode"
},
"CryptoCurrency": {
"$ref": "#/components/schemas/CryptoCurrencyCode"
},
"Network": {
"$ref": "#/components/schemas/Network"
},
"DestinationAddress": {
"$ref": "#/components/schemas/DestinationAddress",
"description": "The final destination address to which the crypto currency should be transferred."
}
},
"required": [
"CustomerID",
"FiatCurrency",
"CryptoCurrency",
"Network",
"DestinationAddress"
]
},
"BankDepositToOnchainAddressResponse": {
"type": "object",
"properties": {
"PaymentMethodID": {
"$ref": "#/components/schemas/PaymentMethodID"
},
"PaymentMethodType": {
"$ref": "#/components/schemas/PaymentMethodType"
},
"Reference": {
"type": "string"
},
"AccountNumber": {
"type": "string"
},
"AccountHolderName": {
"type": "string"
},
"BankCode": {
"type": "string"
},
"BankName": {
"type": "string"
},
"BankAddress": {
"$ref": "#/components/schemas/StreetAddress"
}
},
"required": ["PaymentMethodID", "PaymentMethodType", "AccountNumber"]
},
"RuleCreateRequest": {
"type": "object",
"properties": {
"Trigger": {
"oneOf": [
{
"$ref": "#/components/schemas/DepositSourceTriggerInput"
}
],
"discriminator": {
"propertyName": "Type"
}
},
"Actions": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/SellActionInput"
}
],
"discriminator": {
"propertyName": "Type"
}
}
},
"Expiry": {
"$ref": "#/components/schemas/DateTime"
},
"Permanent": {
"type": "boolean",
"description": "If True, a rule can be executed repeatedly. Default is False."
},
"Nonce": {
"$ref": "#/components/schemas/Nonce"
}
},
"required": ["Trigger", "Actions", "Nonce"]
},
"FormPropertyList": {
"type": "object",
"additionalProperties": true,
"x-go-type-skip-optional-pointer": true,
"x-order": 3
},
"FormSchema": {
"description": "JSON schema for the form",
"type": "object",
"required": ["$schema", "type", "properties"],
"properties": {
"$schema": {
"type": "string",
"example": "http://json-schema.org/draft-07/schema#",
"x-order": 1
},
"type": {
"type": "string",
"example": "object",
"x-order": 2
},
"properties": {
"$ref": "#/components/schemas/FormPropertyList"
},
"required": {
"type": "array",
"items": {
"type": "string"
},
"x-go-type-skip-optional-pointer": true,
"x-order": 4
},
"allOf": {
"type": "array",
"items": {
"type": "object"
},
"x-go-type-skip-optional-pointer": true,
"x-order": 5
}
}
},
"GetFormResponse": {
"type": "object",
"properties": {
"FormSchema": {
"$ref": "#/components/schemas/FormSchema",
"description": "Form schema which needs to be filled by the customer. If no customer input is required, this field is omitted."
}
}
},
"FormInput": {
"type": "object",
"description": "Form input to be submitted based on returned FormSchema",
"additionalProperties": true,
"x-go-type-skip-optional-pointer": true
},
"FormSessionID": {
"type": "string",
"format": "uuid",
"description": "Unique identifier for the Form Session. Form Session allows ramping using provided form data."
},
"SellResponse": {
"type": "object",
"properties": {
"Transaction": {
"$ref": "#/components/schemas/Transaction"
}
},
"required": ["Transaction"]
},
"PrepareSellResponse": {
"type": "object",
"properties": {
"TotalFee": {
"$ref": "#/components/schemas/PositiveDecimal",
"description": "The total fee that will be charged for using the specific channel, always specified in the same currency as the requested fiat segment of the transaction."
},
"CryptoAmountEstimate": {
"$ref": "#/components/schemas/PositiveDecimal",
"description": "The estimated amount of cryptocurrency that will be used in this transaction."
},
"CryptoAuthorizedAmount": {
"$ref": "#/components/schemas/PositiveDecimal",
"description": "Maximum amount that can be charged for this transaction. This will be used in your subsequent `/transactions/sell` request"
},
"FormSessionID": {
"$ref": "#/components/schemas/FormSessionID"
}
},
"required": ["FormSessionID", "TotalFee", "CryptoAmountEstimate", "CryptoAuthorizedAmount"]
},
"GetCustomersResponse": {
"type": "object",
"properties": {
"Items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Customer"
},
"x-go-type-skip-optional-pointer": true
},
"PageToken": {
"type": "string"
}
},
"required": ["Items"]
},
"GetTransactionsResponse": {
"type": "object",
"properties": {
"Items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Transaction"
},
"x-go-type-skip-optional-pointer": true
},
"PageToken": {
"type": "string"
}
},
"required": ["Items"]
},
"CryptoCurrencyCode": {
"type": "string",
"description": "Cryptocurrency (main/sandbox):\n * BTC/BTC_TEST\n * USDC/USDC_TEST\n",
"example": "BTC"
},
"FiatCurrencyCode": {
"type": "string",
"description": "Supported fiat ISO_4217 3 letter currency codes.",
"example": "USD"
},
"CountryCode": {
"type": "string",
"description": "ISO 3166-1 alpha-2 country code.",
"example": "US"
},
"AssetID": {
"type": "string",
"example": "USD",
"description": "A scalar representing a financial asset code. Suitable for use in cases where exactly one of the currency codes must be provided."
},
"TransactionStatus": {
"type": "string",
"enum": ["Pending", "Failed", "Settled"],
"description": "Statuses for transactions.",
"example": "Settled"
},
"TransactionDirection": {
"type": "string",
"description": "Whether the transactions was a credit (in) or a debit (out) in your account",
"enum": ["In", "Out"],
"example": "In"
},
"PositiveDecimal": {
"type": "string",
"example": "10.1",
"minLength": 1,
"maxLength": 38,
"pattern": "^[+]?([.]\\d+|\\d+[.]?\\d*)$"
},
"Network": {
"type": "string",
"description": "Payments network (main/sandbox):\n * Bitcoin/BitcoinTest\n * Lightning/LightningTest\n * Ethereum/EthereumTestSepolia\n * PolygonPos/PolygonTestAmoy\n * Solana/SolanaDevnet\n * OffNetwork/OffNetwork\n",
"example": "Bitcoin"
},
"Nonce": {
"type": "string",
"description": "A string which must be unique each time a new transaction is created, like a UUID or operation sequence number. Request can be idempotently retried by using the same Nonce.",
"example": "dc879b38-494b-4de7-98a9-068703144328",
"minLength": 1,
"maxLength": 36
},
"PaymentMethodCategory": {
"type": "string",
"description": "Categorizes one or more `PaymentMethodType`s into broader groups. Useful for listing channels, displaying payment methods:\n * Bank\n * Card\n * Identifier\n",
"example": "Bank"
},
"PaymentMethodType": {
"type": "string",
"description": "Specific type of payment method:\n * BankSepa\n * BankLocal\n * BankFedwire\n * TokenizedCard\n * IdentifierPix\n",
"example": "BankLocal"
},
"Address": {
"type": "string",
"example": "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4",
"description": "Address for transfer"
},
"DestinationAddress": {
"type": "object",
"properties": {
"Address": {
"$ref": "#/components/schemas/Address"
}
},
"description": "A destination address to transfer cryptocurrency",
"required": ["Address"]
},
"Date": {
"type": "string",
"format": "date",
"example": "2024-04-16",
"minLength": 10,
"maxLength": 10
},
"DateTime": {
"type": "string",
"format": "date-time",
"example": "2024-04-16T08:00:55Z"
},
"FiatAmount": {
"type": "object",
"properties": {
"Amount": {
"$ref": "#/components/schemas/PositiveDecimal"
},
"FiatCurrency": {
"$ref": "#/components/schemas/FiatCurrencyCode"
}
},
"required": ["Amount", "FiatCurrency"]
},
"FiatPaymentStatus": {
"type": "string",
"enum": ["Pending", "Failed", "Successful"],
"example": "Successful"
},
"Transaction": {
"type": "object",
"properties": {
"ID": {
"type": "string",
"format": "uuid",
"description": "NOAH's unique identifier for the transaction."
},
"PublicID": {
"type": "string",
"description": "The public blockchain transaction id or hash. This identifier is only available for transactions that are broadcast to a public network as well as some private networks where available, e.g. Lightning"
},
"Network": {
"$ref": "#/components/schemas/Network"
},
"Created": {
"$ref": "#/components/schemas/DateTime",
"description": "When was this transaction created"
},
"Status": {
"$ref": "#/components/schemas/TransactionStatus"
},
"Direction": {
"$ref": "#/components/schemas/TransactionDirection"
},
"CustomerID": {
"$ref": "#/components/schemas/CustomerID"
},
"ExternalID": {
"$ref": "#/components/schemas/ExternalID"
},
"Amount": {
"description": "The net crypto amount transacted, affecting the balance. This amount **excludes** the `NetworkFee`. For buy transactions, this is the amount after payment fees. For sell transactions, this is the amount before payment fees.",
"$ref": "#/components/schemas/PositiveDecimal"
},
"NetworkFee": {
"description": "Amount paid to cover the the onchain network or gas fee associated with the transaction, if applicable.",
"$ref": "#/components/schemas/PositiveDecimal"
},
"CryptoCurrency": {
"$ref": "#/components/schemas/CryptoCurrencyCode"
},
"FiatPayment": {
"description": " * For buy transactions, `Transaction.Amount = (FiatPayment.Amount - FiatPayment.FeeAmount) / FiatPayment.Rate`\n * For sell transactions, `Transaction.Amount = (FiatPayment.Amount + FiatPayment.FeeAmount) / FiatPayment.Rate`\n",
"$ref": "#/components/schemas/FiatPayment"
},
"Orchestration": {
"description": "Orchestration details for the transaction.",
"$ref": "#/components/schemas/TransactionOrchestration"
},
"FiatPaymentMethod": {
"description": "Information about the fiat payment method used to facilitate this transaction.",
"$ref": "#/components/schemas/PaymentMethod"
},
"Breakdown": {
"type": "array",
"description": "This list explains how the transaction amount was calculated.",
"items": {
"$ref": "#/components/schemas/TransactionBreakdownItem"
},
"x-go-type-skip-optional-pointer": true
}
},
"required": ["ID", "Network", "Created", "Status", "Direction", "CryptoCurrency"]
},
"TransactionBreakdownItem": {
"type": "object",
"properties": {
"Type": {
"$ref": "#/components/schemas/TransactionBreakdownType"
},
"Amount": {
"$ref": "#/components/schemas/PositiveDecimal"
}
},
"required": ["Type", "Amount"]
},
"TransactionBreakdownType": {
"type": "string",
"description": "What does the breakdown item amount refer to:\n* ChannelFee: amount withheld by the system from the fiat payment\n* BusinessFee: amount to withheld on behalf of the business over its customers transactions\n* Remaining: amount withheld by the system from the fiat payment"
},
"Customer": {
"type": "object",
"oneOf": [
{
"$ref": "#/components/schemas/IndividualCustomer"
},
{
"$ref": "#/components/schemas/BusinessCustomer"
}
],
"discriminator": {
"propertyName": "Type",
"mapping": {
"Individual": "#/components/schemas/IndividualCustomer",
"Business": "#/components/schemas/BusinessCustomer"
}
}
},
"IndividualCustomer": {
"type": "object",
"properties": {
"Type": {
"type": "string",
"enum": ["Individual"]
},
"CustomerID": {
"$ref": "#/components/schemas/CustomerID"
},
"Created": {
"$ref": "#/components/schemas/DateTime"
},
"DateOfBirth": {
"$ref": "#/components/schemas/Date"
},
"FullName": {
"$ref": "#/components/schemas/FullName"
},
"Identities": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CustomerIdentity"
},
"x-go-type-skip-optional-pointer": true
},
"PrimaryResidence": {
"$ref": "#/components/schemas/StreetAddress"
}
},
"required": [
"Type",
"CustomerID",
"Created",
"DateOfBirth",
"FullName",
"Identities",
"PrimaryResidence"
]
},