• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stripe / stripe-go / 11295426688

11 Oct 2024 03:52PM UTC coverage: 62.991% (-0.02%) from 63.015%
11295426688

Pull #1934

github

stripe-openapi[bot]
Merge upstream and update generated code for v1290
Pull Request #1934: Update generated code for beta

0 of 8 new or added lines in 2 files covered. (0.0%)

472 existing lines in 21 files now uncovered.

6209 of 9857 relevant lines covered (62.99%)

15.67 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/quotepreviewinvoice.go
1
//
2
//
3
// File generated from our OpenAPI spec
4
//
5
//
6

7
package stripe
8

9
// The status of the payment, one of `open`, `paid`, or `past_due`
10
type QuotePreviewInvoiceAmountsDueStatus string
11

12
// List of values that QuotePreviewInvoiceAmountsDueStatus can take
13
const (
14
        QuotePreviewInvoiceAmountsDueStatusOpen    QuotePreviewInvoiceAmountsDueStatus = "open"
15
        QuotePreviewInvoiceAmountsDueStatusPaid    QuotePreviewInvoiceAmountsDueStatus = "paid"
16
        QuotePreviewInvoiceAmountsDueStatusPastDue QuotePreviewInvoiceAmountsDueStatus = "past_due"
17
)
18

19
// Describes whether the quote line is affecting a new schedule or an existing schedule.
20
type QuotePreviewInvoiceAppliesToType string
21

22
// List of values that QuotePreviewInvoiceAppliesToType can take
23
const (
24
        QuotePreviewInvoiceAppliesToTypeNewReference         QuotePreviewInvoiceAppliesToType = "new_reference"
25
        QuotePreviewInvoiceAppliesToTypeSubscriptionSchedule QuotePreviewInvoiceAppliesToType = "subscription_schedule"
26
)
27

28
// Type of the account referenced.
29
type QuotePreviewInvoiceAutomaticTaxLiabilityType string
30

31
// List of values that QuotePreviewInvoiceAutomaticTaxLiabilityType can take
32
const (
33
        QuotePreviewInvoiceAutomaticTaxLiabilityTypeAccount QuotePreviewInvoiceAutomaticTaxLiabilityType = "account"
34
        QuotePreviewInvoiceAutomaticTaxLiabilityTypeSelf    QuotePreviewInvoiceAutomaticTaxLiabilityType = "self"
35
)
36

37
// The status of the most recent automated tax calculation for this invoice.
38
type QuotePreviewInvoiceAutomaticTaxStatus string
39

40
// List of values that QuotePreviewInvoiceAutomaticTaxStatus can take
41
const (
42
        QuotePreviewInvoiceAutomaticTaxStatusComplete               QuotePreviewInvoiceAutomaticTaxStatus = "complete"
43
        QuotePreviewInvoiceAutomaticTaxStatusFailed                 QuotePreviewInvoiceAutomaticTaxStatus = "failed"
44
        QuotePreviewInvoiceAutomaticTaxStatusRequiresLocationInputs QuotePreviewInvoiceAutomaticTaxStatus = "requires_location_inputs"
45
)
46

47
// Indicates the reason why the invoice was created.
48
//
49
// * `manual`: Unrelated to a subscription, for example, created via the invoice editor.
50
// * `subscription`: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds.
51
// * `subscription_create`: A new subscription was created.
52
// * `subscription_cycle`: A subscription advanced into a new period.
53
// * `subscription_threshold`: A subscription reached a billing threshold.
54
// * `subscription_update`: A subscription was updated.
55
// * `upcoming`: Reserved for simulated invoices, per the upcoming invoice endpoint.
56
type QuotePreviewInvoiceBillingReason string
57

58
// List of values that QuotePreviewInvoiceBillingReason can take
59
const (
60
        QuotePreviewInvoiceBillingReasonAutomaticPendingInvoiceItemInvoice QuotePreviewInvoiceBillingReason = "automatic_pending_invoice_item_invoice"
61
        QuotePreviewInvoiceBillingReasonManual                             QuotePreviewInvoiceBillingReason = "manual"
62
        QuotePreviewInvoiceBillingReasonQuoteAccept                        QuotePreviewInvoiceBillingReason = "quote_accept"
63
        QuotePreviewInvoiceBillingReasonSubscription                       QuotePreviewInvoiceBillingReason = "subscription"
64
        QuotePreviewInvoiceBillingReasonSubscriptionCreate                 QuotePreviewInvoiceBillingReason = "subscription_create"
65
        QuotePreviewInvoiceBillingReasonSubscriptionCycle                  QuotePreviewInvoiceBillingReason = "subscription_cycle"
66
        QuotePreviewInvoiceBillingReasonSubscriptionThreshold              QuotePreviewInvoiceBillingReason = "subscription_threshold"
67
        QuotePreviewInvoiceBillingReasonSubscriptionUpdate                 QuotePreviewInvoiceBillingReason = "subscription_update"
68
        QuotePreviewInvoiceBillingReasonUpcoming                           QuotePreviewInvoiceBillingReason = "upcoming"
69
)
70

71
// Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions.
72
type QuotePreviewInvoiceCollectionMethod string
73

74
// List of values that QuotePreviewInvoiceCollectionMethod can take
75
const (
76
        QuotePreviewInvoiceCollectionMethodChargeAutomatically QuotePreviewInvoiceCollectionMethod = "charge_automatically"
77
        QuotePreviewInvoiceCollectionMethodSendInvoice         QuotePreviewInvoiceCollectionMethod = "send_invoice"
78
)
79

80
// The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated.
81
type QuotePreviewInvoiceCustomerTaxExempt string
82

83
// List of values that QuotePreviewInvoiceCustomerTaxExempt can take
84
const (
85
        QuotePreviewInvoiceCustomerTaxExemptExempt  QuotePreviewInvoiceCustomerTaxExempt = "exempt"
86
        QuotePreviewInvoiceCustomerTaxExemptNone    QuotePreviewInvoiceCustomerTaxExempt = "none"
87
        QuotePreviewInvoiceCustomerTaxExemptReverse QuotePreviewInvoiceCustomerTaxExempt = "reverse"
88
)
89

90
// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown`
91
type QuotePreviewInvoiceCustomerTaxIDType string
92

