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

stripe / stripe-java / #16562

18 Oct 2024 07:00PM UTC coverage: 12.614% (-0.1%) from 12.74%
#16562

push

github

web-flow
Merge pull request #1897 from stripe/latest-codegen-beta

Update generated code for beta

49 of 1978 new or added lines in 47 files covered. (2.48%)

68 existing lines in 20 files now uncovered.

18798 of 149026 relevant lines covered (12.61%)

0.13 hits per line

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

40.95
/src/main/java/com/stripe/model/PaymentIntent.java
1
// File generated from our OpenAPI spec
2
package com.stripe.model;
3

4
import com.google.gson.annotations.SerializedName;
5
import com.stripe.exception.StripeException;
6
import com.stripe.net.ApiRequest;
7
import com.stripe.net.ApiRequestParams;
8
import com.stripe.net.ApiResource;
9
import com.stripe.net.BaseAddress;
10
import com.stripe.net.RequestOptions;
11
import com.stripe.net.StripeResponseGetter;
12
import com.stripe.param.PaymentIntentApplyCustomerBalanceParams;
13
import com.stripe.param.PaymentIntentCancelParams;
14
import com.stripe.param.PaymentIntentCaptureParams;
15
import com.stripe.param.PaymentIntentConfirmParams;
16
import com.stripe.param.PaymentIntentCreateParams;
17
import com.stripe.param.PaymentIntentDecrementAuthorizationParams;
18
import com.stripe.param.PaymentIntentIncrementAuthorizationParams;
19
import com.stripe.param.PaymentIntentListParams;
20
import com.stripe.param.PaymentIntentRetrieveParams;
21
import com.stripe.param.PaymentIntentSearchParams;
22
import com.stripe.param.PaymentIntentUpdateParams;
23
import com.stripe.param.PaymentIntentVerifyMicrodepositsParams;
24
import java.util.List;
25
import java.util.Map;
26
import lombok.EqualsAndHashCode;
27
import lombok.Getter;
28
import lombok.Setter;
29

30
/**
31
 * A PaymentIntent guides you through the process of collecting a payment from your customer. We
32
 * recommend that you create exactly one PaymentIntent for each order or customer session in your
33
 * system. You can reference the PaymentIntent later to see the history of payment attempts for a
34
 * particular session.
35
 *
36
 * <p>A PaymentIntent transitions through <a
37
 * href="https://stripe.com/docs/payments/intents#intent-statuses">multiple statuses</a> throughout
38
 * its lifetime as it interfaces with Stripe.js to perform authentication flows and ultimately
39
 * creates at most one successful charge.
40
 *
41
 * <p>Related guide: <a href="https://stripe.com/docs/payments/payment-intents">Payment Intents
42
 * API</a>
43
 */
