forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stripe-node.d.ts
3107 lines (2678 loc) · 136 KB
/
stripe-node.d.ts
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
// Type definitions for stripe-node
// Project: https://github.com/stripe/stripe-node/
// Definitions by: William Johnston <https://github.com/wjohnsto>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module 'stripe' {
var out: typeof StripeNode.Stripe;
export = out;
}
declare module StripeNode {
class Stripe {
static DEFAULT_HOST: string;
static DEFAULT_PORT: string;
static DEFAULT_BASE_PATH: string;
static DEFAULT_API_VERSION: string;
static DEFAULT_TIMEOUT: number;
static PACKAGE_VERSION: string;
static USER_AGENT: {
bindings_version: string;
lang: string;
lang_version: string;
platform: string;
publisher: string;
uname: string;
};
static USER_AGENT_SERIALIZED: string;
static resources: typeof resources;
static StripeResource: typeof StripeResource;
account: resources.Account;
balance: resources.Balance;
charges: resources.Charges;
coupons: resources.Coupons;
customers: resources.Customers;
events: resources.Events;
invoices: resources.Invoices;
invoiceItems: resources.InvoiceItems;
plans: resources.Plans;
recipientCards: resources.RecipientCards;
recipients: resources.Recipients;
tokens: resources.Tokens;
yransfers: resources.Transfers;
applicationFees: resources.ApplicationFees;
fileUploads: resources.FileUploads;
bitcoinReceivers: resources.BitcoinReceivers;
customerCards: resources.CustomerCards;
customerSubscriptions: resources.CustomerSubscriptions;
chargeRefunds: resources.ChargeRefunds;
applicationFeeRefunds: resources.ApplicationFeeRefunds;
transferReversals: resources.TransferReversals;
constructor(apiKey: string, version?: string);
setHost(host: string): void;
setHost(host: string, port: string|number): void;
setHost(host: string, port: string|number, protocol: string): void;
setProtocol(protocol: string): void;
setPort(port: string|number): void;
setApiVersion(version?: string): void;
setApiKey(key?: string): void;
setTimeout(timeout?: number): void;
setHttpAgent(agent: string): void;
getConstant(c: string): any;
getClientUserAgent(response: (userAgent: string) => void): void;
}
module account { }
module balance {
interface IBalanceTransaction {
id: string;
/**
* Value is 'balance_transaction'
*/
object: string;
/**
* Gross amount of the transaction, in cents.
*/
amount: number;
/**
* The date the transaction’s net funds will become available in the Stripe balance.
*/
available_on: number;
created: number;
/**
* Three-letter ISO currency code representing the currency.
*/
currency: string;
/**
* Fee (in cents) paid for this transaction
*/
fee: number;
/**
* Detailed breakdown of fees (in cents) paid for this transaction
*/
fee_details: Array<{
amount: number;
/**
* Three-letter ISO currency code representing the currency of the amount that was disputed.
*/
currency: string;
/**
* Type of the fee, one of: application_fee, stripe_fee or tax.
*/
type: string;
application: string;
description: string;
}>;
/**
* Net amount of the transaction, in cents.
*/
net: number;
/**
* If the transaction’s net funds are available in the Stripe balance yet. Either available or pending.
*/
status: string;
/**
* Type of the transaction, one of: charge, refund, adjustment, application_fee,
* application_fee_refund, transfer, transfer_cancel or transfer_failure.
*/
type: string;
description?: string;
/**
* The Stripe object this transaction is related to.
*/
source?: IPaymentToken | ICard;
source_transfers: IList<transfers.ITransfer>;
}
}
module charges {
/**
* To charge a credit or a debit card, you create a charge object. You can retrieve and refund individual
* charges as well as list all charges. Charges are identified by a unique random ID.
*/
interface ICharge {
id: string;
/**
* Value is 'charge'
*/
object: string;
livemode: boolean;
/**
* Amount charged in cents, positive integer or zero.
*/
amount: number;
/**
* If the charge was created without capturing, this boolean represents whether or not it is
* still uncaptured or has since been captured.
*/
captured: boolean;
created: number;
/**
* Three-letter ISO currency code representing the currency in which the charge was made.
*/
currency: string;
paid: boolean;
/**
* Whether or not the charge has been fully refunded. If the charge is only partially refunded,
* this attribute will still be false.
*/
refunded: boolean;
/**
* A list of refunds that have been applied to the charge.
*/
refunds: IList<chargeRefunds.IRefund>;
/**
* For most Stripe users, the source of every charge is a credit or debit card.
* This hash is then the card object describing that card.
*/
source: ICard;
/**
* The status of the payment is either succeeded or failed.
*/
status: string;
/**
* Amount in cents refunded (can be less than the amount attribute on the charge if a partial refund was issued).
*/
amount_refunded: number;
/**
* ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes).
*/
balance_transaction: string;
/**
* ID of the customer this charge is for if one exists.
*/
customer: string;
description?: string;
/**
* Details about the dispute if the charge has been disputed.
*/
dispute?: IDispute;
/**
* Error code explaining reason for charge failure if available (see the errors section for a list of
* codes: https://stripe.com/docs/api#errors).
*/
failure_code: string;
/**
* Message to user further explaining reason for charge failure if available.
*/
failure_message: string;
/**
* ID of the invoice this charge is for if one exists.
*/
invoice: string;
metadata: IMetadata;
/**
* This is the email address that the receipt for this charge was sent to.
*/
receipt_email: string;
/**
* This is the transaction number that appears on email receipts sent for this charge.
*/
receipt_number: string;
application_fee?: string;
/**
* Hash with information on fraud assessments for the charge.
*/
fraud_details: {
/**
* Assessments reported by you have the key user_report and, if set, possible values of safe and fraudulent.
*/
user_report?: string;
/**
* Assessments from Stripe have the key stripe_report and, if set, the value fraudulent.
*/
stripe_report?: string;
};
/**
* Shipping information for the charge.
*/
shipping?: IShippingInformation;
}
}
module coupons {
/**
* A discount represents the actual application of a coupon to a particular customer. It contains information
* about when the discount began and when it will end.
*/
interface IDiscount {
/**
* Value is 'discount'
*/
object: string;
/**
* Hash describing the coupon applied to create this discount
*/
coupon: ICoupon;
customer: string;
/**
* Date that the coupon was applied
*/
start: number;
/**
* If the coupon has a duration of once or repeating, the date that this discount will end. If the coupon
* used has a forever duration, this attribute will be null.
*/
end: number;
/**
* The subscription that this coupon is applied to, if it is applied to a particular subscription
*/
subscription: string;
}
/**
* A coupon contains information about a percent-off or amount-off discount you might want to apply to a customer.
* Coupons only apply to invoices; they do not apply to one-off charges.
*/
interface ICoupon {
id: string;
/**
* Value is 'coupon'
*/
object: string;
livemode: boolean;
created: number;
/**
* One of forever, once, and repeating. Describes how long a customer who applies this coupon will get the discount.
*/
duration: string;
/**
* Amount (in the currency specified) that will be taken off the subtotal of any invoices for this customer.
*/
amount_off: number;
/**
* If amount_off has been set, the currency of the amount to take off.
*/
currency: string;
/**
* If duration is repeating, the number of months the coupon applies. Null if coupon duration is forever or once.
*/
duration_in_months: number;
/**
* Maximum number of times this coupon can be redeemed, in total, before it is no longer valid.
*/
max_redemptions: number;
/**
* A set of key/value pairs that you can attach to a coupon object. It can be useful for storing
* additional information about the coupon in a structured format.
*/
metadata: IMetadata;
/**
* Percent that will be taken off the subtotal of any invoices for this customer for the duration
* of the coupon. For example, a coupon with percent_off of 50 will make a $100 invoice $50 instead.
*/
percent_off: number;
/**
* Date after which the coupon can no longer be redeemed
*/
redeem_by: number;
/**
* Number of times this coupon has been applied to a customer.
*/
times_redeemed: number;
/**
* Taking account of the above properties, whether this coupon can still be applied to a customer
*/
valid: boolean;
}
}
module customers {
/**
* Customer objects allow you to perform recurring charges and track multiple charges that are associated
* with the same customer. The API allows you to create, delete, and update your customers. You can
* retrieve individual customers as well as a list of all your customers.
*/
interface ICustomer {
id: string;
/**
* Value is 'customer'
*/
object: string;
livemode: boolean;
created: number;
/**
* Current balance, if any, being stored on the customer’s account. If negative, the customer has credit to apply to
* the next invoice. If positive, the customer has an amount owed that will be added to the next invoice. The balance
* does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied
* to any invoice. This balance is only taken into account for recurring charges.
*/
account_balance?: number;
/**
* The currency the customer can be charged in for recurring billing purposes (subscriptions, invoices, invoice items).
*/
currency: string;
/**
* ID of the default source attached to this customer.
*/
default_source: string;
/**
* Whether or not the latest charge for the customer’s latest invoice has failed
*/
delinquent: boolean;
/**
* Describes the current discount active on the customer, if there is one.
*/
discount: coupons.IDiscount;
description?: string;
email?: string;
/**
* A set of key/value pairs that you can attach to a customer object. It can be useful for storing
* additional information about the customer in a structured format.
*/
metadata?: IMetadata;
sources?: IList<ICard | bitcoinReceivers.IBitcoinReceiver>;
/**
* The customer’s current subscriptions, if any
*/
subscriptions: IList<customerSubscriptions.ISubscription>;
}
}
module events { }
module invoices {
/**
* Invoices are statements of what a customer owes for a particular billing period, including subscriptions,
* invoice items, and any automatic proration adjustments if necessary. Once an invoice is created, payment
* is automatically attempted. Note that the payment, while automatic, does not happen exactly at the time of
* invoice creation. If you have configured webhooks, the invoice will wait until one hour after the last
* webhook is successfully sent (or the last webhook times out after failing). Any customer credit on the
* account is applied before determining how much is due for that invoice (the amount that will be actually
* charged). If the amount due for the invoice is less than 50 cents (the minimum for a charge), we add the
* amount to the customer's running account balance to be added to the next invoice. If this amount is
* negative, it will act as a credit to offset the next invoice. Note that the customer account balance does
* not include unpaid invoices; it only includes balances that need to be taken into account when calculating
* the amount due for the next invoice.
*/
interface IInvoice {
id: string;
/**
* Value is 'invoice'
*/
object: string;
livemode: boolean;
/**
* Final amount due at this time for this invoice. If the invoice’s total is smaller than the minimum charge
* amount, for example, or if there is account credit that can be applied to the invoice, the amount_due may
* be 0. If there is a positive starting_balance for the invoice (the customer owes money), the amount_due
* will also take that into account. The charge that gets generated for the invoice will be for the amount
* specified in amount_due.
*/
amount_due: number;
/**
* Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any
* payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt
* count. In other words, manual payment attempts after the first attempt do not affect the retry schedule.
*/
attempt_count: number;
/**
* Whether or not an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after
* the invoice.created webhook, for example, so you might not want to display that invoice as unpaid to your
* users.
*/
attempted: boolean;
/**
* Whether or not the invoice is still trying to collect payment. An invoice is closed if it’s either paid or
* it has been marked closed. A closed invoice will no longer attempt to collect payment.
*/
closed: boolean;
currency: string;
customer: string;
date: number;
/**
* Whether or not the invoice has been forgiven. Forgiving an invoice instructs us to update the subscription
* status as if the invoice were succcessfully paid. Once an invoice has been forgiven, it cannot be unforgiven
* or reopened
*/
forgiven: boolean;
/**
* The individual line items that make up the invoice
*/
lines: IList<invoiceItems.InvoiceLineItem>;
/**
* Whether or not payment was successfully collected for this invoice. An invoice can be paid (most commonly)
* with a charge or with credit from the customer’s account balance.
*/
paid: boolean;
/**
* End of the usage period during which invoice items were added to this invoice
*/
period_end: number;
/**
* Start of the usage period during which invoice items were added to this invoice
*/
period_start: number;
/**
* Starting customer balance before attempting to pay invoice. If the invoice has not been attempted yet,
* this will be the current customer balance.
*/
starting_balance: number;
/**
* Total of all subscriptions, invoice items, and prorations on the invoice before any discount is applied
*/
subtotal: number;
/**
* Total after discount
*/
total: number;
/**
* The fee in cents that will be applied to the invoice and transferred to the application owner’s
* Stripe account when the invoice is paid.
*/
application_fee: number;
/**
* ID of the latest charge generated for this invoice, if any.
*/
charge: string;
description: string;
discount: coupons.IDiscount;
/**
* Ending customer balance after attempting to pay invoice. If the invoice has not been attempted yet,
* this will be null.
*/
ending_balance: number;
/**
* The time at which payment will next be attempted.
*/
next_payment_attempt: number;
/**
* This is the transaction number that appears on email receipts sent for this invoice.
*/
receipt_number: string;
/**
* Extra information about an invoice for the customer’s credit card statement.
*/
statement_descriptor: string;
/**
* The subscription that this invoice was prepared for, if any.
*/
subscription: string;
/**
* The time at which webhooks for this invoice were successfully delivered (if the invoice had no webhooks to
* deliver, this will match date). Invoice payment is delayed until webhooks are delivered, or until all webhook
* delivery attempts have been exhausted.
*/
webhooks_delivered_at: number;
/**
* A set of key/value pairs that you can attach to an invoice object. It can be useful for storing additional
* information about the invoice in a structured format.
*/
metadata: IMetadata;
/**
* The amount of tax included in the total, calculated from tax_percent and the subtotal. If no tax_percent
* is defined, this value will be null.
*/
tax: number;
/**
* This percentage of the subtotal has been added to the total amount of the invoice, including invoice line
* items and discounts. This field is inherited from the subscription’s tax_percent field, but can be changed
* before the invoice is paid. This field defaults to null.
*/
tax_percent: number;
}
}
module invoiceItems {
interface InvoiceLineItem {
/**
* The ID of the source of this line item, either an invoice item or a subscription
*/
id: string;
/**
* Value is 'line_item'
*/
object: string;
/**
* Whether or not this is a test line item
*/
livemode: boolean;
/**
* The amount, in cents
*/
amount: number;
currency: string;
/**
* If true, discounts will apply to this line item. Always false for prorations.
*/
discountable: boolean;
/**
* The period this line_item covers
*/
period: {
/**
* The period start date
*/
start: number;
/**
* The period end date
*/
end: number;
};
/**
* Whether or not this is a proration
*/
proration: boolean;
/**
* A string identifying the type of the source of this line item, either an invoiceitem or a subscription
*/
type: string;
/**
* A text description of the line item, if the line item is an invoice item
*/
description: string;
/**
* Key-value pairs attached to the line item, if the line item is an invoice item
*/
metadata: IMetadata;
/**
* The plan of the subscription, if the line item is a subscription or a proration
*/
plan: plans.IPlan;
/**
* The quantity of the subscription, if the line item is a subscription or a proration
*/
quantity: number;
/**
* When type is invoiceitem, the subscription that the invoice item pertains to, if any. Left blank when
* type is already subscription, as it’d be redundant with id.
*/
subscription: string;
}
}
module plans {
/**
* A subscription plan contains the pricing information for different products and feature levels on your site.
* For example, you might have a $10/month plan for basic features and a different $20/month plan for premium features.
*/
interface IPlan {
id: string;
/**
* Value is 'plan'
*/
object: string;
livemode: boolean;
/**
* The amount in cents to be charged on the interval specified
*/
amount: number;
created: number;
/**
* Currency in which subscription will be charged
*/
currency: string;
/**
* One of day, week, month or year. The frequency with which a subscription should be billed.
*/
interval: string;
/**
* The number of intervals (specified in the interval property) between each subscription billing. For example,
* interval=month and interval_count=3 bills every 3 months.
*/
interval_count: number;
/**
* Display name of the plan
*/
name: string;
/**
* A set of key/value pairs that you can attach to a plan object. It can be useful for storing additional information
* about the plan in a structured format.
*/
metadata: IMetadata;
/**
* Number of trial period days granted when subscribing a customer to this plan. Null if the plan has no trial period.
*/
trial_period_days: number;
/**
* Extra information about a charge for the customer’s credit card statement.
*/
statement_descriptor: string;
}
}
module recipientCards { }
module recipients { }
module tokens { }
module transfers {
interface ITransfer {
id: string;
object: string;
livemode: boolean;
/**
* Amount (in cents) to be transferred to your bank account
*/
amount: number;
/**
* Time that this record of the transfer was first created.
*/
created: number;
/**
* Three-letter ISO currency code representing the currency.
*/
currency: string;
/**
* Date the transfer is scheduled to arrive in the bank. This doesn’t factor in delays like weekends or bank holidays.
*/
date: number;
/**
* A list of reversals that have been applied to the transfer.
*/
reversals: IList<IReversal>;
/**
* Whether or not the transfer has been fully reversed. If the transfer is only partially reversed, this attribute
* will still be false.
*/
reversed: boolean;
/**
* Current status of the transfer (paid, pending, canceled or failed). A transfer will be pending until it is submitted, at which
* point it becomes paid. If it does not go through successfully, its status will change to failed or canceled.
*/
status: string;
/**
* The type of this type of this transfer. Can be card or bank_account.
*/
type: string;
/**
* Amount in cents reversed (can be less than the amount attribute on the transfer if a partial reversal was issued).
*/
amount_reversed: number;
/**
* Balance transaction that describes the impact of this transfer on your account balance.
*/
balance_transaction: string;
/**
* Internal-only description of the transfer
*/
description: string;
/**
* Error code explaining reason for transfer failure if available. See Types of transfer failures for a
* list of failure codes: https://stripe.com/docs/api#transfer_failures
*/
failure_code: string;
/**
* Message to user further explaining reason for transfer failure if available.
*/
failure_message: string;
metadata: IMetadata;
application_fee: string;
/**
* Hash describing the bank account this transfer was sent to
*/
bank_account: IBankAccount;
/**
* Hash describing the debit card this transfer was sent to
*/
card: ICard;
/**
* ID of the recipient this transfer is for if one exists. Transfers to your bank account do not have a recipient.
*/
recipient: string;
source_transaction: string;
/**
* Extra information about a transfer to be displayed on the user’s bank statement.
*/
statement_descriptor: string;
}
}
module applicationFees { }
module fileUploads { }
module bitcoinReceivers {
/**
* A Bitcoin receiver wraps a Bitcoin address so that a customer can push a payment to you. This guide describes how to use
* receivers to create Bitcoin payments.
*/
interface IBitcoinReceiver {
id: string;
/**
* Value is 'bitcoin_receiver'
*/
object: string;
livemode: boolean;
/**
* True when this bitcoin receiver has received a non-zero amount of bitcoin.
*/
active: boolean;
/**
* The amount of currency that you are collecting as payment.
*/
amount: number;
/**
* The amount of currency to which bitcoin_amount_received has been converted.
*/
amount_received: number;
/**
* The amount of bitcoin that the customer should send to fill the receiver. The bitcoin_amount is denominated in Satoshi:
* there are 10^8 Satoshi in one bitcoin.
*/
bitcoin_amount: number;
/**
* The amount of bitcoin that has been sent by the customer to this receiver.
*/
bitcoin_amount_received: number;
/**
* This URI can be displayed to the customer as a clickable link (to activate their bitcoin client) or as a QR code (for mobile wallets).
*/
bitcoin_uri: number;
created: number;
/**
* Three-letter ISO currency code representing the currency to which the bitcoin will be converted.
*/
currency: string;
/**
* This flag is initially false and updates to true when the customer sends the bitcoin_amount to this receiver.
*/
filled: boolean;
/**
* A bitcoin address that is specific to this receiver. The customer can send bitcoin to this address to fill the receiver.
*/
inbound_address: string;
/**
* A list with one entry for each time that the customer sent bitcoin to the receiver. Hidden when viewing the
* receiver with a publishable key.
*/
transactions: IList<IBitcoinTransaction>;
/**
* This receiver contains uncaptured funds that can be used for a payment or refunded.
*/
uncaptured_funds: boolean;
description: string;
/**
* The customer’s email address, set by the API call that creates the receiver.
*/
email: string;
/**
* A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information
* about the customer in a structured format.
*/
metadata: IMetadata;
/**
* The ID of the payment created from the receiver, if any. Hidden when viewing the receiver with a publishable key.
*/
payment: string;
/**
* The refund address for these bitcoin, if communicated by the customer.
*/
refund_address: string;
customer: string;
}
interface IBitcoinTransaction {
id: string;
/**
* Value is 'list'
*/
object: string;
/**
* The amount of currency that the transaction was converted to in real-time.
*/
amount: number;
/**
* The amount of bitcoin contained in the transaction.
*/
bitcoin_amount: number;
created: number;
/**
* The currency to which this transaction was converted.
*/
currency: string;
/**
* The receiver to which this transaction was sent.
*/
receiver: string;
}
}
module customerCards { }
module customerSubscriptions {
/**
* Subscriptions allow you to charge a customer's card on a recurring basis. A subscription ties a customer to
* a particular plan you've created: https://stripe.com/docs/api#create_plan
*/
interface ISubscription {
id: string;
/**
* Value is 'subscription'
*/
object: string;
/**
* If the subscription has been canceled with the at_period_end flag set to true, cancel_at_period_end on the
* subscription will be true. You can use this attribute to determine whether a subscription that has a status
* of active is scheduled to be canceled at the end of the current period.
*/
cancel_at_period_end: boolean;
customer: string;
/**
* Hash describing the plan the customer is subscribed to
*/
plan: plans.IPlan;
/**
* The number of subscriptions for the associated plan
*/
quantity: number;