93
// List of values that QuotePreviewInvoiceCustomerTaxIDType can take
94
const (
95
        QuotePreviewInvoiceCustomerTaxIDTypeADNRT    QuotePreviewInvoiceCustomerTaxIDType = "ad_nrt"
96
        QuotePreviewInvoiceCustomerTaxIDTypeAETRN    QuotePreviewInvoiceCustomerTaxIDType = "ae_trn"
97
        QuotePreviewInvoiceCustomerTaxIDTypeARCUIT   QuotePreviewInvoiceCustomerTaxIDType = "ar_cuit"
98
        QuotePreviewInvoiceCustomerTaxIDTypeAUABN    QuotePreviewInvoiceCustomerTaxIDType = "au_abn"
99
        QuotePreviewInvoiceCustomerTaxIDTypeAUARN    QuotePreviewInvoiceCustomerTaxIDType = "au_arn"
100
        QuotePreviewInvoiceCustomerTaxIDTypeBGUIC    QuotePreviewInvoiceCustomerTaxIDType = "bg_uic"
101
        QuotePreviewInvoiceCustomerTaxIDTypeBhVAT    QuotePreviewInvoiceCustomerTaxIDType = "bh_vat"
102
        QuotePreviewInvoiceCustomerTaxIDTypeBOTIN    QuotePreviewInvoiceCustomerTaxIDType = "bo_tin"
103
        QuotePreviewInvoiceCustomerTaxIDTypeBRCNPJ   QuotePreviewInvoiceCustomerTaxIDType = "br_cnpj"
104
        QuotePreviewInvoiceCustomerTaxIDTypeBRCPF    QuotePreviewInvoiceCustomerTaxIDType = "br_cpf"
105
        QuotePreviewInvoiceCustomerTaxIDTypeByTin    QuotePreviewInvoiceCustomerTaxIDType = "by_tin"
106
        QuotePreviewInvoiceCustomerTaxIDTypeCABN     QuotePreviewInvoiceCustomerTaxIDType = "ca_bn"
107
        QuotePreviewInvoiceCustomerTaxIDTypeCAGSTHST QuotePreviewInvoiceCustomerTaxIDType = "ca_gst_hst"
108
        QuotePreviewInvoiceCustomerTaxIDTypeCAPSTBC  QuotePreviewInvoiceCustomerTaxIDType = "ca_pst_bc"
109
        QuotePreviewInvoiceCustomerTaxIDTypeCAPSTMB  QuotePreviewInvoiceCustomerTaxIDType = "ca_pst_mb"
110
        QuotePreviewInvoiceCustomerTaxIDTypeCAPSTSK  QuotePreviewInvoiceCustomerTaxIDType = "ca_pst_sk"
111
        QuotePreviewInvoiceCustomerTaxIDTypeCAQST    QuotePreviewInvoiceCustomerTaxIDType = "ca_qst"
112
        QuotePreviewInvoiceCustomerTaxIDTypeCHUID    QuotePreviewInvoiceCustomerTaxIDType = "ch_uid"
113
        QuotePreviewInvoiceCustomerTaxIDTypeCHVAT    QuotePreviewInvoiceCustomerTaxIDType = "ch_vat"
114
        QuotePreviewInvoiceCustomerTaxIDTypeCLTIN    QuotePreviewInvoiceCustomerTaxIDType = "cl_tin"
115
        QuotePreviewInvoiceCustomerTaxIDTypeCNTIN    QuotePreviewInvoiceCustomerTaxIDType = "cn_tin"
116
        QuotePreviewInvoiceCustomerTaxIDTypeCONIT    QuotePreviewInvoiceCustomerTaxIDType = "co_nit"
117
        QuotePreviewInvoiceCustomerTaxIDTypeCRTIN    QuotePreviewInvoiceCustomerTaxIDType = "cr_tin"
118
        QuotePreviewInvoiceCustomerTaxIDTypeDEStn    QuotePreviewInvoiceCustomerTaxIDType = "de_stn"
119
        QuotePreviewInvoiceCustomerTaxIDTypeDORCN    QuotePreviewInvoiceCustomerTaxIDType = "do_rcn"
120
        QuotePreviewInvoiceCustomerTaxIDTypeECRUC    QuotePreviewInvoiceCustomerTaxIDType = "ec_ruc"
121
        QuotePreviewInvoiceCustomerTaxIDTypeEGTIN    QuotePreviewInvoiceCustomerTaxIDType = "eg_tin"
122
        QuotePreviewInvoiceCustomerTaxIDTypeESCIF    QuotePreviewInvoiceCustomerTaxIDType = "es_cif"
123
        QuotePreviewInvoiceCustomerTaxIDTypeEUOSSVAT QuotePreviewInvoiceCustomerTaxIDType = "eu_oss_vat"
124
        QuotePreviewInvoiceCustomerTaxIDTypeEUVAT    QuotePreviewInvoiceCustomerTaxIDType = "eu_vat"
125
        QuotePreviewInvoiceCustomerTaxIDTypeGBVAT    QuotePreviewInvoiceCustomerTaxIDType = "gb_vat"
126
        QuotePreviewInvoiceCustomerTaxIDTypeGEVAT    QuotePreviewInvoiceCustomerTaxIDType = "ge_vat"
127
        QuotePreviewInvoiceCustomerTaxIDTypeHKBR     QuotePreviewInvoiceCustomerTaxIDType = "hk_br"
128
        QuotePreviewInvoiceCustomerTaxIDTypeHROIB    QuotePreviewInvoiceCustomerTaxIDType = "hr_oib"
129
        QuotePreviewInvoiceCustomerTaxIDTypeHUTIN    QuotePreviewInvoiceCustomerTaxIDType = "hu_tin"
130
        QuotePreviewInvoiceCustomerTaxIDTypeIDNPWP   QuotePreviewInvoiceCustomerTaxIDType = "id_npwp"
131
        QuotePreviewInvoiceCustomerTaxIDTypeILVAT    QuotePreviewInvoiceCustomerTaxIDType = "il_vat"
132
        QuotePreviewInvoiceCustomerTaxIDTypeINGST    QuotePreviewInvoiceCustomerTaxIDType = "in_gst"
133
        QuotePreviewInvoiceCustomerTaxIDTypeISVAT    QuotePreviewInvoiceCustomerTaxIDType = "is_vat"
134
        QuotePreviewInvoiceCustomerTaxIDTypeJPCN     QuotePreviewInvoiceCustomerTaxIDType = "jp_cn"
135
        QuotePreviewInvoiceCustomerTaxIDTypeJPRN     QuotePreviewInvoiceCustomerTaxIDType = "jp_rn"
136
        QuotePreviewInvoiceCustomerTaxIDTypeJPTRN    QuotePreviewInvoiceCustomerTaxIDType = "jp_trn"
137
        QuotePreviewInvoiceCustomerTaxIDTypeKEPIN    QuotePreviewInvoiceCustomerTaxIDType = "ke_pin"
138
        QuotePreviewInvoiceCustomerTaxIDTypeKRBRN    QuotePreviewInvoiceCustomerTaxIDType = "kr_brn"
139
        QuotePreviewInvoiceCustomerTaxIDTypeKzBin    QuotePreviewInvoiceCustomerTaxIDType = "kz_bin"
140
        QuotePreviewInvoiceCustomerTaxIDTypeLIUID    QuotePreviewInvoiceCustomerTaxIDType = "li_uid"
141
        QuotePreviewInvoiceCustomerTaxIDTypeMaVAT    QuotePreviewInvoiceCustomerTaxIDType = "ma_vat"
142
        QuotePreviewInvoiceCustomerTaxIDTypeMdVAT    QuotePreviewInvoiceCustomerTaxIDType = "md_vat"
143
        QuotePreviewInvoiceCustomerTaxIDTypeMXRFC    QuotePreviewInvoiceCustomerTaxIDType = "mx_rfc"
144
        QuotePreviewInvoiceCustomerTaxIDTypeMYFRP    QuotePreviewInvoiceCustomerTaxIDType = "my_frp"
145
        QuotePreviewInvoiceCustomerTaxIDTypeMYITN    QuotePreviewInvoiceCustomerTaxIDType = "my_itn"
146
        QuotePreviewInvoiceCustomerTaxIDTypeMYSST    QuotePreviewInvoiceCustomerTaxIDType = "my_sst"
147
        QuotePreviewInvoiceCustomerTaxIDTypeNgTin    QuotePreviewInvoiceCustomerTaxIDType = "ng_tin"
148
        QuotePreviewInvoiceCustomerTaxIDTypeNOVAT    QuotePreviewInvoiceCustomerTaxIDType = "no_vat"
149
        QuotePreviewInvoiceCustomerTaxIDTypeNOVOEC   QuotePreviewInvoiceCustomerTaxIDType = "no_voec"
150
        QuotePreviewInvoiceCustomerTaxIDTypeNZGST    QuotePreviewInvoiceCustomerTaxIDType = "nz_gst"
151
        QuotePreviewInvoiceCustomerTaxIDTypeOmVAT    QuotePreviewInvoiceCustomerTaxIDType = "om_vat"
152
        QuotePreviewInvoiceCustomerTaxIDTypePERUC    QuotePreviewInvoiceCustomerTaxIDType = "pe_ruc"
153
        QuotePreviewInvoiceCustomerTaxIDTypePHTIN    QuotePreviewInvoiceCustomerTaxIDType = "ph_tin"
154
        QuotePreviewInvoiceCustomerTaxIDTypeROTIN    QuotePreviewInvoiceCustomerTaxIDType = "ro_tin"
155
        QuotePreviewInvoiceCustomerTaxIDTypeRSPIB    QuotePreviewInvoiceCustomerTaxIDType = "rs_pib"
156
        QuotePreviewInvoiceCustomerTaxIDTypeRUINN    QuotePreviewInvoiceCustomerTaxIDType = "ru_inn"
157
        QuotePreviewInvoiceCustomerTaxIDTypeRUKPP    QuotePreviewInvoiceCustomerTaxIDType = "ru_kpp"
158
        QuotePreviewInvoiceCustomerTaxIDTypeSAVAT    QuotePreviewInvoiceCustomerTaxIDType = "sa_vat"
159
        QuotePreviewInvoiceCustomerTaxIDTypeSGGST    QuotePreviewInvoiceCustomerTaxIDType = "sg_gst"
160
        QuotePreviewInvoiceCustomerTaxIDTypeSGUEN    QuotePreviewInvoiceCustomerTaxIDType = "sg_uen"
161
        QuotePreviewInvoiceCustomerTaxIDTypeSITIN    QuotePreviewInvoiceCustomerTaxIDType = "si_tin"
162
        QuotePreviewInvoiceCustomerTaxIDTypeSVNIT    QuotePreviewInvoiceCustomerTaxIDType = "sv_nit"
163
        QuotePreviewInvoiceCustomerTaxIDTypeTHVAT    QuotePreviewInvoiceCustomerTaxIDType = "th_vat"
164
        QuotePreviewInvoiceCustomerTaxIDTypeTRTIN    QuotePreviewInvoiceCustomerTaxIDType = "tr_tin"
165
        QuotePreviewInvoiceCustomerTaxIDTypeTWVAT    QuotePreviewInvoiceCustomerTaxIDType = "tw_vat"
166
        QuotePreviewInvoiceCustomerTaxIDTypeTzVAT    QuotePreviewInvoiceCustomerTaxIDType = "tz_vat"
167
        QuotePreviewInvoiceCustomerTaxIDTypeUAVAT    QuotePreviewInvoiceCustomerTaxIDType = "ua_vat"
168
        QuotePreviewInvoiceCustomerTaxIDTypeUnknown  QuotePreviewInvoiceCustomerTaxIDType = "unknown"
169
        QuotePreviewInvoiceCustomerTaxIDTypeUSEIN    QuotePreviewInvoiceCustomerTaxIDType = "us_ein"
170
        QuotePreviewInvoiceCustomerTaxIDTypeUYRUC    QuotePreviewInvoiceCustomerTaxIDType = "uy_ruc"
171
        QuotePreviewInvoiceCustomerTaxIDTypeUzTin    QuotePreviewInvoiceCustomerTaxIDType = "uz_tin"
172
        QuotePreviewInvoiceCustomerTaxIDTypeUzVAT    QuotePreviewInvoiceCustomerTaxIDType = "uz_vat"
173
        QuotePreviewInvoiceCustomerTaxIDTypeVERIF    QuotePreviewInvoiceCustomerTaxIDType = "ve_rif"
174
        QuotePreviewInvoiceCustomerTaxIDTypeVNTIN    QuotePreviewInvoiceCustomerTaxIDType = "vn_tin"
175
        QuotePreviewInvoiceCustomerTaxIDTypeZAVAT    QuotePreviewInvoiceCustomerTaxIDType = "za_vat"
176
)
177