44
@Getter
45
@Setter
46
@EqualsAndHashCode(callSuper = false)
47
public class PaymentIntent extends ApiResource implements HasId, MetadataStore<PaymentIntent> {
1✔
48
  /**
49
   * Amount intended to be collected by this PaymentIntent. A positive integer representing how much
50
   * to charge in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency
51
   * unit</a> (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The
52
   * minimum amount is $0.50 US or <a
53
   * href="https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts">equivalent in
54
   * charge currency</a>. The amount value supports up to eight digits (e.g., a value of 99999999
55
   * for a USD charge of $999,999.99).
56
   */
57
  @SerializedName("amount")
58
  Long amount;
59

60
  /** Amount that can be captured from this PaymentIntent. */
61
  @SerializedName("amount_capturable")
62
  Long amountCapturable;
63

64
  @SerializedName("amount_details")
65
  AmountDetails amountDetails;
66

67
  /** Amount that this PaymentIntent collects. */
68
  @SerializedName("amount_received")
69
  Long amountReceived;
70

71
  /** ID of the Connect application that created the PaymentIntent. */
72
  @SerializedName("application")
73
  @Getter(lombok.AccessLevel.NONE)
74
  @Setter(lombok.AccessLevel.NONE)
75
  ExpandableField<Application> application;
76

77
  /**
78
   * The amount of the application fee (if any) that will be requested to be applied to the payment
79
   * and transferred to the application owner's Stripe account. The amount of the application fee
80
   * collected will be capped at the total payment amount. For more information, see the
81
   * PaymentIntents <a href="https://stripe.com/docs/payments/connected-accounts">use case for
82
   * connected accounts</a>.
83
   */
84
  @SerializedName("application_fee_amount")
85
  Long applicationFeeAmount;
86

87
  @SerializedName("async_workflows")
88
  AsyncWorkflows asyncWorkflows;
89

90
  /**
91
   * Settings to configure compatible payment methods from the <a
92
   * href="https://dashboard.stripe.com/settings/payment_methods">Stripe Dashboard.</a>
93
   */
94
  @SerializedName("automatic_payment_methods")
95
  AutomaticPaymentMethods automaticPaymentMethods;
96

97
  /**
98
   * Populated when {@code status} is {@code canceled}, this is the time at which the PaymentIntent
99
   * was canceled. Measured in seconds since the Unix epoch.
100
   */
101
  @SerializedName("canceled_at")
102
  Long canceledAt;
103

104
  /**
105
   * Reason for cancellation of this PaymentIntent, either user-provided ({@code duplicate}, {@code
106
   * fraudulent}, {@code requested_by_customer}, or {@code abandoned}) or generated by Stripe
107
   * internally ({@code failed_invoice}, {@code void_invoice}, or {@code automatic}).
108
   *
109
   * <p>One of {@code abandoned}, {@code automatic}, {@code duplicate}, {@code failed_invoice},
110
   * {@code fraudulent}, {@code requested_by_customer}, or {@code void_invoice}.
111
   */
112
  @SerializedName("cancellation_reason")
113
  String cancellationReason;
114

115
  /**
116
   * Controls when the funds will be captured from the customer's account.
117
   *
118
   * <p>One of {@code automatic}, {@code automatic_async}, or {@code manual}.
119
   */
120
  @SerializedName("capture_method")
121
  String captureMethod;
122

123
  /**
124
   * The client secret of this PaymentIntent. Used for client-side retrieval using a publishable
125
   * key.
126
   *
127
   * <p>The client secret can be used to complete a payment from your frontend. It should not be
128
   * stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS
129
   * enabled on any page that includes the client secret.
130
   *
131
   * <p>Refer to our docs to <a
132
   * href="https://stripe.com/docs/payments/accept-a-payment?ui=elements">accept a payment</a> and
133
   * learn about how {@code client_secret} should be handled.
134
   */
135
  @SerializedName("client_secret")
136
  String clientSecret;
137

138
  /**
139
   * Describes whether we can confirm this PaymentIntent automatically, or if it requires customer
140
   * action to confirm the payment.
141
   *
142
   * <p>One of {@code automatic}, or {@code manual}.
143
   */
144
  @SerializedName("confirmation_method")
145
  String confirmationMethod;
146

147
  /** Time at which the object was created. Measured in seconds since the Unix epoch. */
148
  @SerializedName("created")
149
  Long created;
150

151
  /**
152
   * Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>,
153
   * in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
154
   */
155
  @SerializedName("currency")
156
  String currency;
157

158
  /**
159
   * ID of the Customer this PaymentIntent belongs to, if one exists.
160
   *
161
   * <p>Payment methods attached to other Customers cannot be used with this PaymentIntent.
162
   *
163
   * <p>If <a
164
   * href="https://stripe.com/docs/api#payment_intent_object-setup_future_usage">setup_future_usage</a>
165
   * is set and this PaymentIntent's payment method is not {@code card_present}, then the payment
166
   * method attaches to the Customer after the PaymentIntent has been confirmed and any required
167
   * actions from the user are complete. If the payment method is {@code card_present} and isn't a
168
   * digital wallet, then a <a
169
   * href="https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
170
   * payment method representing the card is created and attached to the Customer instead.
171
   */
172
  @SerializedName("customer")
173
  @Getter(lombok.AccessLevel.NONE)
174
  @Setter(lombok.AccessLevel.NONE)
175
  ExpandableField<Customer> customer;
176

177
  /** An arbitrary string attached to the object. Often useful for displaying to users. */
178
  @SerializedName("description")
179
  String description;
180

181
  /** Unique identifier for the object. */
182
  @Getter(onMethod_ = {@Override})
183
  @SerializedName("id")
184
  String id;
185

186
  /** ID of the invoice that created this PaymentIntent, if it exists. */
187
  @SerializedName("invoice")
188
  @Getter(lombok.AccessLevel.NONE)
189
  @Setter(lombok.AccessLevel.NONE)
190
  ExpandableField<Invoice> invoice;
191

192
  /**
193
   * The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if
194
   * the PaymentIntent is later updated for any reason.
195
   */
196
  @SerializedName("last_payment_error")
197
  StripeError lastPaymentError;
198

199
  /**
200
   * ID of the latest <a href="https://stripe.com/docs/api/charges">Charge object</a> created by
201
   * this PaymentIntent. This property is {@code null} until PaymentIntent confirmation is
202
   * attempted.
203
   */
204
  @SerializedName("latest_charge")
205
  @Getter(lombok.AccessLevel.NONE)
206
  @Setter(lombok.AccessLevel.NONE)
207
  ExpandableField<Charge> latestCharge;
208

209
  /**
210
   * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
211
   * object exists in test mode.
212
   */
213
  @SerializedName("livemode")
214
  Boolean livemode;
215

216
  /**
217
   * Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach
218
   * to an object. This can be useful for storing additional information about the object in a
219
   * structured format. Learn more about <a
220
   * href="https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata">storing
221
   * information in metadata</a>.
222
   */
223
  @Getter(onMethod_ = {@Override})
224
  @SerializedName("metadata")
225
  Map<String, String> metadata;
226

227
  /**
228
   * If present, this property tells you what actions you need to take in order for your customer to
229
   * fulfill a payment using the provided source.
230
   */
231
  @SerializedName("next_action")
232
  NextAction nextAction;
233

234
  /**
235
   * String representing the object's type. Objects of the same type share the same value.
236
   *
237
   * <p>Equal to {@code payment_intent}.
238
   */
239
  @SerializedName("object")
240
  String object;
241

242
  /**
243
   * The account (if any) for which the funds of the PaymentIntent are intended. See the
244
   * PaymentIntents <a href="https://stripe.com/docs/payments/connected-accounts">use case for
245
   * connected accounts</a> for details.
246
   */
247
  @SerializedName("on_behalf_of")
248
  @Getter(lombok.AccessLevel.NONE)
249
  @Setter(lombok.AccessLevel.NONE)
250
  ExpandableField<Account> onBehalfOf;
251

252
  @SerializedName("payment_details")
253
  PaymentDetails paymentDetails;
254

255
  /** ID of the payment method used in this PaymentIntent. */
256
  @SerializedName("payment_method")
257
  @Getter(lombok.AccessLevel.NONE)
258
  @Setter(lombok.AccessLevel.NONE)
259
  ExpandableField<PaymentMethod> paymentMethod;
260

261
  /** Information about the payment method configuration used for this PaymentIntent. */
262
  @SerializedName("payment_method_configuration_details")
263
  PaymentMethodConfigurationDetails paymentMethodConfigurationDetails;
264

265
  /** Payment-method-specific configuration for this PaymentIntent. */
266
  @SerializedName("payment_method_options")
267
  PaymentMethodOptions paymentMethodOptions;
268

269
  /** The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */
270
  @SerializedName("payment_method_types")
271
  List<String> paymentMethodTypes;
272

273
  /** If present, this property tells you about the processing state of the payment. */
274
  @SerializedName("processing")
275
  Processing processing;
276

277
  /**
278
   * Email address that the receipt for the resulting payment will be sent to. If {@code
279
   * receipt_email} is specified for a payment in live mode, a receipt will be sent regardless of
280
   * your <a href="https://dashboard.stripe.com/account/emails">email settings</a>.
281
   */
282
  @SerializedName("receipt_email")
283
  String receiptEmail;
284

285
  /** ID of the review associated with this PaymentIntent, if any. */
286
  @SerializedName("review")
287
  @Getter(lombok.AccessLevel.NONE)
288
  @Setter(lombok.AccessLevel.NONE)
289
  ExpandableField<Review> review;
290

291
  /**
292
   * Indicates whether confirmation for this PaymentIntent using a secret key is {@code required} or
293
   * {@code optional}.
294
   *
295
   * <p>One of {@code optional}, or {@code required}.
296
   */
297
  @SerializedName("secret_key_confirmation")
298
  String secretKeyConfirmation;
299

300
  /**
301
   * Indicates that you intend to make future payments with this PaymentIntent's payment method.
302
   *
303
   * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
304
   * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
305
   * Customer after the PaymentIntent is confirmed and the customer completes any required actions.
306
   * If you don't provide a Customer, you can still <a
307
   * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
308
   * Customer after the transaction completes.
309
   *
310
   * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates and
311
   * attaches a <a
312
   * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
313
   * payment method representing the card to the Customer instead.
314
   *
315
   * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
316
   * with regional legislation and network rules, such as <a
317
   * href="https://stripe.com/strong-customer-authentication">SCA</a>.
318
   *
319
   * <p>One of {@code off_session}, or {@code on_session}.
320
   */
321
  @SerializedName("setup_future_usage")
322
  String setupFutureUsage;
323

324
  /** Shipping information for this PaymentIntent. */
325
  @SerializedName("shipping")
326
  ShippingDetails shipping;
327

328
  /**
329
   * This is a legacy field that will be removed in the future. It is the ID of the Source object
330
   * that is associated with this PaymentIntent, if one was supplied.
331
   */
332
  @SerializedName("source")
333
  @Getter(lombok.AccessLevel.NONE)
334
  @Setter(lombok.AccessLevel.NONE)
335
  ExpandableField<PaymentSource> source;
336

337
  /**
338
   * Text that appears on the customer's statement as the statement descriptor for a non-card
339
   * charge. This value overrides the account's default statement descriptor. For information about
340
   * requirements, including the 22-character limit, see <a
341
   * href="https://docs.stripe.com/get-started/account/statement-descriptors">the Statement
342
   * Descriptor docs</a>.
343
   *
344
   * <p>Setting this value for a card charge returns an error. For card charges, set the <a
345
   * href="https://docs.stripe.com/get-started/account/statement-descriptors#dynamic">statement_descriptor_suffix</a>
346
   * instead.
347
   */
348
  @SerializedName("statement_descriptor")
349
  String statementDescriptor;
350

351
  /**
352
   * Provides information about a card charge. Concatenated to the account's <a
353
   * href="https://docs.stripe.com/get-started/account/statement-descriptors#static">statement
354
   * descriptor prefix</a> to form the complete statement descriptor that appears on the customer's
355
   * statement.
356
   */
357
  @SerializedName("statement_descriptor_suffix")
358
  String statementDescriptorSuffix;
359

360
  /**
361
   * Status of this PaymentIntent, one of {@code requires_payment_method}, {@code
362
   * requires_confirmation}, {@code requires_action}, {@code processing}, {@code requires_capture},
363
   * {@code canceled}, or {@code succeeded}. Read more about each PaymentIntent <a
364
   * href="https://stripe.com/docs/payments/intents#intent-statuses">status</a>.
365
   */
366
  @SerializedName("status")
367
  String status;
368

369
  /**
370
   * The data that automatically creates a Transfer after the payment finalizes. Learn more about
371
   * the <a href="https://stripe.com/docs/payments/connected-accounts">use case for connected
372
   * accounts</a>.
373
   */
374
  @SerializedName("transfer_data")
375
  TransferData transferData;
376

377
  /**
378
   * A string that identifies the resulting payment as part of a group. Learn more about the <a
379
   * href="https://stripe.com/docs/connect/separate-charges-and-transfers">use case for connected
380
   * accounts</a>.
381
   */
382
  @SerializedName("transfer_group")
383
  String transferGroup;
384

385
  /** Get ID of expandable {@code application} object. */
386
  public String getApplication() {
387
    return (this.application != null) ? this.application.getId() : null;
1✔
388
  }
389

390
  public void setApplication(String id) {
391
    this.application = ApiResource.setExpandableFieldId(id, this.application);
×
392
  }
×
393

394
  /** Get expanded {@code application}. */
395
  public Application getApplicationObject() {
396
    return (this.application != null) ? this.application.getExpanded() : null;
1✔
397
  }
398

399
  public void setApplicationObject(Application expandableObject) {
400
    this.application = new ExpandableField<Application>(expandableObject.getId(), expandableObject);
×
401
  }
×
402

403
  /** Get ID of expandable {@code customer} object. */
404
  public String getCustomer() {
405
    return (this.customer != null) ? this.customer.getId() : null;
1✔
406
  }
407

408
  public void setCustomer(String id) {
409
    this.customer = ApiResource.setExpandableFieldId(id, this.customer);
×
410
  }
×
411

412
  /** Get expanded {@code customer}. */
413
  public Customer getCustomerObject() {
414
    return (this.customer != null) ? this.customer.getExpanded() : null;
1✔
415
  }
416

417
  public void setCustomerObject(Customer expandableObject) {
418
    this.customer = new ExpandableField<Customer>(expandableObject.getId(), expandableObject);
×
419
  }
×
420

421
  /** Get ID of expandable {@code invoice} object. */
422
  public String getInvoice() {
423
    return (this.invoice != null) ? this.invoice.getId() : null;
1✔
424
  }
425

426
  public void setInvoice(String id) {
427
    this.invoice = ApiResource.setExpandableFieldId(id, this.invoice);
×
428
  }
×
429

430
  /** Get expanded {@code invoice}. */
431
  public Invoice getInvoiceObject() {
432
    return (this.invoice != null) ? this.invoice.getExpanded() : null;
1✔
433
  }
434

435
  public void setInvoiceObject(Invoice expandableObject) {
436
    this.invoice = new ExpandableField<Invoice>(expandableObject.getId(), expandableObject);
×
437
  }
×
438

439
  /** Get ID of expandable {@code latestCharge} object. */
440
  public String getLatestCharge() {
441
    return (this.latestCharge != null) ? this.latestCharge.getId() : null;
×
442
  }
443

444
  public void setLatestCharge(String id) {
445
    this.latestCharge = ApiResource.setExpandableFieldId(id, this.latestCharge);
×
446
  }
×
447

448
  /** Get expanded {@code latestCharge}. */
449
  public Charge getLatestChargeObject() {
450
    return (this.latestCharge != null) ? this.latestCharge.getExpanded() : null;
×
451
  }
452

453
  public void setLatestChargeObject(Charge expandableObject) {
454
    this.latestCharge = new ExpandableField<Charge>(expandableObject.getId(), expandableObject);
×
455
  }
×
456

457
  /** Get ID of expandable {@code onBehalfOf} object. */
458
  public String getOnBehalfOf() {
459
    return (this.onBehalfOf != null) ? this.onBehalfOf.getId() : null;
1✔
460
  }
461

462
  public void setOnBehalfOf(String id) {
463
    this.onBehalfOf = ApiResource.setExpandableFieldId(id, this.onBehalfOf);
×
464
  }
×
465

466
  /** Get expanded {@code onBehalfOf}. */
467
  public Account getOnBehalfOfObject() {
468
    return (this.onBehalfOf != null) ? this.onBehalfOf.getExpanded() : null;
1✔
469
  }
470

471
  public void setOnBehalfOfObject(Account expandableObject) {
472
    this.onBehalfOf = new ExpandableField<Account>(expandableObject.getId(), expandableObject);
×
473
  }
×
474

475
  /** Get ID of expandable {@code paymentMethod} object. */
476
  public String getPaymentMethod() {
477
    return (this.paymentMethod != null) ? this.paymentMethod.getId() : null;
1✔
478
  }
479

480
  public void setPaymentMethod(String id) {
481
    this.paymentMethod = ApiResource.setExpandableFieldId(id, this.paymentMethod);
×
482
  }
×
483

484
  /** Get expanded {@code paymentMethod}. */
485
  public PaymentMethod getPaymentMethodObject() {
486
    return (this.paymentMethod != null) ? this.paymentMethod.getExpanded() : null;
1✔
487
  }
488

489
  public void setPaymentMethodObject(PaymentMethod expandableObject) {
490
    this.paymentMethod =
×
491
        new ExpandableField<PaymentMethod>(expandableObject.getId(), expandableObject);
×
492
  }
×
493

494
  /** Get ID of expandable {@code review} object. */
495
  public String getReview() {
496
    return (this.review != null) ? this.review.getId() : null;
1✔
497
  }
498

499
  public void setReview(String id) {
500
    this.review = ApiResource.setExpandableFieldId(id, this.review);
×
501
  }
×
502

503
  /** Get expanded {@code review}. */
504
  public Review getReviewObject() {
505
    return (this.review != null) ? this.review.getExpanded() : null;
1✔
506
  }
507

508
  public void setReviewObject(Review expandableObject) {
509
    this.review = new ExpandableField<Review>(expandableObject.getId(), expandableObject);
×
510
  }
×
511

512
  /** Get ID of expandable {@code source} object. */
513
  public String getSource() {
514
    return (this.source != null) ? this.source.getId() : null;
×
515
  }
516

517
  public void setSource(String id) {
518
    this.source = ApiResource.setExpandableFieldId(id, this.source);
×
519
  }
×
520

521
  /** Get expanded {@code source}. */
522
  public PaymentSource getSourceObject() {
523
    return (this.source != null) ? this.source.getExpanded() : null;
×
524
  }
525

526
  public void setSourceObject(PaymentSource expandableObject) {
527
    this.source = new ExpandableField<PaymentSource>(expandableObject.getId(), expandableObject);
×
528
  }
×
529

530
  /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */
531
  public PaymentIntent applyCustomerBalance() throws StripeException {
532
    return applyCustomerBalance((Map<String, Object>) null, (RequestOptions) null);
×
533
  }
534

535
  /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */
536
  public PaymentIntent applyCustomerBalance(RequestOptions options) throws StripeException {
537
    return applyCustomerBalance((Map<String, Object>) null, options);
×
538
  }
539

540
  /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */
541
  public PaymentIntent applyCustomerBalance(Map<String, Object> params) throws StripeException {
542
    return applyCustomerBalance(params, (RequestOptions) null);
×
543
  }
544

545
  /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */
546
  public PaymentIntent applyCustomerBalance(Map<String, Object> params, RequestOptions options)
547
      throws StripeException {
548
    String path =
×
549
        String.format(
×
550
            "/v1/payment_intents/%s/apply_customer_balance", ApiResource.urlEncodeId(this.getId()));
×
551
    ApiRequest request =
×
552
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
553
    return getResponseGetter().request(request, PaymentIntent.class);
×
554
  }
555

556
  /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */
557
  public PaymentIntent applyCustomerBalance(PaymentIntentApplyCustomerBalanceParams params)
558
      throws StripeException {
559
    return applyCustomerBalance(params, (RequestOptions) null);
1✔
560
  }
561

562
  /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */
563
  public PaymentIntent applyCustomerBalance(
564
      PaymentIntentApplyCustomerBalanceParams params, RequestOptions options)
565
      throws StripeException {
566
    String path =
1✔
567
        String.format(
1✔
568
            "/v1/payment_intents/%s/apply_customer_balance", ApiResource.urlEncodeId(this.getId()));
1✔
569
    ApiResource.checkNullTypedParams(path, params);
1✔
570
    ApiRequest request =
1✔
571
        new ApiRequest(
572
            BaseAddress.API,
573
            ApiResource.RequestMethod.POST,
574
            path,
575
            ApiRequestParams.paramsToMap(params),
1✔
576
            options);
577
    return getResponseGetter().request(request, PaymentIntent.class);
1✔
578
  }
579

580
  /**
581
   * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code
582
   * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code
583
   * requires_action} or, <a href="https://stripe.com/docs/payments/intents">in rare cases</a>,
584
   * {@code processing}.
585
   *
586
   * <p>After it’s canceled, no additional charges are made by the PaymentIntent and any operations
587
   * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code
588
   * requires_capture}, the remaining {@code amount_capturable} is automatically refunded.
589
   *
590
   * <p>You can’t cancel the PaymentIntent for a Checkout Session. <a
591
   * href="https://stripe.com/docs/api/checkout/sessions/expire">Expire the Checkout Session</a>
592
   * instead.
593
   */
594
  public PaymentIntent cancel() throws StripeException {
595
    return cancel((Map<String, Object>) null, (RequestOptions) null);
1✔
596
  }
597

598
  /**
599
   * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code
600
   * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code
601
   * requires_action} or, <a href="https://stripe.com/docs/payments/intents">in rare cases</a>,
602
   * {@code processing}.
603
   *
604
   * <p>After it’s canceled, no additional charges are made by the PaymentIntent and any operations
605
   * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code
606
   * requires_capture}, the remaining {@code amount_capturable} is automatically refunded.
607
   *
608
   * <p>You can’t cancel the PaymentIntent for a Checkout Session. <a
609
   * href="https://stripe.com/docs/api/checkout/sessions/expire">Expire the Checkout Session</a>
610
   * instead.
611
   */
612
  public PaymentIntent cancel(RequestOptions options) throws StripeException {
613
    return cancel((Map<String, Object>) null, options);
×
614
  }
615

616
  /**
617
   * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code
618
   * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code
619
   * requires_action} or, <a href="https://stripe.com/docs/payments/intents">in rare cases</a>,
620
   * {@code processing}.
621
   *
622
   * <p>After it’s canceled, no additional charges are made by the PaymentIntent and any operations
623
   * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code
624
   * requires_capture}, the remaining {@code amount_capturable} is automatically refunded.
625
   *
626
   * <p>You can’t cancel the PaymentIntent for a Checkout Session. <a
627
   * href="https://stripe.com/docs/api/checkout/sessions/expire">Expire the Checkout Session</a>
628
   * instead.
629
   */
630
  public PaymentIntent cancel(Map<String, Object> params) throws StripeException {
631
    return cancel(params, (RequestOptions) null);
×
632
  }
633

634
  /**
635
   * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code
636
   * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code
637
   * requires_action} or, <a href="https://stripe.com/docs/payments/intents">in rare cases</a>,
638
   * {@code processing}.
639
   *
640
   * <p>After it’s canceled, no additional charges are made by the PaymentIntent and any operations
641
   * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code
642
   * requires_capture}, the remaining {@code amount_capturable} is automatically refunded.
643
   *
644
   * <p>You can’t cancel the PaymentIntent for a Checkout Session. <a
645
   * href="https://stripe.com/docs/api/checkout/sessions/expire">Expire the Checkout Session</a>
646
   * instead.
647
   */
648
  public PaymentIntent cancel(Map<String, Object> params, RequestOptions options)
649
      throws StripeException {
650
    String path =
1✔
651
        String.format("/v1/payment_intents/%s/cancel", ApiResource.urlEncodeId(this.getId()));
1✔
652
    ApiRequest request =
1✔
653
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
654
    return getResponseGetter().request(request, PaymentIntent.class);
1✔
655
  }
656

657
  /**
658
   * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code
659
   * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code
660
   * requires_action} or, <a href="https://stripe.com/docs/payments/intents">in rare cases</a>,
661
   * {@code processing}.
662
   *
663
   * <p>After it’s canceled, no additional charges are made by the PaymentIntent and any operations
664
   * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code
665
   * requires_capture}, the remaining {@code amount_capturable} is automatically refunded.
666
   *
667
   * <p>You can’t cancel the PaymentIntent for a Checkout Session. <a
668
   * href="https://stripe.com/docs/api/checkout/sessions/expire">Expire the Checkout Session</a>
669
   * instead.
670
   */
671
  public PaymentIntent cancel(PaymentIntentCancelParams params) throws StripeException {
672
    return cancel(params, (RequestOptions) null);
1✔
673
  }
674

675
  /**
676
   * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code
677
   * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code
678
   * requires_action} or, <a href="https://stripe.com/docs/payments/intents">in rare cases</a>,
679
   * {@code processing}.
680
   *
681
   * <p>After it’s canceled, no additional charges are made by the PaymentIntent and any operations
682
   * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code
683
   * requires_capture}, the remaining {@code amount_capturable} is automatically refunded.
684
   *
685
   * <p>You can’t cancel the PaymentIntent for a Checkout Session. <a
686
   * href="https://stripe.com/docs/api/checkout/sessions/expire">Expire the Checkout Session</a>
687
   * instead.
688
   */
689
  public PaymentIntent cancel(PaymentIntentCancelParams params, RequestOptions options)
690
      throws StripeException {
691
    String path =
1✔
692
        String.format("/v1/payment_intents/%s/cancel", ApiResource.urlEncodeId(this.getId()));
1✔
693
    ApiResource.checkNullTypedParams(path, params);
1✔
694
    ApiRequest request =
1✔
695
        new ApiRequest(
696
            BaseAddress.API,
697
            ApiResource.RequestMethod.POST,
698
            path,
699
            ApiRequestParams.paramsToMap(params),
1✔
700
            options);
701
    return getResponseGetter().request(request, PaymentIntent.class);
1✔
702
  }
703

704
  /**
705
   * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code
706
   * requires_capture}.
707
   *
708
   * <p>Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their
709
   * creation.
710
   *
711
   * <p>Learn more about <a href="https://stripe.com/docs/payments/capture-later">separate
712
   * authorization and capture</a>.
713
   */
714
  public PaymentIntent capture() throws StripeException {
715
    return capture((Map<String, Object>) null, (RequestOptions) null);
1✔
716
  }
717

718
  /**
719
   * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code
720
   * requires_capture}.
721
   *
722
   * <p>Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their
723
   * creation.
724
   *
725
   * <p>Learn more about <a href="https://stripe.com/docs/payments/capture-later">separate
726
   * authorization and capture</a>.
727
   */
728
  public PaymentIntent capture(RequestOptions options) throws StripeException {
729
    return capture((Map<String, Object>) null, options);
×
730
  }
731

732
  /**
733
   * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code
734
   * requires_capture}.
735
   *
736
   * <p>Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their
737
   * creation.
738
   *
739
   * <p>Learn more about <a href="https://stripe.com/docs/payments/capture-later">separate
740
   * authorization and capture</a>.
741
   */
742
  public PaymentIntent capture(Map<String, Object> params) throws StripeException {
743
    return capture(params, (RequestOptions) null);
×
744
  }
745

746
  /**
747
   * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code
748
   * requires_capture}.
749
   *
750
   * <p>Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their
751
   * creation.
752
   *
753
   * <p>Learn more about <a href="https://stripe.com/docs/payments/capture-later">separate
754
   * authorization and capture</a>.
755
   */
756
  public PaymentIntent capture(Map<String, Object> params, RequestOptions options)
757
      throws StripeException {
758
    String path =
1✔
759
        String.format("/v1/payment_intents/%s/capture", ApiResource.urlEncodeId(this.getId()));
1✔
760
    ApiRequest request =
1✔
761
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
762
    return getResponseGetter().request(request, PaymentIntent.class);
1✔
763
  }
764

765
  /**
766
   * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code
767
   * requires_capture}.
768
   *
769
   * <p>Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their
770
   * creation.
771
   *
772
   * <p>Learn more about <a href="https://stripe.com/docs/payments/capture-later">separate
773
   * authorization and capture</a>.
774
   */
775
  public PaymentIntent capture(PaymentIntentCaptureParams params) throws StripeException {
776
    return capture(params, (RequestOptions) null);
1✔
777
  }
778

779
  /**
780
   * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code
781
   * requires_capture}.
782
   *
783
   * <p>Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their
784
   * creation.
785
   *
786
   * <p>Learn more about <a href="https://stripe.com/docs/payments/capture-later">separate
787
   * authorization and capture</a>.
788
   */
789
  public PaymentIntent capture(PaymentIntentCaptureParams params, RequestOptions options)
790
      throws StripeException {
791
    String path =
1✔
792
        String.format("/v1/payment_intents/%s/capture", ApiResource.urlEncodeId(this.getId()));
1✔
793
    ApiResource.checkNullTypedParams(path, params);
1✔
794
    ApiRequest request =
1✔
795
        new ApiRequest(
796
            BaseAddress.API,
797
            ApiResource.RequestMethod.POST,
798
            path,
799
            ApiRequestParams.paramsToMap(params),
1✔
800
            options);
801
    return getResponseGetter().request(request, PaymentIntent.class);
1✔
802
  }
803

804
  /**
805
   * Confirm that your customer intends to pay with current or provided payment method. Upon
806
   * confirmation, the PaymentIntent will attempt to initiate a payment. If the selected payment
807
   * method requires additional authentication steps, the PaymentIntent will transition to the
808
   * {@code requires_action} status and suggest additional actions via {@code next_action}. If
809
   * payment fails, the PaymentIntent transitions to the {@code requires_payment_method} status or
810
   * the {@code canceled} status if the confirmation limit is reached. If payment succeeds, the
811
   * PaymentIntent will transition to the {@code succeeded} status (or {@code requires_capture}, if
812
   * {@code capture_method} is set to {@code manual}). If the {@code confirmation_method} is {@code
813
   * automatic}, payment may be attempted using our <a
814
   * href="https://stripe.com/docs/stripe-js/reference#stripe-handle-card-payment">client SDKs</a>
815
   * and the PaymentIntent’s <a
816
   * href="https://stripe.com/docs/api#payment_intent_object-client_secret">client_secret</a>. After
817
   * {@code next_action}s are handled by the client, no additional confirmation is required to
818
   * complete the payment. If the {@code confirmation_method} is {@code manual}, all payment
819
   * attempts must be initiated using a secret key. If any actions are required for the payment, the
820
   * PaymentIntent will return to the {@code requires_confirmation} state after those actions are
821
   * completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the
822
   * next payment attempt. There is a variable upper limit on how many times a PaymentIntent can be
823
   * confirmed. After this limit is reached, any further calls to this endpoint will transition the
824
   * PaymentIntent to the {@code canceled} state.
825
   */
826
  public PaymentIntent confirm() throws StripeException {
827
    return confirm((Map<String, Object>) null, (RequestOptions) null);
1✔
828
  }
829

830
  /**
831
   * Confirm that your customer intends to pay with current or provided payment method. Upon
832
   * confirmation, the PaymentIntent will attempt to initiate a payment. If the selected payment
833
   * method requires additional authentication steps, the PaymentIntent will transition to the
834
   * {@code requires_action} status and suggest additional actions via {@code next_action}. If
835
   * payment fails, the PaymentIntent transitions to the {@code requires_payment_method} status or
836
   * the {@code canceled} status if the confirmation limit is reached. If payment succeeds, the
837
   * PaymentIntent will transition to the {@code succeeded} status (or {@code requires_capture}, if
838
   * {@code capture_method} is set to {@code manual}). If the {@code confirmation_method} is {@code
839
   * automatic}, payment may be attempted using our <a
840
   * href="https://stripe.com/docs/stripe-js/reference#stripe-handle-card-payment">client SDKs</a>
841
   * and the PaymentIntent’s <a
842
   * href="https://stripe.com/docs/api#payment_intent_object-client_secret">client_secret</a>. After
843
   * {@code next_action}s are handled by the client, no additional confirmation is required to
844
   * complete the payment. If the {@code confirmation_method} is {@code manual}, all payment
845
   * attempts must be initiated using a secret key. If any actions are required for the payment, the
846
   * PaymentIntent will return to the {@code requires_confirmation} state after those actions are
847
   * completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the
848
   * next payment attempt. There is a variable upper limit on how many times a PaymentIntent can be
849
   * confirmed. After this limit is reached, any further calls to this endpoint will transition the
850
   * PaymentIntent to the {@code canceled} state.
851
   */
852
  public PaymentIntent confirm(RequestOptions options) throws StripeException {
853
    return confirm((Map<String, Object>) null, options);
×
854
  }
855

856
  /**
857
   * Confirm that your customer intends to pay with current or provided payment method. Upon
858
   * confirmation, the PaymentIntent will attempt to initiate a payment. If the selected payment
859
   * method requires additional authentication steps, the PaymentIntent will transition to the
860
   * {@code requires_action} status and suggest additional actions via {@code next_action}. If
861
   * payment fails, the PaymentIntent transitions to the {@code requires_payment_method} status or
862
   * the {@code canceled} status if the confirmation limit is reached. If payment succeeds, the
863
   * PaymentIntent will transition to the {@code succeeded} status (or {@code requires_capture}, if
864
   * {@code capture_method} is set to {@code manual}). If the {@code confirmation_method} is {@code
865
   * automatic}, payment may be attempted using our <a
866
   * href="https://stripe.com/docs/stripe-js/reference#stripe-handle-card-payment">client SDKs</a>
867
   * and the PaymentIntent’s <a
868
   * href="https://stripe.com/docs/api#payment_intent_object-client_secret">client_secret</a>. After
869
   * {@code next_action}s are handled by the client, no additional confirmation is required to
870
   * complete the payment. If the {@code confirmation_method} is {@code manual}, all payment
871
   * attempts must be initiated using a secret key. If any actions are required for the payment, the
872
   * PaymentIntent will return to the {@code requires_confirmation} state after those actions are
873
   * completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the
874
   * next payment attempt. There is a variable upper limit on how many times a PaymentIntent can be
875
   * confirmed. After this limit is reached, any further calls to this endpoint will transition the
876
   * PaymentIntent to the {@code canceled} state.
877
   */
878
  public PaymentIntent confirm(Map<String, Object> params) throws StripeException {
879
    return confirm(params, (RequestOptions) null);
×
880
  }
881

882
  /**
883
   * Confirm that your customer intends to pay with current or provided payment method. Upon
884
   * confirmation, the PaymentIntent will attempt to initiate a payment. If the selected payment
885
   * method requires additional authentication steps, the PaymentIntent will transition to the
886
   * {@code requires_action} status and suggest additional actions via {@code next_action}. If
887
   * payment fails, the PaymentIntent transitions to the {@code requires_payment_method} status or
888
   * the {@code canceled} status if the confirmation limit is reached. If payment succeeds, the
889
   * PaymentIntent will transition to the {@code succeeded} status (or {@code requires_capture}, if
890
   * {@code capture_method} is set to {@code manual}). If the {@code confirmation_method} is {@code
891
   * automatic}, payment may be attempted using our <a
892
   * href="https://stripe.com/docs/stripe-js/reference#stripe-handle-card-payment">client SDKs</a>
893
   * and the PaymentIntent’s <a
894
   * href="https://stripe.com/docs/api#payment_intent_object-client_secret">client_secret</a>. After
895
   * {@code next_action}s are handled by the client, no additional confirmation is required to
896
   * complete the payment. If the {@code confirmation_method} is {@code manual}, all payment
897
   * attempts must be initiated using a secret key. If any actions are required for the payment, the
898
   * PaymentIntent will return to the {@code requires_confirmation} state after those actions are
899
   * completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the
900
   * next payment attempt. There is a variable upper limit on how many times a PaymentIntent can be
901
   * confirmed. After this limit is reached, any further calls to this endpoint will transition the
902
   * PaymentIntent to the {@code canceled} state.
903
   */
904
  public PaymentIntent confirm(Map<String, Object> params, RequestOptions options)
905
      throws StripeException {
906
    String path =
1✔
907
        String.format("/v1/payment_intents/%s/confirm", ApiResource.urlEncodeId(this.getId()));
1✔
908
    ApiRequest request =
1✔
909
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
910
    return getResponseGetter().request(request, PaymentIntent.class);
1✔
911
  }
912

913
  /**
914
   * Confirm that your customer intends to pay with current or provided payment method. Upon
915
   * confirmation, the PaymentIntent will attempt to initiate a payment. If the selected payment
916
   * method requires additional authentication steps, the PaymentIntent will transition to the
917
   * {@code requires_action} status and suggest additional actions via {@code next_action}. If
918
   * payment fails, the PaymentIntent transitions to the {@code requires_payment_method} status or
919
   * the {@code canceled} status if the confirmation limit is reached. If payment succeeds, the
920
   * PaymentIntent will transition to the {@code succeeded} status (or {@code requires_capture}, if
921
   * {@code capture_method} is set to {@code manual}). If the {@code confirmation_method} is {@code
922
   * automatic}, payment may be attempted using our <a
923
   * href="https://stripe.com/docs/stripe-js/reference#stripe-handle-card-payment">client SDKs</a>
924
   * and the PaymentIntent’s <a
925
   * href="https://stripe.com/docs/api#payment_intent_object-client_secret">client_secret</a>. After
926
   * {@code next_action}s are handled by the client, no additional confirmation is required to
927
   * complete the payment. If the {@code confirmation_method} is {@code manual}, all payment
928
   * attempts must be initiated using a secret key. If any actions are required for the payment, the
929
   * PaymentIntent will return to the {@code requires_confirmation} state after those actions are
930
   * completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the
931
   * next payment attempt. There is a variable upper limit on how many times a PaymentIntent can be
932
   * confirmed. After this limit is reached, any further calls to this endpoint will transition the
933
   * PaymentIntent to the {@code canceled} state.
934
   */
935
  public PaymentIntent confirm(PaymentIntentConfirmParams params) throws StripeException {
936
    return confirm(params, (RequestOptions) null);
1✔
937
  }
938

939
  /**
940
   * Confirm that your customer intends to pay with current or provided payment method. Upon
941
   * confirmation, the PaymentIntent will attempt to initiate a payment. If the selected payment
942
   * method requires additional authentication steps, the PaymentIntent will transition to the
943
   * {@code requires_action} status and suggest additional actions via {@code next_action}. If
944
   * payment fails, the PaymentIntent transitions to the {@code requires_payment_method} status or
945
   * the {@code canceled} status if the confirmation limit is reached. If payment succeeds, the
946
   * PaymentIntent will transition to the {@code succeeded} status (or {@code requires_capture}, if
947
   * {@code capture_method} is set to {@code manual}). If the {@code confirmation_method} is {@code
948
   * automatic}, payment may be attempted using our <a
949
   * href="https://stripe.com/docs/stripe-js/reference#stripe-handle-card-payment">client SDKs</a>
950
   * and the PaymentIntent’s <a
951
   * href="https://stripe.com/docs/api#payment_intent_object-client_secret">client_secret</a>. After
952
   * {@code next_action}s are handled by the client, no additional confirmation is required to
953
   * complete the payment. If the {@code confirmation_method} is {@code manual}, all payment
954
   * attempts must be initiated using a secret key. If any actions are required for the payment, the
955
   * PaymentIntent will return to the {@code requires_confirmation} state after those actions are
956
   * completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the
957
   * next payment attempt. There is a variable upper limit on how many times a PaymentIntent can be
958
   * confirmed. After this limit is reached, any further calls to this endpoint will transition the
959
   * PaymentIntent to the {@code canceled} state.
960
   */
961
  public PaymentIntent confirm(PaymentIntentConfirmParams params, RequestOptions options)
962
      throws StripeException {
963
    String path =
1✔
964
        String.format("/v1/payment_intents/%s/confirm", ApiResource.urlEncodeId(this.getId()));
1✔
965
    ApiResource.checkNullTypedParams(path, params);
1✔
966
    ApiRequest request =
1✔
967
        new ApiRequest(
968
            BaseAddress.API,
969
            ApiResource.RequestMethod.POST,
970
            path,
971
            ApiRequestParams.paramsToMap(params),
1✔
972
            options);
973
    return getResponseGetter().request(request, PaymentIntent.class);
1✔
974
  }
975

976
  /**
977
   * Creates a PaymentIntent object.
978
   *
979
   * <p>After the PaymentIntent is created, attach a payment method and <a
980
   * href="https://stripe.com/docs/api/payment_intents/confirm">confirm</a> to continue the payment.
981
   * Learn more about <a href="https://stripe.com/docs/payments/payment-intents">the available
982
   * payment flows with the Payment Intents API</a>.
983
   *
984
   * <p>When you use {@code confirm=true} during creation, it’s equivalent to creating and
985
   * confirming the PaymentIntent in the same call. You can use any parameters available in the <a
986
   * href="https://stripe.com/docs/api/payment_intents/confirm">confirm API</a> when you supply
987
   * {@code confirm=true}.
988
   */
989
  public static PaymentIntent create(Map<String, Object> params) throws StripeException {
990
    return create(params, (RequestOptions) null);
1✔
991
  }
992

993
  /**
994
   * Creates a PaymentIntent object.
995
   *
996
   * <p>After the PaymentIntent is created, attach a payment method and <a
997
   * href="https://stripe.com/docs/api/payment_intents/confirm">confirm</a> to continue the payment.
998
   * Learn more about <a href="https://stripe.com/docs/payments/payment-intents">the available
999
   * payment flows with the Payment Intents API</a>.
1000
   *
1001
   * <p>When you use {@code confirm=true} during creation, it’s equivalent to creating and
1002
   * confirming the PaymentIntent in the same call. You can use any parameters available in the <a
1003
   * href="https://stripe.com/docs/api/payment_intents/confirm">confirm API</a> when you supply
1004
   * {@code confirm=true}.
1005
   */
1006
  public static PaymentIntent create(Map<String, Object> params, RequestOptions options)
1007
      throws StripeException {
1008
    String path = "/v1/payment_intents";
1✔
1009
    ApiRequest request =
1✔
1010
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
1011
    return getGlobalResponseGetter().request(request, PaymentIntent.class);
1✔
1012
  }
1013

1014
  /**
1015
   * Creates a PaymentIntent object.
1016
   *
1017
   * <p>After the PaymentIntent is created, attach a payment method and <a
1018
   * href="https://stripe.com/docs/api/payment_intents/confirm">confirm</a> to continue the payment.
1019
   * Learn more about <a href="https://stripe.com/docs/payments/payment-intents">the available
1020
   * payment flows with the Payment Intents API</a>.
1021
   *
1022
   * <p>When you use {@code confirm=true} during creation, it’s equivalent to creating and
1023
   * confirming the PaymentIntent in the same call. You can use any parameters available in the <a
1024
   * href="https://stripe.com/docs/api/payment_intents/confirm">confirm API</a> when you supply
1025
   * {@code confirm=true}.
1026
   */
1027
  public static PaymentIntent create(PaymentIntentCreateParams params) throws StripeException {
1028
    return create(params, (RequestOptions) null);
1✔
1029
  }
1030

1031
  /**
1032
   * Creates a PaymentIntent object.
1033
   *
1034
   * <p>After the PaymentIntent is created, attach a payment method and <a
1035
   * href="https://stripe.com/docs/api/payment_intents/confirm">confirm</a> to continue the payment.
1036
   * Learn more about <a href="https://stripe.com/docs/payments/payment-intents">the available
1037
   * payment flows with the Payment Intents API</a>.
1038
   *
1039
   * <p>When you use {@code confirm=true} during creation, it’s equivalent to creating and
1040
   * confirming the PaymentIntent in the same call. You can use any parameters available in the <a
1041
   * href="https://stripe.com/docs/api/payment_intents/confirm">confirm API</a> when you supply
1042
   * {@code confirm=true}.
1043
   */
1044
  public static PaymentIntent create(PaymentIntentCreateParams params, RequestOptions options)
1045
      throws StripeException {
1046
    String path = "/v1/payment_intents";
1✔
1047
    ApiResource.checkNullTypedParams(path, params);
1✔
1048
    ApiRequest request =
1✔
1049
        new ApiRequest(
1050
            BaseAddress.API,
1051
            ApiResource.RequestMethod.POST,
1052
            path,
1053
            ApiRequestParams.paramsToMap(params),
1✔
1054
            options);
1055
    return getGlobalResponseGetter().request(request, PaymentIntent.class);
1✔
1056
  }
1057

1058
  /**
1059
   * Perform a decremental authorization on an eligible <a
1060
   * href="https://stripe.com/docs/api/payment_intents/object">PaymentIntent</a>. To be eligible,
1061
   * the PaymentIntent’s status must be {@code requires_capture} and <a
1062
   * href="https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card-decremental_authorization">decremental_authorization.status</a>
1063
   * must be {@code available}.
1064
   *
1065
   * <p>Decremental authorizations decrease the authorized amount on your customer’s card to the
1066
   * new, lower {@code amount} provided. A single PaymentIntent can call this endpoint multiple
1067
   * times to further decrease the authorized amount.
1068
   *
1069
   * <p>After decrement, the PaymentIntent object returns with the updated <a
1070
   * href="https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount">amount</a>.
1071
   * The PaymentIntent will now be capturable up to the new authorized amount.
1072
   *
1073
   * <p>Each PaymentIntent can have a maximum of 10 decremental or incremental authorization
1074
   * attempts, including declines. After it’s fully captured, a PaymentIntent can no longer be
1075
   * decremented.
1076
   */
1077
  public PaymentIntent decrementAuthorization(Map<String, Object> params) throws StripeException {
1078
    return decrementAuthorization(params, (RequestOptions) null);
×
1079
  }
1080

1081
  /**
1082
   * Perform a decremental authorization on an eligible <a
1083
   * href="https://stripe.com/docs/api/payment_intents/object">PaymentIntent</a>. To be eligible,
1084
   * the PaymentIntent’s status must be {@code requires_capture} and <a
1085
   * href="https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card-decremental_authorization">decremental_authorization.status</a>
1086
   * must be {@code available}.
1087
   *
1088
   * <p>Decremental authorizations decrease the authorized amount on your customer’s card to the
1089
   * new, lower {@code amount} provided. A single PaymentIntent can call this endpoint multiple
1090
   * times to further decrease the authorized amount.
1091
   *
1092
   * <p>After decrement, the PaymentIntent object returns with the updated <a
1093
   * href="https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount">amount</a>.
1094
   * The PaymentIntent will now be capturable up to the new authorized amount.
1095
   *
1096
   * <p>Each PaymentIntent can have a maximum of 10 decremental or incremental authorization
1097
   * attempts, including declines. After it’s fully captured, a PaymentIntent can no longer be
1098
   * decremented.
1099
   */
1100
  public PaymentIntent decrementAuthorization(Map<String, Object> params, RequestOptions options)
1101
      throws StripeException {
1102
    String path =
×
1103
        String.format(
×
1104
            "/v1/payment_intents/%s/decrement_authorization",
1105
            ApiResource.urlEncodeId(this.getId()));
×
1106
    ApiRequest request =
×
1107
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
1108
    return getResponseGetter().request(request, PaymentIntent.class);
×
1109
  }
1110

1111
  /**
1112
   * Perform a decremental authorization on an eligible <a
1113
   * href="https://stripe.com/docs/api/payment_intents/object">PaymentIntent</a>. To be eligible,
1114
   * the PaymentIntent’s status must be {@code requires_capture} and <a
1115
   * href="https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card-decremental_authorization">decremental_authorization.status</a>
1116
   * must be {@code available}.
1117
   *
1118
   * <p>Decremental authorizations decrease the authorized amount on your customer’s card to the
1119
   * new, lower {@code amount} provided. A single PaymentIntent can call this endpoint multiple
1120
   * times to further decrease the authorized amount.
1121
   *
1122
   * <p>After decrement, the PaymentIntent object returns with the updated <a
1123
   * href="https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount">amount</a>.
1124
   * The PaymentIntent will now be capturable up to the new authorized amount.
1125
   *
1126
   * <p>Each PaymentIntent can have a maximum of 10 decremental or incremental authorization
1127
   * attempts, including declines. After it’s fully captured, a PaymentIntent can no longer be
1128
   * decremented.
1129
   */
1130
  public PaymentIntent decrementAuthorization(PaymentIntentDecrementAuthorizationParams params)
1131
      throws StripeException {
1132
    return decrementAuthorization(params, (RequestOptions) null);
×
1133
  }
1134

1135
  /**
1136
   * Perform a decremental authorization on an eligible <a
1137
   * href="https://stripe.com/docs/api/payment_intents/object">PaymentIntent</a>. To be eligible,
1138
   * the PaymentIntent’s status must be {@code requires_capture} and <a
1139
   * href="https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card-decremental_authorization">decremental_authorization.status</a>
1140
   * must be {@code available}.
1141
   *
1142
   * <p>Decremental authorizations decrease the authorized amount on your customer’s card to the
1143
   * new, lower {@code amount} provided. A single PaymentIntent can call this endpoint multiple
1144
   * times to further decrease the authorized amount.
1145
   *
1146
   * <p>After decrement, the PaymentIntent object returns with the updated <a
1147
   * href="https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount">amount</a>.
1148
   * The PaymentIntent will now be capturable up to the new authorized amount.
1149
   *
1150
   * <p>Each PaymentIntent can have a maximum of 10 decremental or incremental authorization
1151
   * attempts, including declines. After it’s fully captured, a PaymentIntent can no longer be
1152
   * decremented.
1153
   */
1154
  public PaymentIntent decrementAuthorization(
1155
      PaymentIntentDecrementAuthorizationParams params, RequestOptions options)
1156
      throws StripeException {
1157
    String path =
×
1158
        String.format(
×
1159
            "/v1/payment_intents/%s/decrement_authorization",
1160
            ApiResource.urlEncodeId(this.getId()));
×
1161
    ApiResource.checkNullTypedParams(path, params);
×
1162
    ApiRequest request =
×
1163
        new ApiRequest(
1164
            BaseAddress.API,
1165
            ApiResource.RequestMethod.POST,
1166
            path,
1167
            ApiRequestParams.paramsToMap(params),
×
1168
            options);
1169
    return getResponseGetter().request(request, PaymentIntent.class);
×
1170
  }
1171

1172
  /**
1173
   * Perform an incremental authorization on an eligible <a
1174
   * href="https://stripe.com/docs/api/payment_intents/object">PaymentIntent</a>. To be eligible,
1175
   * the PaymentIntent’s status must be {@code requires_capture} and <a
1176
   * href="https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported">incremental_authorization_supported</a>
1177
   * must be {@code true}.
1178
   *
1179
   * <p>Incremental authorizations attempt to increase the authorized amount on your customer’s card
1180
   * to the new, higher {@code amount} provided. Similar to the initial authorization, incremental
1181
   * authorizations can be declined. A single PaymentIntent can call this endpoint multiple times to
1182
   * further increase the authorized amount.
1183
   *
1184
   * <p>If the incremental authorization succeeds, the PaymentIntent object returns with the updated
1185
   * <a
1186
   * href="https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount">amount</a>.
1187
   * If the incremental authorization fails, a <a
1188
   * href="https://stripe.com/docs/error-codes#card-declined">card_declined</a> error returns, and
1189
   * no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains
1190
   * capturable for the previously authorized amount.
1191
   *
1192
   * <p>Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including
1193
   * declines. After it’s captured, a PaymentIntent can no longer be incremented.
1194
   *
1195
   * <p>Learn more about <a
1196
   * href="https://stripe.com/docs/terminal/features/incremental-authorizations">incremental
1197
   * authorizations</a>.
1198
   */
1199
  public PaymentIntent incrementAuthorization(Map<String, Object> params) throws StripeException {
1200
    return incrementAuthorization(params, (RequestOptions) null);
×
1201
  }
1202

1203
  /**
1204
   * Perform an incremental authorization on an eligible <a
1205
   * href="https://stripe.com/docs/api/payment_intents/object">PaymentIntent</a>. To be eligible,
1206
   * the PaymentIntent’s status must be {@code requires_capture} and <a
1207
   * href="https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported">incremental_authorization_supported</a>
1208
   * must be {@code true}.
1209
   *
1210
   * <p>Incremental authorizations attempt to increase the authorized amount on your customer’s card
1211
   * to the new, higher {@code amount} provided. Similar to the initial authorization, incremental
1212
   * authorizations can be declined. A single PaymentIntent can call this endpoint multiple times to
1213
   * further increase the authorized amount.
1214
   *
1215
   * <p>If the incremental authorization succeeds, the PaymentIntent object returns with the updated
1216
   * <a
1217
   * href="https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount">amount</a>.
1218
   * If the incremental authorization fails, a <a
1219
   * href="https://stripe.com/docs/error-codes#card-declined">card_declined</a> error returns, and
1220
   * no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains
1221
   * capturable for the previously authorized amount.
1222
   *
1223
   * <p>Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including
1224
   * declines. After it’s captured, a PaymentIntent can no longer be incremented.
1225
   *
1226
   * <p>Learn more about <a
1227
   * href="https://stripe.com/docs/terminal/features/incremental-authorizations">incremental
1228
   * authorizations</a>.
1229
   */
1230
  public PaymentIntent incrementAuthorization(Map<String, Object> params, RequestOptions options)
1231
      throws StripeException {
1232
    String path =
×
1233
        String.format(
×
1234
            "/v1/payment_intents/%s/increment_authorization",
1235
            ApiResource.urlEncodeId(this.getId()));
×
1236
    ApiRequest request =
×
1237
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
1238
    return getResponseGetter().request(request, PaymentIntent.class);
×
1239
  }
1240

1241
  /**
1242
   * Perform an incremental authorization on an eligible <a
1243
   * href="https://stripe.com/docs/api/payment_intents/object">PaymentIntent</a>. To be eligible,
1244
   * the PaymentIntent’s status must be {@code requires_capture} and <a
1245
   * href="https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported">incremental_authorization_supported</a>
1246
   * must be {@code true}.
1247
   *
1248
   * <p>Incremental authorizations attempt to increase the authorized amount on your customer’s card
1249
   * to the new, higher {@code amount} provided. Similar to the initial authorization, incremental
1250
   * authorizations can be declined. A single PaymentIntent can call this endpoint multiple times to
1251
   * further increase the authorized amount.
1252
   *
1253
   * <p>If the incremental authorization succeeds, the PaymentIntent object returns with the updated
1254
   * <a
1255
   * href="https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount">amount</a>.
1256
   * If the incremental authorization fails, a <a
1257
   * href="https://stripe.com/docs/error-codes#card-declined">card_declined</a> error returns, and
1258
   * no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains
1259
   * capturable for the previously authorized amount.
1260
   *
1261
   * <p>Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including
1262
   * declines. After it’s captured, a PaymentIntent can no longer be incremented.
1263
   *
1264
   * <p>Learn more about <a
1265
   * href="https://stripe.com/docs/terminal/features/incremental-authorizations">incremental
1266
   * authorizations</a>.
1267
   */
1268
  public PaymentIntent incrementAuthorization(PaymentIntentIncrementAuthorizationParams params)
1269
      throws StripeException {
1270
    return incrementAuthorization(params, (RequestOptions) null);
1✔
1271
  }
1272

1273
  /**
1274
   * Perform an incremental authorization on an eligible <a
1275
   * href="https://stripe.com/docs/api/payment_intents/object">PaymentIntent</a>. To be eligible,
1276
   * the PaymentIntent’s status must be {@code requires_capture} and <a
1277
   * href="https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported">incremental_authorization_supported</a>
1278
   * must be {@code true}.
1279
   *
1280
   * <p>Incremental authorizations attempt to increase the authorized amount on your customer’s card
1281
   * to the new, higher {@code amount} provided. Similar to the initial authorization, incremental
1282
   * authorizations can be declined. A single PaymentIntent can call this endpoint multiple times to
1283
   * further increase the authorized amount.
1284
   *
1285
   * <p>If the incremental authorization succeeds, the PaymentIntent object returns with the updated
1286
   * <a
1287
   * href="https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount">amount</a>.
1288
   * If the incremental authorization fails, a <a
1289
   * href="https://stripe.com/docs/error-codes#card-declined">card_declined</a> error returns, and
1290
   * no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains
1291
   * capturable for the previously authorized amount.
1292
   *
1293
   * <p>Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including
1294
   * declines. After it’s captured, a PaymentIntent can no longer be incremented.
1295
   *
1296
   * <p>Learn more about <a
1297
   * href="https://stripe.com/docs/terminal/features/incremental-authorizations">incremental
1298
   * authorizations</a>.
1299
   */
1300
  public PaymentIntent incrementAuthorization(
1301
      PaymentIntentIncrementAuthorizationParams params, RequestOptions options)
1302
      throws StripeException {
1303
    String path =
1✔
1304
        String.format(
1✔
1305
            "/v1/payment_intents/%s/increment_authorization",
1306
            ApiResource.urlEncodeId(this.getId()));
1✔
1307
    ApiResource.checkNullTypedParams(path, params);
1✔
1308
    ApiRequest request =
1✔
1309
        new ApiRequest(
1310
            BaseAddress.API,
1311
            ApiResource.RequestMethod.POST,
1312
            path,
1313
            ApiRequestParams.paramsToMap(params),
1✔
1314
            options);
1315
    return getResponseGetter().request(request, PaymentIntent.class);
1✔
1316
  }
1317

1318
  /** Returns a list of PaymentIntents. */
1319
  public static PaymentIntentCollection list(Map<String, Object> params) throws StripeException {
1320
    return list(params, (RequestOptions) null);
1✔
1321
  }
1322

1323
  /** Returns a list of PaymentIntents. */
1324
  public static PaymentIntentCollection list(Map<String, Object> params, RequestOptions options)
1325
      throws StripeException {
1326
    String path = "/v1/payment_intents";
1✔
1327
    ApiRequest request =
1✔
1328
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
1329
    return getGlobalResponseGetter().request(request, PaymentIntentCollection.class);
1✔
1330
  }
1331

1332
  /** Returns a list of PaymentIntents. */
1333
  public static PaymentIntentCollection list(PaymentIntentListParams params)
1334
      throws StripeException {
1335
    return list(params, (RequestOptions) null);
1✔
1336
  }
1337

1338
  /** Returns a list of PaymentIntents. */
1339
  public static PaymentIntentCollection list(PaymentIntentListParams params, RequestOptions options)
1340
      throws StripeException {
1341
    String path = "/v1/payment_intents";
1✔
1342
    ApiResource.checkNullTypedParams(path, params);
1✔
1343
    ApiRequest request =
1✔
1344
        new ApiRequest(
1345
            BaseAddress.API,
1346
            ApiResource.RequestMethod.GET,
1347
            path,
1348
            ApiRequestParams.paramsToMap(params),
1✔
1349
            options);
1350
    return getGlobalResponseGetter().request(request, PaymentIntentCollection.class);
1✔
1351
  }
1352

1353
  /**
1354
   * Retrieves the details of a PaymentIntent that has previously been created.
1355
   *
1356
   * <p>You can retrieve a PaymentIntent client-side using a publishable key when the {@code
1357
   * client_secret} is in the query string.
1358
   *
1359
   * <p>If you retrieve a PaymentIntent with a publishable key, it only returns a subset of
1360
   * properties. Refer to the <a href="https://stripe.com/docs/api#payment_intent_object">payment
1361
   * intent</a> object reference for more details.
1362
   */
1363
  public static PaymentIntent retrieve(String intent) throws StripeException {
1364
    return retrieve(intent, (Map<String, Object>) null, (RequestOptions) null);
1✔
1365
  }
1366

1367
  /**
1368
   * Retrieves the details of a PaymentIntent that has previously been created.
1369
   *
1370
   * <p>You can retrieve a PaymentIntent client-side using a publishable key when the {@code
1371
   * client_secret} is in the query string.
1372
   *
1373
   * <p>If you retrieve a PaymentIntent with a publishable key, it only returns a subset of
1374
   * properties. Refer to the <a href="https://stripe.com/docs/api#payment_intent_object">payment
1375
   * intent</a> object reference for more details.
1376
   */
1377
  public static PaymentIntent retrieve(String intent, RequestOptions options)
1378
      throws StripeException {
1379
    return retrieve(intent, (Map<String, Object>) null, options);
×
1380
  }
1381

1382
  /**
1383
   * Retrieves the details of a PaymentIntent that has previously been created.
1384
   *
1385
   * <p>You can retrieve a PaymentIntent client-side using a publishable key when the {@code
1386
   * client_secret} is in the query string.
1387
   *
1388
   * <p>If you retrieve a PaymentIntent with a publishable key, it only returns a subset of
1389
   * properties. Refer to the <a href="https://stripe.com/docs/api#payment_intent_object">payment
1390
   * intent</a> object reference for more details.
1391
   */
1392
  public static PaymentIntent retrieve(
1393
      String intent, Map<String, Object> params, RequestOptions options) throws StripeException {
1394
    String path = String.format("/v1/payment_intents/%s", ApiResource.urlEncodeId(intent));
1✔
1395
    ApiRequest request =
1✔
1396
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
1397
    return getGlobalResponseGetter().request(request, PaymentIntent.class);
1✔
1398
  }
1399

1400
  /**
1401
   * Retrieves the details of a PaymentIntent that has previously been created.
1402
   *
1403
   * <p>You can retrieve a PaymentIntent client-side using a publishable key when the {@code
1404
   * client_secret} is in the query string.
1405
   *
1406
   * <p>If you retrieve a PaymentIntent with a publishable key, it only returns a subset of
1407
   * properties. Refer to the <a href="https://stripe.com/docs/api#payment_intent_object">payment
1408
   * intent</a> object reference for more details.
1409
   */
1410
  public static PaymentIntent retrieve(
1411
      String intent, PaymentIntentRetrieveParams params, RequestOptions options)
1412
      throws StripeException {
1413
    String path = String.format("/v1/payment_intents/%s", ApiResource.urlEncodeId(intent));
1✔
1414
    ApiResource.checkNullTypedParams(path, params);
1✔
1415
    ApiRequest request =
1✔
1416
        new ApiRequest(
1417
            BaseAddress.API,
1418
            ApiResource.RequestMethod.GET,
1419
            path,
1420
            ApiRequestParams.paramsToMap(params),
1✔
1421
            options);
1422
    return getGlobalResponseGetter().request(request, PaymentIntent.class);
1✔
1423
  }
1424

1425
  /**
1426
   * Search for PaymentIntents you’ve previously created using Stripe’s <a
1427
   * href="https://stripe.com/docs/search#search-query-language">Search Query Language</a>. Don’t
1428
   * use search in read-after-write flows where strict consistency is necessary. Under normal
1429
   * operating conditions, data is searchable in less than a minute. Occasionally, propagation of
1430
   * new or updated data can be up to an hour behind during outages. Search functionality is not
1431
   * available to merchants in India.
1432
   */
1433
  public static PaymentIntentSearchResult search(Map<String, Object> params)
1434
      throws StripeException {
1435
    return search(params, (RequestOptions) null);
×
1436
  }
1437

1438
  /**
1439
   * Search for PaymentIntents you’ve previously created using Stripe’s <a
1440
   * href="https://stripe.com/docs/search#search-query-language">Search Query Language</a>. Don’t
1441
   * use search in read-after-write flows where strict consistency is necessary. Under normal
1442
   * operating conditions, data is searchable in less than a minute. Occasionally, propagation of
1443
   * new or updated data can be up to an hour behind during outages. Search functionality is not
1444
   * available to merchants in India.
1445
   */
1446
  public static PaymentIntentSearchResult search(Map<String, Object> params, RequestOptions options)
1447
      throws StripeException {
1448
    String path = "/v1/payment_intents/search";
×
1449
    ApiRequest request =
×
1450
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
1451
    return getGlobalResponseGetter().request(request, PaymentIntentSearchResult.class);
×
1452
  }
1453

1454
  /**
1455
   * Search for PaymentIntents you’ve previously created using Stripe’s <a
1456
   * href="https://stripe.com/docs/search#search-query-language">Search Query Language</a>. Don’t
1457
   * use search in read-after-write flows where strict consistency is necessary. Under normal
1458
   * operating conditions, data is searchable in less than a minute. Occasionally, propagation of
1459
   * new or updated data can be up to an hour behind during outages. Search functionality is not
1460
   * available to merchants in India.
1461
   */
1462
  public static PaymentIntentSearchResult search(PaymentIntentSearchParams params)
1463
      throws StripeException {
1464
    return search(params, (RequestOptions) null);
1✔
1465
  }
1466

1467
  /**
1468
   * Search for PaymentIntents you’ve previously created using Stripe’s <a
1469
   * href="https://stripe.com/docs/search#search-query-language">Search Query Language</a>. Don’t
1470
   * use search in read-after-write flows where strict consistency is necessary. Under normal
1471
   * operating conditions, data is searchable in less than a minute. Occasionally, propagation of
1472
   * new or updated data can be up to an hour behind during outages. Search functionality is not
1473
   * available to merchants in India.
1474
   */
1475
  public static PaymentIntentSearchResult search(
1476
      PaymentIntentSearchParams params, RequestOptions options) throws StripeException {
1477
    String path = "/v1/payment_intents/search";
1✔
1478
    ApiResource.checkNullTypedParams(path, params);
1✔
1479
    ApiRequest request =
1✔
1480
        new ApiRequest(
1481
            BaseAddress.API,
1482
            ApiResource.RequestMethod.GET,
1483
            path,
1484
            ApiRequestParams.paramsToMap(params),
1✔
1485
            options);
1486
    return getGlobalResponseGetter().request(request, PaymentIntentSearchResult.class);
1✔
1487
  }
1488

1489
  /**
1490
   * Updates properties on a PaymentIntent object without confirming.
1491
   *
1492
   * <p>Depending on which properties you update, you might need to confirm the PaymentIntent again.
1493
   * For example, updating the {@code payment_method} always requires you to confirm the
1494
   * PaymentIntent again. If you prefer to update and confirm at the same time, we recommend
1495
   * updating properties through the <a
1496
   * href="https://stripe.com/docs/api/payment_intents/confirm">confirm API</a> instead.
1497
   */
1498
  @Override
1499
  public PaymentIntent update(Map<String, Object> params) throws StripeException {
1500
    return update(params, (RequestOptions) null);
1✔
1501
  }
1502

1503
  /**
1504
   * Updates properties on a PaymentIntent object without confirming.
1505
   *
1506
   * <p>Depending on which properties you update, you might need to confirm the PaymentIntent again.
1507
   * For example, updating the {@code payment_method} always requires you to confirm the
1508
   * PaymentIntent again. If you prefer to update and confirm at the same time, we recommend
1509
   * updating properties through the <a
1510
   * href="https://stripe.com/docs/api/payment_intents/confirm">confirm API</a> instead.
1511
   */
1512
  @Override
1513
  public PaymentIntent update(Map<String, Object> params, RequestOptions options)
1514
      throws StripeException {
1515
    String path = String.format("/v1/payment_intents/%s", ApiResource.urlEncodeId(this.getId()));
1✔
1516
    ApiRequest request =
1✔
1517
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
1518
    return getResponseGetter().request(request, PaymentIntent.class);
1✔
1519
  }
1520

1521
  /**
1522
   * Updates properties on a PaymentIntent object without confirming.
1523
   *
1524
   * <p>Depending on which properties you update, you might need to confirm the PaymentIntent again.
1525
   * For example, updating the {@code payment_method} always requires you to confirm the
1526
   * PaymentIntent again. If you prefer to update and confirm at the same time, we recommend
1527
   * updating properties through the <a
1528
   * href="https://stripe.com/docs/api/payment_intents/confirm">confirm API</a> instead.
1529
   */
1530
  public PaymentIntent update(PaymentIntentUpdateParams params) throws StripeException {
1531
    return update(params, (RequestOptions) null);
1✔
1532
  }
1533

1534
  /**
1535
   * Updates properties on a PaymentIntent object without confirming.
1536
   *
1537
   * <p>Depending on which properties you update, you might need to confirm the PaymentIntent again.
1538
   * For example, updating the {@code payment_method} always requires you to confirm the
1539
   * PaymentIntent again. If you prefer to update and confirm at the same time, we recommend
1540
   * updating properties through the <a
1541
   * href="https://stripe.com/docs/api/payment_intents/confirm">confirm API</a> instead.
1542
   */
1543
  public PaymentIntent update(PaymentIntentUpdateParams params, RequestOptions options)
1544
      throws StripeException {
1545
    String path = String.format("/v1/payment_intents/%s", ApiResource.urlEncodeId(this.getId()));
1✔
1546
    ApiResource.checkNullTypedParams(path, params);
1✔
1547
    ApiRequest request =
1✔
1548
        new ApiRequest(
1549
            BaseAddress.API,
1550
            ApiResource.RequestMethod.POST,
1551
            path,
1552
            ApiRequestParams.paramsToMap(params),
1✔
1553
            options);
1554
    return getResponseGetter().request(request, PaymentIntent.class);
1✔
1555
  }
1556

1557
  /** Verifies microdeposits on a PaymentIntent object. */
1558
  public PaymentIntent verifyMicrodeposits() throws StripeException {
1559
    return verifyMicrodeposits((Map<String, Object>) null, (RequestOptions) null);
×
1560
  }
1561

1562
  /** Verifies microdeposits on a PaymentIntent object. */
1563
  public PaymentIntent verifyMicrodeposits(RequestOptions options) throws StripeException {
1564
    return verifyMicrodeposits((Map<String, Object>) null, options);
×
1565
  }
1566

1567
  /** Verifies microdeposits on a PaymentIntent object. */
1568
  public PaymentIntent verifyMicrodeposits(Map<String, Object> params) throws StripeException {
1569
    return verifyMicrodeposits(params, (RequestOptions) null);
×
1570
  }
1571

1572
  /** Verifies microdeposits on a PaymentIntent object. */
1573
  public PaymentIntent verifyMicrodeposits(Map<String, Object> params, RequestOptions options)
1574
      throws StripeException {
1575
    String path =
×
1576
        String.format(
×
1577
            "/v1/payment_intents/%s/verify_microdeposits", ApiResource.urlEncodeId(this.getId()));
×
1578
    ApiRequest request =
×
1579
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
1580
    return getResponseGetter().request(request, PaymentIntent.class);
×
1581
  }
1582

1583
  /** Verifies microdeposits on a PaymentIntent object. */
1584
  public PaymentIntent verifyMicrodeposits(PaymentIntentVerifyMicrodepositsParams params)
1585
      throws StripeException {
1586
    return verifyMicrodeposits(params, (RequestOptions) null);
1✔
1587
  }
1588

1589
  /** Verifies microdeposits on a PaymentIntent object. */
1590
  public PaymentIntent verifyMicrodeposits(
1591
      PaymentIntentVerifyMicrodepositsParams params, RequestOptions options)
1592
      throws StripeException {
1593
    String path =
1✔
1594
        String.format(
1✔
1595
            "/v1/payment_intents/%s/verify_microdeposits", ApiResource.urlEncodeId(this.getId()));
1✔
1596
    ApiResource.checkNullTypedParams(path, params);
1✔
1597
    ApiRequest request =
1✔
1598
        new ApiRequest(
1599
            BaseAddress.API,
1600
            ApiResource.RequestMethod.POST,
1601
            path,
1602
            ApiRequestParams.paramsToMap(params),
1✔
1603
            options);
1604
    return getResponseGetter().request(request, PaymentIntent.class);
1✔
1605
  }
1606

1607
  /**
1608
   * For more details about AmountDetails, please refer to the <a
1609
   * href="https://docs.stripe.com/api">API Reference.</a>
1610
   */
1611
  @Getter
1612
  @Setter
1613
  @EqualsAndHashCode(callSuper = false)
1614
  public static class AmountDetails extends StripeObject {
1✔
1615
    @SerializedName("tip")
1616
    Tip tip;
1617

1618
    /**
1619
     * For more details about Tip, please refer to the <a href="https://docs.stripe.com/api">API
1620
     * Reference.</a>
1621
     */
1622
    @Getter
1623
    @Setter
1624
    @EqualsAndHashCode(callSuper = false)
1625
    public static class Tip extends StripeObject {
1✔
1626
      /** Portion of the amount that corresponds to a tip. */
1627
      @SerializedName("amount")
1628
      Long amount;
1629
    }
1630
  }
1631

1632
  /**
1633
   * For more details about AsyncWorkflows, please refer to the <a
1634
   * href="https://docs.stripe.com/api">API Reference.</a>
1635
   */
1636
  @Getter
1637
  @Setter
1638
  @EqualsAndHashCode(callSuper = false)
1639
  public static class AsyncWorkflows extends StripeObject {
×
1640
    @SerializedName("inputs")
1641
    Inputs inputs;
1642

1643
    /**
1644
     * For more details about Inputs, please refer to the <a href="https://docs.stripe.com/api">API
1645
     * Reference.</a>
1646
     */
1647
    @Getter
1648
    @Setter
1649
    @EqualsAndHashCode(callSuper = false)
1650
    public static class Inputs extends StripeObject {
×
1651
      @SerializedName("tax")
1652
      Tax tax;
1653

1654
      /**
1655
       * For more details about Tax, please refer to the <a href="https://docs.stripe.com/api">API
1656
       * Reference.</a>
1657
       */
1658
      @Getter
1659
      @Setter
1660
      @EqualsAndHashCode(callSuper = false)
1661
      public static class Tax extends StripeObject {
×
1662
        /** The <a href="https://stripe.com/docs/api/tax/calculations">TaxCalculation</a> id */
1663
        @SerializedName("calculation")
1664
        String calculation;
1665
      }
1666
    }
1667
  }
1668

1669
  /**
1670
   * For more details about AutomaticPaymentMethods, please refer to the <a
1671
   * href="https://docs.stripe.com/api">API Reference.</a>
1672
   */
1673
  @Getter
1674
  @Setter
1675
  @EqualsAndHashCode(callSuper = false)
1676
  public static class AutomaticPaymentMethods extends StripeObject {
×
1677
    /**
1678
     * Controls whether this PaymentIntent will accept redirect-based payment methods.
1679
     *
1680
     * <p>Redirect-based payment methods may require your customer to be redirected to a payment
1681
     * method's app or site for authentication or additional steps. To <a
1682
     * href="https://stripe.com/docs/api/payment_intents/confirm">confirm</a> this PaymentIntent,
1683
     * you may be required to provide a {@code return_url} to redirect customers back to your site
1684
     * after they authenticate or complete the payment.
1685
     *
1686
     * <p>One of {@code always}, or {@code never}.
1687
     */
1688
    @SerializedName("allow_redirects")
1689
    String allowRedirects;
1690

1691
    /** Automatically calculates compatible payment methods. */
1692
    @SerializedName("enabled")
1693
    Boolean enabled;
1694
  }
1695

1696
  /**
1697
   * For more details about NextAction, please refer to the <a
1698
   * href="https://docs.stripe.com/api">API Reference.</a>
1699
   */
1700
  @Getter
1701
  @Setter
1702
  @EqualsAndHashCode(callSuper = false)
1703
  public static class NextAction extends StripeObject {
1✔
1704
    @SerializedName("alipay_handle_redirect")
1705
    AlipayHandleRedirect alipayHandleRedirect;
1706

1707
    @SerializedName("boleto_display_details")
1708
    BoletoDisplayDetails boletoDisplayDetails;
1709

1710
    @SerializedName("card_await_notification")
1711
    CardAwaitNotification cardAwaitNotification;
1712

1713
    @SerializedName("cashapp_handle_redirect_or_display_qr_code")
1714
    CashappHandleRedirectOrDisplayQrCode cashappHandleRedirectOrDisplayQrCode;
1715

1716
    @SerializedName("display_bank_transfer_instructions")
1717
    DisplayBankTransferInstructions displayBankTransferInstructions;
1718

1719
    @SerializedName("konbini_display_details")
1720
    KonbiniDisplayDetails konbiniDisplayDetails;
1721

1722
    @SerializedName("multibanco_display_details")
1723
    MultibancoDisplayDetails multibancoDisplayDetails;
1724

1725
    @SerializedName("oxxo_display_details")
1726
    OxxoDisplayDetails oxxoDisplayDetails;
1727

1728
    @SerializedName("paynow_display_qr_code")
1729
    PaynowDisplayQrCode paynowDisplayQrCode;
1730

1731
    @SerializedName("pix_display_qr_code")
1732
    PixDisplayQrCode pixDisplayQrCode;
1733

1734
    @SerializedName("promptpay_display_qr_code")
1735
    PromptpayDisplayQrCode promptpayDisplayQrCode;
1736

1737
    @SerializedName("redirect_to_url")
1738
    RedirectToUrl redirectToUrl;
1739

1740
    @SerializedName("swish_handle_redirect_or_display_qr_code")
1741
    SwishHandleRedirectOrDisplayQrCode swishHandleRedirectOrDisplayQrCode;
1742

1743
    /**
1744
     * Type of the next action to perform, one of {@code redirect_to_url}, {@code use_stripe_sdk},
1745
     * {@code alipay_handle_redirect}, {@code oxxo_display_details}, or {@code
1746
     * verify_with_microdeposits}.
1747
     */
1748
    @SerializedName("type")
1749
    String type;
1750

1751
    /**
1752
     * When confirming a PaymentIntent with Stripe.js, Stripe.js depends on the contents of this
1753
     * dictionary to invoke authentication flows. The shape of the contents is subject to change and
1754
     * is only intended to be used by Stripe.js.
1755
     */
1756
    @SerializedName("use_stripe_sdk")
1757
    Map<String, Object> useStripeSdk;
1758

1759
    @SerializedName("verify_with_microdeposits")
1760
    VerifyWithMicrodeposits verifyWithMicrodeposits;
1761

1762
    @SerializedName("wechat_pay_display_qr_code")
1763
    WechatPayDisplayQrCode wechatPayDisplayQrCode;
1764

1765
    @SerializedName("wechat_pay_redirect_to_android_app")
1766
    WechatPayRedirectToAndroidApp wechatPayRedirectToAndroidApp;
1767

1768
    @SerializedName("wechat_pay_redirect_to_ios_app")
1769
    WechatPayRedirectToIosApp wechatPayRedirectToIosApp;
1770

1771
    /**
1772
     * For more details about AlipayHandleRedirect, please refer to the <a
1773
     * href="https://docs.stripe.com/api">API Reference.</a>
1774
     */
1775
    @Getter
1776
    @Setter
1777
    @EqualsAndHashCode(callSuper = false)
1778
    public static class AlipayHandleRedirect extends StripeObject {
×
1779
      /**
1780
       * The native data to be used with Alipay SDK you must redirect your customer to in order to
1781
       * authenticate the payment in an Android App.
1782
       */
1783
      @SerializedName("native_data")
1784
      String nativeData;
1785

1786
      /**
1787
       * The native URL you must redirect your customer to in order to authenticate the payment in
1788
       * an iOS App.
1789
       */
1790
      @SerializedName("native_url")
1791
      String nativeUrl;
1792

1793
      /**
1794
       * If the customer does not exit their browser while authenticating, they will be redirected
1795
       * to this specified URL after completion.
1796
       */
1797
      @SerializedName("return_url")
1798
      String returnUrl;
1799

1800
      /** The URL you must redirect your customer to in order to authenticate the payment. */
1801
      @SerializedName("url")
1802
      String url;
1803
    }
1804

1805
    /**
1806
     * For more details about BoletoDisplayDetails, please refer to the <a
1807
     * href="https://docs.stripe.com/api">API Reference.</a>
1808
     */
1809
    @Getter
1810
    @Setter
1811
    @EqualsAndHashCode(callSuper = false)
1812
    public static class BoletoDisplayDetails extends StripeObject {
×
1813
      /** The timestamp after which the boleto expires. */
1814
      @SerializedName("expires_at")
1815
      Long expiresAt;
1816

1817
      /**
1818
       * The URL to the hosted boleto voucher page, which allows customers to view the boleto
1819
       * voucher.
1820
       */
1821
      @SerializedName("hosted_voucher_url")
1822
      String hostedVoucherUrl;
1823

1824
      /** The boleto number. */
1825
      @SerializedName("number")
1826
      String number;
1827

1828
      /** The URL to the downloadable boleto voucher PDF. */
1829
      @SerializedName("pdf")
1830
      String pdf;
1831
    }
1832

1833
    /**
1834
     * For more details about CardAwaitNotification, please refer to the <a
1835
     * href="https://docs.stripe.com/api">API Reference.</a>
1836
     */
1837
    @Getter
1838
    @Setter
1839
    @EqualsAndHashCode(callSuper = false)
1840
    public static class CardAwaitNotification extends StripeObject {
×
1841
      /**
1842
       * The time that payment will be attempted. If customer approval is required, they need to
1843
       * provide approval before this time.
1844
       */
1845
      @SerializedName("charge_attempt_at")
1846
      Long chargeAttemptAt;
1847

1848
      /**
1849
       * For payments greater than INR 15000, the customer must provide explicit approval of the
1850
       * payment with their bank. For payments of lower amount, no customer action is required.
1851
       */
1852
      @SerializedName("customer_approval_required")
1853
      Boolean customerApprovalRequired;
1854
    }
1855

1856
    /**
1857
     * For more details about CashappHandleRedirectOrDisplayQrCode, please refer to the <a
1858
     * href="https://docs.stripe.com/api">API Reference.</a>
1859
     */
1860
    @Getter
1861
    @Setter
1862
    @EqualsAndHashCode(callSuper = false)
1863
    public static class CashappHandleRedirectOrDisplayQrCode extends StripeObject {
×
1864
      /**
1865
       * The URL to the hosted Cash App Pay instructions page, which allows customers to view the QR
1866
       * code, and supports QR code refreshing on expiration.
1867
       */
1868
      @SerializedName("hosted_instructions_url")
1869
      String hostedInstructionsUrl;
1870

1871
      /** The url for mobile redirect based auth. */
1872
      @SerializedName("mobile_auth_url")
1873
      String mobileAuthUrl;
1874

1875
      @SerializedName("qr_code")
1876
      QrCode qrCode;
1877

1878
      /**
1879
       * For more details about QrCode, please refer to the <a
1880
       * href="https://docs.stripe.com/api">API Reference.</a>
1881
       */
1882
      @Getter
1883
      @Setter
1884
      @EqualsAndHashCode(callSuper = false)
1885
      public static class QrCode extends StripeObject {
×
1886
        /** The date (unix timestamp) when the QR code expires. */
1887
        @SerializedName("expires_at")
1888
        Long expiresAt;
1889

1890
        /** The image_url_png string used to render QR code. */
1891
        @SerializedName("image_url_png")
1892
        String imageUrlPng;
1893

1894
        /** The image_url_svg string used to render QR code. */
1895
        @SerializedName("image_url_svg")
1896
        String imageUrlSvg;
1897
      }
1898
    }
1899

1900
    /**
1901
     * For more details about DisplayBankTransferInstructions, please refer to the <a
1902
     * href="https://docs.stripe.com/api">API Reference.</a>
1903
     */
1904
    @Getter
1905
    @Setter
1906
    @EqualsAndHashCode(callSuper = false)
1907
    public static class DisplayBankTransferInstructions extends StripeObject {
×
1908
      /** The remaining amount that needs to be transferred to complete the payment. */
1909
      @SerializedName("amount_remaining")
1910
      Long amountRemaining;
1911

1912
      /**
1913
       * Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
1914
       * code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
1915
       * currency</a>.
1916
       */
1917
      @SerializedName("currency")
1918
      String currency;
1919

1920
      /** A list of financial addresses that can be used to fund the customer balance. */
1921
      @SerializedName("financial_addresses")
1922
      List<PaymentIntent.NextAction.DisplayBankTransferInstructions.FinancialAddress>
1923
          financialAddresses;
1924

1925
      /** A link to a hosted page that guides your customer through completing the transfer. */
1926
      @SerializedName("hosted_instructions_url")
1927
      String hostedInstructionsUrl;
1928

1929
      /**
1930
       * A string identifying this payment. Instruct your customer to include this code in the
1931
       * reference or memo field of their bank transfer.
1932
       */
1933
      @SerializedName("reference")
1934
      String reference;
1935

1936
      /**
1937
       * Type of bank transfer
1938
       *
1939
       * <p>One of {@code eu_bank_transfer}, {@code gb_bank_transfer}, {@code jp_bank_transfer},
1940
       * {@code mx_bank_transfer}, or {@code us_bank_transfer}.
1941
       */
1942
      @SerializedName("type")
1943
      String type;
1944

1945
      /** FinancialAddresses contain identifying information that resolves to a FinancialAccount. */
1946
      @Getter
1947
      @Setter
1948
      @EqualsAndHashCode(callSuper = false)
1949
      public static class FinancialAddress extends StripeObject {
×
1950
        /** ABA Records contain U.S. bank account details per the ABA format. */
1951
        @SerializedName("aba")
1952
        Aba aba;
1953

1954
        /** Iban Records contain E.U. bank account details per the SEPA format. */
1955
        @SerializedName("iban")
1956
        Iban iban;
1957

1958
        /** Sort Code Records contain U.K. bank account details per the sort code format. */
1959
        @SerializedName("sort_code")
1960
        SortCode sortCode;
1961

1962
        /** SPEI Records contain Mexico bank account details per the SPEI format. */
1963
        @SerializedName("spei")
1964
        Spei spei;
1965

1966
        /** The payment networks supported by this FinancialAddress. */
1967
        @SerializedName("supported_networks")
1968
        List<String> supportedNetworks;
1969

1970
        /** SWIFT Records contain U.S. bank account details per the SWIFT format. */
1971
        @SerializedName("swift")
1972
        Swift swift;
1973

1974
        /**
1975
         * The type of financial address
1976
         *
1977
         * <p>One of {@code aba}, {@code iban}, {@code sort_code}, {@code spei}, {@code swift}, or
1978
         * {@code zengin}.
1979
         */
1980
        @SerializedName("type")
1981
        String type;
1982

1983
        /** Zengin Records contain Japan bank account details per the Zengin format. */
1984
        @SerializedName("zengin")
1985
        Zengin zengin;
1986

1987
        /** ABA Records contain U.S. bank account details per the ABA format. */
1988
        @Getter
1989
        @Setter
1990
        @EqualsAndHashCode(callSuper = false)
1991
        public static class Aba extends StripeObject {
×
1992
          /** The ABA account number. */
1993
          @SerializedName("account_number")
1994
          String accountNumber;
1995

1996
          /** The bank name. */
1997
          @SerializedName("bank_name")
1998
          String bankName;
1999

2000
          /** The ABA routing number. */
2001
          @SerializedName("routing_number")
2002
          String routingNumber;
2003
        }
2004

2005
        /** Iban Records contain E.U. bank account details per the SEPA format. */
2006
        @Getter
2007
        @Setter
2008
        @EqualsAndHashCode(callSuper = false)
2009
        public static class Iban extends StripeObject {
×
2010
          /** The name of the person or business that owns the bank account. */
2011
          @SerializedName("account_holder_name")
2012
          String accountHolderName;
2013

2014
          /** The BIC/SWIFT code of the account. */
2015
          @SerializedName("bic")
2016
          String bic;
2017

2018
          /**
2019
           * Two-letter country code (<a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO
2020
           * 3166-1 alpha-2</a>).
2021
           */
2022
          @SerializedName("country")
2023
          String country;
2024

2025
          /** The IBAN of the account. */
2026
          @SerializedName("iban")
2027
          String iban;
2028
        }
2029

2030
        /** Sort Code Records contain U.K. bank account details per the sort code format. */
2031
        @Getter
2032
        @Setter
2033
        @EqualsAndHashCode(callSuper = false)
2034
        public static class SortCode extends StripeObject {
×
2035
          /** The name of the person or business that owns the bank account. */
2036
          @SerializedName("account_holder_name")
2037
          String accountHolderName;
2038

2039
          /** The account number. */
2040
          @SerializedName("account_number")
2041
          String accountNumber;
2042

2043
          /** The six-digit sort code. */
2044
          @SerializedName("sort_code")
2045
          String sortCode;
2046
        }
2047

2048
        /** SPEI Records contain Mexico bank account details per the SPEI format. */
2049
        @Getter
2050
        @Setter
2051
        @EqualsAndHashCode(callSuper = false)
2052
        public static class Spei extends StripeObject {
×
2053
          /** The three-digit bank code. */
2054
          @SerializedName("bank_code")
2055
          String bankCode;
2056

2057
          /** The short banking institution name. */
2058
          @SerializedName("bank_name")
2059
          String bankName;
2060

2061
          /** The CLABE number. */
2062
          @SerializedName("clabe")
2063
          String clabe;
2064
        }
2065

2066
        /** SWIFT Records contain U.S. bank account details per the SWIFT format. */
2067
        @Getter
2068
        @Setter
2069
        @EqualsAndHashCode(callSuper = false)
2070
        public static class Swift extends StripeObject {
×
2071
          /** The account number. */
2072
          @SerializedName("account_number")
2073
          String accountNumber;
2074

2075
          /** The bank name. */
2076
          @SerializedName("bank_name")
2077
          String bankName;
2078

2079
          /** The SWIFT code. */
2080
          @SerializedName("swift_code")
2081
          String swiftCode;
2082
        }
2083

2084
        /** Zengin Records contain Japan bank account details per the Zengin format. */
2085
        @Getter
2086
        @Setter
2087
        @EqualsAndHashCode(callSuper = false)
2088
        public static class Zengin extends StripeObject {
×
2089
          /** The account holder name. */
2090
          @SerializedName("account_holder_name")
2091
          String accountHolderName;
2092

2093
          /** The account number. */
2094
          @SerializedName("account_number")
2095
          String accountNumber;
2096

2097
          /** The bank account type. In Japan, this can only be {@code futsu} or {@code toza}. */
2098
          @SerializedName("account_type")
2099
          String accountType;
2100

2101
          /** The bank code of the account. */
2102
          @SerializedName("bank_code")
2103
          String bankCode;
2104

2105
          /** The bank name of the account. */
2106
          @SerializedName("bank_name")
2107
          String bankName;
2108

2109
          /** The branch code of the account. */
2110
          @SerializedName("branch_code")
2111
          String branchCode;
2112

2113
          /** The branch name of the account. */
2114
          @SerializedName("branch_name")
2115
          String branchName;
2116
        }
2117
      }
2118
    }
2119

2120
    /**
2121
     * For more details about KonbiniDisplayDetails, please refer to the <a
2122
     * href="https://docs.stripe.com/api">API Reference.</a>
2123
     */
2124
    @Getter
2125
    @Setter
2126
    @EqualsAndHashCode(callSuper = false)
2127
    public static class KonbiniDisplayDetails extends StripeObject {
×
2128
      /** The timestamp at which the pending Konbini payment expires. */
2129
      @SerializedName("expires_at")
2130
      Long expiresAt;
2131

2132
      /**
2133
       * The URL for the Konbini payment instructions page, which allows customers to view and print
2134
       * a Konbini voucher.
2135
       */
2136
      @SerializedName("hosted_voucher_url")
2137
      String hostedVoucherUrl;
2138

2139
      @SerializedName("stores")
2140
      Stores stores;
2141

2142
      /**
2143
       * For more details about Stores, please refer to the <a
2144
       * href="https://docs.stripe.com/api">API Reference.</a>
2145
       */
2146
      @Getter
2147
      @Setter
2148
      @EqualsAndHashCode(callSuper = false)
2149
      public static class Stores extends StripeObject {
×
2150
        /** FamilyMart instruction details. */
2151
        @SerializedName("familymart")
2152
        Familymart familymart;
2153

2154
        /** Lawson instruction details. */
2155
        @SerializedName("lawson")
2156
        Lawson lawson;
2157

2158
        /** Ministop instruction details. */
2159
        @SerializedName("ministop")
2160
        Ministop ministop;
2161

2162
        /** Seicomart instruction details. */
2163
        @SerializedName("seicomart")
2164
        Seicomart seicomart;
2165

2166
        /**
2167
         * For more details about Familymart, please refer to the <a
2168
         * href="https://docs.stripe.com/api">API Reference.</a>
2169
         */
2170
        @Getter
2171
        @Setter
2172
        @EqualsAndHashCode(callSuper = false)
2173
        public static class Familymart extends StripeObject {
×
2174
          /** The confirmation number. */
2175
          @SerializedName("confirmation_number")
2176
          String confirmationNumber;
2177

2178
          /** The payment code. */
2179
          @SerializedName("payment_code")
2180
          String paymentCode;
2181
        }
2182

2183
        /**
2184
         * For more details about Lawson, please refer to the <a
2185
         * href="https://docs.stripe.com/api">API Reference.</a>
2186
         */
2187
        @Getter
2188
        @Setter
2189
        @EqualsAndHashCode(callSuper = false)
2190
        public static class Lawson extends StripeObject {
×
2191
          /** The confirmation number. */
2192
          @SerializedName("confirmation_number")
2193
          String confirmationNumber;
2194

2195
          /** The payment code. */
2196
          @SerializedName("payment_code")
2197
          String paymentCode;
2198
        }
2199

2200
        /**
2201
         * For more details about Ministop, please refer to the <a
2202
         * href="https://docs.stripe.com/api">API Reference.</a>
2203
         */
2204
        @Getter
2205
        @Setter
2206
        @EqualsAndHashCode(callSuper = false)
2207
        public static class Ministop extends StripeObject {
×
2208
          /** The confirmation number. */
2209
          @SerializedName("confirmation_number")
2210
          String confirmationNumber;
2211

2212
          /** The payment code. */
2213
          @SerializedName("payment_code")
2214
          String paymentCode;
2215
        }
2216

2217
        /**
2218
         * For more details about Seicomart, please refer to the <a
2219
         * href="https://docs.stripe.com/api">API Reference.</a>
2220
         */
2221
        @Getter
2222
        @Setter
2223
        @EqualsAndHashCode(callSuper = false)
2224
        public static class Seicomart extends StripeObject {
×
2225
          /** The confirmation number. */
2226
          @SerializedName("confirmation_number")
2227
          String confirmationNumber;
2228

2229
          /** The payment code. */
2230
          @SerializedName("payment_code")
2231
          String paymentCode;
2232
        }
2233
      }
2234
    }
2235

2236
    /**
2237
     * For more details about MultibancoDisplayDetails, please refer to the <a
2238
     * href="https://docs.stripe.com/api">API Reference.</a>
2239
     */
2240
    @Getter
2241
    @Setter
2242
    @EqualsAndHashCode(callSuper = false)
2243
    public static class MultibancoDisplayDetails extends StripeObject {
×
2244
      /** Entity number associated with this Multibanco payment. */
2245
      @SerializedName("entity")
2246
      String entity;
2247

2248
      /** The timestamp at which the Multibanco voucher expires. */
2249
      @SerializedName("expires_at")
2250
      Long expiresAt;
2251

2252
      /**
2253
       * The URL for the hosted Multibanco voucher page, which allows customers to view a Multibanco
2254
       * voucher.
2255
       */
2256
      @SerializedName("hosted_voucher_url")
2257
      String hostedVoucherUrl;
2258

2259
      /** Reference number associated with this Multibanco payment. */
2260
      @SerializedName("reference")
2261
      String reference;
2262
    }
2263

2264
    /**
2265
     * For more details about OxxoDisplayDetails, please refer to the <a
2266
     * href="https://docs.stripe.com/api">API Reference.</a>
2267
     */
2268
    @Getter
2269
    @Setter
2270
    @EqualsAndHashCode(callSuper = false)
2271
    public static class OxxoDisplayDetails extends StripeObject {
×
2272
      /** The timestamp after which the OXXO voucher expires. */
2273
      @SerializedName("expires_after")
2274
      Long expiresAfter;
2275

2276
      /**
2277
       * The URL for the hosted OXXO voucher page, which allows customers to view and print an OXXO
2278
       * voucher.
2279
       */
2280
      @SerializedName("hosted_voucher_url")
2281
      String hostedVoucherUrl;
2282

2283
      /** OXXO reference number. */
2284
      @SerializedName("number")
2285
      String number;
2286
    }
2287

2288
    /**
2289
     * For more details about PaynowDisplayQrCode, please refer to the <a
2290
     * href="https://docs.stripe.com/api">API Reference.</a>
2291
     */
2292
    @Getter
2293
    @Setter
2294
    @EqualsAndHashCode(callSuper = false)
2295
    public static class PaynowDisplayQrCode extends StripeObject {
×
2296
      /**
2297
       * The raw data string used to generate QR code, it should be used together with QR code
2298
       * library.
2299
       */
2300
      @SerializedName("data")
2301
      String data;
2302

2303
      /**
2304
       * The URL to the hosted PayNow instructions page, which allows customers to view the PayNow
2305
       * QR code.
2306
       */
2307
      @SerializedName("hosted_instructions_url")
2308
      String hostedInstructionsUrl;
2309

2310
      /** The image_url_png string used to render QR code. */
2311
      @SerializedName("image_url_png")
2312
      String imageUrlPng;
2313

2314
      /** The image_url_svg string used to render QR code. */
2315
      @SerializedName("image_url_svg")
2316
      String imageUrlSvg;
2317
    }
2318

2319
    /**
2320
     * For more details about PixDisplayQrCode, please refer to the <a
2321
     * href="https://docs.stripe.com/api">API Reference.</a>
2322
     */
2323
    @Getter
2324
    @Setter
2325
    @EqualsAndHashCode(callSuper = false)
2326
    public static class PixDisplayQrCode extends StripeObject {
×
2327
      /**
2328
       * The raw data string used to generate QR code, it should be used together with QR code
2329
       * library.
2330
       */
2331
      @SerializedName("data")
2332
      String data;
2333

2334
      /** The date (unix timestamp) when the PIX expires. */
2335
      @SerializedName("expires_at")
2336
      Long expiresAt;
2337

2338
      /**
2339
       * The URL to the hosted pix instructions page, which allows customers to view the pix QR
2340
       * code.
2341
       */
2342
      @SerializedName("hosted_instructions_url")
2343
      String hostedInstructionsUrl;
2344

2345
      /** The image_url_png string used to render png QR code. */
2346
      @SerializedName("image_url_png")
2347
      String imageUrlPng;
2348

2349
      /** The image_url_svg string used to render svg QR code. */
2350
      @SerializedName("image_url_svg")
2351
      String imageUrlSvg;
2352
    }
2353

2354
    /**
2355
     * For more details about PromptpayDisplayQrCode, please refer to the <a
2356
     * href="https://docs.stripe.com/api">API Reference.</a>
2357
     */
2358
    @Getter
2359
    @Setter
2360
    @EqualsAndHashCode(callSuper = false)
2361
    public static class PromptpayDisplayQrCode extends StripeObject {
×
2362
      /**
2363
       * The raw data string used to generate QR code, it should be used together with QR code
2364
       * library.
2365
       */
2366
      @SerializedName("data")
2367
      String data;
2368

2369
      /**
2370
       * The URL to the hosted PromptPay instructions page, which allows customers to view the
2371
       * PromptPay QR code.
2372
       */
2373
      @SerializedName("hosted_instructions_url")
2374
      String hostedInstructionsUrl;
2375

2376
      /** The PNG path used to render the QR code, can be used as the source in an HTML img tag. */
2377
      @SerializedName("image_url_png")
2378
      String imageUrlPng;
2379

2380
      /** The SVG path used to render the QR code, can be used as the source in an HTML img tag. */
2381
      @SerializedName("image_url_svg")
2382
      String imageUrlSvg;
2383
    }
2384

2385
    /**
2386
     * For more details about RedirectToUrl, please refer to the <a
2387
     * href="https://docs.stripe.com/api">API Reference.</a>
2388
     */
2389
    @Getter
2390
    @Setter
2391
    @EqualsAndHashCode(callSuper = false)
2392
    public static class RedirectToUrl extends StripeObject {
1✔
2393
      /**
2394
       * If the customer does not exit their browser while authenticating, they will be redirected
2395
       * to this specified URL after completion.
2396
       */
2397
      @SerializedName("return_url")
2398
      String returnUrl;
2399

2400
      /** The URL you must redirect your customer to in order to authenticate the payment. */
2401
      @SerializedName("url")
2402
      String url;
2403
    }
2404

2405
    /**
2406
     * For more details about SwishHandleRedirectOrDisplayQrCode, please refer to the <a
2407
     * href="https://docs.stripe.com/api">API Reference.</a>
2408
     */
2409
    @Getter
2410
    @Setter
2411
    @EqualsAndHashCode(callSuper = false)
2412
    public static class SwishHandleRedirectOrDisplayQrCode extends StripeObject {
×
2413
      /**
2414
       * The URL to the hosted Swish instructions page, which allows customers to view the QR code.
2415
       */
2416
      @SerializedName("hosted_instructions_url")
2417
      String hostedInstructionsUrl;
2418

2419
      /**
2420
       * The url for mobile redirect based auth (for internal use only and not typically available
2421
       * in standard API requests).
2422
       */
2423
      @SerializedName("mobile_auth_url")
2424
      String mobileAuthUrl;
2425

2426
      @SerializedName("qr_code")
2427
      QrCode qrCode;
2428

2429
      /**
2430
       * For more details about QrCode, please refer to the <a
2431
       * href="https://docs.stripe.com/api">API Reference.</a>
2432
       */
2433
      @Getter
2434
      @Setter
2435
      @EqualsAndHashCode(callSuper = false)
2436
      public static class QrCode extends StripeObject {
×
2437
        /**
2438
         * The raw data string used to generate QR code, it should be used together with QR code
2439
         * library.
2440
         */
2441
        @SerializedName("data")
2442
        String data;
2443

2444
        /** The image_url_png string used to render QR code. */
2445
        @SerializedName("image_url_png")
2446
        String imageUrlPng;
2447

2448
        /** The image_url_svg string used to render QR code. */
2449
        @SerializedName("image_url_svg")
2450
        String imageUrlSvg;
2451
      }
2452
    }
2453

2454
    /**
2455
     * For more details about VerifyWithMicrodeposits, please refer to the <a
2456
     * href="https://docs.stripe.com/api">API Reference.</a>
2457
     */
2458
    @Getter
2459
    @Setter
2460
    @EqualsAndHashCode(callSuper = false)
2461
    public static class VerifyWithMicrodeposits extends StripeObject {
×
2462
      /** The timestamp when the microdeposits are expected to land. */
2463
      @SerializedName("arrival_date")
2464
      Long arrivalDate;
2465

2466
      /**
2467
       * The URL for the hosted verification page, which allows customers to verify their bank
2468
       * account.
2469
       */
2470
      @SerializedName("hosted_verification_url")
2471
      String hostedVerificationUrl;
2472

2473
      /**
2474
       * The type of the microdeposit sent to the customer. Used to distinguish between different
2475
       * verification methods.
2476
       *
2477
       * <p>One of {@code amounts}, or {@code descriptor_code}.
2478
       */
2479
      @SerializedName("microdeposit_type")
2480
      String microdepositType;
2481
    }
2482

2483
    /**
2484
     * For more details about WechatPayDisplayQrCode, please refer to the <a
2485
     * href="https://docs.stripe.com/api">API Reference.</a>
2486
     */
2487
    @Getter
2488
    @Setter
2489
    @EqualsAndHashCode(callSuper = false)
2490
    public static class WechatPayDisplayQrCode extends StripeObject {
×
2491
      /** The data being used to generate QR code. */
2492
      @SerializedName("data")
2493
      String data;
2494

2495
      /**
2496
       * The URL to the hosted WeChat Pay instructions page, which allows customers to view the
2497
       * WeChat Pay QR code.
2498
       */
2499
      @SerializedName("hosted_instructions_url")
2500
      String hostedInstructionsUrl;
2501

2502
      /** The base64 image data for a pre-generated QR code. */
2503
      @SerializedName("image_data_url")
2504
      String imageDataUrl;
2505

2506
      /** The image_url_png string used to render QR code. */
2507
      @SerializedName("image_url_png")
2508
      String imageUrlPng;
2509

2510
      /** The image_url_svg string used to render QR code. */
2511
      @SerializedName("image_url_svg")
2512
      String imageUrlSvg;
2513
    }
2514

2515
    /**
2516
     * For more details about WechatPayRedirectToAndroidApp, please refer to the <a
2517
     * href="https://docs.stripe.com/api">API Reference.</a>
2518
     */
2519
    @Getter
2520
    @Setter
2521
    @EqualsAndHashCode(callSuper = false)
2522
    public static class WechatPayRedirectToAndroidApp extends StripeObject {
×
2523
      /** app_id is the APP ID registered on WeChat open platform. */
2524
      @SerializedName("app_id")
2525
      String appId;
2526

2527
      /** nonce_str is a random string. */
2528
      @SerializedName("nonce_str")
2529
      String nonceStr;
2530

2531
      /** an unique merchant ID assigned by WeChat Pay. */
2532
      @SerializedName("partner_id")
2533
      String partnerId;
2534

2535
      /** an unique trading ID assigned by WeChat Pay. */
2536
      @SerializedName("prepay_id")
2537
      String prepayId;
2538

2539
      /** A signature. */
2540
      @SerializedName("sign")
2541
      String sign;
2542

2543
      /** Specifies the current time in epoch format. */
2544
      @SerializedName("timestamp")
2545
      String timestamp;
2546

2547
      // package is a reserved word so we append an
2548
      // underscore to the private field and expose
2549
      // a custom getter and setter
2550
      @SerializedName("package")
2551
      String package_;
2552

2553
      public String getPackage() {
2554
        return this.package_;
×
2555
      }
2556

2557
      public void setPackage(String package_) {
2558
        this.package_ = package_;
×
2559
      }
×
2560
    }
2561

2562
    /**
2563
     * For more details about WechatPayRedirectToIosApp, please refer to the <a
2564
     * href="https://docs.stripe.com/api">API Reference.</a>
2565
     */
2566
    @Getter
2567
    @Setter
2568
    @EqualsAndHashCode(callSuper = false)
2569
    public static class WechatPayRedirectToIosApp extends StripeObject {
×
2570
      /** An universal link that redirect to WeChat Pay app. */
2571
      @SerializedName("native_url")
2572
      String nativeUrl;
2573
    }
2574
  }
2575

2576
  /**
2577
   * For more details about PaymentDetails, please refer to the <a
2578
   * href="https://docs.stripe.com/api">API Reference.</a>
2579
   */
2580
  @Getter
2581
  @Setter
2582
  @EqualsAndHashCode(callSuper = false)
2583
  public static class PaymentDetails extends StripeObject {
×
2584
    @SerializedName("car_rental")
2585
    CarRental carRental;
2586

2587
    @SerializedName("event_details")
2588
    EventDetails eventDetails;
2589

2590
    @SerializedName("subscription")
2591
    Subscription subscription;
2592

2593
    /**
2594
     * For more details about CarRental, please refer to the <a
2595
     * href="https://docs.stripe.com/api">API Reference.</a>
2596
     */
2597
    @Getter
2598
    @Setter
2599
    @EqualsAndHashCode(callSuper = false)
2600
    public static class CarRental extends StripeObject {
×
2601
      @SerializedName("affiliate")
2602
      Affiliate affiliate;
2603

2604
      /** The booking number associated with the car rental. */
2605
      @SerializedName("booking_number")
2606
      String bookingNumber;
2607

2608
      /** Class code of the car. */
2609
      @SerializedName("car_class_code")
2610
      String carClassCode;
2611

2612
      /** Make of the car. */
2613
      @SerializedName("car_make")
2614
      String carMake;
2615

2616
      /** Model of the car. */
2617
      @SerializedName("car_model")
2618
      String carModel;
2619

2620
      /** The name of the rental car company. */
2621
      @SerializedName("company")
2622
      String company;
2623

2624
      /** The customer service phone number of the car rental company. */
2625
      @SerializedName("customer_service_phone_number")
2626
      String customerServicePhoneNumber;
2627

2628
      /** Number of days the car is being rented. */
2629
      @SerializedName("days_rented")
2630
      Long daysRented;
2631

2632
      @SerializedName("delivery")
2633
      Delivery delivery;
2634

2635
      /** The details of the drivers associated with the trip. */
2636
      @SerializedName("drivers")
2637
      List<PaymentIntent.PaymentDetails.CarRental.Driver> drivers;
2638

2639
      /** List of additional charges being billed. */
2640
      @SerializedName("extra_charges")
2641
      List<String> extraCharges;
2642

2643
      /** Indicates if the customer did not keep nor cancel their booking. */
2644
      @SerializedName("no_show")
2645
      Boolean noShow;
2646

2647
      @SerializedName("pickup_address")
2648
      com.stripe.model.Address pickupAddress;
2649

2650
      /** Car pick-up time. Measured in seconds since the Unix epoch. */
2651
      @SerializedName("pickup_at")
2652
      Long pickupAt;
2653

2654
      /** Rental rate. */
2655
      @SerializedName("rate_amount")
2656
      Long rateAmount;
2657

2658
      /**
2659
       * The frequency at which the rate amount is applied. One of {@code day}, {@code week} or
2660
       * {@code month}
2661
       */
2662
      @SerializedName("rate_interval")
2663
      String rateInterval;
2664

2665
      /** The full name of the person or entity renting the car. */
2666
      @SerializedName("renter_name")
2667
      String renterName;
2668

2669
      @SerializedName("return_address")
2670
      com.stripe.model.Address returnAddress;
2671

2672
      /** Car return time. Measured in seconds since the Unix epoch. */
2673
      @SerializedName("return_at")
2674
      Long returnAt;
2675

2676
      /** Indicates whether the goods or services are tax-exempt or tax is not collected. */
2677
      @SerializedName("tax_exempt")
2678
      Boolean taxExempt;
2679

2680
      /**
2681
       * For more details about Affiliate, please refer to the <a
2682
       * href="https://docs.stripe.com/api">API Reference.</a>
2683
       */
2684
      @Getter
2685
      @Setter
2686
      @EqualsAndHashCode(callSuper = false)
2687
      public static class Affiliate extends StripeObject {
×
2688
        /** The name of the affiliate that originated the purchase. */
2689
        @SerializedName("name")
2690
        String name;
2691
      }
2692

2693
      /**
2694
       * For more details about Delivery, please refer to the <a
2695
       * href="https://docs.stripe.com/api">API Reference.</a>
2696
       */
2697
      @Getter
2698
      @Setter
2699
      @EqualsAndHashCode(callSuper = false)
2700
      public static class Delivery extends StripeObject {
×
2701
        /**
2702
         * The delivery method for the payment
2703
         *
2704
         * <p>One of {@code email}, {@code phone}, {@code pickup}, or {@code post}.
2705
         */
2706
        @SerializedName("mode")
2707
        String mode;
2708

2709
        @SerializedName("recipient")
2710
        Recipient recipient;
2711

2712
        /**
2713
         * For more details about Recipient, please refer to the <a
2714
         * href="https://docs.stripe.com/api">API Reference.</a>
2715
         */
2716
        @Getter
2717
        @Setter
2718
        @EqualsAndHashCode(callSuper = false)
2719
        public static class Recipient extends StripeObject {
×
2720
          /** The email of the recipient the ticket is delivered to. */
2721
          @SerializedName("email")
2722
          String email;
2723

2724
          /** The name of the recipient the ticket is delivered to. */
2725
          @SerializedName("name")
2726
          String name;
2727

2728
          /** The phone number of the recipient the ticket is delivered to. */
2729
          @SerializedName("phone")
2730
          String phone;
2731
        }
2732
      }
2733

2734
      /**
2735
       * For more details about Driver, please refer to the <a
2736
       * href="https://docs.stripe.com/api">API Reference.</a>
2737
       */
2738
      @Getter
2739
      @Setter
2740
      @EqualsAndHashCode(callSuper = false)
2741
      public static class Driver extends StripeObject {
×
2742
        /** Full name of the driver on the reservation. */
2743
        @SerializedName("name")
2744
        String name;
2745
      }
2746
    }
2747

2748
    /**
2749
     * For more details about EventDetails, please refer to the <a
2750
     * href="https://docs.stripe.com/api">API Reference.</a>
2751
     */
2752
    @Getter
2753
    @Setter
2754
    @EqualsAndHashCode(callSuper = false)
2755
    public static class EventDetails extends StripeObject {
×
2756
      /** Indicates if the tickets are digitally checked when entering the venue. */
2757
      @SerializedName("access_controlled_venue")
2758
      Boolean accessControlledVenue;
2759

2760
      @SerializedName("address")
2761
      com.stripe.model.Address address;
2762

2763
      @SerializedName("affiliate")
2764
      Affiliate affiliate;
2765

2766
      /** The name of the company. */
2767
      @SerializedName("company")
2768
      String company;
2769

2770
      @SerializedName("delivery")
2771
      Delivery delivery;
2772

2773
      /** Event end time. Measured in seconds since the Unix epoch. */
2774
      @SerializedName("ends_at")
2775
      Long endsAt;
2776

2777
      /** Type of the event entertainment (concert, sports event etc). */
2778
      @SerializedName("genre")
2779
      String genre;
2780

2781
      /** The name of the event. */
2782
      @SerializedName("name")
2783
      String name;
2784

2785
      /** Event start time. Measured in seconds since the Unix epoch. */
2786
      @SerializedName("starts_at")
2787
      Long startsAt;
2788

2789
      /**
2790
       * For more details about Affiliate, please refer to the <a
2791
       * href="https://docs.stripe.com/api">API Reference.</a>
2792
       */
2793
      @Getter
2794
      @Setter
2795
      @EqualsAndHashCode(callSuper = false)
2796
      public static class Affiliate extends StripeObject {
×
2797
        /** The name of the affiliate that originated the purchase. */
2798
        @SerializedName("name")
2799
        String name;
2800
      }
2801

2802
      /**
2803
       * For more details about Delivery, please refer to the <a
2804
       * href="https://docs.stripe.com/api">API Reference.</a>
2805
       */
2806
      @Getter
2807
      @Setter
2808
      @EqualsAndHashCode(callSuper = false)
2809
      public static class Delivery extends StripeObject {
×
2810
        /**
2811
         * The delivery method for the payment
2812
         *
2813
         * <p>One of {@code email}, {@code phone}, {@code pickup}, or {@code post}.
2814
         */
2815
        @SerializedName("mode")
2816
        String mode;
2817

2818
        @SerializedName("recipient")
2819
        Recipient recipient;
2820

2821
        /**
2822
         * For more details about Recipient, please refer to the <a
2823
         * href="https://docs.stripe.com/api">API Reference.</a>
2824
         */
2825
        @Getter
2826
        @Setter
2827
        @EqualsAndHashCode(callSuper = false)
2828
        public static class Recipient extends StripeObject {
×
2829
          /** The email of the recipient the ticket is delivered to. */
2830
          @SerializedName("email")
2831
          String email;
2832

2833
          /** The name of the recipient the ticket is delivered to. */
2834
          @SerializedName("name")
2835
          String name;
2836

2837
          /** The phone number of the recipient the ticket is delivered to. */
2838
          @SerializedName("phone")
2839
          String phone;
2840
        }
2841
      }
2842
    }
2843

2844
    /**
2845
     * For more details about Subscription, please refer to the <a
2846
     * href="https://docs.stripe.com/api">API Reference.</a>
2847
     */
2848
    @Getter
2849
    @Setter
2850
    @EqualsAndHashCode(callSuper = false)
2851
    public static class Subscription extends StripeObject {
×
2852
      @SerializedName("affiliate")
2853
      Affiliate affiliate;
2854

2855
      /** Info whether the subscription will be auto renewed upon expiry. */
2856
      @SerializedName("auto_renewal")
2857
      Boolean autoRenewal;
2858

2859
      @SerializedName("billing_interval")
2860
      BillingInterval billingInterval;
2861

2862
      /** Subscription end time. Measured in seconds since the Unix epoch. */
2863
      @SerializedName("ends_at")
2864
      Long endsAt;
2865

2866
      /** Name of the product on subscription. e.g. Apple Music Subscription. */
2867
      @SerializedName("name")
2868
      String name;
2869

2870
      /** Subscription start time. Measured in seconds since the Unix epoch. */
2871
      @SerializedName("starts_at")
2872
      Long startsAt;
2873

2874
      /**
2875
       * For more details about Affiliate, please refer to the <a
2876
       * href="https://docs.stripe.com/api">API Reference.</a>
2877
       */
2878
      @Getter
2879
      @Setter
2880
      @EqualsAndHashCode(callSuper = false)
2881
      public static class Affiliate extends StripeObject {
×
2882
        /** The name of the affiliate that originated the purchase. */
2883
        @SerializedName("name")
2884
        String name;
2885
      }
2886

2887
      /**
2888
       * For more details about BillingInterval, please refer to the <a
2889
       * href="https://docs.stripe.com/api">API Reference.</a>
2890
       */
2891
      @Getter
2892
      @Setter
2893
      @EqualsAndHashCode(callSuper = false)
2894
      public static class BillingInterval extends StripeObject {
×
2895
        /**
2896
         * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the
2897
         * interval type to get the overall duration.
2898
         */
2899
        @SerializedName("count")
2900
        Long count;
2901

2902
        /**
2903
         * Specifies a type of interval unit. Either {@code day}, {@code week}, {@code month} or
2904
         * {@code year}.
2905
         *
2906
         * <p>One of {@code day}, {@code month}, {@code week}, or {@code year}.
2907
         */
2908
        @SerializedName("interval")
2909
        String interval;
2910
      }
2911
    }
2912
  }
2913

2914
  /**
2915
   * For more details about PaymentMethodConfigurationDetails, please refer to the <a
2916
   * href="https://docs.stripe.com/api">API Reference.</a>
2917
   */
2918
  @Getter
2919
  @Setter
2920
  @EqualsAndHashCode(callSuper = false)
2921
  public static class PaymentMethodConfigurationDetails extends StripeObject implements HasId {
×
2922
    /** ID of the payment method configuration used. */
2923
    @Getter(onMethod_ = {@Override})
2924
    @SerializedName("id")
2925
    String id;
2926

2927
    /** ID of the parent payment method configuration used. */
2928
    @SerializedName("parent")
2929
    String parent;
2930
  }
2931

2932
  /**
2933
   * For more details about PaymentMethodOptions, please refer to the <a
2934
   * href="https://docs.stripe.com/api">API Reference.</a>
2935
   */
2936
  @Getter
2937
  @Setter
2938
  @EqualsAndHashCode(callSuper = false)
2939
  public static class PaymentMethodOptions extends StripeObject {
1✔
2940
    @SerializedName("acss_debit")
2941
    AcssDebit acssDebit;
2942

2943
    @SerializedName("affirm")
2944
    Affirm affirm;
2945

2946
    @SerializedName("afterpay_clearpay")
2947
    AfterpayClearpay afterpayClearpay;
2948

2949
    @SerializedName("alipay")
2950
    Alipay alipay;
2951

2952
    @SerializedName("alma")
2953
    Alma alma;
2954

2955
    @SerializedName("amazon_pay")
2956
    AmazonPay amazonPay;
2957

2958
    @SerializedName("au_becs_debit")
2959
    AuBecsDebit auBecsDebit;
2960

2961
    @SerializedName("bacs_debit")
2962
    BacsDebit bacsDebit;
2963

2964
    @SerializedName("bancontact")
2965
    Bancontact bancontact;
2966

2967
    @SerializedName("blik")
2968
    Blik blik;
2969

2970
    @SerializedName("boleto")
2971
    Boleto boleto;
2972

2973
    @SerializedName("card")
2974
    Card card;
2975

2976
    @SerializedName("card_present")
2977
    CardPresent cardPresent;
2978

2979
    @SerializedName("cashapp")
2980
    Cashapp cashapp;
2981

2982
    @SerializedName("customer_balance")
2983
    CustomerBalance customerBalance;
2984

2985
    @SerializedName("eps")
2986
    Eps eps;
2987

2988
    @SerializedName("fpx")
2989
    Fpx fpx;
2990

2991
    @SerializedName("giropay")
2992
    Giropay giropay;
2993

2994
    @SerializedName("gopay")
2995
    Gopay gopay;
2996

2997
    @SerializedName("grabpay")
2998
    Grabpay grabpay;
2999

3000
    @SerializedName("ideal")
3001
    Ideal ideal;
3002

3003
    @SerializedName("interac_present")
3004
    InteracPresent interacPresent;
3005

3006
    @SerializedName("kakao_pay")
3007
    KakaoPay kakaoPay;
3008

3009
    @SerializedName("klarna")
3010
    Klarna klarna;
3011

3012
    @SerializedName("konbini")
3013
    Konbini konbini;
3014

3015
    @SerializedName("kr_card")
3016
    KrCard krCard;
3017

3018
    @SerializedName("link")
3019
    Link link;
3020

3021
    @SerializedName("mb_way")
3022
    MbWay mbWay;
3023

3024
    @SerializedName("mobilepay")
3025
    Mobilepay mobilepay;
3026

3027
    @SerializedName("multibanco")
3028
    Multibanco multibanco;
3029

3030
    @SerializedName("naver_pay")
3031
    NaverPay naverPay;
3032

3033
    @SerializedName("oxxo")
3034
    Oxxo oxxo;
3035

3036
    @SerializedName("p24")
3037
    P24 p24;
3038

3039
    @SerializedName("payco")
3040
    Payco payco;
3041

3042
    @SerializedName("paynow")
3043
    Paynow paynow;
3044

3045
    @SerializedName("paypal")
3046
    Paypal paypal;
3047

3048
    @SerializedName("payto")
3049
    Payto payto;
3050

3051
    @SerializedName("pix")
3052
    Pix pix;
3053

3054
    @SerializedName("promptpay")
3055
    Promptpay promptpay;
3056

3057
    @SerializedName("qris")
3058
    Qris qris;
3059

3060
    @SerializedName("rechnung")
3061
    Rechnung rechnung;
3062

3063
    @SerializedName("revolut_pay")
3064
    RevolutPay revolutPay;
3065

3066
    @SerializedName("samsung_pay")
3067
    SamsungPay samsungPay;
3068

3069
    @SerializedName("sepa_debit")
3070
    SepaDebit sepaDebit;
3071

3072
    @SerializedName("shopeepay")
3073
    Shopeepay shopeepay;
3074

3075
    @SerializedName("sofort")
3076
    Sofort sofort;
3077

3078
    @SerializedName("swish")
3079
    Swish swish;
3080

3081
    @SerializedName("twint")
3082
    Twint twint;
3083

3084
    @SerializedName("us_bank_account")
3085
    UsBankAccount usBankAccount;
3086

3087
    @SerializedName("wechat_pay")
3088
    WechatPay wechatPay;
3089

3090
    @SerializedName("zip")
3091
    Zip zip;
3092

3093
    /**
3094
     * For more details about AcssDebit, please refer to the <a
3095
     * href="https://docs.stripe.com/api">API Reference.</a>
3096
     */
3097
    @Getter
3098
    @Setter
3099
    @EqualsAndHashCode(callSuper = false)
3100
    public static class AcssDebit extends StripeObject {
×
3101
      @SerializedName("mandate_options")
3102
      MandateOptions mandateOptions;
3103

3104
      /**
3105
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3106
       *
3107
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3108
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3109
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3110
       * actions. If you don't provide a Customer, you can still <a
3111
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3112
       * Customer after the transaction completes.
3113
       *
3114
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3115
       * and attaches a <a
3116
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3117
       * payment method representing the card to the Customer instead.
3118
       *
3119
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3120
       * with regional legislation and network rules, such as <a
3121
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3122
       *
3123
       * <p>One of {@code none}, {@code off_session}, or {@code on_session}.
3124
       */
3125
      @SerializedName("setup_future_usage")
3126
      String setupFutureUsage;
3127

3128
      /**
3129
       * Bank account verification method.
3130
       *
3131
       * <p>One of {@code automatic}, {@code instant}, or {@code microdeposits}.
3132
       */
3133
      @SerializedName("verification_method")
3134
      String verificationMethod;
3135

3136
      /**
3137
       * For more details about MandateOptions, please refer to the <a
3138
       * href="https://docs.stripe.com/api">API Reference.</a>
3139
       */
3140
      @Getter
3141
      @Setter
3142
      @EqualsAndHashCode(callSuper = false)
3143
      public static class MandateOptions extends StripeObject {
×
3144
        /** A URL for custom mandate text. */
3145
        @SerializedName("custom_mandate_url")
3146
        String customMandateUrl;
3147

3148
        /**
3149
         * Description of the interval. Only required if the 'payment_schedule' parameter is
3150
         * 'interval' or 'combined'.
3151
         */
3152
        @SerializedName("interval_description")
3153
        String intervalDescription;
3154

3155
        /**
3156
         * Payment schedule for the mandate.
3157
         *
3158
         * <p>One of {@code combined}, {@code interval}, or {@code sporadic}.
3159
         */
3160
        @SerializedName("payment_schedule")
3161
        String paymentSchedule;
3162

3163
        /**
3164
         * Transaction type of the mandate.
3165
         *
3166
         * <p>One of {@code business}, or {@code personal}.
3167
         */
3168
        @SerializedName("transaction_type")
3169
        String transactionType;
3170
      }
3171
    }
3172

3173
    /**
3174
     * For more details about Affirm, please refer to the <a href="https://docs.stripe.com/api">API
3175
     * Reference.</a>
3176
     */
3177
    @Getter
3178
    @Setter
3179
    @EqualsAndHashCode(callSuper = false)
3180
    public static class Affirm extends StripeObject {
×
3181
      /**
3182
       * Controls when the funds will be captured from the customer's account.
3183
       *
3184
       * <p>Equal to {@code manual}.
3185
       */
3186
      @SerializedName("capture_method")
3187
      String captureMethod;
3188

3189
      /** Preferred language of the Affirm authorization page that the customer is redirected to. */
3190
      @SerializedName("preferred_locale")
3191
      String preferredLocale;
3192

3193
      /**
3194
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3195
       *
3196
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3197
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3198
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3199
       * actions. If you don't provide a Customer, you can still <a
3200
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3201
       * Customer after the transaction completes.
3202
       *
3203
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3204
       * and attaches a <a
3205
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3206
       * payment method representing the card to the Customer instead.
3207
       *
3208
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3209
       * with regional legislation and network rules, such as <a
3210
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3211
       *
3212
       * <p>Equal to {@code none}.
3213
       */
3214
      @SerializedName("setup_future_usage")
3215
      String setupFutureUsage;
3216
    }
3217

3218
    /**
3219
     * For more details about AfterpayClearpay, please refer to the <a
3220
     * href="https://docs.stripe.com/api">API Reference.</a>
3221
     */
3222
    @Getter
3223
    @Setter
3224
    @EqualsAndHashCode(callSuper = false)
3225
    public static class AfterpayClearpay extends StripeObject {
×
3226
      /**
3227
       * Controls when the funds will be captured from the customer's account.
3228
       *
3229
       * <p>Equal to {@code manual}.
3230
       */
3231
      @SerializedName("capture_method")
3232
      String captureMethod;
3233

3234
      /**
3235
       * An internal identifier or reference that this payment corresponds to. You must limit the
3236
       * identifier to 128 characters, and it can only contain letters, numbers, underscores,
3237
       * backslashes, and dashes. This field differs from the statement descriptor and item name.
3238
       */
3239
      @SerializedName("reference")
3240
      String reference;
3241

3242
      /**
3243
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3244
       *
3245
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3246
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3247
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3248
       * actions. If you don't provide a Customer, you can still <a
3249
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3250
       * Customer after the transaction completes.
3251
       *
3252
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3253
       * and attaches a <a
3254
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3255
       * payment method representing the card to the Customer instead.
3256
       *
3257
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3258
       * with regional legislation and network rules, such as <a
3259
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3260
       *
3261
       * <p>Equal to {@code none}.
3262
       */
3263
      @SerializedName("setup_future_usage")
3264
      String setupFutureUsage;
3265
    }
3266

3267
    /**
3268
     * For more details about Alipay, please refer to the <a href="https://docs.stripe.com/api">API
3269
     * Reference.</a>
3270
     */
3271
    @Getter
3272
    @Setter
3273
    @EqualsAndHashCode(callSuper = false)
3274
    public static class Alipay extends StripeObject {
×
3275
      /**
3276
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3277
       *
3278
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3279
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3280
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3281
       * actions. If you don't provide a Customer, you can still <a
3282
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3283
       * Customer after the transaction completes.
3284
       *
3285
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3286
       * and attaches a <a
3287
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3288
       * payment method representing the card to the Customer instead.
3289
       *
3290
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3291
       * with regional legislation and network rules, such as <a
3292
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3293
       *
3294
       * <p>One of {@code none}, or {@code off_session}.
3295
       */
3296
      @SerializedName("setup_future_usage")
3297
      String setupFutureUsage;
3298
    }
3299

3300
    /**
3301
     * For more details about Alma, please refer to the <a href="https://docs.stripe.com/api">API
3302
     * Reference.</a>
3303
     */
3304
    @Getter
3305
    @Setter
3306
    @EqualsAndHashCode(callSuper = false)
NEW
3307
    public static class Alma extends StripeObject {
×
3308
      /**
3309
       * Controls when the funds will be captured from the customer's account.
3310
       *
3311
       * <p>Equal to {@code manual}.
3312
       */
3313
      @SerializedName("capture_method")
3314
      String captureMethod;
3315
    }
3316

3317
    /**
3318
     * For more details about AmazonPay, please refer to the <a
3319
     * href="https://docs.stripe.com/api">API Reference.</a>
3320
     */
3321
    @Getter
3322
    @Setter
3323
    @EqualsAndHashCode(callSuper = false)
3324
    public static class AmazonPay extends StripeObject {
×
3325
      /**
3326
       * Controls when the funds will be captured from the customer's account.
3327
       *
3328
       * <p>Equal to {@code manual}.
3329
       */
3330
      @SerializedName("capture_method")
3331
      String captureMethod;
3332

3333
      /**
3334
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3335
       *
3336
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3337
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3338
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3339
       * actions. If you don't provide a Customer, you can still <a
3340
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3341
       * Customer after the transaction completes.
3342
       *
3343
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3344
       * and attaches a <a
3345
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3346
       * payment method representing the card to the Customer instead.
3347
       *
3348
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3349
       * with regional legislation and network rules, such as <a
3350
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3351
       *
3352
       * <p>One of {@code none}, or {@code off_session}.
3353
       */
3354
      @SerializedName("setup_future_usage")
3355
      String setupFutureUsage;
3356
    }
3357

3358
    /**
3359
     * For more details about AuBecsDebit, please refer to the <a
3360
     * href="https://docs.stripe.com/api">API Reference.</a>
3361
     */
3362
    @Getter
3363
    @Setter
3364
    @EqualsAndHashCode(callSuper = false)
3365
    public static class AuBecsDebit extends StripeObject {
×
3366
      /**
3367
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3368
       *
3369
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3370
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3371
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3372
       * actions. If you don't provide a Customer, you can still <a
3373
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3374
       * Customer after the transaction completes.
3375
       *
3376
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3377
       * and attaches a <a
3378
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3379
       * payment method representing the card to the Customer instead.
3380
       *
3381
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3382
       * with regional legislation and network rules, such as <a
3383
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3384
       *
3385
       * <p>One of {@code none}, {@code off_session}, or {@code on_session}.
3386
       */
3387
      @SerializedName("setup_future_usage")
3388
      String setupFutureUsage;
3389
    }
3390

3391
    /**
3392
     * For more details about BacsDebit, please refer to the <a
3393
     * href="https://docs.stripe.com/api">API Reference.</a>
3394
     */
3395
    @Getter
3396
    @Setter
3397
    @EqualsAndHashCode(callSuper = false)
3398
    public static class BacsDebit extends StripeObject {
×
3399
      @SerializedName("mandate_options")
3400
      MandateOptions mandateOptions;
3401

3402
      /**
3403
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3404
       *
3405
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3406
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3407
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3408
       * actions. If you don't provide a Customer, you can still <a
3409
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3410
       * Customer after the transaction completes.
3411
       *
3412
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3413
       * and attaches a <a
3414
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3415
       * payment method representing the card to the Customer instead.
3416
       *
3417
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3418
       * with regional legislation and network rules, such as <a
3419
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3420
       *
3421
       * <p>One of {@code none}, {@code off_session}, or {@code on_session}.
3422
       */
3423
      @SerializedName("setup_future_usage")
3424
      String setupFutureUsage;
3425

3426
      /**
3427
       * For more details about MandateOptions, please refer to the <a
3428
       * href="https://docs.stripe.com/api">API Reference.</a>
3429
       */
3430
      @Getter
3431
      @Setter
3432
      @EqualsAndHashCode(callSuper = false)
3433
      public static class MandateOptions extends StripeObject {}
×
3434
    }
3435

3436
    /**
3437
     * For more details about Bancontact, please refer to the <a
3438
     * href="https://docs.stripe.com/api">API Reference.</a>
3439
     */
3440
    @Getter
3441
    @Setter
3442
    @EqualsAndHashCode(callSuper = false)
3443
    public static class Bancontact extends StripeObject {
×
3444
      /**
3445
       * Preferred language of the Bancontact authorization page that the customer is redirected to.
3446
       *
3447
       * <p>One of {@code de}, {@code en}, {@code fr}, or {@code nl}.
3448
       */
3449
      @SerializedName("preferred_language")
3450
      String preferredLanguage;
3451

3452
      /**
3453
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3454
       *
3455
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3456
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3457
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3458
       * actions. If you don't provide a Customer, you can still <a
3459
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3460
       * Customer after the transaction completes.
3461
       *
3462
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3463
       * and attaches a <a
3464
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3465
       * payment method representing the card to the Customer instead.
3466
       *
3467
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3468
       * with regional legislation and network rules, such as <a
3469
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3470
       *
3471
       * <p>One of {@code none}, or {@code off_session}.
3472
       */
3473
      @SerializedName("setup_future_usage")
3474
      String setupFutureUsage;
3475
    }
3476

3477
    /**
3478
     * For more details about Blik, please refer to the <a href="https://docs.stripe.com/api">API
3479
     * Reference.</a>
3480
     */
3481
    @Getter
3482
    @Setter
3483
    @EqualsAndHashCode(callSuper = false)
3484
    public static class Blik extends StripeObject {
×
3485
      /**
3486
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3487
       *
3488
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3489
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3490
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3491
       * actions. If you don't provide a Customer, you can still <a
3492
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3493
       * Customer after the transaction completes.
3494
       *
3495
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3496
       * and attaches a <a
3497
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3498
       * payment method representing the card to the Customer instead.
3499
       *
3500
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3501
       * with regional legislation and network rules, such as <a
3502
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3503
       *
3504
       * <p>Equal to {@code none}.
3505
       */
3506
      @SerializedName("setup_future_usage")
3507
      String setupFutureUsage;
3508
    }
3509

3510
    /**
3511
     * For more details about Boleto, please refer to the <a href="https://docs.stripe.com/api">API
3512
     * Reference.</a>
3513
     */
3514
    @Getter
3515
    @Setter
3516
    @EqualsAndHashCode(callSuper = false)
3517
    public static class Boleto extends StripeObject {
×
3518
      /**
3519
       * The number of calendar days before a Boleto voucher expires. For example, if you create a
3520
       * Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will
3521
       * expire on Wednesday at 23:59 America/Sao_Paulo time.
3522
       */
3523
      @SerializedName("expires_after_days")
3524
      Long expiresAfterDays;
3525

3526
      /**
3527
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3528
       *
3529
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3530
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3531
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3532
       * actions. If you don't provide a Customer, you can still <a
3533
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3534
       * Customer after the transaction completes.
3535
       *
3536
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3537
       * and attaches a <a
3538
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3539
       * payment method representing the card to the Customer instead.
3540
       *
3541
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3542
       * with regional legislation and network rules, such as <a
3543
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3544
       *
3545
       * <p>One of {@code none}, {@code off_session}, or {@code on_session}.
3546
       */
3547
      @SerializedName("setup_future_usage")
3548
      String setupFutureUsage;
3549
    }
3550

3551
    /**
3552
     * For more details about Card, please refer to the <a href="https://docs.stripe.com/api">API
3553
     * Reference.</a>
3554
     */
3555
    @Getter
3556
    @Setter
3557
    @EqualsAndHashCode(callSuper = false)
3558
    public static class Card extends StripeObject {
×
3559
      /**
3560
       * Controls when the funds will be captured from the customer's account.
3561
       *
3562
       * <p>Equal to {@code manual}.
3563
       */
3564
      @SerializedName("capture_method")
3565
      String captureMethod;
3566

3567
      /**
3568
       * Installment details for this payment (Mexico only).
3569
       *
3570
       * <p>For more information, see the <a
3571
       * href="https://stripe.com/docs/payments/installments">installments integration guide</a>.
3572
       */
3573
      @SerializedName("installments")
3574
      Installments installments;
3575

3576
      /** Configuration options for setting up an eMandate for cards issued in India. */
3577
      @SerializedName("mandate_options")
3578
      MandateOptions mandateOptions;
3579

3580
      /**
3581
       * Selected network to process this payment intent on. Depends on the available networks of
3582
       * the card attached to the payment intent. Can be only set confirm-time.
3583
       */
3584
      @SerializedName("network")
3585
      String network;
3586

3587
      /**
3588
       * Request ability to <a
3589
       * href="https://stripe.com/docs/payments/decremental-authorization">decrement the
3590
       * authorization</a> for this PaymentIntent.
3591
       *
3592
       * <p>One of {@code if_available}, or {@code never}.
3593
       */
3594
      @SerializedName("request_decremental_authorization")
3595
      String requestDecrementalAuthorization;
3596

3597
      /**
3598
       * Request ability to <a
3599
       * href="https://stripe.com/docs/payments/extended-authorization">capture beyond the standard
3600
       * authorization validity window</a> for this PaymentIntent.
3601
       *
3602
       * <p>One of {@code if_available}, or {@code never}.
3603
       */
3604
      @SerializedName("request_extended_authorization")
3605
      String requestExtendedAuthorization;
3606

3607
      /**
3608
       * Request ability to <a
3609
       * href="https://stripe.com/docs/payments/incremental-authorization">increment the
3610
       * authorization</a> for this PaymentIntent.
3611
       *
3612
       * <p>One of {@code if_available}, or {@code never}.
3613
       */
3614
      @SerializedName("request_incremental_authorization")
3615
      String requestIncrementalAuthorization;
3616

3617
      /**
3618
       * Request ability to make <a href="https://stripe.com/docs/payments/multicapture">multiple
3619
       * captures</a> for this PaymentIntent.
3620
       *
3621
       * <p>One of {@code if_available}, or {@code never}.
3622
       */
3623
      @SerializedName("request_multicapture")
3624
      String requestMulticapture;
3625

3626
      /**
3627
       * Request ability to <a href="https://stripe.com/docs/payments/overcapture">overcapture</a>
3628
       * for this PaymentIntent.
3629
       *
3630
       * <p>One of {@code if_available}, or {@code never}.
3631
       */
3632
      @SerializedName("request_overcapture")
3633
      String requestOvercapture;
3634

3635
      /**
3636
       * We strongly recommend that you rely on our SCA Engine to automatically prompt your
3637
       * customers for authentication based on risk level and <a
3638
       * href="https://stripe.com/docs/strong-customer-authentication">other requirements</a>.
3639
       * However, if you wish to request 3D Secure based on logic from your own fraud engine,
3640
       * provide this option. If not provided, this value defaults to {@code automatic}. Read our
3641
       * guide on <a
3642
       * href="https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds">manually
3643
       * requesting 3D Secure</a> for more information on how this configuration interacts with
3644
       * Radar and our SCA Engine.
3645
       *
3646
       * <p>One of {@code any}, {@code automatic}, or {@code challenge}.
3647
       */
3648
      @SerializedName("request_three_d_secure")
3649
      String requestThreeDSecure;
3650

3651
      /**
3652
       * When enabled, using a card that is attached to a customer will require the CVC to be
3653
       * provided again (i.e. using the cvc_token parameter).
3654
       */
3655
      @SerializedName("require_cvc_recollection")
3656
      Boolean requireCvcRecollection;
3657

3658
      /**
3659
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3660
       *
3661
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3662
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3663
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3664
       * actions. If you don't provide a Customer, you can still <a
3665
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3666
       * Customer after the transaction completes.
3667
       *
3668
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3669
       * and attaches a <a
3670
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3671
       * payment method representing the card to the Customer instead.
3672
       *
3673
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3674
       * with regional legislation and network rules, such as <a
3675
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3676
       *
3677
       * <p>One of {@code none}, {@code off_session}, or {@code on_session}.
3678
       */
3679
      @SerializedName("setup_future_usage")
3680
      String setupFutureUsage;
3681

3682
      /**
3683
       * Provides information about a card payment that customers see on their statements.
3684
       * Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor
3685
       * that’s set on the account to form the complete statement descriptor. Maximum 22 characters.
3686
       * On card statements, the <em>concatenation</em> of both prefix and suffix (including
3687
       * separators) will appear truncated to 22 characters.
3688
       */
3689
      @SerializedName("statement_descriptor_suffix_kana")
3690
      String statementDescriptorSuffixKana;
3691

3692
      /**
3693
       * Provides information about a card payment that customers see on their statements.
3694
       * Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement
3695
       * descriptor that’s set on the account to form the complete statement descriptor. Maximum 17
3696
       * characters. On card statements, the <em>concatenation</em> of both prefix and suffix
3697
       * (including separators) will appear truncated to 17 characters.
3698
       */
3699
      @SerializedName("statement_descriptor_suffix_kanji")
3700
      String statementDescriptorSuffixKanji;
3701

3702
      @SerializedName("statement_details")
3703
      StatementDetails statementDetails;
3704

3705
      /**
3706
       * For more details about Installments, please refer to the <a
3707
       * href="https://docs.stripe.com/api">API Reference.</a>
3708
       */
3709
      @Getter
3710
      @Setter
3711
      @EqualsAndHashCode(callSuper = false)
3712
      public static class Installments extends StripeObject {
×
3713
        /** Installment plans that may be selected for this PaymentIntent. */
3714
        @SerializedName("available_plans")
3715
        List<PaymentIntent.PaymentMethodOptions.Card.Installments.AvailablePlan> availablePlans;
3716

3717
        /** Whether Installments are enabled for this PaymentIntent. */
3718
        @SerializedName("enabled")
3719
        Boolean enabled;
3720

3721
        /** Installment plan selected for this PaymentIntent. */
3722
        @SerializedName("plan")
3723
        Plan plan;
3724

3725
        /**
3726
         * For more details about AvailablePlan, please refer to the <a
3727
         * href="https://docs.stripe.com/api">API Reference.</a>
3728
         */
3729
        @Getter
3730
        @Setter
3731
        @EqualsAndHashCode(callSuper = false)
3732
        public static class AvailablePlan extends StripeObject {
×
3733
          /**
3734
           * For {@code fixed_count} installment plans, this is the number of installment payments
3735
           * your customer will make to their credit card.
3736
           */
3737
          @SerializedName("count")
3738
          Long count;
3739

3740
          /**
3741
           * For {@code fixed_count} installment plans, this is the interval between installment
3742
           * payments your customer will make to their credit card. One of {@code month}.
3743
           */
3744
          @SerializedName("interval")
3745
          String interval;
3746

3747
          /** Type of installment plan, one of {@code fixed_count}. */
3748
          @SerializedName("type")
3749
          String type;
3750
        }
3751

3752
        /**
3753
         * For more details about Plan, please refer to the <a
3754
         * href="https://docs.stripe.com/api">API Reference.</a>
3755
         */
3756
        @Getter
3757
        @Setter
3758
        @EqualsAndHashCode(callSuper = false)
3759
        public static class Plan extends StripeObject {
×
3760
          /**
3761
           * For {@code fixed_count} installment plans, this is the number of installment payments
3762
           * your customer will make to their credit card.
3763
           */
3764
          @SerializedName("count")
3765
          Long count;
3766

3767
          /**
3768
           * For {@code fixed_count} installment plans, this is the interval between installment
3769
           * payments your customer will make to their credit card. One of {@code month}.
3770
           */
3771
          @SerializedName("interval")
3772
          String interval;
3773

3774
          /** Type of installment plan, one of {@code fixed_count}. */
3775
          @SerializedName("type")
3776
          String type;
3777
        }
3778
      }
3779

3780
      /**
3781
       * For more details about MandateOptions, please refer to the <a
3782
       * href="https://docs.stripe.com/api">API Reference.</a>
3783
       */
3784
      @Getter
3785
      @Setter
3786
      @EqualsAndHashCode(callSuper = false)
3787
      public static class MandateOptions extends StripeObject {
×
3788
        /** Amount to be charged for future payments. */
3789
        @SerializedName("amount")
3790
        Long amount;
3791

3792
        /**
3793
         * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
3794
         * refers to the exact amount to be charged in future payments. If {@code maximum}, the
3795
         * amount charged can be up to the value passed for the {@code amount} param.
3796
         */
3797
        @SerializedName("amount_type")
3798
        String amountType;
3799

3800
        /**
3801
         * A description of the mandate or subscription that is meant to be displayed to the
3802
         * customer.
3803
         */
3804
        @SerializedName("description")
3805
        String description;
3806

3807
        /**
3808
         * End date of the mandate or subscription. If not provided, the mandate will be active
3809
         * until canceled. If provided, end date should be after start date.
3810
         */
3811
        @SerializedName("end_date")
3812
        Long endDate;
3813

3814
        /**
3815
         * Specifies payment frequency. One of {@code day}, {@code week}, {@code month}, {@code
3816
         * year}, or {@code sporadic}.
3817
         */
3818
        @SerializedName("interval")
3819
        String interval;
3820

3821
        /**
3822
         * The number of intervals between payments. For example, {@code interval=month} and {@code
3823
         * interval_count=3} indicates one payment every three months. Maximum of one year interval
3824
         * allowed (1 year, 12 months, or 52 weeks). This parameter is optional when {@code
3825
         * interval=sporadic}.
3826
         */
3827
        @SerializedName("interval_count")
3828
        Long intervalCount;
3829

3830
        /** Unique identifier for the mandate or subscription. */
3831
        @SerializedName("reference")
3832
        String reference;
3833

3834
        /**
3835
         * Start date of the mandate or subscription. Start date should not be lesser than
3836
         * yesterday.
3837
         */
3838
        @SerializedName("start_date")
3839
        Long startDate;
3840

3841
        /** Specifies the type of mandates supported. Possible values are {@code india}. */
3842
        @SerializedName("supported_types")
3843
        List<String> supportedTypes;
3844
      }
3845

3846
      /**
3847
       * For more details about StatementDetails, please refer to the <a
3848
       * href="https://docs.stripe.com/api">API Reference.</a>
3849
       */
3850
      @Getter
3851
      @Setter
3852
      @EqualsAndHashCode(callSuper = false)
3853
      public static class StatementDetails extends StripeObject {
×
3854
        @SerializedName("address")
3855
        com.stripe.model.PaymentIntent.PaymentMethodOptions.Card.StatementDetails.Address address;
3856

3857
        /** Phone number. */
3858
        @SerializedName("phone")
3859
        String phone;
3860

3861
        /**
3862
         * For more details about Address, please refer to the <a
3863
         * href="https://docs.stripe.com/api">API Reference.</a>
3864
         */
3865
        @Getter
3866
        @Setter
3867
        @EqualsAndHashCode(callSuper = false)
3868
        public static class Address extends StripeObject {
×
3869
          /** City, district, suburb, town, or village. */
3870
          @SerializedName("city")
3871
          String city;
3872

3873
          /**
3874
           * Two-letter country code (<a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO
3875
           * 3166-1 alpha-2</a>).
3876
           */
3877
          @SerializedName("country")
3878
          String country;
3879

3880
          /** Address line 1 (e.g., street, PO Box, or company name). */
3881
          @SerializedName("line1")
3882
          String line1;
3883

3884
          /** Address line 2 (e.g., apartment, suite, unit, or building). */
3885
          @SerializedName("line2")
3886
          String line2;
3887

3888
          /** ZIP or postal code. */
3889
          @SerializedName("postal_code")
3890
          String postalCode;
3891

3892
          /** State, county, province, or region. */
3893
          @SerializedName("state")
3894
          String state;
3895
        }
3896
      }
3897
    }
3898

3899
    /**
3900
     * For more details about CardPresent, please refer to the <a
3901
     * href="https://docs.stripe.com/api">API Reference.</a>
3902
     */
3903
    @Getter
3904
    @Setter
3905
    @EqualsAndHashCode(callSuper = false)
3906
    public static class CardPresent extends StripeObject {
×
3907
      /**
3908
       * Request ability to capture this payment beyond the standard <a
3909
       * href="https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity">authorization
3910
       * validity window.</a>
3911
       */
3912
      @SerializedName("request_extended_authorization")
3913
      Boolean requestExtendedAuthorization;
3914

3915
      /**
3916
       * Request ability to <a
3917
       * href="https://stripe.com/docs/terminal/features/incremental-authorizations">increment</a>
3918
       * this PaymentIntent if the combination of MCC and card brand is eligible. Check <a
3919
       * href="https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported">incremental_authorization_supported</a>
3920
       * in the <a href="https://stripe.com/docs/api/payment_intents/confirm">Confirm</a> response
3921
       * to verify support.
3922
       */
3923
      @SerializedName("request_incremental_authorization_support")
3924
      Boolean requestIncrementalAuthorizationSupport;
3925

3926
      @SerializedName("routing")
3927
      Routing routing;
3928

3929
      /**
3930
       * For more details about Routing, please refer to the <a
3931
       * href="https://docs.stripe.com/api">API Reference.</a>
3932
       */
3933
      @Getter
3934
      @Setter
3935
      @EqualsAndHashCode(callSuper = false)
3936
      public static class Routing extends StripeObject {
×
3937
        /**
3938
         * Requested routing priority
3939
         *
3940
         * <p>One of {@code domestic}, or {@code international}.
3941
         */
3942
        @SerializedName("requested_priority")
3943
        String requestedPriority;
3944
      }
3945
    }
3946

3947
    /**
3948
     * For more details about Cashapp, please refer to the <a href="https://docs.stripe.com/api">API
3949
     * Reference.</a>
3950
     */
3951
    @Getter
3952
    @Setter
3953
    @EqualsAndHashCode(callSuper = false)
3954
    public static class Cashapp extends StripeObject {
×
3955
      /**
3956
       * Controls when the funds will be captured from the customer's account.
3957
       *
3958
       * <p>Equal to {@code manual}.
3959
       */
3960
      @SerializedName("capture_method")
3961
      String captureMethod;
3962

3963
      /**
3964
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3965
       *
3966
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3967
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3968
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3969
       * actions. If you don't provide a Customer, you can still <a
3970
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3971
       * Customer after the transaction completes.
3972
       *
3973
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3974
       * and attaches a <a
3975
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3976
       * payment method representing the card to the Customer instead.
3977
       *
3978
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3979
       * with regional legislation and network rules, such as <a
3980
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3981
       *
3982
       * <p>One of {@code none}, {@code off_session}, or {@code on_session}.
3983
       */
3984
      @SerializedName("setup_future_usage")
3985
      String setupFutureUsage;
3986
    }
3987

3988
    /**
3989
     * For more details about CustomerBalance, please refer to the <a
3990
     * href="https://docs.stripe.com/api">API Reference.</a>
3991
     */
3992
    @Getter
3993
    @Setter
3994
    @EqualsAndHashCode(callSuper = false)
3995
    public static class CustomerBalance extends StripeObject {
×
3996
      @SerializedName("bank_transfer")
3997
      BankTransfer bankTransfer;
3998

3999
      /**
4000
       * The funding method type to be used when there are not enough funds in the customer balance.
4001
       * Permitted values include: {@code bank_transfer}.
4002
       *
4003
       * <p>Equal to {@code bank_transfer}.
4004
       */
4005
      @SerializedName("funding_type")
4006
      String fundingType;
4007

4008
      /**
4009
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
4010
       *
4011
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
4012
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
4013
       * Customer after the PaymentIntent is confirmed and the customer completes any required
4014
       * actions. If you don't provide a Customer, you can still <a
4015
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
4016
       * Customer after the transaction completes.
4017
       *
4018
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
4019
       * and attaches a <a
4020
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
4021
       * payment method representing the card to the Customer instead.
4022
       *
4023
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
4024
       * with regional legislation and network rules, such as <a
4025
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
4026
       *
4027
       * <p>Equal to {@code none}.
4028
       */
4029
      @SerializedName("setup_future_usage")
4030
      String setupFutureUsage;
4031

4032
      /**
4033
       * For more details about BankTransfer, please refer to the <a
4034
       * href="https://docs.stripe.com/api">API Reference.</a>
4035
       */
4036
      @Getter
4037
      @Setter
4038
      @EqualsAndHashCode(callSuper = false)
4039
      public static class BankTransfer extends StripeObject {
×
4040
        @SerializedName("eu_bank_transfer")
4041
        EuBankTransfer euBankTransfer;
4042

4043
        /**
4044
         * List of address types that should be returned in the financial_addresses response. If not
4045
         * specified, all valid types will be returned.
4046
         *
4047
         * <p>Permitted values include: {@code sort_code}, {@code zengin}, {@code iban}, or {@code
4048
         * spei}.
4049
         */
4050
        @SerializedName("requested_address_types")
4051
        List<String> requestedAddressTypes;
4052

4053
        /**
4054
         * The bank transfer type that this PaymentIntent is allowed to use for funding Permitted
4055
         * values include: {@code eu_bank_transfer}, {@code gb_bank_transfer}, {@code
4056
         * jp_bank_transfer}, {@code mx_bank_transfer}, or {@code us_bank_transfer}.
4057
         *
4058
         * <p>One of {@code eu_bank_transfer}, {@code gb_bank_transfer}, {@code jp_bank_transfer},
4059
         * {@code mx_bank_transfer}, or {@code us_bank_transfer}.
4060
         */
4061
        @SerializedName("type")
4062
        String type;
4063

4064
        /**
4065
         * For more details about EuBankTransfer, please refer to the <a
4066
         * href="https://docs.stripe.com/api">API Reference.</a>
4067
         */
4068
        @Getter
4069
        @Setter
4070
        @EqualsAndHashCode(callSuper = false)
4071
        public static class EuBankTransfer extends StripeObject {
×
4072
          /**
4073
           * The desired country code of the bank account information. Permitted values include:
4074
           * {@code BE}, {@code DE}, {@code ES}, {@code FR}, {@code IE}, or {@code NL}.
4075
           *
4076
           * <p>One of {@code BE}, {@code DE}, {@code ES}, {@code FR}, {@code IE}, or {@code NL}.
4077
           */
4078
          @SerializedName("country")
4079
          String country;
4080
        }
4081
      }
4082
    }
4083

4084
    /**
4085
     * For more details about Eps, please refer to the <a href="https://docs.stripe.com/api">API
4086
     * Reference.</a>
4087
     */
4088
    @Getter
4089
    @Setter
4090
    @EqualsAndHashCode(callSuper = false)
4091
    public static class Eps extends StripeObject {
×
4092
      /**
4093
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
4094
       *
4095
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
4096
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
4097
       * Customer after the PaymentIntent is confirmed and the customer completes any required
4098
       * actions. If you don't provide a Customer, you can still <a
4099
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
4100
       * Customer after the transaction completes.
4101
       *
4102
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
4103
       * and attaches a <a
4104
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
4105
       * payment method representing the card to the Customer instead.
4106
       *
4107
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
4108
       * with regional legislation and network rules, such as <a
4109
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
4110
       *
4111
       * <p>Equal to {@code none}.
4112
       */
4113
      @SerializedName("setup_future_usage")
4114
      String setupFutureUsage;
4115
    }
4116

4117
    /**
4118
     * For more details about Fpx, please refer to the <a href="https://docs.stripe.com/api">API
4119
     * Reference.</a>
4120
     */
4121
    @Getter
4122
    @Setter
4123
    @EqualsAndHashCode(callSuper = false)
4124
    public static class Fpx extends StripeObject {
×
4125
      /**
4126
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
4127
       *
4128
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
4129
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
4130
       * Customer after the PaymentIntent is confirmed and the customer completes any required
4131
       * actions. If you don't provide a Customer, you can still <a
4132
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
4133
       * Customer after the transaction completes.
4134
       *
4135
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
4136
       * and attaches a <a
4137
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
4138
       * payment method representing the card to the Customer instead.
4139
       *
4140
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
4141
       * with regional legislation and network rules, such as <a
4142
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
4143
       *
4144
       * <p>Equal to {@code none}.
4145
       */
4146
      @SerializedName("setup_future_usage")
4147
      String setupFutureUsage;
4148
    }
4149

4150
    /**
4151
     * For more details about Giropay, please refer to the <a href="https://docs.stripe.com/api">API
4152
     * Reference.</a>
4153
     */
4154
    @Getter
4155
    @Setter
4156
    @EqualsAndHashCode(callSuper = false)
4157
    public static class Giropay extends StripeObject {
×
4158
      /**
4159
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
4160
       *
4161
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
4162
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
4163
       * Customer after the PaymentIntent is confirmed and the customer completes any required
4164
       * actions. If you don't provide a Customer, you can still <a
4165
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
4166
       * Customer after the transaction completes.
4167
       *
4168
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
4169
       * and attaches a <a
4170
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
4171
       * payment method representing the card to the Customer instead.
4172
       *
4173
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
4174
       * with regional legislation and network rules, such as <a
4175
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
4176
       *
4177
       * <p>Equal to {@code none}.
4178
       */
4179
      @SerializedName("setup_future_usage")
4180
      String setupFutureUsage;
4181
    }
4182

4183
    /**
4184
     * For more details about Gopay, please refer to the <a href="https://docs.stripe.com/api">API
4185
     * Reference.</a>
4186
     */
4187
    @Getter
4188
    @Setter
4189
    @EqualsAndHashCode(callSuper = false)
NEW
4190
    public static class Gopay extends StripeObject {
×
4191
      /**
4192
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
4193
       *
4194
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
4195
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
4196
       * Customer after the PaymentIntent is confirmed and the customer completes any required
4197
       * actions. If you don't provide a Customer, you can still <a
4198
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
4199
       * Customer after the transaction completes.
4200
       *
4201
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
4202
       * and attaches a <a
4203
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
4204
       * payment method representing the card to the Customer instead.
4205
       *
4206
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
4207
       * with regional legislation and network rules, such as <a
4208
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
4209
       *
4210
       * <p>Equal to {@code none}.
4211
       */
4212
      @SerializedName("setup_future_usage")
4213
      String setupFutureUsage;
4214
    }
4215

4216
    /**
4217
     * For more details about Grabpay, please refer to the <a href="https://docs.stripe.com/api">API
4218
     * Reference.</a>
4219
     */
4220
    @Getter
4221
    @Setter
4222
    @EqualsAndHashCode(callSuper = false)
4223
    public static class Grabpay extends StripeObject {
×
4224
      /**
4225
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
4226
       *
4227
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
4228
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
4229
       * Customer after the PaymentIntent is confirmed and the customer completes any required
4230
       * actions. If you don't provide a Customer, you can still <a
4231
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
4232
       * Customer after the transaction completes.
4233
       *
4234
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
4235
       * and attaches a <a
4236
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
4237
       * payment method representing the card to the Customer instead.
4238
       *
4239
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
4240
       * with regional legislation and network rules, such as <a
4241
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
4242
       *
4243
       * <p>Equal to {@code none}.
4244
       */
4245
      @SerializedName("setup_future_usage")
4246
      String setupFutureUsage;
4247
    }
4248

4249
    /**
4250
     * For more details about Ideal, please refer to the <a href="https://docs.stripe.com/api">API
4251
     * Reference.</a>
4252
     */
4253
    @Getter
4254
    @Setter
4255
    @EqualsAndHashCode(callSuper = false)
4256
    public static class Ideal extends StripeObject {
×
4257
      /**
4258
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
4259
       *
4260
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
4261
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
4262
       * Customer after the PaymentIntent is confirmed and the customer completes any required
4263
       * actions. If you don't provide a Customer, you can still <a
4264
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
4265
       * Customer after the transaction completes.
4266
       *
4267
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
4268
       * and attaches a <a
4269
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
4270
       * payment method representing the card to the Customer instead.
4271
       *
4272
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
4273
       * with regional legislation and network rules, such as <a
4274
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
4275
       *
4276
       * <p>One of {@code none}, or {@code off_session}.
4277
       */
4278
      @SerializedName("setup_future_usage")
4279
      String setupFutureUsage;
4280
    }
4281

4282
    /**
4283
     * For more details about InteracPresent, please refer to the <a
4284
     * href="https://docs.stripe.com/api">API Reference.</a>
4285
     */
4286
    @Getter
4287
    @Setter
4288
    @EqualsAndHashCode(callSuper = false)
4289
    public static class InteracPresent extends StripeObject {}
×
4290

4291
    /**
4292
     * For more details about KakaoPay, please refer to the <a
4293
     * href="https://docs.stripe.com/api">API Reference.</a>
4294
     */
4295
    @Getter
4296
    @Setter
4297
    @EqualsAndHashCode(callSuper = false)
4298
    public static class KakaoPay extends StripeObject {
×
4299
      /**
4300
       * Controls when the funds will be captured from the customer's account.
4301
       *
4302
       * <p>Equal to {@code manual}.
4303
       */
4304
      @SerializedName("capture_method")
4305
      String captureMethod;
4306

4307
      /**
4308
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
4309
       *
4310
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
4311
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
4312
       * Customer after the PaymentIntent is confirmed and the customer completes any required
4313
       * actions. If you don't provide a Customer, you can still <a
4314
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
4315
       * Customer after the transaction completes.
4316
       *
4317
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
4318
       * and attaches a <a
4319
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
4320
       * payment method representing the card to the Customer instead.
4321
       *
4322
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
4323
       * with regional legislation and network rules, such as <a
4324
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
4325
       *
4326
       * <p>One of {@code none}, or {@code off_session}.
4327
       */
4328
      @SerializedName("setup_future_usage")
4329
      String setupFutureUsage;
4330
    }
4331

4332
    /**
4333
     * For more details about Klarna, please refer to the <a href="https://docs.stripe.com/api">API
4334
     * Reference.</a>
4335
     */
4336
    @Getter
4337
    @Setter
4338
    @EqualsAndHashCode(callSuper = false)
4339
    public static class Klarna extends StripeObject {
×
4340
      /**
4341
       * Controls when the funds will be captured from the customer's account.
4342
       *
4343
       * <p>Equal to {@code manual}.
4344
       */
4345
      @SerializedName("capture_method")
4346
      String captureMethod;
4347

4348
      /** Preferred locale of the Klarna checkout page that the customer is redirected to. */
4349
      @SerializedName("preferred_locale")
4350
      String preferredLocale;
4351

4352
      /**
4353
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
4354
       *
4355
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
4356
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
4357
       * Customer after the PaymentIntent is confirmed and the customer completes any required
4358
       * actions. If you don't provide a Customer, you can still <a
4359
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
4360
       * Customer after the transaction completes.
4361
       *
4362
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
4363
       * and attaches a <a
4364
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
4365
       * payment method representing the card to the Customer instead.
4366
       *
4367
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
4368
       * with regional legislation and network rules, such as <a
4369
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
4370
       *
4371
       * <p>Equal to {@code none}.
4372
       */
4373
      @SerializedName("setup_future_usage")
4374
      String setupFutureUsage;
4375
    }
4376

4377
    /**
4378
     * For more details about Konbini, please refer to the <a href="https://docs.stripe.com/api">API
4379
     * Reference.</a>
4380
     */
4381
    @Getter
4382
    @Setter
4383
    @EqualsAndHashCode(callSuper = false)
4384
    public static class Konbini extends StripeObject {
×
4385
      /**
4386
       * An optional 10 to 11 digit numeric-only string determining the confirmation code at
4387
       * applicable convenience stores.
4388
       */
4389
      @SerializedName("confirmation_number")
4390
      String confirmationNumber;
4391

4392
      /**
4393
       * The number of calendar days (between 1 and 60) after which Konbini payment instructions
4394
       * will expire. For example, if a PaymentIntent is confirmed with Konbini and {@code
4395
       * expires_after_days} set to 2 on Monday JST, the instructions will expire on Wednesday
4396
       * 23:59:59 JST.
4397
       */
4398
      @SerializedName("expires_after_days")
4399
      Long expiresAfterDays;
4400

4401
      /**
4402
       * The timestamp at which the Konbini payment instructions will expire. Only one of {@code
4403
       * expires_after_days} or {@code expires_at} may be set.
4404
       */
4405
      @SerializedName("expires_at")
4406
      Long expiresAt;
4407

4408
      /**
4409
       * A product descriptor of up to 22 characters, which will appear to customers at the
4410
       * convenience store.
4411
       */
4412
      @SerializedName("product_description")
4413
      String productDescription;
4414

4415
      /**
4416
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
4417
       *
4418
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
4419
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
4420
       * Customer after the PaymentIntent is confirmed and the customer completes any required
4421
       * actions. If you don't provide a Customer, you can still <a
4422
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
4423
       * Customer after the transaction completes.
4424
       *
4425
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
4426
       * and attaches a <a
4427
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
4428
       * payment method representing the card to the Customer instead.
4429
       *
4430
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
4431
       * with regional legislation and network rules, such as <a
4432
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
4433
       *
4434
       * <p>Equal to {@code none}.
4435
       */
4436
      @SerializedName("setup_future_usage")
4437
      String setupFutureUsage;
4438
    }
4439

4440
    /**
4441
     * For more details about KrCard, please refer to the <a href="https://docs.stripe.com/api">API
4442
     * Reference.</a>
4443
     */
4444
    @Getter
4445
    @Setter
4446
    @EqualsAndHashCode(callSuper = false)
4447
    public static class KrCard extends StripeObject {
×
4448
      /**
4449
       * Controls when the funds will be captured from the customer's account.
4450
       *
4451
       * <p>Equal to {@code manual}.
4452
       */
4453
      @SerializedName("capture_method")
4454
      String captureMethod;
4455

4456
      /**
4457
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
4458
       *
4459
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
4460
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
4461
       * Customer after the PaymentIntent is confirmed and the customer completes any required
4462
       * actions. If you don't provide a Customer, you can still <a
4463
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
4464
       * Customer after the transaction completes.
4465
       *
4466
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
4467
       * and attaches a <a
4468
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
4469
       * payment method representing the card to the Customer instead.
4470
       *
4471
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
4472
       * with regional legislation and network rules, such as <a
4473
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
4474
       *
4475
       * <p>One of {@code none}, or {@code off_session}.
4476
       */
4477
      @SerializedName("setup_future_usage")
4478
      String setupFutureUsage;
4479
    }
4480

4481
    /**
4482
     * For more details about Link, please refer to the <a href="https://docs.stripe.com/api">API
4483
     * Reference.</a>
4484
     */
4485
    @Getter
4486
    @Setter
4487
    @EqualsAndHashCode(callSuper = false)
4488
    public static class Link extends StripeObject {
×
4489
      /**
4490
       * Controls when the funds will be captured from the customer's account.
4491
       *
4492
       * <p>Equal to {@code manual}.
4493
       */
4494
      @SerializedName("capture_method")
4495
      String captureMethod;
4496

4497
      /** [Deprecated] This is a legacy parameter that no longer has any function. */
4498
      @SerializedName("persistent_token")
4499
      @Deprecated
4500
      String persistentToken;
4501

4502
      /**
4503
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
4504
       *
4505
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
4506
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
4507
       * Customer after the PaymentIntent is confirmed and the customer completes any required
4508
       * actions. If you don't provide a Customer, you can still <a
4509
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
4510
       * Customer after the transaction completes.
4511
       *
4512
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
4513
       * and attaches a <a
4514
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
4515
       * payment method representing the card to the Customer instead.
4516
       *
4517
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
4518
       * with regional legislation and network rules, such as <a
4519
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
4520
       *
4521
       * <p>One of {@code none}, or {@code off_session}.
4522
       */
4523
      @SerializedName("setup_future_usage")
4524
      String setupFutureUsage;
4525
    }
4526

4527
    /**
4528
     * For more details about MbWay, please refer to the <a href="https://docs.stripe.com/api">API
4529
     * Reference.</a>
4530
     */
4531
    @Getter
4532
    @Setter
4533
    @EqualsAndHashCode(callSuper = false)
4534
    public static class MbWay extends StripeObject {
×
4535
      /**
4536
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
4537
       *
4538
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
4539
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
4540
       * Customer after the PaymentIntent is confirmed and the customer completes any required
4541
       * actions. If you don't provide a Customer, you can still <a
4542
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
4543
       * Customer after the transaction completes.
4544
       *
4545
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
4546
       * and attaches a <a
4547
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
4548
       * payment method representing the card to the Customer instead.
4549
       *
4550
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
4551
       * with regional legislation and network rules, such as <a
4552
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
4553
       *
4554
       * <p>Equal to {@code none}.
4555
       */
4556
      @SerializedName("setup_future_usage")
4557
      String setupFutureUsage;
4558
    }
4559

4560
    /**
4561
     * For more details about Mobilepay, please refer to the <a
4562
     * href="https://docs.stripe.com/api">API Reference.</a>
4563
     */
4564
    @Getter
4565
    @Setter
4566
    @EqualsAndHashCode(callSuper = false)
4567
    public static class Mobilepay extends StripeObject {
×
4568
      /**
4569
       * Controls when the funds will be captured from the customer's account.
4570
       *
4571
       * <p>Equal to {@code manual}.
4572
       */
4573
      @SerializedName("capture_method")
4574
      String captureMethod;
4575

4576
      /**
4577
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
4578
       *
4579
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
4580
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
4581
       * Customer after the PaymentIntent is confirmed and the customer completes any required
4582
       * actions. If you don't provide a Customer, you can still <a
4583
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
4584
       * Customer after the transaction completes.
4585
       *
4586
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
4587
       * and attaches a <a
4588
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
4589
       * payment method representing the card to the Customer instead.
4590
       *
4591
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
4592
       * with regional legislation and network rules, such as <a
4593
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
4594
       *
4595
       * <p>Equal to {@code none}.
4596
       */
4597
      @SerializedName("setup_future_usage")
4598
      String setupFutureUsage;
4599
    }
4600

4601
    /**
4602
     * For more details about Multibanco, please refer to the <a
4603
     * href="https://docs.stripe.com/api">API Reference.</a>
4604
     */
4605
    @Getter
4606
    @Setter
4607
    @EqualsAndHashCode(callSuper = false)
4608
    public static class Multibanco extends StripeObject {
×
4609
      /**
4610
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
4611
       *
4612
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
4613
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
4614
       * Customer after the PaymentIntent is confirmed and the customer completes any required
4615
       * actions. If you don't provide a Customer, you can still <a
4616
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
4617
       * Customer after the transaction completes.
4618
       *
4619
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
4620
       * and attaches a <a
4621
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
4622
       * payment method representing the card to the Customer instead.
4623
       *
4624
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
4625
       * with regional legislation and network rules, such as <a
4626
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
4627
       *
4628
       * <p>Equal to {@code none}.
4629
       */
4630
      @SerializedName("setup_future_usage")
4631
      String setupFutureUsage;
4632
    }
4633

4634
    /**
4635
     * For more details about NaverPay, please refer to the <a
4636
     * href="https://docs.stripe.com/api">API Reference.</a>
4637
     */
4638
    @Getter
4639
    @Setter
4640
    @EqualsAndHashCode(callSuper = false)
4641
    public static class NaverPay extends StripeObject {
×
4642
      /**
4643
       * Controls when the funds will be captured from the customer's account.
4644
       *
4645
       * <p>Equal to {@code manual}.
4646
       */
4647
      @SerializedName("capture_method")
4648
      String captureMethod;
4649
    }
4650

4651
    /**
4652
     * For more details about Oxxo, please refer to the <a href="https://docs.stripe.com/api">API
4653
     * Reference.</a>
4654
     */
4655
    @Getter
4656
    @Setter
4657
    @EqualsAndHashCode(callSuper = false)
4658
    public static class Oxxo extends StripeObject {
×
4659
      /**
4660
       * The number of calendar days before an OXXO invoice expires. For example, if you create an
4661
       * OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on
4662
       * Wednesday at 23:59 America/Mexico_City time.
4663
       */
4664
      @SerializedName("expires_after_days")
4665
      Long expiresAfterDays;
4666

4667
      /**
4668
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
4669
       *
4670
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
4671
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
4672
       * Customer after the PaymentIntent is confirmed and the customer completes any required
4673
       * actions. If you don't provide a Customer, you can still <a
4674
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
4675
       * Customer after the transaction completes.
4676
       *
4677
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
4678
       * and attaches a <a
4679
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
4680
       * payment method representing the card to the Customer instead.
4681
       *
4682
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
4683
       * with regional legislation and network rules, such as <a
4684
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
4685
       *
4686
       * <p>Equal to {@code none}.
4687
       */
4688
      @SerializedName("setup_future_usage")
4689
      String setupFutureUsage;
4690
    }
4691

4692
    /**
4693
     * For more details about P24, please refer to the <a href="https://docs.stripe.com/api">API
4694
     * Reference.</a>
4695
     */
4696
    @Getter
4697
    @Setter
4698
    @EqualsAndHashCode(callSuper = false)
4699
    public static class P24 extends StripeObject {
×
4700
      /**
4701
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
4702
       *
4703
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
4704
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
4705
       * Customer after the PaymentIntent is confirmed and the customer completes any required
4706
       * actions. If you don't provide a Customer, you can still <a
4707
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
4708
       * Customer after the transaction completes.
4709
       *
4710
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
4711
       * and attaches a <a
4712
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
4713
       * payment method representing the card to the Customer instead.
4714
       *
4715
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
4716
       * with regional legislation and network rules, such as <a
4717
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
4718
       *
4719
       * <p>Equal to {@code none}.
4720
       */
4721
      @SerializedName("setup_future_usage")
4722
      String setupFutureUsage;
4723
    }
4724

4725
    /**
4726
     * For more details about Payco, please refer to the <a href="https://docs.stripe.com/api">API
4727
     * Reference.</a>
4728
     */
4729
    @Getter
4730
    @Setter
4731
    @EqualsAndHashCode(callSuper = false)
4732
    public static class Payco extends StripeObject {
×
4733
      /**
4734
       * Controls when the funds will be captured from the customer's account.
4735
       *
4736
       * <p>Equal to {@code manual}.
4737
       */
4738
      @SerializedName("capture_method")
4739
      String captureMethod;
4740
    }
4741

4742
    /**
4743
     * For more details about Paynow, please refer to the <a href="https://docs.stripe.com/api">API
4744
     * Reference.</a>
4745
     */
4746
    @Getter
4747
    @Setter
4748
    @EqualsAndHashCode(callSuper = false)
4749
    public static class Paynow extends StripeObject {
×
4750
      /**
4751
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
4752
       *
4753
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
4754
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
4755
       * Customer after the PaymentIntent is confirmed and the customer completes any required
4756
       * actions. If you don't provide a Customer, you can still <a
4757
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
4758
       * Customer after the transaction completes.
4759
       *
4760
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
4761
       * and attaches a <a
4762
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
4763
       * payment method representing the card to the Customer instead.
4764
       *
4765
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
4766
       * with regional legislation and network rules, such as <a
4767
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
4768
       *
4769
       * <p>Equal to {@code none}.
4770
       */
4771
      @SerializedName("setup_future_usage")
4772
      String setupFutureUsage;
4773
    }
4774

4775
    /**
4776
     * For more details about Paypal, please refer to the <a href="https://docs.stripe.com/api">API
4777
     * Reference.</a>
4778
     */
4779
    @Getter
4780
    @Setter
4781
    @EqualsAndHashCode(callSuper = false)
4782
    public static class Paypal extends StripeObject {
×
4783
      /**
4784
       * Controls when the funds will be captured from the customer's account.
4785
       *
4786
       * <p>Equal to {@code manual}.
4787
       */
4788
      @SerializedName("capture_method")
4789
      String captureMethod;
4790

4791
      /** The line items purchased by the customer. */
4792
      @SerializedName("line_items")
4793
      List<PaymentIntent.PaymentMethodOptions.Paypal.LineItem> lineItems;
4794

4795
      /** Preferred locale of the PayPal checkout page that the customer is redirected to. */
4796
      @SerializedName("preferred_locale")
4797
      String preferredLocale;
4798

4799
      /**
4800
       * A reference of the PayPal transaction visible to customer which is mapped to PayPal's
4801
       * invoice ID. This must be a globally unique ID if you have configured in your PayPal
4802
       * settings to block multiple payments per invoice ID.
4803
       */
4804
      @SerializedName("reference")
4805
      String reference;
4806

4807
      /**
4808
       * A reference of the PayPal transaction visible to customer which is mapped to PayPal's
4809
       * invoice ID. This must be a globally unique ID if you have configured in your PayPal
4810
       * settings to block multiple payments per invoice ID.
4811
       */
4812
      @SerializedName("reference_id")
4813
      String referenceId;
4814

4815
      /**
4816
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
4817
       *
4818
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
4819
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
4820
       * Customer after the PaymentIntent is confirmed and the customer completes any required
4821
       * actions. If you don't provide a Customer, you can still <a
4822
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
4823
       * Customer after the transaction completes.
4824
       *
4825
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
4826
       * and attaches a <a
4827
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
4828
       * payment method representing the card to the Customer instead.
4829
       *
4830
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
4831
       * with regional legislation and network rules, such as <a
4832
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
4833
       *
4834
       * <p>One of {@code none}, or {@code off_session}.
4835
       */
4836
      @SerializedName("setup_future_usage")
4837
      String setupFutureUsage;
4838

4839
      /**
4840
       * The Stripe connected account IDs of the sellers on the platform for this transaction
4841
       * (optional). Only allowed when <a
4842
       * href="https://stripe.com/docs/connect/separate-charges-and-transfers">separate charges and
4843
       * transfers</a> are used.
4844
       */
4845
      @SerializedName("subsellers")
4846
      List<String> subsellers;
4847

4848
      /**
4849
       * For more details about LineItem, please refer to the <a
4850
       * href="https://docs.stripe.com/api">API Reference.</a>
4851
       */
4852
      @Getter
4853
      @Setter
4854
      @EqualsAndHashCode(callSuper = false)
4855
      public static class LineItem extends StripeObject {
×
4856
        /**
4857
         * Type of the line item.
4858
         *
4859
         * <p>One of {@code digital_goods}, {@code donation}, or {@code physical_goods}.
4860
         */
4861
        @SerializedName("category")
4862
        String category;
4863

4864
        /** Description of the line item. */
4865
        @SerializedName("description")
4866
        String description;
4867

4868
        /** Descriptive name of the line item. */
4869
        @SerializedName("name")
4870
        String name;
4871

4872
        /** Quantity of the line item. Cannot be a negative number. */
4873
        @SerializedName("quantity")
4874
        Long quantity;
4875

4876
        /** Client facing stock keeping unit, article number or similar. */
4877
        @SerializedName("sku")
4878
        String sku;
4879

4880
        /**
4881
         * The Stripe account ID of the connected account that sells the item. This is only needed
4882
         * when using <a
4883
         * href="https://docs.stripe.com/connect/separate-charges-and-transfers">Separate Charges
4884
         * and Transfers</a>.
4885
         */
4886
        @SerializedName("sold_by")
4887
        String soldBy;
4888

4889
        @SerializedName("tax")
4890
        Tax tax;
4891

4892
        /** Price for a single unit of the line item in minor units. Cannot be a negative number. */
4893
        @SerializedName("unit_amount")
4894
        Long unitAmount;
4895

4896
        /**
4897
         * For more details about Tax, please refer to the <a href="https://docs.stripe.com/api">API
4898
         * Reference.</a>
4899
         */
4900
        @Getter
4901
        @Setter
4902
        @EqualsAndHashCode(callSuper = false)
4903
        public static class Tax extends StripeObject {
×
4904
          /**
4905
           * The tax for a single unit of the line item in minor units. Cannot be a negative number.
4906
           */
4907
          @SerializedName("amount")
4908
          Long amount;
4909

4910
          /**
4911
           * The tax behavior for the line item.
4912
           *
4913
           * <p>One of {@code exclusive}, or {@code inclusive}.
4914
           */
4915
          @SerializedName("behavior")
4916
          String behavior;
4917
        }
4918
      }
4919
    }
4920

4921
    /**
4922
     * For more details about Payto, please refer to the <a href="https://docs.stripe.com/api">API
4923
     * Reference.</a>
4924
     */
4925
    @Getter
4926
    @Setter
4927
    @EqualsAndHashCode(callSuper = false)
4928
    public static class Payto extends StripeObject {
×
4929
      @SerializedName("mandate_options")
4930
      MandateOptions mandateOptions;
4931

4932
      /**
4933
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
4934
       *
4935
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
4936
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
4937
       * Customer after the PaymentIntent is confirmed and the customer completes any required
4938
       * actions. If you don't provide a Customer, you can still <a
4939
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
4940
       * Customer after the transaction completes.
4941
       *
4942
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
4943
       * and attaches a <a
4944
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
4945
       * payment method representing the card to the Customer instead.
4946
       *
4947
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
4948
       * with regional legislation and network rules, such as <a
4949
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
4950
       *
4951
       * <p>One of {@code none}, or {@code off_session}.
4952
       */
4953
      @SerializedName("setup_future_usage")
4954
      String setupFutureUsage;
4955

4956
      /**
4957
       * For more details about MandateOptions, please refer to the <a
4958
       * href="https://docs.stripe.com/api">API Reference.</a>
4959
       */
4960
      @Getter
4961
      @Setter
4962
      @EqualsAndHashCode(callSuper = false)
4963
      public static class MandateOptions extends StripeObject {
×
4964
        /**
4965
         * Amount that will be collected. It is required when {@code amount_type} is {@code fixed}.
4966
         */
4967
        @SerializedName("amount")
4968
        Long amount;
4969

4970
        /**
4971
         * The type of amount that will be collected. The amount charged must be exact or up to the
4972
         * value of {@code amount} param for {@code fixed} or {@code maximum} type respectively.
4973
         *
4974
         * <p>One of {@code fixed}, or {@code maximum}.
4975
         */
4976
        @SerializedName("amount_type")
4977
        String amountType;
4978

4979
        /**
4980
         * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no
4981
         * end date.
4982
         */
4983
        @SerializedName("end_date")
4984
        String endDate;
4985

4986
        /**
4987
         * The periodicity at which payments will be collected.
4988
         *
4989
         * <p>One of {@code adhoc}, {@code annual}, {@code daily}, {@code fortnightly}, {@code
4990
         * monthly}, {@code quarterly}, {@code semi_annual}, or {@code weekly}.
4991
         */
4992
        @SerializedName("payment_schedule")
4993
        String paymentSchedule;
4994

4995
        /**
4996
         * The number of payments that will be made during a payment period. Defaults to 1 except
4997
         * for when {@code payment_schedule} is {@code adhoc}. In that case, it defaults to no
4998
         * limit.
4999
         */
5000
        @SerializedName("payments_per_period")
5001
        Long paymentsPerPeriod;
5002

5003
        /**
5004
         * The purpose for which payments are made. Defaults to retail.
5005
         *
5006
         * <p>One of {@code dependant_support}, {@code government}, {@code loan}, {@code mortgage},
5007
         * {@code other}, {@code pension}, {@code personal}, {@code retail}, {@code salary}, {@code
5008
         * tax}, or {@code utility}.
5009
         */
5010
        @SerializedName("purpose")
5011
        String purpose;
5012
      }
5013
    }
5014

5015
    /**
5016
     * For more details about Pix, please refer to the <a href="https://docs.stripe.com/api">API
5017
     * Reference.</a>
5018
     */
5019
    @Getter
5020
    @Setter
5021
    @EqualsAndHashCode(callSuper = false)
5022
    public static class Pix extends StripeObject {
×
5023
      /** The number of seconds (between 10 and 1209600) after which Pix payment will expire. */
5024
      @SerializedName("expires_after_seconds")
5025
      Long expiresAfterSeconds;
5026

5027
      /** The timestamp at which the Pix expires. */
5028
      @SerializedName("expires_at")
5029
      Long expiresAt;
5030

5031
      /**
5032
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
5033
       *
5034
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
5035
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
5036
       * Customer after the PaymentIntent is confirmed and the customer completes any required
5037
       * actions. If you don't provide a Customer, you can still <a
5038
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
5039
       * Customer after the transaction completes.
5040
       *
5041
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
5042
       * and attaches a <a
5043
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
5044
       * payment method representing the card to the Customer instead.
5045
       *
5046
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
5047
       * with regional legislation and network rules, such as <a
5048
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
5049
       *
5050
       * <p>Equal to {@code none}.
5051
       */
5052
      @SerializedName("setup_future_usage")
5053
      String setupFutureUsage;
5054
    }
5055

5056
    /**
5057
     * For more details about Promptpay, please refer to the <a
5058
     * href="https://docs.stripe.com/api">API Reference.</a>
5059
     */
5060
    @Getter
5061
    @Setter
5062
    @EqualsAndHashCode(callSuper = false)
5063
    public static class Promptpay extends StripeObject {
×
5064
      /**
5065
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
5066
       *
5067
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
5068
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
5069
       * Customer after the PaymentIntent is confirmed and the customer completes any required
5070
       * actions. If you don't provide a Customer, you can still <a
5071
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
5072
       * Customer after the transaction completes.
5073
       *
5074
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
5075
       * and attaches a <a
5076
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
5077
       * payment method representing the card to the Customer instead.
5078
       *
5079
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
5080
       * with regional legislation and network rules, such as <a
5081
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
5082
       *
5083
       * <p>Equal to {@code none}.
5084
       */
5085
      @SerializedName("setup_future_usage")
5086
      String setupFutureUsage;
5087
    }
5088

5089
    /**
5090
     * For more details about Qris, please refer to the <a href="https://docs.stripe.com/api">API
5091
     * Reference.</a>
5092
     */
5093
    @Getter
5094
    @Setter
5095
    @EqualsAndHashCode(callSuper = false)
NEW
5096
    public static class Qris extends StripeObject {
×
5097
      /**
5098
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
5099
       *
5100
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
5101
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
5102
       * Customer after the PaymentIntent is confirmed and the customer completes any required
5103
       * actions. If you don't provide a Customer, you can still <a
5104
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
5105
       * Customer after the transaction completes.
5106
       *
5107
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
5108
       * and attaches a <a
5109
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
5110
       * payment method representing the card to the Customer instead.
5111
       *
5112
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
5113
       * with regional legislation and network rules, such as <a
5114
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
5115
       *
5116
       * <p>Equal to {@code none}.
5117
       */
5118
      @SerializedName("setup_future_usage")
5119
      String setupFutureUsage;
5120
    }
5121

5122
    /**
5123
     * For more details about Rechnung, please refer to the <a
5124
     * href="https://docs.stripe.com/api">API Reference.</a>
5125
     */
5126
    @Getter
5127
    @Setter
5128
    @EqualsAndHashCode(callSuper = false)
5129
    public static class Rechnung extends StripeObject {}
×
5130

5131
    /**
5132
     * For more details about RevolutPay, please refer to the <a
5133
     * href="https://docs.stripe.com/api">API Reference.</a>
5134
     */
5135
    @Getter
5136
    @Setter
5137
    @EqualsAndHashCode(callSuper = false)
5138
    public static class RevolutPay extends StripeObject {
×
5139
      /**
5140
       * Controls when the funds will be captured from the customer's account.
5141
       *
5142
       * <p>Equal to {@code manual}.
5143
       */
5144
      @SerializedName("capture_method")
5145
      String captureMethod;
5146

5147
      /**
5148
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
5149
       *
5150
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
5151
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
5152
       * Customer after the PaymentIntent is confirmed and the customer completes any required
5153
       * actions. If you don't provide a Customer, you can still <a
5154
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
5155
       * Customer after the transaction completes.
5156
       *
5157
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
5158
       * and attaches a <a
5159
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
5160
       * payment method representing the card to the Customer instead.
5161
       *
5162
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
5163
       * with regional legislation and network rules, such as <a
5164
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
5165
       *
5166
       * <p>One of {@code none}, or {@code off_session}.
5167
       */
5168
      @SerializedName("setup_future_usage")
5169
      String setupFutureUsage;
5170
    }
5171

5172
    /**
5173
     * For more details about SamsungPay, please refer to the <a
5174
     * href="https://docs.stripe.com/api">API Reference.</a>
5175
     */
5176
    @Getter
5177
    @Setter
5178
    @EqualsAndHashCode(callSuper = false)
5179
    public static class SamsungPay extends StripeObject {
×
5180
      /**
5181
       * Controls when the funds will be captured from the customer's account.
5182
       *
5183
       * <p>Equal to {@code manual}.
5184
       */
5185
      @SerializedName("capture_method")
5186
      String captureMethod;
5187
    }
5188

5189
    /**
5190
     * For more details about SepaDebit, please refer to the <a
5191
     * href="https://docs.stripe.com/api">API Reference.</a>
5192
     */
5193
    @Getter
5194
    @Setter
5195
    @EqualsAndHashCode(callSuper = false)
5196
    public static class SepaDebit extends StripeObject {
×
5197
      @SerializedName("mandate_options")
5198
      MandateOptions mandateOptions;
5199

5200
      /**
5201
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
5202
       *
5203
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
5204
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
5205
       * Customer after the PaymentIntent is confirmed and the customer completes any required
5206
       * actions. If you don't provide a Customer, you can still <a
5207
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
5208
       * Customer after the transaction completes.
5209
       *
5210
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
5211
       * and attaches a <a
5212
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
5213
       * payment method representing the card to the Customer instead.
5214
       *
5215
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
5216
       * with regional legislation and network rules, such as <a
5217
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
5218
       *
5219
       * <p>One of {@code none}, {@code off_session}, or {@code on_session}.
5220
       */
5221
      @SerializedName("setup_future_usage")
5222
      String setupFutureUsage;
5223

5224
      /**
5225
       * For more details about MandateOptions, please refer to the <a
5226
       * href="https://docs.stripe.com/api">API Reference.</a>
5227
       */
5228
      @Getter
5229
      @Setter
5230
      @EqualsAndHashCode(callSuper = false)
5231
      public static class MandateOptions extends StripeObject {}
×
5232
    }
5233

5234
    /**
5235
     * For more details about Shopeepay, please refer to the <a
5236
     * href="https://docs.stripe.com/api">API Reference.</a>
5237
     */
5238
    @Getter
5239
    @Setter
5240
    @EqualsAndHashCode(callSuper = false)
NEW
5241
    public static class Shopeepay extends StripeObject {
×
5242
      /**
5243
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
5244
       *
5245
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
5246
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
5247
       * Customer after the PaymentIntent is confirmed and the customer completes any required
5248
       * actions. If you don't provide a Customer, you can still <a
5249
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
5250
       * Customer after the transaction completes.
5251
       *
5252
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
5253
       * and attaches a <a
5254
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
5255
       * payment method representing the card to the Customer instead.
5256
       *
5257
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
5258
       * with regional legislation and network rules, such as <a
5259
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
5260
       *
5261
       * <p>Equal to {@code none}.
5262
       */
5263
      @SerializedName("setup_future_usage")
5264
      String setupFutureUsage;
5265
    }
5266

5267
    /**
5268
     * For more details about Sofort, please refer to the <a href="https://docs.stripe.com/api">API
5269
     * Reference.</a>
5270
     */
5271
    @Getter
5272
    @Setter
5273
    @EqualsAndHashCode(callSuper = false)
5274
    public static class Sofort extends StripeObject {
×
5275
      /**
5276
       * Preferred language of the SOFORT authorization page that the customer is redirected to.
5277
       *
5278
       * <p>One of {@code de}, {@code en}, {@code es}, {@code fr}, {@code it}, {@code nl}, or {@code
5279
       * pl}.
5280
       */
5281
      @SerializedName("preferred_language")
5282
      String preferredLanguage;
5283

5284
      /**
5285
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
5286
       *
5287
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
5288
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
5289
       * Customer after the PaymentIntent is confirmed and the customer completes any required
5290
       * actions. If you don't provide a Customer, you can still <a
5291
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
5292
       * Customer after the transaction completes.
5293
       *
5294
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
5295
       * and attaches a <a
5296
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
5297
       * payment method representing the card to the Customer instead.
5298
       *
5299
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
5300
       * with regional legislation and network rules, such as <a
5301
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
5302
       *
5303
       * <p>One of {@code none}, or {@code off_session}.
5304
       */
5305
      @SerializedName("setup_future_usage")
5306
      String setupFutureUsage;
5307
    }
5308

5309
    /**
5310
     * For more details about Swish, please refer to the <a href="https://docs.stripe.com/api">API
5311
     * Reference.</a>
5312
     */
5313
    @Getter
5314
    @Setter
5315
    @EqualsAndHashCode(callSuper = false)
5316
    public static class Swish extends StripeObject {
×
5317
      /** The order ID displayed in the Swish app after the payment is authorized. */
5318
      @SerializedName("reference")
5319
      String reference;
5320

5321
      /**
5322
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
5323
       *
5324
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
5325
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
5326
       * Customer after the PaymentIntent is confirmed and the customer completes any required
5327
       * actions. If you don't provide a Customer, you can still <a
5328
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
5329
       * Customer after the transaction completes.
5330
       *
5331
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
5332
       * and attaches a <a
5333
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
5334
       * payment method representing the card to the Customer instead.
5335
       *
5336
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
5337
       * with regional legislation and network rules, such as <a
5338
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
5339
       *
5340
       * <p>Equal to {@code none}.
5341
       */
5342
      @SerializedName("setup_future_usage")
5343
      String setupFutureUsage;
5344
    }
5345

5346
    /**
5347
     * For more details about Twint, please refer to the <a href="https://docs.stripe.com/api">API
5348
     * Reference.</a>
5349
     */
5350
    @Getter
5351
    @Setter
5352
    @EqualsAndHashCode(callSuper = false)
5353
    public static class Twint extends StripeObject {
×
5354
      /**
5355
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
5356
       *
5357
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
5358
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
5359
       * Customer after the PaymentIntent is confirmed and the customer completes any required
5360
       * actions. If you don't provide a Customer, you can still <a
5361
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
5362
       * Customer after the transaction completes.
5363
       *
5364
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
5365
       * and attaches a <a
5366
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
5367
       * payment method representing the card to the Customer instead.
5368
       *
5369
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
5370
       * with regional legislation and network rules, such as <a
5371
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
5372
       *
5373
       * <p>Equal to {@code none}.
5374
       */
5375
      @SerializedName("setup_future_usage")
5376
      String setupFutureUsage;
5377
    }
5378

5379
    /**
5380
     * For more details about UsBankAccount, please refer to the <a
5381
     * href="https://docs.stripe.com/api">API Reference.</a>
5382
     */
5383
    @Getter
5384
    @Setter
5385
    @EqualsAndHashCode(callSuper = false)
5386
    public static class UsBankAccount extends StripeObject {
×
5387
      @SerializedName("financial_connections")
5388
      FinancialConnections financialConnections;
5389

5390
      @SerializedName("mandate_options")
5391
      MandateOptions mandateOptions;
5392

5393
      /**
5394
       * Preferred transaction settlement speed
5395
       *
5396
       * <p>One of {@code fastest}, or {@code standard}.
5397
       */
5398
      @SerializedName("preferred_settlement_speed")
5399
      String preferredSettlementSpeed;
5400

5401
      /**
5402
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
5403
       *
5404
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
5405
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
5406
       * Customer after the PaymentIntent is confirmed and the customer completes any required
5407
       * actions. If you don't provide a Customer, you can still <a
5408
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
5409
       * Customer after the transaction completes.
5410
       *
5411
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
5412
       * and attaches a <a
5413
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
5414
       * payment method representing the card to the Customer instead.
5415
       *
5416
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
5417
       * with regional legislation and network rules, such as <a
5418
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
5419
       *
5420
       * <p>One of {@code none}, {@code off_session}, or {@code on_session}.
5421
       */
5422
      @SerializedName("setup_future_usage")
5423
      String setupFutureUsage;
5424

5425
      /**
5426
       * Bank account verification method.
5427
       *
5428
       * <p>One of {@code automatic}, {@code instant}, or {@code microdeposits}.
5429
       */
5430
      @SerializedName("verification_method")
5431
      String verificationMethod;
5432

5433
      /**
5434
       * For more details about FinancialConnections, please refer to the <a
5435
       * href="https://docs.stripe.com/api">API Reference.</a>
5436
       */
5437
      @Getter
5438
      @Setter
5439
      @EqualsAndHashCode(callSuper = false)
5440
      public static class FinancialConnections extends StripeObject {
×
5441
        @SerializedName("filters")
5442
        Filters filters;
5443

5444
        @SerializedName("manual_entry")
5445
        ManualEntry manualEntry;
5446

5447
        /**
5448
         * The list of permissions to request. The {@code payment_method} permission must be
5449
         * included.
5450
         */
5451
        @SerializedName("permissions")
5452
        List<String> permissions;
5453

5454
        /** Data features requested to be retrieved upon account creation. */
5455
        @SerializedName("prefetch")
5456
        List<String> prefetch;
5457

5458
        /**
5459
         * For webview integrations only. Upon completing OAuth login in the native browser, the
5460
         * user will be redirected to this URL to return to your app.
5461
         */
5462
        @SerializedName("return_url")
5463
        String returnUrl;
5464

5465
        /**
5466
         * For more details about Filters, please refer to the <a
5467
         * href="https://docs.stripe.com/api">API Reference.</a>
5468
         */
5469
        @Getter
5470
        @Setter
5471
        @EqualsAndHashCode(callSuper = false)
5472
        public static class Filters extends StripeObject {
×
5473
          /**
5474
           * The account subcategories to use to filter for possible accounts to link. Valid
5475
           * subcategories are {@code checking} and {@code savings}.
5476
           */
5477
          @SerializedName("account_subcategories")
5478
          List<String> accountSubcategories;
5479

5480
          /** The institution to use to filter for possible accounts to link. */
5481
          @SerializedName("institution")
5482
          String institution;
5483
        }
5484

5485
        /**
5486
         * For more details about ManualEntry, please refer to the <a
5487
         * href="https://docs.stripe.com/api">API Reference.</a>
5488
         */
5489
        @Getter
5490
        @Setter
5491
        @EqualsAndHashCode(callSuper = false)
5492
        public static class ManualEntry extends StripeObject {
×
5493
          /**
5494
           * Settings for configuring manual entry of account details.
5495
           *
5496
           * <p>One of {@code automatic}, or {@code custom}.
5497
           */
5498
          @SerializedName("mode")
5499
          String mode;
5500
        }
5501
      }
5502

5503
      /**
5504
       * For more details about MandateOptions, please refer to the <a
5505
       * href="https://docs.stripe.com/api">API Reference.</a>
5506
       */
5507
      @Getter
5508
      @Setter
5509
      @EqualsAndHashCode(callSuper = false)
5510
      public static class MandateOptions extends StripeObject {
×
5511
        /**
5512
         * Mandate collection method
5513
         *
5514
         * <p>Equal to {@code paper}.
5515
         */
5516
        @SerializedName("collection_method")
5517
        String collectionMethod;
5518
      }
5519
    }
5520

5521
    /**
5522
     * For more details about WechatPay, please refer to the <a
5523
     * href="https://docs.stripe.com/api">API Reference.</a>
5524
     */
5525
    @Getter
5526
    @Setter
5527
    @EqualsAndHashCode(callSuper = false)
5528
    public static class WechatPay extends StripeObject {
×
5529
      /** The app ID registered with WeChat Pay. Only required when client is ios or android. */
5530
      @SerializedName("app_id")
5531
      String appId;
5532

5533
      /**
5534
       * The client type that the end customer will pay from
5535
       *
5536
       * <p>One of {@code android}, {@code ios}, or {@code web}.
5537
       */
5538
      @SerializedName("client")
5539
      String client;
5540

5541
      /**
5542
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
5543
       *
5544
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
5545
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
5546
       * Customer after the PaymentIntent is confirmed and the customer completes any required
5547
       * actions. If you don't provide a Customer, you can still <a
5548
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
5549
       * Customer after the transaction completes.
5550
       *
5551
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
5552
       * and attaches a <a
5553
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
5554
       * payment method representing the card to the Customer instead.
5555
       *
5556
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
5557
       * with regional legislation and network rules, such as <a
5558
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
5559
       *
5560
       * <p>Equal to {@code none}.
5561
       */
5562
      @SerializedName("setup_future_usage")
5563
      String setupFutureUsage;
5564
    }
5565

5566
    /**
5567
     * For more details about Zip, please refer to the <a href="https://docs.stripe.com/api">API
5568
     * Reference.</a>
5569
     */
5570
    @Getter
5571
    @Setter
5572
    @EqualsAndHashCode(callSuper = false)
5573
    public static class Zip extends StripeObject {
×
5574
      /**
5575
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
5576
       *
5577
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
5578
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
5579
       * Customer after the PaymentIntent is confirmed and the customer completes any required
5580
       * actions. If you don't provide a Customer, you can still <a
5581
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
5582
       * Customer after the transaction completes.
5583
       *
5584
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
5585
       * and attaches a <a
5586
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
5587
       * payment method representing the card to the Customer instead.
5588
       *
5589
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
5590
       * with regional legislation and network rules, such as <a
5591
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
5592
       *
5593
       * <p>Equal to {@code none}.
5594
       */
5595
      @SerializedName("setup_future_usage")
5596
      String setupFutureUsage;
5597
    }
5598
  }
5599

5600
  /**
5601
   * For more details about Processing, please refer to the <a
5602
   * href="https://docs.stripe.com/api">API Reference.</a>
5603
   */
5604
  @Getter
5605
  @Setter
5606
  @EqualsAndHashCode(callSuper = false)
5607
  public static class Processing extends StripeObject {
×
5608
    @SerializedName("card")
5609
    Card card;
5610

5611
    /**
5612
     * Type of the payment method for which payment is in {@code processing} state, one of {@code
5613
     * card}.
5614
     */
5615
    @SerializedName("type")
5616
    String type;
5617

5618
    /**
5619
     * For more details about Card, please refer to the <a href="https://docs.stripe.com/api">API
5620
     * Reference.</a>
5621
     */
5622
    @Getter
5623
    @Setter
5624
    @EqualsAndHashCode(callSuper = false)
5625
    public static class Card extends StripeObject {
×
5626
      @SerializedName("customer_notification")
5627
      CustomerNotification customerNotification;
5628

5629
      /**
5630
       * For more details about CustomerNotification, please refer to the <a
5631
       * href="https://docs.stripe.com/api">API Reference.</a>
5632
       */
5633
      @Getter
5634
      @Setter
5635
      @EqualsAndHashCode(callSuper = false)
5636
      public static class CustomerNotification extends StripeObject {
×
5637
        /**
5638
         * Whether customer approval has been requested for this payment. For payments greater than
5639
         * INR 15000 or mandate amount, the customer must provide explicit approval of the payment
5640
         * with their bank.
5641
         */
5642
        @SerializedName("approval_requested")
5643
        Boolean approvalRequested;
5644

5645
        /** If customer approval is required, they need to provide approval before this time. */
5646
        @SerializedName("completes_at")
5647
        Long completesAt;
5648
      }
5649
    }
5650
  }
5651

5652
  /**
5653
   * For more details about TransferData, please refer to the <a
5654
   * href="https://docs.stripe.com/api">API Reference.</a>
5655
   */
5656
  @Getter
5657
  @Setter
5658
  @EqualsAndHashCode(callSuper = false)
5659
  public static class TransferData extends StripeObject {
1✔
5660
    /**
5661
     * Amount intended to be collected by this PaymentIntent. A positive integer representing how
5662
     * much to charge in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest
5663
     * currency unit</a> (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal
5664
     * currency). The minimum amount is $0.50 US or <a
5665
     * href="https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts">equivalent in
5666
     * charge currency</a>. The amount value supports up to eight digits (e.g., a value of 99999999
5667
     * for a USD charge of $999,999.99).
5668
     */
5669
    @SerializedName("amount")
5670
    Long amount;
5671

5672
    /**
5673
     * The account (if any) that the payment is attributed to for tax reporting, and where funds
5674
     * from the payment are transferred to after payment success.
5675
     */
5676
    @SerializedName("destination")
5677
    @Getter(lombok.AccessLevel.NONE)
5678
    @Setter(lombok.AccessLevel.NONE)
5679
    ExpandableField<Account> destination;
5680

5681
    /** Get ID of expandable {@code destination} object. */
5682
    public String getDestination() {
5683
      return (this.destination != null) ? this.destination.getId() : null;
1✔
5684
    }
5685

5686
    public void setDestination(String id) {
5687
      this.destination = ApiResource.setExpandableFieldId(id, this.destination);
×
5688
    }
×
5689

5690
    /** Get expanded {@code destination}. */
5691
    public Account getDestinationObject() {
5692
      return (this.destination != null) ? this.destination.getExpanded() : null;
1✔
5693
    }
5694

5695
    public void setDestinationObject(Account expandableObject) {
5696
      this.destination = new ExpandableField<Account>(expandableObject.getId(), expandableObject);
×
5697
    }
×
5698
  }
5699

5700
  @Override
5701
  public void setResponseGetter(StripeResponseGetter responseGetter) {
5702
    super.setResponseGetter(responseGetter);
1✔
5703
    trySetResponseGetter(amountDetails, responseGetter);
1✔
5704
    trySetResponseGetter(application, responseGetter);
1✔
5705
    trySetResponseGetter(asyncWorkflows, responseGetter);
1✔
5706
    trySetResponseGetter(automaticPaymentMethods, responseGetter);
1✔
5707
    trySetResponseGetter(customer, responseGetter);
1✔
5708
    trySetResponseGetter(invoice, responseGetter);
1✔
5709
    trySetResponseGetter(lastPaymentError, responseGetter);
1✔
5710
    trySetResponseGetter(latestCharge, responseGetter);
1✔
5711
    trySetResponseGetter(nextAction, responseGetter);
1✔
5712
    trySetResponseGetter(onBehalfOf, responseGetter);
1✔
5713
    trySetResponseGetter(paymentDetails, responseGetter);
1✔
5714
    trySetResponseGetter(paymentMethod, responseGetter);
1✔
5715
    trySetResponseGetter(paymentMethodConfigurationDetails, responseGetter);
1✔
5716
    trySetResponseGetter(paymentMethodOptions, responseGetter);
1✔
5717
    trySetResponseGetter(processing, responseGetter);
1✔
5718
    trySetResponseGetter(review, responseGetter);
1✔
5719
    trySetResponseGetter(shipping, responseGetter);
1✔
5720
    trySetResponseGetter(source, responseGetter);
1✔
5721
    trySetResponseGetter(transferData, responseGetter);
1✔
5722
  }
1✔
5723
}
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

© 2026 Coveralls, Inc