-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathopenapi.yml
More file actions
2099 lines (2099 loc) · 71.7 KB
/
openapi.yml
File metadata and controls
2099 lines (2099 loc) · 71.7 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.3
info:
title: ZBD Payments API
version: 1.0.0
description: Comprehensive OpenAPI specification for ZBD's Payments APIs.
paths:
/v0/gamertag/charges:
post:
summary: Create Charge
description: Generate a payment request for a ZBD User.
operationId: post_v0_gamertag_charges
tags:
- ZBD Gamertag
parameters:
- name: Content-Type
in: header
required: false
schema:
type: string
description: Content Type
responses:
'200':
description: Successful response
content:
application/json:
example:
success: true
data:
unit: msats
status: CHARGE_PENDING
amount: '15000'
createdAt: '2023-03-14T19:40:13.880Z'
internalId: test
callbackUrl: https://my-website.ngrok.io/callback
description: Requesting Charge for Gamertag
invoiceRequest: lnbc10n1pjppnvapp5camc852ky0et9g46gyey9mnv5xgux6tnkkq5qc6cexrr65xw2j9sdps2fjhzat9wd6xjmn8yppksctjvajjqen0wgsywctdv4e8gct8cqzpgxqzjcsp5jgs84mxjwk8n9r7xmp7ulzycy7882f5m8zagk45s2qp23p7rprqq9qyyssq3ysvdsgg5qvx0nwtlz46hcrucs7m6nkvsffcze5nhes40hqrnnes3xjcq0a4wtpqvvrdqlyqy3sz5yhqh6944unan4d32py2azq38zgq4c5ysu
invoiceExpiresAt: '2023-03-14T19:50:13.859Z'
invoiceDescriptionHash: null
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
requestBody:
content:
application/json:
schema:
type: object
properties:
amount:
type: string
description: The amount for the Payment -> in millisatoshis
gamertag:
type: string
description: Destination ZBD Gamertag
description:
type: string
description: Note or comment for this Payment (visible to recipient)
expiresIn:
type: number
description: Time until Charge expiration -> in seconds
internalId:
type: string
description: Open metadata string property
callbackUrl:
type: string
description: The endpoint ZBD will POST Charge updates to
example:
amount: string
gamertag: string
description: string
expiresIn: string
internalId: string
callbackUrl: string
security:
- apikeyAuth: []
/v0/charges:
post:
summary: Create Charge
description: Start receiving instant Bitcoin payments through the ZBD API.
operationId: post_v0_charges
tags:
- Lightning Charges
parameters:
- name: Content-Type
in: header
required: false
schema:
type: string
description: Content Type
responses:
'200':
description: Successful response
content:
application/json:
example:
success: true
message: Successfully created Charge.
data:
unit: msats
amount: '10000'
confirmedAt: null
status: pending
description: My Charge Description
createdAt: '2020-05-09T15:09:05.765Z'
expiresAt: '2020-05-09T15:14:05.618Z'
id: 1907b0fe-789b-4e25-b18a-0c4c0f5cced7
internalId: 11af01d092444a317cb33faa6b8304b8
callbackUrl: https://your-website.com/callback
invoice:
request: lnbc100n1p0td3u3pp5z2ed9yjfrz0rgu0fzuc5cdwfu8dtjlgrfztz5uga8hakkjy2yzgsdpzf4ujqsmgv9exwefqg3jhxcmjd9c8g6t0dccqzpgxqzfvsp5q8z5mkghmuzrnusxdwtmls7x8vuy63j25rt4z55gj3s7340dv72q9qy9qsqz02rlmlzcvew3vk90c6l0369ewk7tkr2tx0yrk3qa235v07w6d3qeksk99wm7y8f8ug7zqy6yjudu4cs2f4umpey43cw7msyj7uqj2qq8x03te
uri: lightning:lnbc100n1p0td3u3pp5z2ed9yjfrz0rgu0fzuc5cdwfu8dtjlgrfztz5uga8hakkjy2yzgsdpzf4ujqsmgv9exwefqg3jhxcmjd9c8g6t0dccqzpgxqzfvsp5q8z5mkghmuzrnusxdwtmls7x8vuy63j25rt4z55gj3s7340dv72q9qy9qsqz02rlmlzcvew3vk90c6l0369ewk7tkr2tx0yrk3qa235v07w6d3qeksk99wm7y8f8ug7zqy6yjudu4cs2f4umpey43cw7msyj7uqj2qq8x03te
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
requestBody:
content:
application/json:
schema:
type: object
properties:
amount:
type: string
description: The amount for the Charge -> in millisatoshis
description:
type: string
description: Note or comment for this Charge (visible to payer)
expiresIn:
type: number
description: Time until Charge expiration -> in seconds
callbackUrl:
type: string
description: The endpoint ZBD will POST Charge updates to
internalId:
type: string
description: Open metadata string property
example:
amount: string
description: string
expiresIn: string
callbackUrl: string
internalId: string
security:
- apikeyAuth: []
/v0/internal-transfer:
post:
summary: Initiate Internal Transfer
description: Performs a transfer of funds between two Projects.
operationId: post_v0_internal-transfer
tags:
- Internal Transfers
parameters:
- name: Content-Type
in: header
required: false
schema:
type: string
description: Content Type
responses:
'200':
description: Successful response
content:
application/json:
example:
success: true
data:
id: c8571a4c-3c34-47af-8ded-ebd476f519c1
senderWalletId: b81fa874-ac60-4a08-84f2-0af79684c506
receiverWalletId: b804ee02-ec0b-4fd4-b99f-1f2d3d0001a6
userId: 2470d896-9dc8-4d49-b18c-a4e83263e76d
sendTxId: f532db20-2cfa-41b0-8c00-40cfbe124b54
receiveTxId: 4b4640e0-d8a2-4f1e-8973-d98196f79a88
status: TRANSFER_STATUS_COMPLETED
amount: '1000'
createdAt: '2023-02-16T02:28:32.754Z'
updatedAt: '2023-02-16T02:28:32.777Z'
message: Internal Transfer done.
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
requestBody:
content:
application/json:
schema:
type: object
properties:
amount:
type: string
description: The amount to be transferred -> in millisatoshis
receiverWalletId:
type: string
description: The Wallet ID of the recipient Project
example:
amount: string
receiverWalletId: string
security:
- apikeyAuth: []
/v0/ln-address/fetch-charge:
post:
summary: Create Charge
description: Generate a payment request for a Lightning Address.
operationId: post_v0_ln-address_fetch-charge
tags:
- Lightning Address
parameters:
- name: Content-Type
in: header
required: false
schema:
type: string
description: Content Type
responses:
'200':
description: Successful response
content:
application/json:
example:
success: true
data:
lnaddress: andre@zbd.gg
amount: '15000'
invoice:
uri: lightning:lnbc100n1p3mtxc3pp5tz4srtee9c4gsvlcqa6azu60a2ak2fvrnk7jv52j6n0rzp0musnqhp5xt5ts9t74akf67j59ynkr5qz8x3hs4g09d3dttmjrwwdhrxgc03qcqzpgxqzfvsp5529t5y03yaakumqrm9cwr5t6nysnr5cv93pnvw089a25aa7wszas9qyyssqalswdlc92983203l5azl43nksehadfy2uahc9v6qwg67xs52z02hg6vh7alrm3yx46ywdrl3dxey75t9l2ekmuwc3tu4ug03dy729fspdld2lj
request: lnbc100n1p3mtxc3pp5tz4srtee9c4gsvlcqa6azu60a2ak2fvrnk7jv52j6n0rzp0musnqhp5xt5ts9t74akf67j59ynkr5qz8x3hs4g09d3dttmjrwwdhrxgc03qcqzpgxqzfvsp5529t5y03yaakumqrm9cwr5t6nysnr5cv93pnvw089a25aa7wszas9qyyssqalswdlc92983203l5azl43nksehadfy2uahc9v6qwg67xs52z02hg6vh7alrm3yx46ywdrl3dxey75t9l2ekmuwc3tu4ug03dy729fspdld2lj
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
requestBody:
content:
application/json:
schema:
type: object
properties:
lnaddress:
type: string
description: The Lightning Address of the intended recipient
amount:
type: string
description: The amount for the Charge -> in millisatoshis
description:
type: string
description: Note or comment of this Charge
example:
lnaddress: string
amount: string
description: string
security:
- apikeyAuth: []
/v0/static-charges:
post:
summary: Create Static Charge
description: Start accepting payments on Lightning with Static QR codes.
operationId: post_v0_static-charges
tags:
- Lightning Charges
parameters:
- name: Content-Type
in: header
required: false
schema:
type: string
description: Content Type
responses:
'200':
description: Successful response
content:
application/json:
example:
message: Successfully created Static Charge.
data:
id: 45c225b1-022b-4a37-98d6-5a5568f78d11
unit: msats
slots: 0
minAmount: '10000'
maxAmount: '100000'
createdAt: '2023-03-07T20:07:06.910Z'
expiresAt: null
internalId: myInternalId
description: Static Charge API Ref
callbackUrl: https://my-website/zbd-callback
allowedSlots: 1000
successMessage: Congratulations your payment was successful!
status: active
invoice:
request: lnurl1dp68gurn8ghj7ctsdyh85etzv4jx2efwd9hj7a3s9aex2ut4v4ehgttnw3shg6tr943ksctjvajhxte5x43nyv34vgcj6vpjxf3z6drpxvmj6wfcvsmz6dtpx56nvwrxxuuxgvf3uzvpfy
uri: lightning:lnurl1dp68gurn8ghj7ctsdyh85etzv4jx2efwd9hj7a3s9aex2ut4v4ehgttnw3shg6tr943ksctjvajhxte5x43nyv34vgcj6vpjxf3z6drpxvmj6wfcvsmz6dtpx56nvwrxxuuxgvf3uzvpfy
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
requestBody:
content:
application/json:
schema:
type: object
properties:
minAmount:
type: string
description: Minimum allowed amount for the Static Charge -> in
millisatoshis
maxAmount:
type: string
description: Maximum allowed amount for the Static Charge -> in
millisatoshis
description:
type: string
description: Note or comment for this Static Charge (visible to
payer)
successMessage:
type: string
description: Message displayed to the payer AFTER payment settles.
Maximum of 144 characters.
allowedSlots:
type: number
description: Number of payments this Static Charge can accept
internalId:
type: string
description: Open metadata string property
callbackUrl:
type: string
description: The endpoint ZBD will POST Charge updates to
identifier:
type: string
description: Used for Custom Lightning Addresses (see guide)
example:
minAmount: string
maxAmount: string
description: string
successMessage: string
allowedSlots: 123
internalId: string
callbackUrl: string
identifier: string
security:
- apikeyAuth: []
/v1/create-voucher:
post:
summary: Create Voucher
description: ''
operationId: post_v1_create-voucher
tags:
- Vouchers
parameters:
- name: Content-Type
in: header
required: false
schema:
type: string
description: Content Type
responses:
'200':
description: Successful response
content:
application/json:
example:
success: true
data:
amount: '1000'
code: 7EE15185
createdAt: '2023-08-24T15:01:56.408Z'
createTransactionId: 0e11be7a-fd5e-48db-a0bb-54731681bc25
description: Voucher for user.
fee: '1000'
id: a2eb43c4-af7f-4eb9-839c-ca31db34b3fc
unit: msats
walletId: 4a4bd549-297e-4e67-a594-386200e1bc21
message: Successfully created Voucher.
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
requestBody:
content:
application/json:
schema:
type: object
properties:
amount:
type: string
description: The amount for the Charge -> in millisatoshis
description:
type: string
description: Note or comment for this Charge (visible to payer)
example:
amount: string
description: string
security:
- apikeyAuth: []
/v0/withdrawal-requests:
post:
summary: Create Withdrawal Request
description: Start creating Bitcoin voucher QR codes.
operationId: post_v0_withdrawal-requests
tags:
- Withdrawal Requests
parameters:
- name: Content-Type
in: header
required: false
schema:
type: string
description: Content Type
responses:
'200':
description: Successful response
content:
application/json:
example:
success: true
data:
id: e54e62d4-9cfa-495d-abb9-9c9f4bc4f2cf
unit: msats
amount: '15000'
createdAt: '2023-04-27T22:15:54.258Z'
expiresAt: '2023-04-27T22:20:54.252Z'
internalId: 1c3b1-f61j2
description: Withdraw QR!
callbackUrl: https://your-website.com/zbd-callback
status: pending
fee: null
invoice:
request: lnurl1dp68gurn8ghj7ctsdyh85etzv4jx2efwd9hj7a3s9acxz7tvdaskgtthd96xserjv9mkzmpdwfjhzat9wd6r7um9vdex2apax5exxwpjx9jx2wf4xajnxc3sx4jrwcenv56nwdm9vg6kxwtrx9sk2dtzvsunxce3vymkxef4vycxvwpexd3kxcmpxcmk2d3n8yenswqph63m6
fastRequest: lnurl1dp68gurn8ghj7ctsdyh85etzv4jx2efwd9hj7a3s9acxz7tvdaskgtthd96xserjv9mkzmpdwfjhzat9wd6r7arpvu7hw6t5dpj8ycth2fjhzat9wd6zv6e3856nycecxgckgefex5mk2vmzxq6kgdmrxdjn2dehv43r2ceevvckzef4vfjrjvmrx9snwcm9x4snqe3c8yekxcmrvymrwefkxvunxwpcyekkjmjhd96xserjv9mkzcnvv57nzdfsxqczvmtp0ptkjargv3exzampvfkx20f3x5crqvpxv3jkvct4d36ygetnvdexjur5d9hku02hd96xserjv9mjq52jyynxxctvd33xzcmt8458garswvaz7tmpwp5ju7n9vfjkget99e5k7tmkxqhhqun0vdjhxuedwa5hg6rywfshwctv94ex2ut4v4ehg5thy6x
uri: lightning:lnurl1dp68gurn8ghj7ctsdyh85etzv4jx2efwd9hj7a3s9acxz7tvdaskgtthd96xserjv9mkzmpdwfjhzat9wd6r7um9vdex2apax5exxwpjx9jx2wf4xajnxc3sx4jrwcenv56nwdm9vg6kxwtrx9sk2dtzvsunxce3vymkxef4vycxvwpexd3kxcmpxcmk2d3n8yenswqph63m6
fastUri: lightning:lnurl1dp68gurn8ghj7ctsdyh85etzv4jx2efwd9hj7a3s9acxz7tvdaskgtthd96xserjv9mkzmpdwfjhzat9wd6r7arpvu7hw6t5dpj8ycth2fjhzat9wd6zv6e3856nycecxgckgefex5mk2vmzxq6kgdmrxdjn2dehv43r2ceevvckzef4vfjrjvmrx9snwcm9x4snqe3c8yekxcmrvymrwefkxvunxwpcyekkjmjhd96xserjv9mkzcnvv57nzdfsxqczvmtp0ptkjargv3exzampvfkx20f3x5crqvpxv3jkvct4d36ygetnvdexjur5d9hku02hd96xserjv9mjq52jyynxxctvd33xzcmt8458garswvaz7tmpwp5ju7n9vfjkget99e5k7tmkxqhhqun0vdjhxuedwa5hg6rywfshwctv94ex2ut4v4ehg5thy6x
message: Successfully created Withdrawal Request.
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
requestBody:
content:
application/json:
schema:
type: object
properties:
amount:
type: string
description: The amount for the Withdrawal Request -> in millisatoshis
description:
type: string
description: Note or comment for this Withdrawal Request
expiresIn:
type: number
description: Time until Withdrawal Request expiration -> in seconds
internalId:
type: string
description: Open metadata string property
callbackUrl:
type: string
description: The endpoint ZBD will POST Charge updates to
example:
amount: string
description: string
expiresIn: 123
internalId: string
callbackUrl: string
security:
- apikeyAuth: []
/v0/decode-invoice:
post:
summary: Decode Charge
description: Understand the inner properties of a Charge QR code.
operationId: post_v0_decode-invoice
tags:
- Utilities
parameters:
- name: Content-Type
in: header
required: false
schema:
type: string
description: Content Type
responses:
'200':
description: Successful response
content:
application/json:
example:
success: true
data:
amount: '212325000'
lnRequest: lnbc2123250n1pjpr2qmpp526234tljpx5756pa2fyj2zrdmn2tnz9rhj54km2s7dv0pap3vtkqhp5extcuyp2x0ydfwnfhrc5cwx8azxeen2g7hxr29464ezvn3k6w2fqcqzpgxqzjcsp5xzelh2w3twt4ysvva2ugu2klurmrl7nk8h46x2hcthf9cvee24jq9qyyssq6an9tjftjymjeklerjmw8cv4ccpsvd2vzuzxn5upt9s37hnw2r0z0n5cd8cqq8jq5ems00tugt5jnw5jn03tr84945nd6j4hsfsu7kqp9hptk2
lnExpiresAt: '2023-03-15T11:22:27.000Z'
network: bitcoin
description: 'Paying for Master Sword #5546'
descriptionHash: c9978e102a33c8d4ba69b8f14c38c7e88d9ccd48f5cc3516baae44c9c6da7292
paymentHash: 56951aaff209a9ea683d524925086ddcd4b988a3bca95b6d50f358f0f43162ec
paymentSecret: 30b3fba9d15b9752418ceab88e2adfe0f63ffa763deba32af85dd25c33395564
payee: 036ff83834666d3ebfe61c2a7d1f8fc5d6b339a26559a61819e2b0d1b5f540fdfc
signature: d76655c92b91372cdbf91cb6e3e195c60306354c170469d38159611f5e6e50de27ce9869f0001e40a67707bd7c42e929ba929be2b19ea5ad26dd4ab78261cf58
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
requestBody:
content:
application/json:
schema:
type: object
properties:
invoice:
type: string
description: The Charge or Invoice QR code contents
example:
invoice: string
security:
- apikeyAuth: []
/v0/btcusd:
get:
summary: BTC USD Price Feed
description: Get the latest price for Bitcoin in US Dollars.
operationId: get_v0_btcusd
tags:
- Utilities
parameters: []
responses:
'200':
description: Successful response
content:
application/json:
example:
success: true
data:
btcUsdPrice: '16825'
btcUsdTimestamp: '1672847113'
message: Successfully retrieved BTC USD price ticker information.
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- apikeyAuth: []
/v0/charges/{id}:
get:
summary: Get Charge
description: Retrieve all data about a single Charge.
operationId: get_v0_charges_id
tags:
- Lightning Charges
parameters:
- name: id
in: path
required: true
schema:
type: string
description: 'Path parameter: id'
responses:
'200':
description: Successful response
content:
application/json:
example:
success: true
message: Successfully retrieved Charge.
data:
unit: msats
amount: '10000'
confirmedAt: null
status: pending
description: My Charge Description
createdAt: '2020-05-09T15:09:05.765Z'
expiresAt: '2020-05-09T15:14:05.618Z'
id: 1907b0fe-789b-4e25-b18a-0c4c0f5cced7
internalId: 11af01d092444a317cb33faa6b8304b8
callbackUrl: https://your-website.com/callback
invoice:
request: lnbc100n1p0td3u3pp5z2ed9yjfrz0rgu0fzuc5cdwfu8dtjlgrfztz5uga8hakkjy2yzgsdpzf4ujqsmgv9exwefqg3jhxcmjd9c8g6t0dccqzpgxqzfvsp5q8z5mkghmuzrnusxdwtmls7x8vuy63j25rt4z55gj3s7340dv72q9qy9qsqz02rlmlzcvew3vk90c6l0369ewk7tkr2tx0yrk3qa235v07w6d3qeksk99wm7y8f8ug7zqy6yjudu4cs2f4umpey43cw7msyj7uqj2qq8x03te
uri: lightning:lnbc100n1p0td3u3pp5z2ed9yjfrz0rgu0fzuc5cdwfu8dtjlgrfztz5uga8hakkjy2yzgsdpzf4ujqsmgv9exwefqg3jhxcmjd9c8g6t0dccqzpgxqzfvsp5q8z5mkghmuzrnusxdwtmls7x8vuy63j25rt4z55gj3s7340dv72q9qy9qsqz02rlmlzcvew3vk90c6l0369ewk7tkr2tx0yrk3qa235v07w6d3qeksk99wm7y8f8ug7zqy6yjudu4cs2f4umpey43cw7msyj7uqj2qq8x03te
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- apikeyAuth: []
/v0/gamertag/user-id/{id}:
get:
summary: Get Gamertag By ZBD ID
description: Retrieve ZBD user ID from a Gamertag.
operationId: get_v0_gamertag_user-id_id
tags:
- ZBD Gamertag
parameters:
- name: id
in: path
required: true
schema:
type: string
description: 'Path parameter: id'
responses:
'200':
description: Successful response
content:
application/json:
example:
success: true
data:
gamertag: foxp2
message: Fetched gamertag from uuid
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- apikeyAuth: []
/v0/payments/{id}:
get:
summary: Get Payment
description: Retrieve all data about a single Payment.
operationId: get_v0_payments_id
tags:
- Lightning Payments
parameters:
- name: id
in: path
required: true
schema:
type: string
description: 'Path parameter: id'
responses:
'200':
description: Successful response
content:
application/json:
example:
success: true
message: Fetched Payment.
data:
id: caafd318-527c-466b-81f2-441d3a092aae
fee: '2000'
unit: msats
amount: '101000'
invoice: lnbc1010n1p3mt8akpp5uyxhllflux2fvl36wjxh80wtqzdh2vjmu8cdyzuap578az80v74qdqcd3hzucmpwd5zqurp09kk2mn5cqzpgxqzjhsp550s770zy4puj76wqnua0hmym883gr07dhuast5ygcm44grl6z7ns9qyyssqgf7sumdmxwzgkq2m0h9lcv530sqs0m4t4shlu98djrrckrtulcmr8rear70dyftdm67jvgncxgz4jmd6ksx87jvnj88e39un48ssk4gp8vs4u5
preimage: 8a14f6da89d4a8ffd09677f585b7c377de72744b7c3713d3c115fa71ca4fc290
internalId: 11af01d092444a317cb33faa6b8304b8
processedAt: '2023-01-04T15:48:29.805Z'
confirmedAt: '2023-01-04T15:48:29.805Z'
description: Custom Payment Description
status: completed
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- apikeyAuth: []
/v0/gamertag/transaction/{id}:
get:
summary: Get Payment
description: Retrieve all data about a Payment sent to ZBD User.
operationId: get_v0_gamertag_transaction_id
tags:
- ZBD Gamertag
parameters:
- name: id
in: path
required: true
schema:
type: string
description: 'Path parameter: id'
responses:
'200':
description: Successful response
content:
application/json:
example:
message: Fetched charge.
success: true
data:
id: 903883f2-67d9-4707-a21b-ddff004fe041
receiverId: ec9b38d5-b126-4307-9d1e-8aa0dfab5d7e
amount: '15000'
fee: '1000'
unit: msats
processedAt: '2023-01-04T15:59:16.993Z'
confirmedAt: '2023-01-04T15:59:16.989Z'
comment: Sending to ZBD Gamertag
status: TRANSACTION_STATUS_COMPLETED
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- apikeyAuth: []
/v0/static-charges/{id}:
get:
summary: Get Static Charge
description: Retrieve all data about a single Static Charge.
operationId: get_v0_static-charges_id
tags:
- Lightning Charges
parameters:
- name: id
in: path
required: true
schema:
type: string
description: 'Path parameter: id'
responses:
'200':
description: Successful response
content:
application/json:
example:
message: Successfully fetched Static Charge.
data:
id: 45c225b1-022b-4a37-98d6-5a5568f78d11
unit: msats
slots: 0
minAmount: '10000'
maxAmount: '100000'
createdAt: '2023-03-07T20:07:06.910Z'
expiresAt: null
internalId: myInternalId
description: This is my static charge
callbackUrl: https://my-website/zbd-callback
allowedSlots: 1000
successMessage: Congratulations your payment was successful!
status: active
invoice:
request: lnurl1dp68gurn8ghj7ctsdyh85etzv4jx2efwd9hj7a3s9aex2ut4v4ehgttnw3shg6tr943ksctjvajhxte5x43nyv34vgcj6vpjxf3z6drpxvmj6wfcvsmz6dtpx56nvwrxxuuxgvf3uzvpfy
uri: lightning:lnurl1dp68gurn8ghj7ctsdyh85etzv4jx2efwd9hj7a3s9aex2ut4v4ehgttnw3shg6tr943ksctjvajhxte5x43nyv34vgcj6vpjxf3z6drpxvmj6wfcvsmz6dtpx56nvwrxxuuxgvf3uzvpfy
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- apikeyAuth: []
patch:
summary: Update Static Charge
description: Change the configuration of a Static Charge QR code.
operationId: patch_v0_static-charges_id
tags:
- Lightning Charges
parameters:
- name: Content-Type
in: header
required: false
schema:
type: string
description: Content Type
- name: id
in: path
required: true
schema:
type: string
description: 'Path parameter: id'
responses:
'200':
description: Successful response
content:
application/json:
example:
message: Successfully editted Static Charge.
data:
id: 45c225b1-022b-4a37-98d6-5a5568f78d11
unit: msats
slots: 0
minAmount: '10000'
maxAmount: '100000'
createdAt: '2023-03-07T20:07:06.910Z'
expiresAt: null
internalId: myInternalId
description: This is my static charge
callbackUrl: https://my-website/zbd-callback
allowedSlots: 1000
successMessage: Congratulations your payment was successful!
status: active
invoice:
request: lnurl1dp68gurn8ghj7ctsdyh85etzv4jx2efwd9hj7a3s9aex2ut4v4ehgttnw3shg6tr943ksctjvajhxte5x43nyv34vgcj6vpjxf3z6drpxvmj6wfcvsmz6dtpx56nvwrxxuuxgvf3uzvpfy
uri: lightning:lnurl1dp68gurn8ghj7ctsdyh85etzv4jx2efwd9hj7a3s9aex2ut4v4ehgttnw3shg6tr943ksctjvajhxte5x43nyv34vgcj6vpjxf3z6drpxvmj6wfcvsmz6dtpx56nvwrxxuuxgvf3uzvpfy
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
requestBody:
content:
application/json:
schema:
type: object
properties:
minAmount:
type: string
description: Minimum allowed amount for the Static Charge -> in
millisatoshis
maxAmount:
type: string
description: Maximum allowed amount for the Static Charge -> in
millisatoshis