178
// Type of the account referenced.
179
type QuotePreviewInvoiceIssuerType string
180

181
// List of values that QuotePreviewInvoiceIssuerType can take
182
const (
183
        QuotePreviewInvoiceIssuerTypeAccount QuotePreviewInvoiceIssuerType = "account"
184
        QuotePreviewInvoiceIssuerTypeSelf    QuotePreviewInvoiceIssuerType = "self"
185
)
186

187
// Transaction type of the mandate.
188
type QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionType string
189

190
// List of values that QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionType can take
191
const (
192
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionTypeBusiness QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionType = "business"
193
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionTypePersonal QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionType = "personal"
194
)
195

196
// Bank account verification method.
197
type QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod string
198

199
// List of values that QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod can take
200
const (
201
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethodAutomatic     QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod = "automatic"
202
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethodInstant       QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod = "instant"
203
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethodMicrodeposits QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod = "microdeposits"
204
)
205

206
// Preferred language of the Bancontact authorization page that the customer is redirected to.
207
type QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsBancontactPreferredLanguage string
208

209
// List of values that QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsBancontactPreferredLanguage can take
210
const (
211
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsBancontactPreferredLanguageDE QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsBancontactPreferredLanguage = "de"
212
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsBancontactPreferredLanguageEN QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsBancontactPreferredLanguage = "en"
213
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsBancontactPreferredLanguageFR QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsBancontactPreferredLanguage = "fr"
214
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsBancontactPreferredLanguageNL QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsBancontactPreferredLanguage = "nl"
215
)
216

217
// We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
218
type QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure string
219

220
// List of values that QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure can take
221
const (
222
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecureAny       QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure = "any"
223
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecureAutomatic QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure = "automatic"
224
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecureChallenge QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure = "challenge"
225
)
226

227
// The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
228
type QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferCountry string
229

230
// List of values that QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferCountry can take
231
const (
232
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferCountryBE QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferCountry = "BE"
233
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferCountryDE QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferCountry = "DE"
234
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferCountryES QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferCountry = "ES"
235
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferCountryFR QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferCountry = "FR"
236
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferCountryIE QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferCountry = "IE"
237
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferCountryNL QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferCountry = "NL"
238
)
239

240
// The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
241
type QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceFundingType string
242

243
// List of values that QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceFundingType can take
244
const (
245
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceFundingTypeBankTransfer QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceFundingType = "bank_transfer"
246
)
247

248
// The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
249
type QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsFiltersAccountSubcategory string
250

251
// List of values that QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsFiltersAccountSubcategory can take
252
const (
253
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsFiltersAccountSubcategoryChecking QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsFiltersAccountSubcategory = "checking"
254
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsFiltersAccountSubcategorySavings  QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsFiltersAccountSubcategory = "savings"
255
)
256

257
// The list of permissions to request. The `payment_method` permission must be included.
258
type QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission string
259

260
// List of values that QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission can take
261
const (
262
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionBalances      QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "balances"
263
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionOwnership     QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "ownership"
264
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionPaymentMethod QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "payment_method"
265
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionTransactions  QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "transactions"
266
)
267

268
// Data features requested to be retrieved upon account creation.
269
type QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch string
270

271
// List of values that QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch can take
272
const (
273
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchBalances         QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "balances"
274
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchInferredBalances QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "inferred_balances"
275
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchOwnership        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "ownership"
276
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchTransactions     QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "transactions"
277
)
278

279
// Bank account verification method.
280
type QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod string
281

282
// List of values that QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod can take
283
const (
284
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethodAutomatic     QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod = "automatic"
285
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethodInstant       QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod = "instant"
286
        QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethodMicrodeposits QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod = "microdeposits"
287
)
288

289
// The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice).
290
type QuotePreviewInvoicePaymentSettingsPaymentMethodType string
291

292
// List of values that QuotePreviewInvoicePaymentSettingsPaymentMethodType can take
293
const (
294
        QuotePreviewInvoicePaymentSettingsPaymentMethodTypeACHCreditTransfer  QuotePreviewInvoicePaymentSettingsPaymentMethodType = "ach_credit_transfer"
295
        QuotePreviewInvoicePaymentSettingsPaymentMethodTypeACHDebit           QuotePreviewInvoicePaymentSettingsPaymentMethodType = "ach_debit"
296
        QuotePreviewInvoicePaymentSettingsPaymentMethodTypeACSSDebit          QuotePreviewInvoicePaymentSettingsPaymentMethodType = "acss_debit"
297
        QuotePreviewInvoicePaymentSettingsPaymentMethodTypeAmazonPay          QuotePreviewInvoicePaymentSettingsPaymentMethodType = "amazon_pay"
298
        QuotePreviewInvoicePaymentSettingsPaymentMethodTypeAUBECSDebit        QuotePreviewInvoicePaymentSettingsPaymentMethodType = "au_becs_debit"
299
        QuotePreviewInvoicePaymentSettingsPaymentMethodTypeBACSDebit          QuotePreviewInvoicePaymentSettingsPaymentMethodType = "bacs_debit"
300
        QuotePreviewInvoicePaymentSettingsPaymentMethodTypeBancontact         QuotePreviewInvoicePaymentSettingsPaymentMethodType = "bancontact"
301
        QuotePreviewInvoicePaymentSettingsPaymentMethodTypeBoleto             QuotePreviewInvoicePaymentSettingsPaymentMethodType = "boleto"
302
        QuotePreviewInvoicePaymentSettingsPaymentMethodTypeCard               QuotePreviewInvoicePaymentSettingsPaymentMethodType = "card"
303
        QuotePreviewInvoicePaymentSettingsPaymentMethodTypeCashApp            QuotePreviewInvoicePaymentSettingsPaymentMethodType = "cashapp"
304
        QuotePreviewInvoicePaymentSettingsPaymentMethodTypeCustomerBalance    QuotePreviewInvoicePaymentSettingsPaymentMethodType = "customer_balance"
305
        QuotePreviewInvoicePaymentSettingsPaymentMethodTypeEPS                QuotePreviewInvoicePaymentSettingsPaymentMethodType = "eps"
306
        QuotePreviewInvoicePaymentSettingsPaymentMethodTypeFPX                QuotePreviewInvoicePaymentSettingsPaymentMethodType = "fpx"
307
        QuotePreviewInvoicePaymentSettingsPaymentMethodTypeGiropay            QuotePreviewInvoicePaymentSettingsPaymentMethodType = "giropay"
308
        QuotePreviewInvoicePaymentSettingsPaymentMethodTypeGrabpay            QuotePreviewInvoicePaymentSettingsPaymentMethodType = "grabpay"
309
        QuotePreviewInvoicePaymentSettingsPaymentMethodTypeIDEAL              QuotePreviewInvoicePaymentSettingsPaymentMethodType = "ideal"
310
        QuotePreviewInvoicePaymentSettingsPaymentMethodTypeKonbini            QuotePreviewInvoicePaymentSettingsPaymentMethodType = "konbini"
311
        QuotePreviewInvoicePaymentSettingsPaymentMethodTypeLink               QuotePreviewInvoicePaymentSettingsPaymentMethodType = "link"
312
        QuotePreviewInvoicePaymentSettingsPaymentMethodTypeMultibanco         QuotePreviewInvoicePaymentSettingsPaymentMethodType = "multibanco"
313
        QuotePreviewInvoicePaymentSettingsPaymentMethodTypeP24                QuotePreviewInvoicePaymentSettingsPaymentMethodType = "p24"
314
        QuotePreviewInvoicePaymentSettingsPaymentMethodTypePayNow             QuotePreviewInvoicePaymentSettingsPaymentMethodType = "paynow"
315
        QuotePreviewInvoicePaymentSettingsPaymentMethodTypePaypal             QuotePreviewInvoicePaymentSettingsPaymentMethodType = "paypal"
316
        QuotePreviewInvoicePaymentSettingsPaymentMethodTypePromptPay          QuotePreviewInvoicePaymentSettingsPaymentMethodType = "promptpay"
317
        QuotePreviewInvoicePaymentSettingsPaymentMethodTypeRevolutPay         QuotePreviewInvoicePaymentSettingsPaymentMethodType = "revolut_pay"
318
        QuotePreviewInvoicePaymentSettingsPaymentMethodTypeSEPACreditTransfer QuotePreviewInvoicePaymentSettingsPaymentMethodType = "sepa_credit_transfer"
319
        QuotePreviewInvoicePaymentSettingsPaymentMethodTypeSEPADebit          QuotePreviewInvoicePaymentSettingsPaymentMethodType = "sepa_debit"
320
        QuotePreviewInvoicePaymentSettingsPaymentMethodTypeSofort             QuotePreviewInvoicePaymentSettingsPaymentMethodType = "sofort"
321
        QuotePreviewInvoicePaymentSettingsPaymentMethodTypeSwish              QuotePreviewInvoicePaymentSettingsPaymentMethodType = "swish"
322
        QuotePreviewInvoicePaymentSettingsPaymentMethodTypeUSBankAccount      QuotePreviewInvoicePaymentSettingsPaymentMethodType = "us_bank_account"
323
        QuotePreviewInvoicePaymentSettingsPaymentMethodTypeWeChatPay          QuotePreviewInvoicePaymentSettingsPaymentMethodType = "wechat_pay"
324
)
325

326
// Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale.
327
type QuotePreviewInvoiceRenderingPDFPageSize string
328

329
// List of values that QuotePreviewInvoiceRenderingPDFPageSize can take
330
const (
331
        QuotePreviewInvoiceRenderingPDFPageSizeA4     QuotePreviewInvoiceRenderingPDFPageSize = "a4"
332
        QuotePreviewInvoiceRenderingPDFPageSizeAuto   QuotePreviewInvoiceRenderingPDFPageSize = "auto"
333
        QuotePreviewInvoiceRenderingPDFPageSizeLetter QuotePreviewInvoiceRenderingPDFPageSize = "letter"
334
)
335

336
// The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
337
type QuotePreviewInvoiceShippingCostTaxTaxabilityReason string
338

339
// List of values that QuotePreviewInvoiceShippingCostTaxTaxabilityReason can take
340
const (
341
        QuotePreviewInvoiceShippingCostTaxTaxabilityReasonCustomerExempt       QuotePreviewInvoiceShippingCostTaxTaxabilityReason = "customer_exempt"
342
        QuotePreviewInvoiceShippingCostTaxTaxabilityReasonNotCollecting        QuotePreviewInvoiceShippingCostTaxTaxabilityReason = "not_collecting"
343
        QuotePreviewInvoiceShippingCostTaxTaxabilityReasonNotSubjectToTax      QuotePreviewInvoiceShippingCostTaxTaxabilityReason = "not_subject_to_tax"
344
        QuotePreviewInvoiceShippingCostTaxTaxabilityReasonNotSupported         QuotePreviewInvoiceShippingCostTaxTaxabilityReason = "not_supported"
345
        QuotePreviewInvoiceShippingCostTaxTaxabilityReasonPortionProductExempt QuotePreviewInvoiceShippingCostTaxTaxabilityReason = "portion_product_exempt"
346
        QuotePreviewInvoiceShippingCostTaxTaxabilityReasonPortionReducedRated  QuotePreviewInvoiceShippingCostTaxTaxabilityReason = "portion_reduced_rated"
347
        QuotePreviewInvoiceShippingCostTaxTaxabilityReasonPortionStandardRated QuotePreviewInvoiceShippingCostTaxTaxabilityReason = "portion_standard_rated"
348
        QuotePreviewInvoiceShippingCostTaxTaxabilityReasonProductExempt        QuotePreviewInvoiceShippingCostTaxTaxabilityReason = "product_exempt"
349
        QuotePreviewInvoiceShippingCostTaxTaxabilityReasonProductExemptHoliday QuotePreviewInvoiceShippingCostTaxTaxabilityReason = "product_exempt_holiday"
350
        QuotePreviewInvoiceShippingCostTaxTaxabilityReasonProportionallyRated  QuotePreviewInvoiceShippingCostTaxTaxabilityReason = "proportionally_rated"
351
        QuotePreviewInvoiceShippingCostTaxTaxabilityReasonReducedRated         QuotePreviewInvoiceShippingCostTaxTaxabilityReason = "reduced_rated"
352
        QuotePreviewInvoiceShippingCostTaxTaxabilityReasonReverseCharge        QuotePreviewInvoiceShippingCostTaxTaxabilityReason = "reverse_charge"
353
        QuotePreviewInvoiceShippingCostTaxTaxabilityReasonStandardRated        QuotePreviewInvoiceShippingCostTaxTaxabilityReason = "standard_rated"
354
        QuotePreviewInvoiceShippingCostTaxTaxabilityReasonTaxableBasisReduced  QuotePreviewInvoiceShippingCostTaxTaxabilityReason = "taxable_basis_reduced"
355
        QuotePreviewInvoiceShippingCostTaxTaxabilityReasonZeroRated            QuotePreviewInvoiceShippingCostTaxTaxabilityReason = "zero_rated"
356
)
357

358
// The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)
359
type QuotePreviewInvoiceStatus string
360

361
// List of values that QuotePreviewInvoiceStatus can take
362
const (
363
        QuotePreviewInvoiceStatusDraft         QuotePreviewInvoiceStatus = "draft"
364
        QuotePreviewInvoiceStatusOpen          QuotePreviewInvoiceStatus = "open"
365
        QuotePreviewInvoiceStatusPaid          QuotePreviewInvoiceStatus = "paid"
366
        QuotePreviewInvoiceStatusUncollectible QuotePreviewInvoiceStatus = "uncollectible"
367
        QuotePreviewInvoiceStatusVoid          QuotePreviewInvoiceStatus = "void"
368
)
369

370
// The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
371
type QuotePreviewInvoiceSubscriptionDetailsPauseCollectionBehavior string
372

373
// List of values that QuotePreviewInvoiceSubscriptionDetailsPauseCollectionBehavior can take
374
const (
375
        QuotePreviewInvoiceSubscriptionDetailsPauseCollectionBehaviorKeepAsDraft       QuotePreviewInvoiceSubscriptionDetailsPauseCollectionBehavior = "keep_as_draft"
376
        QuotePreviewInvoiceSubscriptionDetailsPauseCollectionBehaviorMarkUncollectible QuotePreviewInvoiceSubscriptionDetailsPauseCollectionBehavior = "mark_uncollectible"
377
        QuotePreviewInvoiceSubscriptionDetailsPauseCollectionBehaviorVoid              QuotePreviewInvoiceSubscriptionDetailsPauseCollectionBehavior = "void"
378
)
379

380
// Type of the pretax credit amount referenced.
381
type QuotePreviewInvoiceTotalPretaxCreditAmountType string
382

383
// List of values that QuotePreviewInvoiceTotalPretaxCreditAmountType can take
384
const (
385
        QuotePreviewInvoiceTotalPretaxCreditAmountTypeCreditBalanceTransaction QuotePreviewInvoiceTotalPretaxCreditAmountType = "credit_balance_transaction"
386
        QuotePreviewInvoiceTotalPretaxCreditAmountTypeDiscount                 QuotePreviewInvoiceTotalPretaxCreditAmountType = "discount"
387
        QuotePreviewInvoiceTotalPretaxCreditAmountTypeMargin                   QuotePreviewInvoiceTotalPretaxCreditAmountType = "margin"
388
)
389

390
// The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
391
type QuotePreviewInvoiceTotalTaxAmountTaxabilityReason string
392

393
// List of values that QuotePreviewInvoiceTotalTaxAmountTaxabilityReason can take
394
const (
395
        QuotePreviewInvoiceTotalTaxAmountTaxabilityReasonCustomerExempt       QuotePreviewInvoiceTotalTaxAmountTaxabilityReason = "customer_exempt"
396
        QuotePreviewInvoiceTotalTaxAmountTaxabilityReasonNotCollecting        QuotePreviewInvoiceTotalTaxAmountTaxabilityReason = "not_collecting"
397
        QuotePreviewInvoiceTotalTaxAmountTaxabilityReasonNotSubjectToTax      QuotePreviewInvoiceTotalTaxAmountTaxabilityReason = "not_subject_to_tax"
398
        QuotePreviewInvoiceTotalTaxAmountTaxabilityReasonNotSupported         QuotePreviewInvoiceTotalTaxAmountTaxabilityReason = "not_supported"
399
        QuotePreviewInvoiceTotalTaxAmountTaxabilityReasonPortionProductExempt QuotePreviewInvoiceTotalTaxAmountTaxabilityReason = "portion_product_exempt"
400
        QuotePreviewInvoiceTotalTaxAmountTaxabilityReasonPortionReducedRated  QuotePreviewInvoiceTotalTaxAmountTaxabilityReason = "portion_reduced_rated"
401
        QuotePreviewInvoiceTotalTaxAmountTaxabilityReasonPortionStandardRated QuotePreviewInvoiceTotalTaxAmountTaxabilityReason = "portion_standard_rated"
402
        QuotePreviewInvoiceTotalTaxAmountTaxabilityReasonProductExempt        QuotePreviewInvoiceTotalTaxAmountTaxabilityReason = "product_exempt"
403
        QuotePreviewInvoiceTotalTaxAmountTaxabilityReasonProductExemptHoliday QuotePreviewInvoiceTotalTaxAmountTaxabilityReason = "product_exempt_holiday"
404
        QuotePreviewInvoiceTotalTaxAmountTaxabilityReasonProportionallyRated  QuotePreviewInvoiceTotalTaxAmountTaxabilityReason = "proportionally_rated"
405
        QuotePreviewInvoiceTotalTaxAmountTaxabilityReasonReducedRated         QuotePreviewInvoiceTotalTaxAmountTaxabilityReason = "reduced_rated"
406
        QuotePreviewInvoiceTotalTaxAmountTaxabilityReasonReverseCharge        QuotePreviewInvoiceTotalTaxAmountTaxabilityReason = "reverse_charge"
407
        QuotePreviewInvoiceTotalTaxAmountTaxabilityReasonStandardRated        QuotePreviewInvoiceTotalTaxAmountTaxabilityReason = "standard_rated"
408
        QuotePreviewInvoiceTotalTaxAmountTaxabilityReasonTaxableBasisReduced  QuotePreviewInvoiceTotalTaxAmountTaxabilityReason = "taxable_basis_reduced"
409
        QuotePreviewInvoiceTotalTaxAmountTaxabilityReasonZeroRated            QuotePreviewInvoiceTotalTaxAmountTaxabilityReason = "zero_rated"
410
)
411

412
// Preview the invoices that would be generated by accepting the quote.
413
type QuotePreviewInvoiceListParams struct {
414
        ListParams `form:"*"`
415
        Quote      *string `form:"-"` // Included in URL
416
        // Specifies which fields in the response should be expanded.
417
        Expand []*string `form:"expand"`
418
}
419

420
// AddExpand appends a new field to expand.
UNCOV
421
func (p *QuotePreviewInvoiceListParams) AddExpand(f string) {
×
UNCOV
422
        p.Expand = append(p.Expand, &f)
×
UNCOV
423
}
×
424

425
// List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically.
426
type QuotePreviewInvoiceAmountsDue struct {
427
        // Incremental amount due for this payment in cents (or local equivalent).
428
        Amount int64 `json:"amount"`
429
        // The amount in cents (or local equivalent) that was paid for this payment.
430
        AmountPaid int64 `json:"amount_paid"`
431
        // The difference between the payment's amount and amount_paid, in cents (or local equivalent).
432
        AmountRemaining int64 `json:"amount_remaining"`
433
        // Number of days from when invoice is finalized until the payment is due.
434
        DaysUntilDue int64 `json:"days_until_due"`
435
        // An arbitrary string attached to the object. Often useful for displaying to users.
436
        Description string `json:"description"`
437
        // Date on which a payment plan's payment is due.
438
        DueDate int64 `json:"due_date"`
439
        // Timestamp when the payment was paid.
440
        PaidAt int64 `json:"paid_at"`
441
        // The status of the payment, one of `open`, `paid`, or `past_due`
442
        Status QuotePreviewInvoiceAmountsDueStatus `json:"status"`
443
}
444
type QuotePreviewInvoiceAppliesTo struct {
445
        // A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
446
        NewReference string `json:"new_reference"`
447
        // The ID of the schedule the line applies to.
448
        SubscriptionSchedule string `json:"subscription_schedule"`
449
        // Describes whether the quote line is affecting a new schedule or an existing schedule.
450
        Type QuotePreviewInvoiceAppliesToType `json:"type"`
451
}
452

453
// The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
454
type QuotePreviewInvoiceAutomaticTaxLiability struct {
455
        // The connected account being referenced when `type` is `account`.
456
        Account *Account `json:"account"`
457
        // Type of the account referenced.
458
        Type QuotePreviewInvoiceAutomaticTaxLiabilityType `json:"type"`
459
}
460
type QuotePreviewInvoiceAutomaticTax struct {
461
        // Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
462
        Enabled bool `json:"enabled"`
463
        // The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
464
        Liability *QuotePreviewInvoiceAutomaticTaxLiability `json:"liability"`
465
        // The status of the most recent automated tax calculation for this invoice.
466
        Status QuotePreviewInvoiceAutomaticTaxStatus `json:"status"`
467
}
468

469
// Custom fields displayed on the invoice.
470
type QuotePreviewInvoiceCustomField struct {
471
        // The name of the custom field.
472
        Name string `json:"name"`
473
        // The value of the custom field.
474
        Value string `json:"value"`
475
}
476

477
// The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated.
478
type QuotePreviewInvoiceCustomerTaxID struct {
479
        // The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown`
480
        Type QuotePreviewInvoiceCustomerTaxIDType `json:"type"`
481
        // The value of the tax ID.
482
        Value string `json:"value"`
483
}
484

485
// Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details.
486
type QuotePreviewInvoiceFromInvoice struct {
487
        // The relation between this invoice and the cloned invoice
488
        Action string `json:"action"`
489
        // The invoice that was cloned.
490
        Invoice *Invoice `json:"invoice"`
491
}
492
type QuotePreviewInvoiceIssuer struct {
493
        // The connected account being referenced when `type` is `account`.
494
        Account *Account `json:"account"`
495
        // Type of the account referenced.
496
        Type QuotePreviewInvoiceIssuerType `json:"type"`
497
}
498
type QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptions struct {
499
        // Transaction type of the mandate.
500
        TransactionType QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionType `json:"transaction_type"`
501
}
502

503
// If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent.
504
type QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsACSSDebit struct {
505
        MandateOptions *QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptions `json:"mandate_options"`
506
        // Bank account verification method.
507
        VerificationMethod QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod `json:"verification_method"`
508
}
509

510
// If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent.
511
type QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsBancontact struct {
512
        // Preferred language of the Bancontact authorization page that the customer is redirected to.
513
        PreferredLanguage QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsBancontactPreferredLanguage `json:"preferred_language"`
514
}
515
type QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCardInstallments struct {
516
        // Whether Installments are enabled for this Invoice.
517
        Enabled bool `json:"enabled"`
518
}
519

520
// If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent.
521
type QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCard struct {
522
        Installments *QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCardInstallments `json:"installments"`
523
        // We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
524
        RequestThreeDSecure QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure `json:"request_three_d_secure"`
525
}
526
type QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer struct {
527
        // The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
528
        Country QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferCountry `json:"country"`
529
}
530
type QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer struct {
531
        EUBankTransfer *QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer `json:"eu_bank_transfer"`
532
        // The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
533
        Type string `json:"type"`
534
}
535

536
// If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent.
537
type QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCustomerBalance struct {
538
        BankTransfer *QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer `json:"bank_transfer"`
539
        // The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
540
        FundingType QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceFundingType `json:"funding_type"`
541
}
542

543
// If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
544
type QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsKonbini struct{}
545

546
// If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent.
547
type QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsSEPADebit struct{}
548
type QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsFilters struct {
549
        // The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
550
        AccountSubcategories []QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsFiltersAccountSubcategory `json:"account_subcategories"`
551
        // The institution to use to filter for possible accounts to link.
552
        Institution string `json:"institution"`
553
}
554
type QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnections struct {
555
        Filters *QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsFilters `json:"filters"`
556
        // The list of permissions to request. The `payment_method` permission must be included.
557
        Permissions []QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission `json:"permissions"`
558
        // Data features requested to be retrieved upon account creation.
559
        Prefetch []QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch `json:"prefetch"`
560
}
561

562
// If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
563
type QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccount struct {
564
        FinancialConnections *QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnections `json:"financial_connections"`
565
        // Bank account verification method.
566
        VerificationMethod QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod `json:"verification_method"`
567
}
568

569
// Payment-method-specific configuration to provide to the invoice's PaymentIntent.
570
type QuotePreviewInvoicePaymentSettingsPaymentMethodOptions struct {
571
        // If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent.
572
        ACSSDebit *QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsACSSDebit `json:"acss_debit"`
573
        // If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent.
574
        Bancontact *QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsBancontact `json:"bancontact"`
575
        // If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent.
576
        Card *QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCard `json:"card"`
577
        // If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent.
578
        CustomerBalance *QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsCustomerBalance `json:"customer_balance"`
579
        // If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
580
        Konbini *QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsKonbini `json:"konbini"`
581
        // If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent.
582
        SEPADebit *QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsSEPADebit `json:"sepa_debit"`
583
        // If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
584
        USBankAccount *QuotePreviewInvoicePaymentSettingsPaymentMethodOptionsUSBankAccount `json:"us_bank_account"`
585
}
586
type QuotePreviewInvoicePaymentSettings struct {
587
        // ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set.
588
        DefaultMandate string `json:"default_mandate"`
589
        // Payment-method-specific configuration to provide to the invoice's PaymentIntent.
590
        PaymentMethodOptions *QuotePreviewInvoicePaymentSettingsPaymentMethodOptions `json:"payment_method_options"`
591
        // The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice).
592
        PaymentMethodTypes []QuotePreviewInvoicePaymentSettingsPaymentMethodType `json:"payment_method_types"`
593
}
594

595
// Invoice pdf rendering options
596
type QuotePreviewInvoiceRenderingPDF struct {
597
        // Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale.
598
        PageSize QuotePreviewInvoiceRenderingPDFPageSize `json:"page_size"`
599
}
600

601
// The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
602
type QuotePreviewInvoiceRendering struct {
603
        // How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
604
        AmountTaxDisplay string `json:"amount_tax_display"`
605
        // Invoice pdf rendering options
606
        PDF *QuotePreviewInvoiceRenderingPDF `json:"pdf"`
607
        // ID of the rendering template that the invoice is formatted by.
608
        Template string `json:"template"`
609
        // Version of the rendering template that the invoice is using.
610
        TemplateVersion int64 `json:"template_version"`
611
}
612

613
// The taxes applied to the shipping rate.
614
type QuotePreviewInvoiceShippingCostTax struct {
615
        // Amount of tax applied for this rate.
616
        Amount int64 `json:"amount"`
617
        // Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.
618
        //
619
        // Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates)
620
        Rate *TaxRate `json:"rate"`
621
        // The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
622
        TaxabilityReason QuotePreviewInvoiceShippingCostTaxTaxabilityReason `json:"taxability_reason"`
623
        // The amount on which tax is calculated, in cents (or local equivalent).
624
        TaxableAmount int64 `json:"taxable_amount"`
625
}
626

627
// The details of the cost of shipping, including the ShippingRate applied on the invoice.
628
type QuotePreviewInvoiceShippingCost struct {
629
        // Total shipping cost before any taxes are applied.
630
        AmountSubtotal int64 `json:"amount_subtotal"`
631
        // Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.
632
        AmountTax int64 `json:"amount_tax"`
633
        // Total shipping cost after taxes are applied.
634
        AmountTotal int64 `json:"amount_total"`
635
        // The ID of the ShippingRate for this invoice.
636
        ShippingRate *ShippingRate `json:"shipping_rate"`
637
        // The taxes applied to the shipping rate.
638
        Taxes []*QuotePreviewInvoiceShippingCostTax `json:"taxes"`
639
}
640
type QuotePreviewInvoiceStatusTransitions struct {
641
        // The time that the invoice draft was finalized.
642
        FinalizedAt int64 `json:"finalized_at"`
643
        // The time that the invoice was marked uncollectible.
644
        MarkedUncollectibleAt int64 `json:"marked_uncollectible_at"`
645
        // The time that the invoice was paid.
646
        PaidAt int64 `json:"paid_at"`
647
        // The time that the invoice was voided.
648
        VoidedAt int64 `json:"voided_at"`
649
}
650

651
// If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/billing/subscriptions/pause-payment).
652
type QuotePreviewInvoiceSubscriptionDetailsPauseCollection struct {
653
        // The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
654
        Behavior QuotePreviewInvoiceSubscriptionDetailsPauseCollectionBehavior `json:"behavior"`
655
        // The time after which the subscription will resume collecting payments.
656
        ResumesAt int64 `json:"resumes_at"`
657
}
658

659
// Details about the subscription that created this invoice.
660
type QuotePreviewInvoiceSubscriptionDetails struct {
661
        // Set of [key-value pairs](https://stripe.com/docs/api/metadata) defined as subscription metadata when an invoice is created. Becomes an immutable snapshot of the subscription metadata at the time of invoice finalization.
662
        //  *Note: This attribute is populated only for invoices created on or after June 29, 2023.*
663
        Metadata map[string]string `json:"metadata"`
664
        // If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/billing/subscriptions/pause-payment).
665
        PauseCollection *QuotePreviewInvoiceSubscriptionDetailsPauseCollection `json:"pause_collection"`
666
}
667

668
// Indicates which line items triggered a threshold invoice.
669
type QuotePreviewInvoiceThresholdReasonItemReason struct {
670
        // The IDs of the line items that triggered the threshold invoice.
671
        LineItemIDs []string `json:"line_item_ids"`
672
        // The quantity threshold boundary that applied to the given line item.
673
        UsageGTE int64 `json:"usage_gte"`
674
}
675
type QuotePreviewInvoiceThresholdReason struct {
676
        // The total invoice amount threshold boundary if it triggered the threshold invoice.
677
        AmountGTE int64 `json:"amount_gte"`
678
        // Indicates which line items triggered a threshold invoice.
679
        ItemReasons []*QuotePreviewInvoiceThresholdReasonItemReason `json:"item_reasons"`
680
}
681

682
// The aggregate amounts calculated per discount across all line items.
683
type QuotePreviewInvoiceTotalDiscountAmount struct {
684
        // The amount, in cents (or local equivalent), of the discount.
685
        Amount int64 `json:"amount"`
686
        // The discount that was applied to get this discount amount.
687
        Discount *Discount `json:"discount"`
688
}
689

690
// The aggregate amounts calculated per margin across all line items.
691
type QuotePreviewInvoiceTotalMarginAmount struct {
692
        // The amount, in cents (or local equivalent), of the reduction in line item amount.
693
        Amount int64 `json:"amount"`
694
        // The margin that was applied to get this margin amount.
695
        Margin *Margin `json:"margin"`
696
}
697

698
// Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items.
699
type QuotePreviewInvoiceTotalPretaxCreditAmount struct {
700
        // The amount, in cents (or local equivalent), of the pretax credit amount.
701
        Amount int64 `json:"amount"`
702
        // The credit balance transaction that was applied to get this pretax credit amount.
703
        CreditBalanceTransaction *BillingCreditBalanceTransaction `json:"credit_balance_transaction"`
704
        // The discount that was applied to get this pretax credit amount.
705
        Discount *Discount `json:"discount"`
706
        // The margin that was applied to get this pretax credit amount.
707
        Margin *Margin `json:"margin"`
708
        // Type of the pretax credit amount referenced.
709
        Type QuotePreviewInvoiceTotalPretaxCreditAmountType `json:"type"`
710
}
711

712
// The aggregate amounts calculated per tax rate for all line items.
713
type QuotePreviewInvoiceTotalTaxAmount struct {
714
        // The amount, in cents (or local equivalent), of the tax.
715
        Amount int64 `json:"amount"`
716
        // Whether this tax amount is inclusive or exclusive.
717
        Inclusive bool `json:"inclusive"`
718
        // The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
719
        TaxabilityReason QuotePreviewInvoiceTotalTaxAmountTaxabilityReason `json:"taxability_reason"`
720
        // The amount on which tax is calculated, in cents (or local equivalent).
721
        TaxableAmount int64 `json:"taxable_amount"`
722
        // The tax rate that was applied to get this tax amount.
723
        TaxRate *TaxRate `json:"tax_rate"`
724
}
725

726
// The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice.
727
type QuotePreviewInvoiceTransferData struct {
728
        // The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination.
729
        Amount int64 `json:"amount"`
730
        // The account where funds from the payment will be transferred to upon payment success.
731
        Destination *Account `json:"destination"`
732
}
733

734
// Invoices are statements of amounts owed by a customer, and are either
735
// generated one-off, or generated periodically from a subscription.
736
//
737
// They contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments
738
// that may be caused by subscription upgrades/downgrades (if necessary).
739
//
740
// If your invoice is configured to be billed through automatic charges,
741
// Stripe automatically finalizes your invoice and attempts payment. Note
742
// that finalizing the invoice,
743
// [when automatic](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection), does
744
// not happen immediately as the invoice is created. Stripe waits
745
// until one hour after the last webhook was successfully sent (or the last
746
// webhook timed out after failing). If you (and the platforms you may have
747
// connected to) have no webhooks configured, Stripe waits one hour after
748
// creation to finalize the invoice.
749
//
750
// If your invoice is configured to be billed by sending an email, then based on your
751
// [email settings](https://dashboard.stripe.com/account/billing/automatic),
752
// Stripe will email the invoice to your customer and await payment. These
753
// emails can contain a link to a hosted page to pay the invoice.
754
//
755
// Stripe applies any customer credit on the account before determining the
756
// amount due for the invoice (i.e., the amount that will be actually
757
// charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge
758
// per currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts), the
759
// invoice is automatically marked paid, and we add the amount due to the
760
// customer's credit balance which is applied to the next invoice.
761
//
762
// More details on the customer's credit balance are
763
// [here](https://stripe.com/docs/billing/customer/balance).
764
//
765
// Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending)
766
type QuotePreviewInvoice struct {
767
        // The country of the business associated with this invoice, most often the business creating the invoice.
768
        AccountCountry string `json:"account_country"`
769
        // The public name of the business associated with this invoice, most often the business creating the invoice.
770
        AccountName string `json:"account_name"`
771
        // The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
772
        AccountTaxIDs []*TaxID `json:"account_tax_ids"`
773
        // 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`.
774
        AmountDue int64 `json:"amount_due"`
775
        // The amount, in cents (or local equivalent), that was paid.
776
        AmountPaid int64 `json:"amount_paid"`
777
        // The difference between amount_due and amount_paid, in cents (or local equivalent).
778
        AmountRemaining int64 `json:"amount_remaining"`
779
        // List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically.
780
        AmountsDue []*QuotePreviewInvoiceAmountsDue `json:"amounts_due"`
781
        // This is the sum of all the shipping amounts.
782
        AmountShipping int64 `json:"amount_shipping"`
783
        // ID of the Connect Application that created the invoice.
784
        Application *Application `json:"application"`
785
        // The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid.
786
        ApplicationFeeAmount int64                         `json:"application_fee_amount"`
787
        AppliesTo            *QuotePreviewInvoiceAppliesTo `json:"applies_to"`
788
        // 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. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained.
789
        AttemptCount int64 `json:"attempt_count"`
790
        // Whether 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.
791
        Attempted bool `json:"attempted"`
792
        // The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized.
793
        AutomaticallyFinalizesAt int64                            `json:"automatically_finalizes_at"`
794
        AutomaticTax             *QuotePreviewInvoiceAutomaticTax `json:"automatic_tax"`
795
        // Indicates the reason why the invoice was created.
796
        //
797
        // * `manual`: Unrelated to a subscription, for example, created via the invoice editor.
798
        // * `subscription`: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds.
799
        // * `subscription_create`: A new subscription was created.
800
        // * `subscription_cycle`: A subscription advanced into a new period.
801
        // * `subscription_threshold`: A subscription reached a billing threshold.
802
        // * `subscription_update`: A subscription was updated.
803
        // * `upcoming`: Reserved for simulated invoices, per the upcoming invoice endpoint.
804
        BillingReason QuotePreviewInvoiceBillingReason `json:"billing_reason"`
805
        // Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions.
806
        CollectionMethod QuotePreviewInvoiceCollectionMethod `json:"collection_method"`
807
        // Time at which the object was created. Measured in seconds since the Unix epoch.
808
        Created int64 `json:"created"`
809
        // Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
810
        Currency Currency `json:"currency"`
811
        // The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated.
812
        CustomerAddress *Address `json:"customer_address"`
813
        // The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated.
814
        CustomerEmail string `json:"customer_email"`
815
        // The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated.
816
        CustomerName string `json:"customer_name"`
817
        // The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated.
818
        CustomerPhone string `json:"customer_phone"`
819
        // The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated.
820
        CustomerShipping *ShippingDetails `json:"customer_shipping"`
821
        // The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated.
822
        CustomerTaxExempt QuotePreviewInvoiceCustomerTaxExempt `json:"customer_tax_exempt"`
823
        // The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated.
824
        CustomerTaxIDs []*QuotePreviewInvoiceCustomerTaxID `json:"customer_tax_ids"`
825
        // Custom fields displayed on the invoice.
826
        CustomFields []*QuotePreviewInvoiceCustomField `json:"custom_fields"`
827
        // The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin.
828
        DefaultMargins []*Margin `json:"default_margins"`
829
        // ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
830
        DefaultPaymentMethod *PaymentMethod `json:"default_payment_method"`
831
        // ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
832
        DefaultSource *PaymentSource `json:"default_source"`
833
        // The tax rates applied to this invoice, if any.
834
        DefaultTaxRates []*TaxRate `json:"default_tax_rates"`
835
        // An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
836
        Description string `json:"description"`
837
        // Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts.
838
        Discount *Discount `json:"discount"`
839
        // The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.
840
        Discounts []*Discount `json:"discounts"`
841
        // The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`.
842
        DueDate int64 `json:"due_date"`
843
        // The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt.
844
        EffectiveAt int64 `json:"effective_at"`
845
        // Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null.
846
        EndingBalance int64 `json:"ending_balance"`
847
        // Footer displayed on the invoice.
848
        Footer string `json:"footer"`
849
        // Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details.
850
        FromInvoice *QuotePreviewInvoiceFromInvoice `json:"from_invoice"`
851
        // Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details.
852
        ID     string                     `json:"id"`
853
        Issuer *QuotePreviewInvoiceIssuer `json:"issuer"`
854
        // The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized.
855
        LastFinalizationError *Error `json:"last_finalization_error"`
856
        // The ID of the most recent non-draft revision of this invoice
857
        LatestRevision *Invoice `json:"latest_revision"`
858
        // The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order.
859
        Lines *InvoiceLineItemList `json:"lines"`
860
        // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
861
        Livemode bool `json:"livemode"`
862
        // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
863
        Metadata map[string]string `json:"metadata"`
864
        // The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`.
865
        NextPaymentAttempt int64 `json:"next_payment_attempt"`
866
        // A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified.
867
        Number string `json:"number"`
868
        // String representing the object's type. Objects of the same type share the same value.
869
        Object string `json:"object"`
870
        // The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.
871
        OnBehalfOf *Account `json:"on_behalf_of"`
872
        // Whether 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.
873
        Paid bool `json:"paid"`
874
        // Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe.
875
        PaidOutOfBand bool `json:"paid_out_of_band"`
876
        // The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent.
877
        PaymentIntent *PaymentIntent `json:"payment_intent"`
878
        // Payments for this invoice
879
        Payments        *InvoicePaymentList                 `json:"payments"`
880
        PaymentSettings *QuotePreviewInvoicePaymentSettings `json:"payment_settings"`
881
        // End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](https://stripe.com/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price.
882
        PeriodEnd int64 `json:"period_end"`
883
        // Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](https://stripe.com/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price.
884
        PeriodStart int64 `json:"period_start"`
885
        // Total amount of all post-payment credit notes issued for this invoice.
886
        PostPaymentCreditNotesAmount int64 `json:"post_payment_credit_notes_amount"`
887
        // Total amount of all pre-payment credit notes issued for this invoice.
888
        PrePaymentCreditNotesAmount int64 `json:"pre_payment_credit_notes_amount"`
889
        // The quote this invoice was generated from.
890
        Quote *Quote `json:"quote"`
891
        // This is the transaction number that appears on email receipts sent for this invoice.
892
        ReceiptNumber string `json:"receipt_number"`
893
        // The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
894
        Rendering *QuotePreviewInvoiceRendering `json:"rendering"`
895
        // The details of the cost of shipping, including the ShippingRate applied on the invoice.
896
        ShippingCost *QuotePreviewInvoiceShippingCost `json:"shipping_cost"`
897
        // Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer.
898
        ShippingDetails *ShippingDetails `json:"shipping_details"`
899
        // Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice.
900
        StartingBalance int64 `json:"starting_balance"`
901
        // Extra information about an invoice for the customer's credit card statement.
902
        StatementDescriptor string `json:"statement_descriptor"`
903
        // The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)
904
        Status            QuotePreviewInvoiceStatus             `json:"status"`
905
        StatusTransitions *QuotePreviewInvoiceStatusTransitions `json:"status_transitions"`
906
        Subscription      *Subscription                         `json:"subscription"`
907
        // Details about the subscription that created this invoice.
908
        SubscriptionDetails *QuotePreviewInvoiceSubscriptionDetails `json:"subscription_details"`
909
        // Only set for upcoming invoices that preview prorations. The time used to calculate prorations.
910
        SubscriptionProrationDate int64 `json:"subscription_proration_date"`
911
        // Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated
912
        Subtotal int64 `json:"subtotal"`
913
        // The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated
914
        SubtotalExcludingTax int64 `json:"subtotal_excluding_tax"`
915
        // The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice.
916
        Tax int64 `json:"tax"`
917
        // ID of the test clock this invoice belongs to.
918
        TestClock       *TestHelpersTestClock               `json:"test_clock"`
919
        ThresholdReason *QuotePreviewInvoiceThresholdReason `json:"threshold_reason"`
920
        // Total after discounts and taxes.
921
        Total int64 `json:"total"`
922
        // The aggregate amounts calculated per discount across all line items.
923
        TotalDiscountAmounts []*QuotePreviewInvoiceTotalDiscountAmount `json:"total_discount_amounts"`
924
        // The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax.
925
        TotalExcludingTax int64 `json:"total_excluding_tax"`
926
        // The aggregate amounts calculated per margin across all line items.
927
        TotalMarginAmounts []*QuotePreviewInvoiceTotalMarginAmount `json:"total_margin_amounts"`
928
        // Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items.
929
        TotalPretaxCreditAmounts []*QuotePreviewInvoiceTotalPretaxCreditAmount `json:"total_pretax_credit_amounts"`
930
        // The aggregate amounts calculated per tax rate for all line items.
931
        TotalTaxAmounts []*QuotePreviewInvoiceTotalTaxAmount `json:"total_tax_amounts"`
932
        // The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice.
933
        TransferData *QuotePreviewInvoiceTransferData `json:"transfer_data"`
934
        // Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created.
935
        WebhooksDeliveredAt int64 `json:"webhooks_delivered_at"`
936
}
937

938
// QuotePreviewInvoiceList is a list of QuotePreviewInvoices as retrieved from a list endpoint.
939
type QuotePreviewInvoiceList struct {
940
        APIResource
941
        ListMeta
942
        Data []*QuotePreviewInvoice `json:"data"`
943
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc