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

stripe / stripe-java / #16707

14 Dec 2024 12:12AM UTC coverage: 15.91% (-0.08%) from 15.988%
#16707

Pull #1931

github

web-flow
Merge 90c2dfd77 into cf528f2c8
Pull Request #1931: Update generated code

43 of 1442 new or added lines in 28 files covered. (2.98%)

137 existing lines in 17 files now uncovered.

18625 of 117068 relevant lines covered (15.91%)

0.16 hits per line

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

46.03
/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.PaymentIntentIncrementAuthorizationParams;
18
import com.stripe.param.PaymentIntentListParams;
19
import com.stripe.param.PaymentIntentRetrieveParams;
20
import com.stripe.param.PaymentIntentSearchParams;
21
import com.stripe.param.PaymentIntentUpdateParams;
22
import com.stripe.param.PaymentIntentVerifyMicrodepositsParams;
23
import java.util.List;
24
import java.util.Map;
25
import lombok.EqualsAndHashCode;
26
import lombok.Getter;
27
import lombok.Setter;
28

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

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

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

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

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

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

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

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

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

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

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

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

143
  /** Time at which the object was created. Measured in seconds since the Unix epoch. */
144
  @SerializedName("created")
145
  Long created;
146

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

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

173
  /** An arbitrary string attached to the object. Often useful for displaying to users. */
174
  @SerializedName("description")
175
  String description;
176

177
  /** Unique identifier for the object. */
178
  @Getter(onMethod_ = {@Override})
179
  @SerializedName("id")
180
  String id;
181

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

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

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

205
  /**
206
   * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
207
   * object exists in test mode.
208
   */
209
  @SerializedName("livemode")
210
  Boolean livemode;
211

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

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

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

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

248
  /** ID of the payment method used in this PaymentIntent. */
249
  @SerializedName("payment_method")
250
  @Getter(lombok.AccessLevel.NONE)
251
  @Setter(lombok.AccessLevel.NONE)
252
  ExpandableField<PaymentMethod> paymentMethod;
253

254
  /**
255
   * Information about the <a
256
   * href="https://stripe.com/docs/api/payment_method_configurations">payment method
257
   * configuration</a> used for this PaymentIntent.
258
   */
259
  @SerializedName("payment_method_configuration_details")
260
  PaymentMethodConfigurationDetails paymentMethodConfigurationDetails;
261

262
  /** Payment-method-specific configuration for this PaymentIntent. */
263
  @SerializedName("payment_method_options")
264
  PaymentMethodOptions paymentMethodOptions;
265

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

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

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

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

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

312
  /** Shipping information for this PaymentIntent. */
313
  @SerializedName("shipping")
314
  ShippingDetails shipping;
315

316
  /**
317
   * This is a legacy field that will be removed in the future. It is the ID of the Source object
318
   * that is associated with this PaymentIntent, if one was supplied.
319
   */
320
  @SerializedName("source")
321
  @Getter(lombok.AccessLevel.NONE)
322
  @Setter(lombok.AccessLevel.NONE)
323
  ExpandableField<PaymentSource> source;
324

325
  /**
326
   * Text that appears on the customer's statement as the statement descriptor for a non-card
327
   * charge. This value overrides the account's default statement descriptor. For information about
328
   * requirements, including the 22-character limit, see <a
329
   * href="https://docs.stripe.com/get-started/account/statement-descriptors">the Statement
330
   * Descriptor docs</a>.
331
   *
332
   * <p>Setting this value for a card charge returns an error. For card charges, set the <a
333
   * href="https://docs.stripe.com/get-started/account/statement-descriptors#dynamic">statement_descriptor_suffix</a>
334
   * instead.
335
   */
336
  @SerializedName("statement_descriptor")
337
  String statementDescriptor;
338

339
  /**
340
   * Provides information about a card charge. Concatenated to the account's <a
341
   * href="https://docs.stripe.com/get-started/account/statement-descriptors#static">statement
342
   * descriptor prefix</a> to form the complete statement descriptor that appears on the customer's
343
   * statement.
344
   */
345
  @SerializedName("statement_descriptor_suffix")
346
  String statementDescriptorSuffix;
347

348
  /**
349
   * Status of this PaymentIntent, one of {@code requires_payment_method}, {@code
350
   * requires_confirmation}, {@code requires_action}, {@code processing}, {@code requires_capture},
351
   * {@code canceled}, or {@code succeeded}. Read more about each PaymentIntent <a
352
   * href="https://stripe.com/docs/payments/intents#intent-statuses">status</a>.
353
   */
354
  @SerializedName("status")
355
  String status;
356

357
  /**
358
   * The data that automatically creates a Transfer after the payment finalizes. Learn more about
359
   * the <a href="https://stripe.com/docs/payments/connected-accounts">use case for connected
360
   * accounts</a>.
361
   */
362
  @SerializedName("transfer_data")
363
  TransferData transferData;
364

365
  /**
366
   * A string that identifies the resulting payment as part of a group. Learn more about the <a
367
   * href="https://stripe.com/docs/connect/separate-charges-and-transfers">use case for connected
368
   * accounts</a>.
369
   */
370
  @SerializedName("transfer_group")
371
  String transferGroup;
372

373
  /** Get ID of expandable {@code application} object. */
374
  public String getApplication() {
375
    return (this.application != null) ? this.application.getId() : null;
1✔
376
  }
377

378
  public void setApplication(String id) {
379
    this.application = ApiResource.setExpandableFieldId(id, this.application);
×
380
  }
×
381

382
  /** Get expanded {@code application}. */
383
  public Application getApplicationObject() {
384
    return (this.application != null) ? this.application.getExpanded() : null;
1✔
385
  }
386

387
  public void setApplicationObject(Application expandableObject) {
388
    this.application = new ExpandableField<Application>(expandableObject.getId(), expandableObject);
×
389
  }
×
390

391
  /** Get ID of expandable {@code customer} object. */
392
  public String getCustomer() {
393
    return (this.customer != null) ? this.customer.getId() : null;
1✔
394
  }
395

396
  public void setCustomer(String id) {
397
    this.customer = ApiResource.setExpandableFieldId(id, this.customer);
×
398
  }
×
399

400
  /** Get expanded {@code customer}. */
401
  public Customer getCustomerObject() {
402
    return (this.customer != null) ? this.customer.getExpanded() : null;
1✔
403
  }
404

405
  public void setCustomerObject(Customer expandableObject) {
406
    this.customer = new ExpandableField<Customer>(expandableObject.getId(), expandableObject);
×
407
  }
×
408

409
  /** Get ID of expandable {@code invoice} object. */
410
  public String getInvoice() {
411
    return (this.invoice != null) ? this.invoice.getId() : null;
1✔
412
  }
413

414
  public void setInvoice(String id) {
415
    this.invoice = ApiResource.setExpandableFieldId(id, this.invoice);
×
416
  }
×
417

418
  /** Get expanded {@code invoice}. */
419
  public Invoice getInvoiceObject() {
420
    return (this.invoice != null) ? this.invoice.getExpanded() : null;
1✔
421
  }
422

423
  public void setInvoiceObject(Invoice expandableObject) {
424
    this.invoice = new ExpandableField<Invoice>(expandableObject.getId(), expandableObject);
×
425
  }
×
426

427
  /** Get ID of expandable {@code latestCharge} object. */
428
  public String getLatestCharge() {
429
    return (this.latestCharge != null) ? this.latestCharge.getId() : null;
×
430
  }
431

432
  public void setLatestCharge(String id) {
433
    this.latestCharge = ApiResource.setExpandableFieldId(id, this.latestCharge);
×
434
  }
×
435

436
  /** Get expanded {@code latestCharge}. */
437
  public Charge getLatestChargeObject() {
438
    return (this.latestCharge != null) ? this.latestCharge.getExpanded() : null;
×
439
  }
440

441
  public void setLatestChargeObject(Charge expandableObject) {
442
    this.latestCharge = new ExpandableField<Charge>(expandableObject.getId(), expandableObject);
×
443
  }
×
444

445
  /** Get ID of expandable {@code onBehalfOf} object. */
446
  public String getOnBehalfOf() {
447
    return (this.onBehalfOf != null) ? this.onBehalfOf.getId() : null;
1✔
448
  }
449

450
  public void setOnBehalfOf(String id) {
451
    this.onBehalfOf = ApiResource.setExpandableFieldId(id, this.onBehalfOf);
×
452
  }
×
453

454
  /** Get expanded {@code onBehalfOf}. */
455
  public Account getOnBehalfOfObject() {
456
    return (this.onBehalfOf != null) ? this.onBehalfOf.getExpanded() : null;
1✔
457
  }
458

459
  public void setOnBehalfOfObject(Account expandableObject) {
460
    this.onBehalfOf = new ExpandableField<Account>(expandableObject.getId(), expandableObject);
×
461
  }
×
462

463
  /** Get ID of expandable {@code paymentMethod} object. */
464
  public String getPaymentMethod() {
465
    return (this.paymentMethod != null) ? this.paymentMethod.getId() : null;
1✔
466
  }
467

468
  public void setPaymentMethod(String id) {
469
    this.paymentMethod = ApiResource.setExpandableFieldId(id, this.paymentMethod);
×
470
  }
×
471

472
  /** Get expanded {@code paymentMethod}. */
473
  public PaymentMethod getPaymentMethodObject() {
474
    return (this.paymentMethod != null) ? this.paymentMethod.getExpanded() : null;
1✔
475
  }
476

477
  public void setPaymentMethodObject(PaymentMethod expandableObject) {
478
    this.paymentMethod =
×
479
        new ExpandableField<PaymentMethod>(expandableObject.getId(), expandableObject);
×
480
  }
×
481

482
  /** Get ID of expandable {@code review} object. */
483
  public String getReview() {
484
    return (this.review != null) ? this.review.getId() : null;
1✔
485
  }
486

487
  public void setReview(String id) {
488
    this.review = ApiResource.setExpandableFieldId(id, this.review);
×
489
  }
×
490

491
  /** Get expanded {@code review}. */
492
  public Review getReviewObject() {
493
    return (this.review != null) ? this.review.getExpanded() : null;
1✔
494
  }
495

496
  public void setReviewObject(Review expandableObject) {
497
    this.review = new ExpandableField<Review>(expandableObject.getId(), expandableObject);
×
498
  }
×
499

500
  /** Get ID of expandable {@code source} object. */
501
  public String getSource() {
502
    return (this.source != null) ? this.source.getId() : null;
×
503
  }
504

505
  public void setSource(String id) {
506
    this.source = ApiResource.setExpandableFieldId(id, this.source);
×
507
  }
×
508

509
  /** Get expanded {@code source}. */
510
  public PaymentSource getSourceObject() {
511
    return (this.source != null) ? this.source.getExpanded() : null;
×
512
  }
513

514
  public void setSourceObject(PaymentSource expandableObject) {
515
    this.source = new ExpandableField<PaymentSource>(expandableObject.getId(), expandableObject);
×
516
  }
×
517

518
  /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */
519
  public PaymentIntent applyCustomerBalance() throws StripeException {
520
    return applyCustomerBalance((Map<String, Object>) null, (RequestOptions) null);
×
521
  }
522

523
  /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */
524
  public PaymentIntent applyCustomerBalance(RequestOptions options) throws StripeException {
525
    return applyCustomerBalance((Map<String, Object>) null, options);
×
526
  }
527

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

533
  /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */
534
  public PaymentIntent applyCustomerBalance(Map<String, Object> params, RequestOptions options)
535
      throws StripeException {
536
    String path =
×
537
        String.format(
×
538
            "/v1/payment_intents/%s/apply_customer_balance", ApiResource.urlEncodeId(this.getId()));
×
539
    ApiRequest request =
×
540
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
541
    return getResponseGetter().request(request, PaymentIntent.class);
×
542
  }
543

544
  /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */
545
  public PaymentIntent applyCustomerBalance(PaymentIntentApplyCustomerBalanceParams params)
546
      throws StripeException {
547
    return applyCustomerBalance(params, (RequestOptions) null);
1✔
548
  }
549

550
  /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */
551
  public PaymentIntent applyCustomerBalance(
552
      PaymentIntentApplyCustomerBalanceParams params, RequestOptions options)
553
      throws StripeException {
554
    String path =
1✔
555
        String.format(
1✔
556
            "/v1/payment_intents/%s/apply_customer_balance", ApiResource.urlEncodeId(this.getId()));
1✔
557
    ApiResource.checkNullTypedParams(path, params);
1✔
558
    ApiRequest request =
1✔
559
        new ApiRequest(
560
            BaseAddress.API,
561
            ApiResource.RequestMethod.POST,
562
            path,
563
            ApiRequestParams.paramsToMap(params),
1✔
564
            options);
565
    return getResponseGetter().request(request, PaymentIntent.class);
1✔
566
  }
567

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

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

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

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

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

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

692
  /**
693
   * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code
694
   * requires_capture}.
695
   *
696
   * <p>Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their
697
   * creation.
698
   *
699
   * <p>Learn more about <a href="https://stripe.com/docs/payments/capture-later">separate
700
   * authorization and capture</a>.
701
   */
702
  public PaymentIntent capture() throws StripeException {
703
    return capture((Map<String, Object>) null, (RequestOptions) null);
1✔
704
  }
705

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

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

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

753
  /**
754
   * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code
755
   * requires_capture}.
756
   *
757
   * <p>Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their
758
   * creation.
759
   *
760
   * <p>Learn more about <a href="https://stripe.com/docs/payments/capture-later">separate
761
   * authorization and capture</a>.
762
   */
763
  public PaymentIntent capture(PaymentIntentCaptureParams params) throws StripeException {
764
    return capture(params, (RequestOptions) null);
1✔
765
  }
766

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

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

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

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

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

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

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

964
  /**
965
   * Creates a PaymentIntent object.
966
   *
967
   * <p>After the PaymentIntent is created, attach a payment method and <a
968
   * href="https://stripe.com/docs/api/payment_intents/confirm">confirm</a> to continue the payment.
969
   * Learn more about <a href="https://stripe.com/docs/payments/payment-intents">the available
970
   * payment flows with the Payment Intents API</a>.
971
   *
972
   * <p>When you use {@code confirm=true} during creation, it’s equivalent to creating and
973
   * confirming the PaymentIntent in the same call. You can use any parameters available in the <a
974
   * href="https://stripe.com/docs/api/payment_intents/confirm">confirm API</a> when you supply
975
   * {@code confirm=true}.
976
   */
977
  public static PaymentIntent create(Map<String, Object> params) throws StripeException {
978
    return create(params, (RequestOptions) null);
1✔
979
  }
980

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

1002
  /**
1003
   * Creates a PaymentIntent object.
1004
   *
1005
   * <p>After the PaymentIntent is created, attach a payment method and <a
1006
   * href="https://stripe.com/docs/api/payment_intents/confirm">confirm</a> to continue the payment.
1007
   * Learn more about <a href="https://stripe.com/docs/payments/payment-intents">the available
1008
   * payment flows with the Payment Intents API</a>.
1009
   *
1010
   * <p>When you use {@code confirm=true} during creation, it’s equivalent to creating and
1011
   * confirming the PaymentIntent in the same call. You can use any parameters available in the <a
1012
   * href="https://stripe.com/docs/api/payment_intents/confirm">confirm API</a> when you supply
1013
   * {@code confirm=true}.
1014
   */
1015
  public static PaymentIntent create(PaymentIntentCreateParams params) throws StripeException {
1016
    return create(params, (RequestOptions) null);
1✔
1017
  }
1018

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

1046
  /**
1047
   * Perform an incremental authorization on an eligible <a
1048
   * href="https://stripe.com/docs/api/payment_intents/object">PaymentIntent</a>. To be eligible,
1049
   * the PaymentIntent’s status must be {@code requires_capture} and <a
1050
   * href="https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported">incremental_authorization_supported</a>
1051
   * must be {@code true}.
1052
   *
1053
   * <p>Incremental authorizations attempt to increase the authorized amount on your customer’s card
1054
   * to the new, higher {@code amount} provided. Similar to the initial authorization, incremental
1055
   * authorizations can be declined. A single PaymentIntent can call this endpoint multiple times to
1056
   * further increase the authorized amount.
1057
   *
1058
   * <p>If the incremental authorization succeeds, the PaymentIntent object returns with the updated
1059
   * <a
1060
   * href="https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount">amount</a>.
1061
   * If the incremental authorization fails, a <a
1062
   * href="https://stripe.com/docs/error-codes#card-declined">card_declined</a> error returns, and
1063
   * no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains
1064
   * capturable for the previously authorized amount.
1065
   *
1066
   * <p>Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including
1067
   * declines. After it’s captured, a PaymentIntent can no longer be incremented.
1068
   *
1069
   * <p>Learn more about <a
1070
   * href="https://stripe.com/docs/terminal/features/incremental-authorizations">incremental
1071
   * authorizations</a>.
1072
   */
1073
  public PaymentIntent incrementAuthorization(Map<String, Object> params) throws StripeException {
1074
    return incrementAuthorization(params, (RequestOptions) null);
×
1075
  }
1076

1077
  /**
1078
   * Perform an incremental authorization on an eligible <a
1079
   * href="https://stripe.com/docs/api/payment_intents/object">PaymentIntent</a>. To be eligible,
1080
   * the PaymentIntent’s status must be {@code requires_capture} and <a
1081
   * href="https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported">incremental_authorization_supported</a>
1082
   * must be {@code true}.
1083
   *
1084
   * <p>Incremental authorizations attempt to increase the authorized amount on your customer’s card
1085
   * to the new, higher {@code amount} provided. Similar to the initial authorization, incremental
1086
   * authorizations can be declined. A single PaymentIntent can call this endpoint multiple times to
1087
   * further increase the authorized amount.
1088
   *
1089
   * <p>If the incremental authorization succeeds, the PaymentIntent object returns with the updated
1090
   * <a
1091
   * href="https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount">amount</a>.
1092
   * If the incremental authorization fails, a <a
1093
   * href="https://stripe.com/docs/error-codes#card-declined">card_declined</a> error returns, and
1094
   * no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains
1095
   * capturable for the previously authorized amount.
1096
   *
1097
   * <p>Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including
1098
   * declines. After it’s captured, a PaymentIntent can no longer be incremented.
1099
   *
1100
   * <p>Learn more about <a
1101
   * href="https://stripe.com/docs/terminal/features/incremental-authorizations">incremental
1102
   * authorizations</a>.
1103
   */
1104
  public PaymentIntent incrementAuthorization(Map<String, Object> params, RequestOptions options)
1105
      throws StripeException {
1106
    String path =
×
1107
        String.format(
×
1108
            "/v1/payment_intents/%s/increment_authorization",
1109
            ApiResource.urlEncodeId(this.getId()));
×
1110
    ApiRequest request =
×
1111
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
1112
    return getResponseGetter().request(request, PaymentIntent.class);
×
1113
  }
1114

1115
  /**
1116
   * Perform an incremental authorization on an eligible <a
1117
   * href="https://stripe.com/docs/api/payment_intents/object">PaymentIntent</a>. To be eligible,
1118
   * the PaymentIntent’s status must be {@code requires_capture} and <a
1119
   * href="https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported">incremental_authorization_supported</a>
1120
   * must be {@code true}.
1121
   *
1122
   * <p>Incremental authorizations attempt to increase the authorized amount on your customer’s card
1123
   * to the new, higher {@code amount} provided. Similar to the initial authorization, incremental
1124
   * authorizations can be declined. A single PaymentIntent can call this endpoint multiple times to
1125
   * further increase the authorized amount.
1126
   *
1127
   * <p>If the incremental authorization succeeds, the PaymentIntent object returns with the updated
1128
   * <a
1129
   * href="https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount">amount</a>.
1130
   * If the incremental authorization fails, a <a
1131
   * href="https://stripe.com/docs/error-codes#card-declined">card_declined</a> error returns, and
1132
   * no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains
1133
   * capturable for the previously authorized amount.
1134
   *
1135
   * <p>Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including
1136
   * declines. After it’s captured, a PaymentIntent can no longer be incremented.
1137
   *
1138
   * <p>Learn more about <a
1139
   * href="https://stripe.com/docs/terminal/features/incremental-authorizations">incremental
1140
   * authorizations</a>.
1141
   */
1142
  public PaymentIntent incrementAuthorization(PaymentIntentIncrementAuthorizationParams params)
1143
      throws StripeException {
1144
    return incrementAuthorization(params, (RequestOptions) null);
1✔
1145
  }
1146

1147
  /**
1148
   * Perform an incremental authorization on an eligible <a
1149
   * href="https://stripe.com/docs/api/payment_intents/object">PaymentIntent</a>. To be eligible,
1150
   * the PaymentIntent’s status must be {@code requires_capture} and <a
1151
   * href="https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported">incremental_authorization_supported</a>
1152
   * must be {@code true}.
1153
   *
1154
   * <p>Incremental authorizations attempt to increase the authorized amount on your customer’s card
1155
   * to the new, higher {@code amount} provided. Similar to the initial authorization, incremental
1156
   * authorizations can be declined. A single PaymentIntent can call this endpoint multiple times to
1157
   * further increase the authorized amount.
1158
   *
1159
   * <p>If the incremental authorization succeeds, the PaymentIntent object returns with the updated
1160
   * <a
1161
   * href="https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount">amount</a>.
1162
   * If the incremental authorization fails, a <a
1163
   * href="https://stripe.com/docs/error-codes#card-declined">card_declined</a> error returns, and
1164
   * no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains
1165
   * capturable for the previously authorized amount.
1166
   *
1167
   * <p>Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including
1168
   * declines. After it’s captured, a PaymentIntent can no longer be incremented.
1169
   *
1170
   * <p>Learn more about <a
1171
   * href="https://stripe.com/docs/terminal/features/incremental-authorizations">incremental
1172
   * authorizations</a>.
1173
   */
1174
  public PaymentIntent incrementAuthorization(
1175
      PaymentIntentIncrementAuthorizationParams params, RequestOptions options)
1176
      throws StripeException {
1177
    String path =
1✔
1178
        String.format(
1✔
1179
            "/v1/payment_intents/%s/increment_authorization",
1180
            ApiResource.urlEncodeId(this.getId()));
1✔
1181
    ApiResource.checkNullTypedParams(path, params);
1✔
1182
    ApiRequest request =
1✔
1183
        new ApiRequest(
1184
            BaseAddress.API,
1185
            ApiResource.RequestMethod.POST,
1186
            path,
1187
            ApiRequestParams.paramsToMap(params),
1✔
1188
            options);
1189
    return getResponseGetter().request(request, PaymentIntent.class);
1✔
1190
  }
1191

1192
  /** Returns a list of PaymentIntents. */
1193
  public static PaymentIntentCollection list(Map<String, Object> params) throws StripeException {
1194
    return list(params, (RequestOptions) null);
1✔
1195
  }
1196

1197
  /** Returns a list of PaymentIntents. */
1198
  public static PaymentIntentCollection list(Map<String, Object> params, RequestOptions options)
1199
      throws StripeException {
1200
    String path = "/v1/payment_intents";
1✔
1201
    ApiRequest request =
1✔
1202
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
1203
    return getGlobalResponseGetter().request(request, PaymentIntentCollection.class);
1✔
1204
  }
1205

1206
  /** Returns a list of PaymentIntents. */
1207
  public static PaymentIntentCollection list(PaymentIntentListParams params)
1208
      throws StripeException {
1209
    return list(params, (RequestOptions) null);
1✔
1210
  }
1211

1212
  /** Returns a list of PaymentIntents. */
1213
  public static PaymentIntentCollection list(PaymentIntentListParams params, RequestOptions options)
1214
      throws StripeException {
1215
    String path = "/v1/payment_intents";
1✔
1216
    ApiResource.checkNullTypedParams(path, params);
1✔
1217
    ApiRequest request =
1✔
1218
        new ApiRequest(
1219
            BaseAddress.API,
1220
            ApiResource.RequestMethod.GET,
1221
            path,
1222
            ApiRequestParams.paramsToMap(params),
1✔
1223
            options);
1224
    return getGlobalResponseGetter().request(request, PaymentIntentCollection.class);
1✔
1225
  }
1226

1227
  /**
1228
   * Retrieves the details of a PaymentIntent that has previously been created.
1229
   *
1230
   * <p>You can retrieve a PaymentIntent client-side using a publishable key when the {@code
1231
   * client_secret} is in the query string.
1232
   *
1233
   * <p>If you retrieve a PaymentIntent with a publishable key, it only returns a subset of
1234
   * properties. Refer to the <a href="https://stripe.com/docs/api#payment_intent_object">payment
1235
   * intent</a> object reference for more details.
1236
   */
1237
  public static PaymentIntent retrieve(String intent) throws StripeException {
1238
    return retrieve(intent, (Map<String, Object>) null, (RequestOptions) null);
1✔
1239
  }
1240

1241
  /**
1242
   * Retrieves the details of a PaymentIntent that has previously been created.
1243
   *
1244
   * <p>You can retrieve a PaymentIntent client-side using a publishable key when the {@code
1245
   * client_secret} is in the query string.
1246
   *
1247
   * <p>If you retrieve a PaymentIntent with a publishable key, it only returns a subset of
1248
   * properties. Refer to the <a href="https://stripe.com/docs/api#payment_intent_object">payment
1249
   * intent</a> object reference for more details.
1250
   */
1251
  public static PaymentIntent retrieve(String intent, RequestOptions options)
1252
      throws StripeException {
1253
    return retrieve(intent, (Map<String, Object>) null, options);
×
1254
  }
1255

1256
  /**
1257
   * Retrieves the details of a PaymentIntent that has previously been created.
1258
   *
1259
   * <p>You can retrieve a PaymentIntent client-side using a publishable key when the {@code
1260
   * client_secret} is in the query string.
1261
   *
1262
   * <p>If you retrieve a PaymentIntent with a publishable key, it only returns a subset of
1263
   * properties. Refer to the <a href="https://stripe.com/docs/api#payment_intent_object">payment
1264
   * intent</a> object reference for more details.
1265
   */
1266
  public static PaymentIntent retrieve(
1267
      String intent, Map<String, Object> params, RequestOptions options) throws StripeException {
1268
    String path = String.format("/v1/payment_intents/%s", ApiResource.urlEncodeId(intent));
1✔
1269
    ApiRequest request =
1✔
1270
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
1271
    return getGlobalResponseGetter().request(request, PaymentIntent.class);
1✔
1272
  }
1273

1274
  /**
1275
   * Retrieves the details of a PaymentIntent that has previously been created.
1276
   *
1277
   * <p>You can retrieve a PaymentIntent client-side using a publishable key when the {@code
1278
   * client_secret} is in the query string.
1279
   *
1280
   * <p>If you retrieve a PaymentIntent with a publishable key, it only returns a subset of
1281
   * properties. Refer to the <a href="https://stripe.com/docs/api#payment_intent_object">payment
1282
   * intent</a> object reference for more details.
1283
   */
1284
  public static PaymentIntent retrieve(
1285
      String intent, PaymentIntentRetrieveParams params, RequestOptions options)
1286
      throws StripeException {
1287
    String path = String.format("/v1/payment_intents/%s", ApiResource.urlEncodeId(intent));
1✔
1288
    ApiResource.checkNullTypedParams(path, params);
1✔
1289
    ApiRequest request =
1✔
1290
        new ApiRequest(
1291
            BaseAddress.API,
1292
            ApiResource.RequestMethod.GET,
1293
            path,
1294
            ApiRequestParams.paramsToMap(params),
1✔
1295
            options);
1296
    return getGlobalResponseGetter().request(request, PaymentIntent.class);
1✔
1297
  }
1298

1299
  /**
1300
   * Search for PaymentIntents you’ve previously created using Stripe’s <a
1301
   * href="https://stripe.com/docs/search#search-query-language">Search Query Language</a>. Don’t
1302
   * use search in read-after-write flows where strict consistency is necessary. Under normal
1303
   * operating conditions, data is searchable in less than a minute. Occasionally, propagation of
1304
   * new or updated data can be up to an hour behind during outages. Search functionality is not
1305
   * available to merchants in India.
1306
   */
1307
  public static PaymentIntentSearchResult search(Map<String, Object> params)
1308
      throws StripeException {
1309
    return search(params, (RequestOptions) null);
×
1310
  }
1311

1312
  /**
1313
   * Search for PaymentIntents you’ve previously created using Stripe’s <a
1314
   * href="https://stripe.com/docs/search#search-query-language">Search Query Language</a>. Don’t
1315
   * use search in read-after-write flows where strict consistency is necessary. Under normal
1316
   * operating conditions, data is searchable in less than a minute. Occasionally, propagation of
1317
   * new or updated data can be up to an hour behind during outages. Search functionality is not
1318
   * available to merchants in India.
1319
   */
1320
  public static PaymentIntentSearchResult search(Map<String, Object> params, RequestOptions options)
1321
      throws StripeException {
1322
    String path = "/v1/payment_intents/search";
×
1323
    ApiRequest request =
×
1324
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
1325
    return getGlobalResponseGetter().request(request, PaymentIntentSearchResult.class);
×
1326
  }
1327

1328
  /**
1329
   * Search for PaymentIntents you’ve previously created using Stripe’s <a
1330
   * href="https://stripe.com/docs/search#search-query-language">Search Query Language</a>. Don’t
1331
   * use search in read-after-write flows where strict consistency is necessary. Under normal
1332
   * operating conditions, data is searchable in less than a minute. Occasionally, propagation of
1333
   * new or updated data can be up to an hour behind during outages. Search functionality is not
1334
   * available to merchants in India.
1335
   */
1336
  public static PaymentIntentSearchResult search(PaymentIntentSearchParams params)
1337
      throws StripeException {
1338
    return search(params, (RequestOptions) null);
1✔
1339
  }
1340

1341
  /**
1342
   * Search for PaymentIntents you’ve previously created using Stripe’s <a
1343
   * href="https://stripe.com/docs/search#search-query-language">Search Query Language</a>. Don’t
1344
   * use search in read-after-write flows where strict consistency is necessary. Under normal
1345
   * operating conditions, data is searchable in less than a minute. Occasionally, propagation of
1346
   * new or updated data can be up to an hour behind during outages. Search functionality is not
1347
   * available to merchants in India.
1348
   */
1349
  public static PaymentIntentSearchResult search(
1350
      PaymentIntentSearchParams params, RequestOptions options) throws StripeException {
1351
    String path = "/v1/payment_intents/search";
1✔
1352
    ApiResource.checkNullTypedParams(path, params);
1✔
1353
    ApiRequest request =
1✔
1354
        new ApiRequest(
1355
            BaseAddress.API,
1356
            ApiResource.RequestMethod.GET,
1357
            path,
1358
            ApiRequestParams.paramsToMap(params),
1✔
1359
            options);
1360
    return getGlobalResponseGetter().request(request, PaymentIntentSearchResult.class);
1✔
1361
  }
1362

1363
  /**
1364
   * Updates properties on a PaymentIntent object without confirming.
1365
   *
1366
   * <p>Depending on which properties you update, you might need to confirm the PaymentIntent again.
1367
   * For example, updating the {@code payment_method} always requires you to confirm the
1368
   * PaymentIntent again. If you prefer to update and confirm at the same time, we recommend
1369
   * updating properties through the <a
1370
   * href="https://stripe.com/docs/api/payment_intents/confirm">confirm API</a> instead.
1371
   */
1372
  @Override
1373
  public PaymentIntent update(Map<String, Object> params) throws StripeException {
1374
    return update(params, (RequestOptions) null);
1✔
1375
  }
1376

1377
  /**
1378
   * Updates properties on a PaymentIntent object without confirming.
1379
   *
1380
   * <p>Depending on which properties you update, you might need to confirm the PaymentIntent again.
1381
   * For example, updating the {@code payment_method} always requires you to confirm the
1382
   * PaymentIntent again. If you prefer to update and confirm at the same time, we recommend
1383
   * updating properties through the <a
1384
   * href="https://stripe.com/docs/api/payment_intents/confirm">confirm API</a> instead.
1385
   */
1386
  @Override
1387
  public PaymentIntent update(Map<String, Object> params, RequestOptions options)
1388
      throws StripeException {
1389
    String path = String.format("/v1/payment_intents/%s", ApiResource.urlEncodeId(this.getId()));
1✔
1390
    ApiRequest request =
1✔
1391
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
1392
    return getResponseGetter().request(request, PaymentIntent.class);
1✔
1393
  }
1394

1395
  /**
1396
   * Updates properties on a PaymentIntent object without confirming.
1397
   *
1398
   * <p>Depending on which properties you update, you might need to confirm the PaymentIntent again.
1399
   * For example, updating the {@code payment_method} always requires you to confirm the
1400
   * PaymentIntent again. If you prefer to update and confirm at the same time, we recommend
1401
   * updating properties through the <a
1402
   * href="https://stripe.com/docs/api/payment_intents/confirm">confirm API</a> instead.
1403
   */
1404
  public PaymentIntent update(PaymentIntentUpdateParams params) throws StripeException {
1405
    return update(params, (RequestOptions) null);
1✔
1406
  }
1407

1408
  /**
1409
   * Updates properties on a PaymentIntent object without confirming.
1410
   *
1411
   * <p>Depending on which properties you update, you might need to confirm the PaymentIntent again.
1412
   * For example, updating the {@code payment_method} always requires you to confirm the
1413
   * PaymentIntent again. If you prefer to update and confirm at the same time, we recommend
1414
   * updating properties through the <a
1415
   * href="https://stripe.com/docs/api/payment_intents/confirm">confirm API</a> instead.
1416
   */
1417
  public PaymentIntent update(PaymentIntentUpdateParams params, RequestOptions options)
1418
      throws StripeException {
1419
    String path = String.format("/v1/payment_intents/%s", ApiResource.urlEncodeId(this.getId()));
1✔
1420
    ApiResource.checkNullTypedParams(path, params);
1✔
1421
    ApiRequest request =
1✔
1422
        new ApiRequest(
1423
            BaseAddress.API,
1424
            ApiResource.RequestMethod.POST,
1425
            path,
1426
            ApiRequestParams.paramsToMap(params),
1✔
1427
            options);
1428
    return getResponseGetter().request(request, PaymentIntent.class);
1✔
1429
  }
1430

1431
  /** Verifies microdeposits on a PaymentIntent object. */
1432
  public PaymentIntent verifyMicrodeposits() throws StripeException {
1433
    return verifyMicrodeposits((Map<String, Object>) null, (RequestOptions) null);
×
1434
  }
1435

1436
  /** Verifies microdeposits on a PaymentIntent object. */
1437
  public PaymentIntent verifyMicrodeposits(RequestOptions options) throws StripeException {
1438
    return verifyMicrodeposits((Map<String, Object>) null, options);
×
1439
  }
1440

1441
  /** Verifies microdeposits on a PaymentIntent object. */
1442
  public PaymentIntent verifyMicrodeposits(Map<String, Object> params) throws StripeException {
1443
    return verifyMicrodeposits(params, (RequestOptions) null);
×
1444
  }
1445

1446
  /** Verifies microdeposits on a PaymentIntent object. */
1447
  public PaymentIntent verifyMicrodeposits(Map<String, Object> params, RequestOptions options)
1448
      throws StripeException {
1449
    String path =
×
1450
        String.format(
×
1451
            "/v1/payment_intents/%s/verify_microdeposits", ApiResource.urlEncodeId(this.getId()));
×
1452
    ApiRequest request =
×
1453
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
1454
    return getResponseGetter().request(request, PaymentIntent.class);
×
1455
  }
1456

1457
  /** Verifies microdeposits on a PaymentIntent object. */
1458
  public PaymentIntent verifyMicrodeposits(PaymentIntentVerifyMicrodepositsParams params)
1459
      throws StripeException {
1460
    return verifyMicrodeposits(params, (RequestOptions) null);
1✔
1461
  }
1462

1463
  /** Verifies microdeposits on a PaymentIntent object. */
1464
  public PaymentIntent verifyMicrodeposits(
1465
      PaymentIntentVerifyMicrodepositsParams params, RequestOptions options)
1466
      throws StripeException {
1467
    String path =
1✔
1468
        String.format(
1✔
1469
            "/v1/payment_intents/%s/verify_microdeposits", ApiResource.urlEncodeId(this.getId()));
1✔
1470
    ApiResource.checkNullTypedParams(path, params);
1✔
1471
    ApiRequest request =
1✔
1472
        new ApiRequest(
1473
            BaseAddress.API,
1474
            ApiResource.RequestMethod.POST,
1475
            path,
1476
            ApiRequestParams.paramsToMap(params),
1✔
1477
            options);
1478
    return getResponseGetter().request(request, PaymentIntent.class);
1✔
1479
  }
1480

1481
  /**
1482
   * For more details about AmountDetails, please refer to the <a
1483
   * href="https://docs.stripe.com/api">API Reference.</a>
1484
   */
1485
  @Getter
1486
  @Setter
1487
  @EqualsAndHashCode(callSuper = false)
1488
  public static class AmountDetails extends StripeObject {
1✔
1489
    @SerializedName("tip")
1490
    Tip tip;
1491

1492
    /**
1493
     * For more details about Tip, please refer to the <a href="https://docs.stripe.com/api">API
1494
     * Reference.</a>
1495
     */
1496
    @Getter
1497
    @Setter
1498
    @EqualsAndHashCode(callSuper = false)
1499
    public static class Tip extends StripeObject {
1✔
1500
      /** Portion of the amount that corresponds to a tip. */
1501
      @SerializedName("amount")
1502
      Long amount;
1503
    }
1504
  }
1505

1506
  /**
1507
   * For more details about AutomaticPaymentMethods, please refer to the <a
1508
   * href="https://docs.stripe.com/api">API Reference.</a>
1509
   */
1510
  @Getter
1511
  @Setter
1512
  @EqualsAndHashCode(callSuper = false)
1513
  public static class AutomaticPaymentMethods extends StripeObject {
×
1514
    /**
1515
     * Controls whether this PaymentIntent will accept redirect-based payment methods.
1516
     *
1517
     * <p>Redirect-based payment methods may require your customer to be redirected to a payment
1518
     * method's app or site for authentication or additional steps. To <a
1519
     * href="https://stripe.com/docs/api/payment_intents/confirm">confirm</a> this PaymentIntent,
1520
     * you may be required to provide a {@code return_url} to redirect customers back to your site
1521
     * after they authenticate or complete the payment.
1522
     *
1523
     * <p>One of {@code always}, or {@code never}.
1524
     */
1525
    @SerializedName("allow_redirects")
1526
    String allowRedirects;
1527

1528
    /** Automatically calculates compatible payment methods. */
1529
    @SerializedName("enabled")
1530
    Boolean enabled;
1531
  }
1532

1533
  /**
1534
   * For more details about NextAction, please refer to the <a
1535
   * href="https://docs.stripe.com/api">API Reference.</a>
1536
   */
1537
  @Getter
1538
  @Setter
1539
  @EqualsAndHashCode(callSuper = false)
1540
  public static class NextAction extends StripeObject {
1✔
1541
    @SerializedName("alipay_handle_redirect")
1542
    AlipayHandleRedirect alipayHandleRedirect;
1543

1544
    @SerializedName("boleto_display_details")
1545
    BoletoDisplayDetails boletoDisplayDetails;
1546

1547
    @SerializedName("card_await_notification")
1548
    CardAwaitNotification cardAwaitNotification;
1549

1550
    @SerializedName("cashapp_handle_redirect_or_display_qr_code")
1551
    CashappHandleRedirectOrDisplayQrCode cashappHandleRedirectOrDisplayQrCode;
1552

1553
    @SerializedName("display_bank_transfer_instructions")
1554
    DisplayBankTransferInstructions displayBankTransferInstructions;
1555

1556
    @SerializedName("konbini_display_details")
1557
    KonbiniDisplayDetails konbiniDisplayDetails;
1558

1559
    @SerializedName("multibanco_display_details")
1560
    MultibancoDisplayDetails multibancoDisplayDetails;
1561

1562
    @SerializedName("oxxo_display_details")
1563
    OxxoDisplayDetails oxxoDisplayDetails;
1564

1565
    @SerializedName("paynow_display_qr_code")
1566
    PaynowDisplayQrCode paynowDisplayQrCode;
1567

1568
    @SerializedName("pix_display_qr_code")
1569
    PixDisplayQrCode pixDisplayQrCode;
1570

1571
    @SerializedName("promptpay_display_qr_code")
1572
    PromptpayDisplayQrCode promptpayDisplayQrCode;
1573

1574
    @SerializedName("redirect_to_url")
1575
    RedirectToUrl redirectToUrl;
1576

1577
    @SerializedName("swish_handle_redirect_or_display_qr_code")
1578
    SwishHandleRedirectOrDisplayQrCode swishHandleRedirectOrDisplayQrCode;
1579

1580
    /**
1581
     * Type of the next action to perform, one of {@code redirect_to_url}, {@code use_stripe_sdk},
1582
     * {@code alipay_handle_redirect}, {@code oxxo_display_details}, or {@code
1583
     * verify_with_microdeposits}.
1584
     */
1585
    @SerializedName("type")
1586
    String type;
1587

1588
    /**
1589
     * When confirming a PaymentIntent with Stripe.js, Stripe.js depends on the contents of this
1590
     * dictionary to invoke authentication flows. The shape of the contents is subject to change and
1591
     * is only intended to be used by Stripe.js.
1592
     */
1593
    @SerializedName("use_stripe_sdk")
1594
    Map<String, Object> useStripeSdk;
1595

1596
    @SerializedName("verify_with_microdeposits")
1597
    VerifyWithMicrodeposits verifyWithMicrodeposits;
1598

1599
    @SerializedName("wechat_pay_display_qr_code")
1600
    WechatPayDisplayQrCode wechatPayDisplayQrCode;
1601

1602
    @SerializedName("wechat_pay_redirect_to_android_app")
1603
    WechatPayRedirectToAndroidApp wechatPayRedirectToAndroidApp;
1604

1605
    @SerializedName("wechat_pay_redirect_to_ios_app")
1606
    WechatPayRedirectToIosApp wechatPayRedirectToIosApp;
1607

1608
    /**
1609
     * For more details about AlipayHandleRedirect, please refer to the <a
1610
     * href="https://docs.stripe.com/api">API Reference.</a>
1611
     */
1612
    @Getter
1613
    @Setter
1614
    @EqualsAndHashCode(callSuper = false)
1615
    public static class AlipayHandleRedirect extends StripeObject {
×
1616
      /**
1617
       * The native data to be used with Alipay SDK you must redirect your customer to in order to
1618
       * authenticate the payment in an Android App.
1619
       */
1620
      @SerializedName("native_data")
1621
      String nativeData;
1622

1623
      /**
1624
       * The native URL you must redirect your customer to in order to authenticate the payment in
1625
       * an iOS App.
1626
       */
1627
      @SerializedName("native_url")
1628
      String nativeUrl;
1629

1630
      /**
1631
       * If the customer does not exit their browser while authenticating, they will be redirected
1632
       * to this specified URL after completion.
1633
       */
1634
      @SerializedName("return_url")
1635
      String returnUrl;
1636

1637
      /** The URL you must redirect your customer to in order to authenticate the payment. */
1638
      @SerializedName("url")
1639
      String url;
1640
    }
1641

1642
    /**
1643
     * For more details about BoletoDisplayDetails, please refer to the <a
1644
     * href="https://docs.stripe.com/api">API Reference.</a>
1645
     */
1646
    @Getter
1647
    @Setter
1648
    @EqualsAndHashCode(callSuper = false)
1649
    public static class BoletoDisplayDetails extends StripeObject {
×
1650
      /** The timestamp after which the boleto expires. */
1651
      @SerializedName("expires_at")
1652
      Long expiresAt;
1653

1654
      /**
1655
       * The URL to the hosted boleto voucher page, which allows customers to view the boleto
1656
       * voucher.
1657
       */
1658
      @SerializedName("hosted_voucher_url")
1659
      String hostedVoucherUrl;
1660

1661
      /** The boleto number. */
1662
      @SerializedName("number")
1663
      String number;
1664

1665
      /** The URL to the downloadable boleto voucher PDF. */
1666
      @SerializedName("pdf")
1667
      String pdf;
1668
    }
1669

1670
    /**
1671
     * For more details about CardAwaitNotification, please refer to the <a
1672
     * href="https://docs.stripe.com/api">API Reference.</a>
1673
     */
1674
    @Getter
1675
    @Setter
1676
    @EqualsAndHashCode(callSuper = false)
1677
    public static class CardAwaitNotification extends StripeObject {
×
1678
      /**
1679
       * The time that payment will be attempted. If customer approval is required, they need to
1680
       * provide approval before this time.
1681
       */
1682
      @SerializedName("charge_attempt_at")
1683
      Long chargeAttemptAt;
1684

1685
      /**
1686
       * For payments greater than INR 15000, the customer must provide explicit approval of the
1687
       * payment with their bank. For payments of lower amount, no customer action is required.
1688
       */
1689
      @SerializedName("customer_approval_required")
1690
      Boolean customerApprovalRequired;
1691
    }
1692

1693
    /**
1694
     * For more details about CashappHandleRedirectOrDisplayQrCode, please refer to the <a
1695
     * href="https://docs.stripe.com/api">API Reference.</a>
1696
     */
1697
    @Getter
1698
    @Setter
1699
    @EqualsAndHashCode(callSuper = false)
1700
    public static class CashappHandleRedirectOrDisplayQrCode extends StripeObject {
×
1701
      /**
1702
       * The URL to the hosted Cash App Pay instructions page, which allows customers to view the QR
1703
       * code, and supports QR code refreshing on expiration.
1704
       */
1705
      @SerializedName("hosted_instructions_url")
1706
      String hostedInstructionsUrl;
1707

1708
      /** The url for mobile redirect based auth. */
1709
      @SerializedName("mobile_auth_url")
1710
      String mobileAuthUrl;
1711

1712
      @SerializedName("qr_code")
1713
      QrCode qrCode;
1714

1715
      /**
1716
       * For more details about QrCode, please refer to the <a
1717
       * href="https://docs.stripe.com/api">API Reference.</a>
1718
       */
1719
      @Getter
1720
      @Setter
1721
      @EqualsAndHashCode(callSuper = false)
1722
      public static class QrCode extends StripeObject {
×
1723
        /** The date (unix timestamp) when the QR code expires. */
1724
        @SerializedName("expires_at")
1725
        Long expiresAt;
1726

1727
        /** The image_url_png string used to render QR code. */
1728
        @SerializedName("image_url_png")
1729
        String imageUrlPng;
1730

1731
        /** The image_url_svg string used to render QR code. */
1732
        @SerializedName("image_url_svg")
1733
        String imageUrlSvg;
1734
      }
1735
    }
1736

1737
    /**
1738
     * For more details about DisplayBankTransferInstructions, please refer to the <a
1739
     * href="https://docs.stripe.com/api">API Reference.</a>
1740
     */
1741
    @Getter
1742
    @Setter
1743
    @EqualsAndHashCode(callSuper = false)
1744
    public static class DisplayBankTransferInstructions extends StripeObject {
×
1745
      /** The remaining amount that needs to be transferred to complete the payment. */
1746
      @SerializedName("amount_remaining")
1747
      Long amountRemaining;
1748

1749
      /**
1750
       * Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
1751
       * code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
1752
       * currency</a>.
1753
       */
1754
      @SerializedName("currency")
1755
      String currency;
1756

1757
      /** A list of financial addresses that can be used to fund the customer balance. */
1758
      @SerializedName("financial_addresses")
1759
      List<PaymentIntent.NextAction.DisplayBankTransferInstructions.FinancialAddress>
1760
          financialAddresses;
1761

1762
      /** A link to a hosted page that guides your customer through completing the transfer. */
1763
      @SerializedName("hosted_instructions_url")
1764
      String hostedInstructionsUrl;
1765

1766
      /**
1767
       * A string identifying this payment. Instruct your customer to include this code in the
1768
       * reference or memo field of their bank transfer.
1769
       */
1770
      @SerializedName("reference")
1771
      String reference;
1772

1773
      /**
1774
       * Type of bank transfer
1775
       *
1776
       * <p>One of {@code eu_bank_transfer}, {@code gb_bank_transfer}, {@code jp_bank_transfer},
1777
       * {@code mx_bank_transfer}, or {@code us_bank_transfer}.
1778
       */
1779
      @SerializedName("type")
1780
      String type;
1781

1782
      /** FinancialAddresses contain identifying information that resolves to a FinancialAccount. */
1783
      @Getter
1784
      @Setter
1785
      @EqualsAndHashCode(callSuper = false)
1786
      public static class FinancialAddress extends StripeObject {
×
1787
        /** ABA Records contain U.S. bank account details per the ABA format. */
1788
        @SerializedName("aba")
1789
        Aba aba;
1790

1791
        /** Iban Records contain E.U. bank account details per the SEPA format. */
1792
        @SerializedName("iban")
1793
        Iban iban;
1794

1795
        /** Sort Code Records contain U.K. bank account details per the sort code format. */
1796
        @SerializedName("sort_code")
1797
        SortCode sortCode;
1798

1799
        /** SPEI Records contain Mexico bank account details per the SPEI format. */
1800
        @SerializedName("spei")
1801
        Spei spei;
1802

1803
        /** The payment networks supported by this FinancialAddress. */
1804
        @SerializedName("supported_networks")
1805
        List<String> supportedNetworks;
1806

1807
        /** SWIFT Records contain U.S. bank account details per the SWIFT format. */
1808
        @SerializedName("swift")
1809
        Swift swift;
1810

1811
        /**
1812
         * The type of financial address
1813
         *
1814
         * <p>One of {@code aba}, {@code iban}, {@code sort_code}, {@code spei}, {@code swift}, or
1815
         * {@code zengin}.
1816
         */
1817
        @SerializedName("type")
1818
        String type;
1819

1820
        /** Zengin Records contain Japan bank account details per the Zengin format. */
1821
        @SerializedName("zengin")
1822
        Zengin zengin;
1823

1824
        /** ABA Records contain U.S. bank account details per the ABA format. */
1825
        @Getter
1826
        @Setter
1827
        @EqualsAndHashCode(callSuper = false)
1828
        public static class Aba extends StripeObject {
×
1829
          @SerializedName("account_holder_address")
1830
          Address accountHolderAddress;
1831

1832
          /** The account holder name. */
1833
          @SerializedName("account_holder_name")
1834
          String accountHolderName;
1835

1836
          /** The ABA account number. */
1837
          @SerializedName("account_number")
1838
          String accountNumber;
1839

1840
          /** The account type. */
1841
          @SerializedName("account_type")
1842
          String accountType;
1843

1844
          @SerializedName("bank_address")
1845
          Address bankAddress;
1846

1847
          /** The bank name. */
1848
          @SerializedName("bank_name")
1849
          String bankName;
1850

1851
          /** The ABA routing number. */
1852
          @SerializedName("routing_number")
1853
          String routingNumber;
1854
        }
1855

1856
        /** Iban Records contain E.U. bank account details per the SEPA format. */
1857
        @Getter
1858
        @Setter
1859
        @EqualsAndHashCode(callSuper = false)
1860
        public static class Iban extends StripeObject {
×
1861
          @SerializedName("account_holder_address")
1862
          Address accountHolderAddress;
1863

1864
          /** The name of the person or business that owns the bank account. */
1865
          @SerializedName("account_holder_name")
1866
          String accountHolderName;
1867

1868
          @SerializedName("bank_address")
1869
          Address bankAddress;
1870

1871
          /** The BIC/SWIFT code of the account. */
1872
          @SerializedName("bic")
1873
          String bic;
1874

1875
          /**
1876
           * Two-letter country code (<a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO
1877
           * 3166-1 alpha-2</a>).
1878
           */
1879
          @SerializedName("country")
1880
          String country;
1881

1882
          /** The IBAN of the account. */
1883
          @SerializedName("iban")
1884
          String iban;
1885
        }
1886

1887
        /** Sort Code Records contain U.K. bank account details per the sort code format. */
1888
        @Getter
1889
        @Setter
1890
        @EqualsAndHashCode(callSuper = false)
1891
        public static class SortCode extends StripeObject {
×
1892
          @SerializedName("account_holder_address")
1893
          Address accountHolderAddress;
1894

1895
          /** The name of the person or business that owns the bank account. */
1896
          @SerializedName("account_holder_name")
1897
          String accountHolderName;
1898

1899
          /** The account number. */
1900
          @SerializedName("account_number")
1901
          String accountNumber;
1902

1903
          @SerializedName("bank_address")
1904
          Address bankAddress;
1905

1906
          /** The six-digit sort code. */
1907
          @SerializedName("sort_code")
1908
          String sortCode;
1909
        }
1910

1911
        /** SPEI Records contain Mexico bank account details per the SPEI format. */
1912
        @Getter
1913
        @Setter
1914
        @EqualsAndHashCode(callSuper = false)
1915
        public static class Spei extends StripeObject {
×
1916
          @SerializedName("account_holder_address")
1917
          Address accountHolderAddress;
1918

1919
          /** The account holder name. */
1920
          @SerializedName("account_holder_name")
1921
          String accountHolderName;
1922

1923
          @SerializedName("bank_address")
1924
          Address bankAddress;
1925

1926
          /** The three-digit bank code. */
1927
          @SerializedName("bank_code")
1928
          String bankCode;
1929

1930
          /** The short banking institution name. */
1931
          @SerializedName("bank_name")
1932
          String bankName;
1933

1934
          /** The CLABE number. */
1935
          @SerializedName("clabe")
1936
          String clabe;
1937
        }
1938

1939
        /** SWIFT Records contain U.S. bank account details per the SWIFT format. */
1940
        @Getter
1941
        @Setter
1942
        @EqualsAndHashCode(callSuper = false)
1943
        public static class Swift extends StripeObject {
×
1944
          @SerializedName("account_holder_address")
1945
          Address accountHolderAddress;
1946

1947
          /** The account holder name. */
1948
          @SerializedName("account_holder_name")
1949
          String accountHolderName;
1950

1951
          /** The account number. */
1952
          @SerializedName("account_number")
1953
          String accountNumber;
1954

1955
          /** The account type. */
1956
          @SerializedName("account_type")
1957
          String accountType;
1958

1959
          @SerializedName("bank_address")
1960
          Address bankAddress;
1961

1962
          /** The bank name. */
1963
          @SerializedName("bank_name")
1964
          String bankName;
1965

1966
          /** The SWIFT code. */
1967
          @SerializedName("swift_code")
1968
          String swiftCode;
1969
        }
1970

1971
        /** Zengin Records contain Japan bank account details per the Zengin format. */
1972
        @Getter
1973
        @Setter
1974
        @EqualsAndHashCode(callSuper = false)
1975
        public static class Zengin extends StripeObject {
×
1976
          @SerializedName("account_holder_address")
1977
          Address accountHolderAddress;
1978

1979
          /** The account holder name. */
1980
          @SerializedName("account_holder_name")
1981
          String accountHolderName;
1982

1983
          /** The account number. */
1984
          @SerializedName("account_number")
1985
          String accountNumber;
1986

1987
          /** The bank account type. In Japan, this can only be {@code futsu} or {@code toza}. */
1988
          @SerializedName("account_type")
1989
          String accountType;
1990

1991
          @SerializedName("bank_address")
1992
          Address bankAddress;
1993

1994
          /** The bank code of the account. */
1995
          @SerializedName("bank_code")
1996
          String bankCode;
1997

1998
          /** The bank name of the account. */
1999
          @SerializedName("bank_name")
2000
          String bankName;
2001

2002
          /** The branch code of the account. */
2003
          @SerializedName("branch_code")
2004
          String branchCode;
2005

2006
          /** The branch name of the account. */
2007
          @SerializedName("branch_name")
2008
          String branchName;
2009
        }
2010
      }
2011
    }
2012

2013
    /**
2014
     * For more details about KonbiniDisplayDetails, please refer to the <a
2015
     * href="https://docs.stripe.com/api">API Reference.</a>
2016
     */
2017
    @Getter
2018
    @Setter
2019
    @EqualsAndHashCode(callSuper = false)
2020
    public static class KonbiniDisplayDetails extends StripeObject {
×
2021
      /** The timestamp at which the pending Konbini payment expires. */
2022
      @SerializedName("expires_at")
2023
      Long expiresAt;
2024

2025
      /**
2026
       * The URL for the Konbini payment instructions page, which allows customers to view and print
2027
       * a Konbini voucher.
2028
       */
2029
      @SerializedName("hosted_voucher_url")
2030
      String hostedVoucherUrl;
2031

2032
      @SerializedName("stores")
2033
      Stores stores;
2034

2035
      /**
2036
       * For more details about Stores, please refer to the <a
2037
       * href="https://docs.stripe.com/api">API Reference.</a>
2038
       */
2039
      @Getter
2040
      @Setter
2041
      @EqualsAndHashCode(callSuper = false)
2042
      public static class Stores extends StripeObject {
×
2043
        /** FamilyMart instruction details. */
2044
        @SerializedName("familymart")
2045
        Familymart familymart;
2046

2047
        /** Lawson instruction details. */
2048
        @SerializedName("lawson")
2049
        Lawson lawson;
2050

2051
        /** Ministop instruction details. */
2052
        @SerializedName("ministop")
2053
        Ministop ministop;
2054

2055
        /** Seicomart instruction details. */
2056
        @SerializedName("seicomart")
2057
        Seicomart seicomart;
2058

2059
        /**
2060
         * For more details about Familymart, please refer to the <a
2061
         * href="https://docs.stripe.com/api">API Reference.</a>
2062
         */
2063
        @Getter
2064
        @Setter
2065
        @EqualsAndHashCode(callSuper = false)
2066
        public static class Familymart extends StripeObject {
×
2067
          /** The confirmation number. */
2068
          @SerializedName("confirmation_number")
2069
          String confirmationNumber;
2070

2071
          /** The payment code. */
2072
          @SerializedName("payment_code")
2073
          String paymentCode;
2074
        }
2075

2076
        /**
2077
         * For more details about Lawson, please refer to the <a
2078
         * href="https://docs.stripe.com/api">API Reference.</a>
2079
         */
2080
        @Getter
2081
        @Setter
2082
        @EqualsAndHashCode(callSuper = false)
2083
        public static class Lawson extends StripeObject {
×
2084
          /** The confirmation number. */
2085
          @SerializedName("confirmation_number")
2086
          String confirmationNumber;
2087

2088
          /** The payment code. */
2089
          @SerializedName("payment_code")
2090
          String paymentCode;
2091
        }
2092

2093
        /**
2094
         * For more details about Ministop, please refer to the <a
2095
         * href="https://docs.stripe.com/api">API Reference.</a>
2096
         */
2097
        @Getter
2098
        @Setter
2099
        @EqualsAndHashCode(callSuper = false)
2100
        public static class Ministop extends StripeObject {
×
2101
          /** The confirmation number. */
2102
          @SerializedName("confirmation_number")
2103
          String confirmationNumber;
2104

2105
          /** The payment code. */
2106
          @SerializedName("payment_code")
2107
          String paymentCode;
2108
        }
2109

2110
        /**
2111
         * For more details about Seicomart, please refer to the <a
2112
         * href="https://docs.stripe.com/api">API Reference.</a>
2113
         */
2114
        @Getter
2115
        @Setter
2116
        @EqualsAndHashCode(callSuper = false)
2117
        public static class Seicomart extends StripeObject {
×
2118
          /** The confirmation number. */
2119
          @SerializedName("confirmation_number")
2120
          String confirmationNumber;
2121

2122
          /** The payment code. */
2123
          @SerializedName("payment_code")
2124
          String paymentCode;
2125
        }
2126
      }
2127
    }
2128

2129
    /**
2130
     * For more details about MultibancoDisplayDetails, please refer to the <a
2131
     * href="https://docs.stripe.com/api">API Reference.</a>
2132
     */
2133
    @Getter
2134
    @Setter
2135
    @EqualsAndHashCode(callSuper = false)
2136
    public static class MultibancoDisplayDetails extends StripeObject {
×
2137
      /** Entity number associated with this Multibanco payment. */
2138
      @SerializedName("entity")
2139
      String entity;
2140

2141
      /** The timestamp at which the Multibanco voucher expires. */
2142
      @SerializedName("expires_at")
2143
      Long expiresAt;
2144

2145
      /**
2146
       * The URL for the hosted Multibanco voucher page, which allows customers to view a Multibanco
2147
       * voucher.
2148
       */
2149
      @SerializedName("hosted_voucher_url")
2150
      String hostedVoucherUrl;
2151

2152
      /** Reference number associated with this Multibanco payment. */
2153
      @SerializedName("reference")
2154
      String reference;
2155
    }
2156

2157
    /**
2158
     * For more details about OxxoDisplayDetails, please refer to the <a
2159
     * href="https://docs.stripe.com/api">API Reference.</a>
2160
     */
2161
    @Getter
2162
    @Setter
2163
    @EqualsAndHashCode(callSuper = false)
2164
    public static class OxxoDisplayDetails extends StripeObject {
×
2165
      /** The timestamp after which the OXXO voucher expires. */
2166
      @SerializedName("expires_after")
2167
      Long expiresAfter;
2168

2169
      /**
2170
       * The URL for the hosted OXXO voucher page, which allows customers to view and print an OXXO
2171
       * voucher.
2172
       */
2173
      @SerializedName("hosted_voucher_url")
2174
      String hostedVoucherUrl;
2175

2176
      /** OXXO reference number. */
2177
      @SerializedName("number")
2178
      String number;
2179
    }
2180

2181
    /**
2182
     * For more details about PaynowDisplayQrCode, please refer to the <a
2183
     * href="https://docs.stripe.com/api">API Reference.</a>
2184
     */
2185
    @Getter
2186
    @Setter
2187
    @EqualsAndHashCode(callSuper = false)
2188
    public static class PaynowDisplayQrCode extends StripeObject {
×
2189
      /**
2190
       * The raw data string used to generate QR code, it should be used together with QR code
2191
       * library.
2192
       */
2193
      @SerializedName("data")
2194
      String data;
2195

2196
      /**
2197
       * The URL to the hosted PayNow instructions page, which allows customers to view the PayNow
2198
       * QR code.
2199
       */
2200
      @SerializedName("hosted_instructions_url")
2201
      String hostedInstructionsUrl;
2202

2203
      /** The image_url_png string used to render QR code. */
2204
      @SerializedName("image_url_png")
2205
      String imageUrlPng;
2206

2207
      /** The image_url_svg string used to render QR code. */
2208
      @SerializedName("image_url_svg")
2209
      String imageUrlSvg;
2210
    }
2211

2212
    /**
2213
     * For more details about PixDisplayQrCode, please refer to the <a
2214
     * href="https://docs.stripe.com/api">API Reference.</a>
2215
     */
2216
    @Getter
2217
    @Setter
2218
    @EqualsAndHashCode(callSuper = false)
2219
    public static class PixDisplayQrCode extends StripeObject {
×
2220
      /**
2221
       * The raw data string used to generate QR code, it should be used together with QR code
2222
       * library.
2223
       */
2224
      @SerializedName("data")
2225
      String data;
2226

2227
      /** The date (unix timestamp) when the PIX expires. */
2228
      @SerializedName("expires_at")
2229
      Long expiresAt;
2230

2231
      /**
2232
       * The URL to the hosted pix instructions page, which allows customers to view the pix QR
2233
       * code.
2234
       */
2235
      @SerializedName("hosted_instructions_url")
2236
      String hostedInstructionsUrl;
2237

2238
      /** The image_url_png string used to render png QR code. */
2239
      @SerializedName("image_url_png")
2240
      String imageUrlPng;
2241

2242
      /** The image_url_svg string used to render svg QR code. */
2243
      @SerializedName("image_url_svg")
2244
      String imageUrlSvg;
2245
    }
2246

2247
    /**
2248
     * For more details about PromptpayDisplayQrCode, please refer to the <a
2249
     * href="https://docs.stripe.com/api">API Reference.</a>
2250
     */
2251
    @Getter
2252
    @Setter
2253
    @EqualsAndHashCode(callSuper = false)
2254
    public static class PromptpayDisplayQrCode extends StripeObject {
×
2255
      /**
2256
       * The raw data string used to generate QR code, it should be used together with QR code
2257
       * library.
2258
       */
2259
      @SerializedName("data")
2260
      String data;
2261

2262
      /**
2263
       * The URL to the hosted PromptPay instructions page, which allows customers to view the
2264
       * PromptPay QR code.
2265
       */
2266
      @SerializedName("hosted_instructions_url")
2267
      String hostedInstructionsUrl;
2268

2269
      /** The PNG path used to render the QR code, can be used as the source in an HTML img tag. */
2270
      @SerializedName("image_url_png")
2271
      String imageUrlPng;
2272

2273
      /** The SVG path used to render the QR code, can be used as the source in an HTML img tag. */
2274
      @SerializedName("image_url_svg")
2275
      String imageUrlSvg;
2276
    }
2277

2278
    /**
2279
     * For more details about RedirectToUrl, please refer to the <a
2280
     * href="https://docs.stripe.com/api">API Reference.</a>
2281
     */
2282
    @Getter
2283
    @Setter
2284
    @EqualsAndHashCode(callSuper = false)
2285
    public static class RedirectToUrl extends StripeObject {
1✔
2286
      /**
2287
       * If the customer does not exit their browser while authenticating, they will be redirected
2288
       * to this specified URL after completion.
2289
       */
2290
      @SerializedName("return_url")
2291
      String returnUrl;
2292

2293
      /** The URL you must redirect your customer to in order to authenticate the payment. */
2294
      @SerializedName("url")
2295
      String url;
2296
    }
2297

2298
    /**
2299
     * For more details about SwishHandleRedirectOrDisplayQrCode, please refer to the <a
2300
     * href="https://docs.stripe.com/api">API Reference.</a>
2301
     */
2302
    @Getter
2303
    @Setter
2304
    @EqualsAndHashCode(callSuper = false)
2305
    public static class SwishHandleRedirectOrDisplayQrCode extends StripeObject {
×
2306
      /**
2307
       * The URL to the hosted Swish instructions page, which allows customers to view the QR code.
2308
       */
2309
      @SerializedName("hosted_instructions_url")
2310
      String hostedInstructionsUrl;
2311

2312
      /**
2313
       * The url for mobile redirect based auth (for internal use only and not typically available
2314
       * in standard API requests).
2315
       */
2316
      @SerializedName("mobile_auth_url")
2317
      String mobileAuthUrl;
2318

2319
      @SerializedName("qr_code")
2320
      QrCode qrCode;
2321

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

2337
        /** The image_url_png string used to render QR code. */
2338
        @SerializedName("image_url_png")
2339
        String imageUrlPng;
2340

2341
        /** The image_url_svg string used to render QR code. */
2342
        @SerializedName("image_url_svg")
2343
        String imageUrlSvg;
2344
      }
2345
    }
2346

2347
    /**
2348
     * For more details about VerifyWithMicrodeposits, please refer to the <a
2349
     * href="https://docs.stripe.com/api">API Reference.</a>
2350
     */
2351
    @Getter
2352
    @Setter
2353
    @EqualsAndHashCode(callSuper = false)
2354
    public static class VerifyWithMicrodeposits extends StripeObject {
×
2355
      /** The timestamp when the microdeposits are expected to land. */
2356
      @SerializedName("arrival_date")
2357
      Long arrivalDate;
2358

2359
      /**
2360
       * The URL for the hosted verification page, which allows customers to verify their bank
2361
       * account.
2362
       */
2363
      @SerializedName("hosted_verification_url")
2364
      String hostedVerificationUrl;
2365

2366
      /**
2367
       * The type of the microdeposit sent to the customer. Used to distinguish between different
2368
       * verification methods.
2369
       *
2370
       * <p>One of {@code amounts}, or {@code descriptor_code}.
2371
       */
2372
      @SerializedName("microdeposit_type")
2373
      String microdepositType;
2374
    }
2375

2376
    /**
2377
     * For more details about WechatPayDisplayQrCode, please refer to the <a
2378
     * href="https://docs.stripe.com/api">API Reference.</a>
2379
     */
2380
    @Getter
2381
    @Setter
2382
    @EqualsAndHashCode(callSuper = false)
2383
    public static class WechatPayDisplayQrCode extends StripeObject {
×
2384
      /** The data being used to generate QR code. */
2385
      @SerializedName("data")
2386
      String data;
2387

2388
      /**
2389
       * The URL to the hosted WeChat Pay instructions page, which allows customers to view the
2390
       * WeChat Pay QR code.
2391
       */
2392
      @SerializedName("hosted_instructions_url")
2393
      String hostedInstructionsUrl;
2394

2395
      /** The base64 image data for a pre-generated QR code. */
2396
      @SerializedName("image_data_url")
2397
      String imageDataUrl;
2398

2399
      /** The image_url_png string used to render QR code. */
2400
      @SerializedName("image_url_png")
2401
      String imageUrlPng;
2402

2403
      /** The image_url_svg string used to render QR code. */
2404
      @SerializedName("image_url_svg")
2405
      String imageUrlSvg;
2406
    }
2407

2408
    /**
2409
     * For more details about WechatPayRedirectToAndroidApp, please refer to the <a
2410
     * href="https://docs.stripe.com/api">API Reference.</a>
2411
     */
2412
    @Getter
2413
    @Setter
2414
    @EqualsAndHashCode(callSuper = false)
2415
    public static class WechatPayRedirectToAndroidApp extends StripeObject {
×
2416
      /** app_id is the APP ID registered on WeChat open platform. */
2417
      @SerializedName("app_id")
2418
      String appId;
2419

2420
      /** nonce_str is a random string. */
2421
      @SerializedName("nonce_str")
2422
      String nonceStr;
2423

2424
      /** an unique merchant ID assigned by WeChat Pay. */
2425
      @SerializedName("partner_id")
2426
      String partnerId;
2427

2428
      /** an unique trading ID assigned by WeChat Pay. */
2429
      @SerializedName("prepay_id")
2430
      String prepayId;
2431

2432
      /** A signature. */
2433
      @SerializedName("sign")
2434
      String sign;
2435

2436
      /** Specifies the current time in epoch format. */
2437
      @SerializedName("timestamp")
2438
      String timestamp;
2439

2440
      // package is a reserved word so we append an
2441
      // underscore to the private field and expose
2442
      // a custom getter and setter
2443
      @SerializedName("package")
2444
      String package_;
2445

2446
      public String getPackage() {
2447
        return this.package_;
×
2448
      }
2449

2450
      public void setPackage(String package_) {
2451
        this.package_ = package_;
×
2452
      }
×
2453
    }
2454

2455
    /**
2456
     * For more details about WechatPayRedirectToIosApp, please refer to the <a
2457
     * href="https://docs.stripe.com/api">API Reference.</a>
2458
     */
2459
    @Getter
2460
    @Setter
2461
    @EqualsAndHashCode(callSuper = false)
2462
    public static class WechatPayRedirectToIosApp extends StripeObject {
×
2463
      /** An universal link that redirect to WeChat Pay app. */
2464
      @SerializedName("native_url")
2465
      String nativeUrl;
2466
    }
2467
  }
2468

2469
  /**
2470
   * For more details about PaymentMethodConfigurationDetails, please refer to the <a
2471
   * href="https://docs.stripe.com/api">API Reference.</a>
2472
   */
2473
  @Getter
2474
  @Setter
2475
  @EqualsAndHashCode(callSuper = false)
2476
  public static class PaymentMethodConfigurationDetails extends StripeObject implements HasId {
×
2477
    /** ID of the payment method configuration used. */
2478
    @Getter(onMethod_ = {@Override})
2479
    @SerializedName("id")
2480
    String id;
2481

2482
    /** ID of the parent payment method configuration used. */
2483
    @SerializedName("parent")
2484
    String parent;
2485
  }
2486

2487
  /**
2488
   * For more details about PaymentMethodOptions, please refer to the <a
2489
   * href="https://docs.stripe.com/api">API Reference.</a>
2490
   */
2491
  @Getter
2492
  @Setter
2493
  @EqualsAndHashCode(callSuper = false)
2494
  public static class PaymentMethodOptions extends StripeObject {
1✔
2495
    @SerializedName("acss_debit")
2496
    AcssDebit acssDebit;
2497

2498
    @SerializedName("affirm")
2499
    Affirm affirm;
2500

2501
    @SerializedName("afterpay_clearpay")
2502
    AfterpayClearpay afterpayClearpay;
2503

2504
    @SerializedName("alipay")
2505
    Alipay alipay;
2506

2507
    @SerializedName("alma")
2508
    Alma alma;
2509

2510
    @SerializedName("amazon_pay")
2511
    AmazonPay amazonPay;
2512

2513
    @SerializedName("au_becs_debit")
2514
    AuBecsDebit auBecsDebit;
2515

2516
    @SerializedName("bacs_debit")
2517
    BacsDebit bacsDebit;
2518

2519
    @SerializedName("bancontact")
2520
    Bancontact bancontact;
2521

2522
    @SerializedName("blik")
2523
    Blik blik;
2524

2525
    @SerializedName("boleto")
2526
    Boleto boleto;
2527

2528
    @SerializedName("card")
2529
    Card card;
2530

2531
    @SerializedName("card_present")
2532
    CardPresent cardPresent;
2533

2534
    @SerializedName("cashapp")
2535
    Cashapp cashapp;
2536

2537
    @SerializedName("customer_balance")
2538
    CustomerBalance customerBalance;
2539

2540
    @SerializedName("eps")
2541
    Eps eps;
2542

2543
    @SerializedName("fpx")
2544
    Fpx fpx;
2545

2546
    @SerializedName("giropay")
2547
    Giropay giropay;
2548

2549
    @SerializedName("grabpay")
2550
    Grabpay grabpay;
2551

2552
    @SerializedName("ideal")
2553
    Ideal ideal;
2554

2555
    @SerializedName("interac_present")
2556
    InteracPresent interacPresent;
2557

2558
    @SerializedName("kakao_pay")
2559
    KakaoPay kakaoPay;
2560

2561
    @SerializedName("klarna")
2562
    Klarna klarna;
2563

2564
    @SerializedName("konbini")
2565
    Konbini konbini;
2566

2567
    @SerializedName("kr_card")
2568
    KrCard krCard;
2569

2570
    @SerializedName("link")
2571
    Link link;
2572

2573
    @SerializedName("mobilepay")
2574
    Mobilepay mobilepay;
2575

2576
    @SerializedName("multibanco")
2577
    Multibanco multibanco;
2578

2579
    @SerializedName("naver_pay")
2580
    NaverPay naverPay;
2581

2582
    @SerializedName("oxxo")
2583
    Oxxo oxxo;
2584

2585
    @SerializedName("p24")
2586
    P24 p24;
2587

2588
    @SerializedName("payco")
2589
    Payco payco;
2590

2591
    @SerializedName("paynow")
2592
    Paynow paynow;
2593

2594
    @SerializedName("paypal")
2595
    Paypal paypal;
2596

2597
    @SerializedName("pix")
2598
    Pix pix;
2599

2600
    @SerializedName("promptpay")
2601
    Promptpay promptpay;
2602

2603
    @SerializedName("revolut_pay")
2604
    RevolutPay revolutPay;
2605

2606
    @SerializedName("samsung_pay")
2607
    SamsungPay samsungPay;
2608

2609
    @SerializedName("sepa_debit")
2610
    SepaDebit sepaDebit;
2611

2612
    @SerializedName("sofort")
2613
    Sofort sofort;
2614

2615
    @SerializedName("swish")
2616
    Swish swish;
2617

2618
    @SerializedName("twint")
2619
    Twint twint;
2620

2621
    @SerializedName("us_bank_account")
2622
    UsBankAccount usBankAccount;
2623

2624
    @SerializedName("wechat_pay")
2625
    WechatPay wechatPay;
2626

2627
    @SerializedName("zip")
2628
    Zip zip;
2629

2630
    /**
2631
     * For more details about AcssDebit, please refer to the <a
2632
     * href="https://docs.stripe.com/api">API Reference.</a>
2633
     */
2634
    @Getter
2635
    @Setter
2636
    @EqualsAndHashCode(callSuper = false)
2637
    public static class AcssDebit extends StripeObject {
×
2638
      @SerializedName("mandate_options")
2639
      MandateOptions mandateOptions;
2640

2641
      /**
2642
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2643
       *
2644
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2645
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2646
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2647
       * actions. If you don't provide a Customer, you can still <a
2648
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2649
       * Customer after the transaction completes.
2650
       *
2651
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2652
       * and attaches a <a
2653
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2654
       * payment method representing the card to the Customer instead.
2655
       *
2656
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2657
       * with regional legislation and network rules, such as <a
2658
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2659
       *
2660
       * <p>One of {@code none}, {@code off_session}, or {@code on_session}.
2661
       */
2662
      @SerializedName("setup_future_usage")
2663
      String setupFutureUsage;
2664

2665
      /**
2666
       * Bank account verification method.
2667
       *
2668
       * <p>One of {@code automatic}, {@code instant}, or {@code microdeposits}.
2669
       */
2670
      @SerializedName("verification_method")
2671
      String verificationMethod;
2672

2673
      /**
2674
       * For more details about MandateOptions, please refer to the <a
2675
       * href="https://docs.stripe.com/api">API Reference.</a>
2676
       */
2677
      @Getter
2678
      @Setter
2679
      @EqualsAndHashCode(callSuper = false)
2680
      public static class MandateOptions extends StripeObject {
×
2681
        /** A URL for custom mandate text. */
2682
        @SerializedName("custom_mandate_url")
2683
        String customMandateUrl;
2684

2685
        /**
2686
         * Description of the interval. Only required if the 'payment_schedule' parameter is
2687
         * 'interval' or 'combined'.
2688
         */
2689
        @SerializedName("interval_description")
2690
        String intervalDescription;
2691

2692
        /**
2693
         * Payment schedule for the mandate.
2694
         *
2695
         * <p>One of {@code combined}, {@code interval}, or {@code sporadic}.
2696
         */
2697
        @SerializedName("payment_schedule")
2698
        String paymentSchedule;
2699

2700
        /**
2701
         * Transaction type of the mandate.
2702
         *
2703
         * <p>One of {@code business}, or {@code personal}.
2704
         */
2705
        @SerializedName("transaction_type")
2706
        String transactionType;
2707
      }
2708
    }
2709

2710
    /**
2711
     * For more details about Affirm, please refer to the <a href="https://docs.stripe.com/api">API
2712
     * Reference.</a>
2713
     */
2714
    @Getter
2715
    @Setter
2716
    @EqualsAndHashCode(callSuper = false)
2717
    public static class Affirm extends StripeObject {
×
2718
      /**
2719
       * Controls when the funds will be captured from the customer's account.
2720
       *
2721
       * <p>Equal to {@code manual}.
2722
       */
2723
      @SerializedName("capture_method")
2724
      String captureMethod;
2725

2726
      /** Preferred language of the Affirm authorization page that the customer is redirected to. */
2727
      @SerializedName("preferred_locale")
2728
      String preferredLocale;
2729

2730
      /**
2731
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2732
       *
2733
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2734
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2735
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2736
       * actions. If you don't provide a Customer, you can still <a
2737
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2738
       * Customer after the transaction completes.
2739
       *
2740
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2741
       * and attaches a <a
2742
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2743
       * payment method representing the card to the Customer instead.
2744
       *
2745
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2746
       * with regional legislation and network rules, such as <a
2747
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2748
       *
2749
       * <p>Equal to {@code none}.
2750
       */
2751
      @SerializedName("setup_future_usage")
2752
      String setupFutureUsage;
2753
    }
2754

2755
    /**
2756
     * For more details about AfterpayClearpay, please refer to the <a
2757
     * href="https://docs.stripe.com/api">API Reference.</a>
2758
     */
2759
    @Getter
2760
    @Setter
2761
    @EqualsAndHashCode(callSuper = false)
2762
    public static class AfterpayClearpay extends StripeObject {
×
2763
      /**
2764
       * Controls when the funds will be captured from the customer's account.
2765
       *
2766
       * <p>Equal to {@code manual}.
2767
       */
2768
      @SerializedName("capture_method")
2769
      String captureMethod;
2770

2771
      /**
2772
       * An internal identifier or reference that this payment corresponds to. You must limit the
2773
       * identifier to 128 characters, and it can only contain letters, numbers, underscores,
2774
       * backslashes, and dashes. This field differs from the statement descriptor and item name.
2775
       */
2776
      @SerializedName("reference")
2777
      String reference;
2778

2779
      /**
2780
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2781
       *
2782
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2783
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2784
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2785
       * actions. If you don't provide a Customer, you can still <a
2786
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2787
       * Customer after the transaction completes.
2788
       *
2789
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2790
       * and attaches a <a
2791
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2792
       * payment method representing the card to the Customer instead.
2793
       *
2794
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2795
       * with regional legislation and network rules, such as <a
2796
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2797
       *
2798
       * <p>Equal to {@code none}.
2799
       */
2800
      @SerializedName("setup_future_usage")
2801
      String setupFutureUsage;
2802
    }
2803

2804
    /**
2805
     * For more details about Alipay, please refer to the <a href="https://docs.stripe.com/api">API
2806
     * Reference.</a>
2807
     */
2808
    @Getter
2809
    @Setter
2810
    @EqualsAndHashCode(callSuper = false)
2811
    public static class Alipay extends StripeObject {
×
2812
      /**
2813
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2814
       *
2815
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2816
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2817
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2818
       * actions. If you don't provide a Customer, you can still <a
2819
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2820
       * Customer after the transaction completes.
2821
       *
2822
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2823
       * and attaches a <a
2824
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2825
       * payment method representing the card to the Customer instead.
2826
       *
2827
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2828
       * with regional legislation and network rules, such as <a
2829
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2830
       *
2831
       * <p>One of {@code none}, or {@code off_session}.
2832
       */
2833
      @SerializedName("setup_future_usage")
2834
      String setupFutureUsage;
2835
    }
2836

2837
    /**
2838
     * For more details about Alma, please refer to the <a href="https://docs.stripe.com/api">API
2839
     * Reference.</a>
2840
     */
2841
    @Getter
2842
    @Setter
2843
    @EqualsAndHashCode(callSuper = false)
2844
    public static class Alma extends StripeObject {
×
2845
      /**
2846
       * Controls when the funds will be captured from the customer's account.
2847
       *
2848
       * <p>Equal to {@code manual}.
2849
       */
2850
      @SerializedName("capture_method")
2851
      String captureMethod;
2852
    }
2853

2854
    /**
2855
     * For more details about AmazonPay, please refer to the <a
2856
     * href="https://docs.stripe.com/api">API Reference.</a>
2857
     */
2858
    @Getter
2859
    @Setter
2860
    @EqualsAndHashCode(callSuper = false)
2861
    public static class AmazonPay extends StripeObject {
×
2862
      /**
2863
       * Controls when the funds will be captured from the customer's account.
2864
       *
2865
       * <p>Equal to {@code manual}.
2866
       */
2867
      @SerializedName("capture_method")
2868
      String captureMethod;
2869

2870
      /**
2871
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2872
       *
2873
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2874
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2875
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2876
       * actions. If you don't provide a Customer, you can still <a
2877
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2878
       * Customer after the transaction completes.
2879
       *
2880
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2881
       * and attaches a <a
2882
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2883
       * payment method representing the card to the Customer instead.
2884
       *
2885
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2886
       * with regional legislation and network rules, such as <a
2887
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2888
       *
2889
       * <p>One of {@code none}, or {@code off_session}.
2890
       */
2891
      @SerializedName("setup_future_usage")
2892
      String setupFutureUsage;
2893
    }
2894

2895
    /**
2896
     * For more details about AuBecsDebit, please refer to the <a
2897
     * href="https://docs.stripe.com/api">API Reference.</a>
2898
     */
2899
    @Getter
2900
    @Setter
2901
    @EqualsAndHashCode(callSuper = false)
2902
    public static class AuBecsDebit extends StripeObject {
×
2903
      /**
2904
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2905
       *
2906
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2907
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2908
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2909
       * actions. If you don't provide a Customer, you can still <a
2910
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2911
       * Customer after the transaction completes.
2912
       *
2913
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2914
       * and attaches a <a
2915
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2916
       * payment method representing the card to the Customer instead.
2917
       *
2918
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2919
       * with regional legislation and network rules, such as <a
2920
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2921
       *
2922
       * <p>One of {@code none}, {@code off_session}, or {@code on_session}.
2923
       */
2924
      @SerializedName("setup_future_usage")
2925
      String setupFutureUsage;
2926
    }
2927

2928
    /**
2929
     * For more details about BacsDebit, please refer to the <a
2930
     * href="https://docs.stripe.com/api">API Reference.</a>
2931
     */
2932
    @Getter
2933
    @Setter
2934
    @EqualsAndHashCode(callSuper = false)
2935
    public static class BacsDebit extends StripeObject {
×
2936
      @SerializedName("mandate_options")
2937
      MandateOptions mandateOptions;
2938

2939
      /**
2940
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2941
       *
2942
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
2943
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
2944
       * Customer after the PaymentIntent is confirmed and the customer completes any required
2945
       * actions. If you don't provide a Customer, you can still <a
2946
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
2947
       * Customer after the transaction completes.
2948
       *
2949
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
2950
       * and attaches a <a
2951
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
2952
       * payment method representing the card to the Customer instead.
2953
       *
2954
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
2955
       * with regional legislation and network rules, such as <a
2956
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
2957
       *
2958
       * <p>One of {@code none}, {@code off_session}, or {@code on_session}.
2959
       */
2960
      @SerializedName("setup_future_usage")
2961
      String setupFutureUsage;
2962

2963
      /**
2964
       * For more details about MandateOptions, please refer to the <a
2965
       * href="https://docs.stripe.com/api">API Reference.</a>
2966
       */
2967
      @Getter
2968
      @Setter
2969
      @EqualsAndHashCode(callSuper = false)
NEW
2970
      public static class MandateOptions extends StripeObject {
×
2971
        /**
2972
         * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must
2973
         * consist of only uppercase letters, numbers, spaces, or the following special characters:
2974
         * '/', '_', '-', '&amp;', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
2975
         */
2976
        @SerializedName("reference_prefix")
2977
        String referencePrefix;
2978
      }
2979
    }
2980

2981
    /**
2982
     * For more details about Bancontact, please refer to the <a
2983
     * href="https://docs.stripe.com/api">API Reference.</a>
2984
     */
2985
    @Getter
2986
    @Setter
2987
    @EqualsAndHashCode(callSuper = false)
2988
    public static class Bancontact extends StripeObject {
×
2989
      /**
2990
       * Preferred language of the Bancontact authorization page that the customer is redirected to.
2991
       *
2992
       * <p>One of {@code de}, {@code en}, {@code fr}, or {@code nl}.
2993
       */
2994
      @SerializedName("preferred_language")
2995
      String preferredLanguage;
2996

2997
      /**
2998
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
2999
       *
3000
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3001
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3002
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3003
       * actions. If you don't provide a Customer, you can still <a
3004
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3005
       * Customer after the transaction completes.
3006
       *
3007
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3008
       * and attaches a <a
3009
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3010
       * payment method representing the card to the Customer instead.
3011
       *
3012
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3013
       * with regional legislation and network rules, such as <a
3014
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3015
       *
3016
       * <p>One of {@code none}, or {@code off_session}.
3017
       */
3018
      @SerializedName("setup_future_usage")
3019
      String setupFutureUsage;
3020
    }
3021

3022
    /**
3023
     * For more details about Blik, please refer to the <a href="https://docs.stripe.com/api">API
3024
     * Reference.</a>
3025
     */
3026
    @Getter
3027
    @Setter
3028
    @EqualsAndHashCode(callSuper = false)
3029
    public static class Blik extends StripeObject {
×
3030
      /**
3031
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3032
       *
3033
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3034
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3035
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3036
       * actions. If you don't provide a Customer, you can still <a
3037
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3038
       * Customer after the transaction completes.
3039
       *
3040
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3041
       * and attaches a <a
3042
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3043
       * payment method representing the card to the Customer instead.
3044
       *
3045
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3046
       * with regional legislation and network rules, such as <a
3047
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3048
       *
3049
       * <p>Equal to {@code none}.
3050
       */
3051
      @SerializedName("setup_future_usage")
3052
      String setupFutureUsage;
3053
    }
3054

3055
    /**
3056
     * For more details about Boleto, please refer to the <a href="https://docs.stripe.com/api">API
3057
     * Reference.</a>
3058
     */
3059
    @Getter
3060
    @Setter
3061
    @EqualsAndHashCode(callSuper = false)
3062
    public static class Boleto extends StripeObject {
×
3063
      /**
3064
       * The number of calendar days before a Boleto voucher expires. For example, if you create a
3065
       * Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will
3066
       * expire on Wednesday at 23:59 America/Sao_Paulo time.
3067
       */
3068
      @SerializedName("expires_after_days")
3069
      Long expiresAfterDays;
3070

3071
      /**
3072
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3073
       *
3074
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3075
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3076
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3077
       * actions. If you don't provide a Customer, you can still <a
3078
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3079
       * Customer after the transaction completes.
3080
       *
3081
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3082
       * and attaches a <a
3083
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3084
       * payment method representing the card to the Customer instead.
3085
       *
3086
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3087
       * with regional legislation and network rules, such as <a
3088
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3089
       *
3090
       * <p>One of {@code none}, {@code off_session}, or {@code on_session}.
3091
       */
3092
      @SerializedName("setup_future_usage")
3093
      String setupFutureUsage;
3094
    }
3095

3096
    /**
3097
     * For more details about Card, please refer to the <a href="https://docs.stripe.com/api">API
3098
     * Reference.</a>
3099
     */
3100
    @Getter
3101
    @Setter
3102
    @EqualsAndHashCode(callSuper = false)
3103
    public static class Card extends StripeObject {
×
3104
      /**
3105
       * Controls when the funds will be captured from the customer's account.
3106
       *
3107
       * <p>Equal to {@code manual}.
3108
       */
3109
      @SerializedName("capture_method")
3110
      String captureMethod;
3111

3112
      /**
3113
       * Installment details for this payment (Mexico only).
3114
       *
3115
       * <p>For more information, see the <a
3116
       * href="https://stripe.com/docs/payments/installments">installments integration guide</a>.
3117
       */
3118
      @SerializedName("installments")
3119
      Installments installments;
3120

3121
      /** Configuration options for setting up an eMandate for cards issued in India. */
3122
      @SerializedName("mandate_options")
3123
      MandateOptions mandateOptions;
3124

3125
      /**
3126
       * Selected network to process this payment intent on. Depends on the available networks of
3127
       * the card attached to the payment intent. Can be only set confirm-time.
3128
       */
3129
      @SerializedName("network")
3130
      String network;
3131

3132
      /**
3133
       * Request ability to <a
3134
       * href="https://stripe.com/docs/payments/extended-authorization">capture beyond the standard
3135
       * authorization validity window</a> for this PaymentIntent.
3136
       *
3137
       * <p>One of {@code if_available}, or {@code never}.
3138
       */
3139
      @SerializedName("request_extended_authorization")
3140
      String requestExtendedAuthorization;
3141

3142
      /**
3143
       * Request ability to <a
3144
       * href="https://stripe.com/docs/payments/incremental-authorization">increment the
3145
       * authorization</a> for this PaymentIntent.
3146
       *
3147
       * <p>One of {@code if_available}, or {@code never}.
3148
       */
3149
      @SerializedName("request_incremental_authorization")
3150
      String requestIncrementalAuthorization;
3151

3152
      /**
3153
       * Request ability to make <a href="https://stripe.com/docs/payments/multicapture">multiple
3154
       * captures</a> for this PaymentIntent.
3155
       *
3156
       * <p>One of {@code if_available}, or {@code never}.
3157
       */
3158
      @SerializedName("request_multicapture")
3159
      String requestMulticapture;
3160

3161
      /**
3162
       * Request ability to <a href="https://stripe.com/docs/payments/overcapture">overcapture</a>
3163
       * for this PaymentIntent.
3164
       *
3165
       * <p>One of {@code if_available}, or {@code never}.
3166
       */
3167
      @SerializedName("request_overcapture")
3168
      String requestOvercapture;
3169

3170
      /**
3171
       * We strongly recommend that you rely on our SCA Engine to automatically prompt your
3172
       * customers for authentication based on risk level and <a
3173
       * href="https://stripe.com/docs/strong-customer-authentication">other requirements</a>.
3174
       * However, if you wish to request 3D Secure based on logic from your own fraud engine,
3175
       * provide this option. If not provided, this value defaults to {@code automatic}. Read our
3176
       * guide on <a
3177
       * href="https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds">manually
3178
       * requesting 3D Secure</a> for more information on how this configuration interacts with
3179
       * Radar and our SCA Engine.
3180
       *
3181
       * <p>One of {@code any}, {@code automatic}, or {@code challenge}.
3182
       */
3183
      @SerializedName("request_three_d_secure")
3184
      String requestThreeDSecure;
3185

3186
      /**
3187
       * When enabled, using a card that is attached to a customer will require the CVC to be
3188
       * provided again (i.e. using the cvc_token parameter).
3189
       */
3190
      @SerializedName("require_cvc_recollection")
3191
      Boolean requireCvcRecollection;
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>One of {@code none}, {@code off_session}, or {@code on_session}.
3213
       */
3214
      @SerializedName("setup_future_usage")
3215
      String setupFutureUsage;
3216

3217
      /**
3218
       * Provides information about a card payment that customers see on their statements.
3219
       * Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor
3220
       * that’s set on the account to form the complete statement descriptor. Maximum 22 characters.
3221
       * On card statements, the <em>concatenation</em> of both prefix and suffix (including
3222
       * separators) will appear truncated to 22 characters.
3223
       */
3224
      @SerializedName("statement_descriptor_suffix_kana")
3225
      String statementDescriptorSuffixKana;
3226

3227
      /**
3228
       * Provides information about a card payment that customers see on their statements.
3229
       * Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement
3230
       * descriptor that’s set on the account to form the complete statement descriptor. Maximum 17
3231
       * characters. On card statements, the <em>concatenation</em> of both prefix and suffix
3232
       * (including separators) will appear truncated to 17 characters.
3233
       */
3234
      @SerializedName("statement_descriptor_suffix_kanji")
3235
      String statementDescriptorSuffixKanji;
3236

3237
      /**
3238
       * For more details about Installments, please refer to the <a
3239
       * href="https://docs.stripe.com/api">API Reference.</a>
3240
       */
3241
      @Getter
3242
      @Setter
3243
      @EqualsAndHashCode(callSuper = false)
3244
      public static class Installments extends StripeObject {
×
3245
        /** Installment plans that may be selected for this PaymentIntent. */
3246
        @SerializedName("available_plans")
3247
        List<PaymentIntent.PaymentMethodOptions.Card.Installments.AvailablePlan> availablePlans;
3248

3249
        /** Whether Installments are enabled for this PaymentIntent. */
3250
        @SerializedName("enabled")
3251
        Boolean enabled;
3252

3253
        /** Installment plan selected for this PaymentIntent. */
3254
        @SerializedName("plan")
3255
        Plan plan;
3256

3257
        /**
3258
         * For more details about AvailablePlan, please refer to the <a
3259
         * href="https://docs.stripe.com/api">API Reference.</a>
3260
         */
3261
        @Getter
3262
        @Setter
3263
        @EqualsAndHashCode(callSuper = false)
3264
        public static class AvailablePlan extends StripeObject {
×
3265
          /**
3266
           * For {@code fixed_count} installment plans, this is the number of installment payments
3267
           * your customer will make to their credit card.
3268
           */
3269
          @SerializedName("count")
3270
          Long count;
3271

3272
          /**
3273
           * For {@code fixed_count} installment plans, this is the interval between installment
3274
           * payments your customer will make to their credit card. One of {@code month}.
3275
           */
3276
          @SerializedName("interval")
3277
          String interval;
3278

3279
          /** Type of installment plan, one of {@code fixed_count}. */
3280
          @SerializedName("type")
3281
          String type;
3282
        }
3283

3284
        /**
3285
         * For more details about Plan, please refer to the <a
3286
         * href="https://docs.stripe.com/api">API Reference.</a>
3287
         */
3288
        @Getter
3289
        @Setter
3290
        @EqualsAndHashCode(callSuper = false)
3291
        public static class Plan extends StripeObject {
×
3292
          /**
3293
           * For {@code fixed_count} installment plans, this is the number of installment payments
3294
           * your customer will make to their credit card.
3295
           */
3296
          @SerializedName("count")
3297
          Long count;
3298

3299
          /**
3300
           * For {@code fixed_count} installment plans, this is the interval between installment
3301
           * payments your customer will make to their credit card. One of {@code month}.
3302
           */
3303
          @SerializedName("interval")
3304
          String interval;
3305

3306
          /** Type of installment plan, one of {@code fixed_count}. */
3307
          @SerializedName("type")
3308
          String type;
3309
        }
3310
      }
3311

3312
      /**
3313
       * For more details about MandateOptions, please refer to the <a
3314
       * href="https://docs.stripe.com/api">API Reference.</a>
3315
       */
3316
      @Getter
3317
      @Setter
3318
      @EqualsAndHashCode(callSuper = false)
3319
      public static class MandateOptions extends StripeObject {
×
3320
        /** Amount to be charged for future payments. */
3321
        @SerializedName("amount")
3322
        Long amount;
3323

3324
        /**
3325
         * One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
3326
         * refers to the exact amount to be charged in future payments. If {@code maximum}, the
3327
         * amount charged can be up to the value passed for the {@code amount} param.
3328
         */
3329
        @SerializedName("amount_type")
3330
        String amountType;
3331

3332
        /**
3333
         * A description of the mandate or subscription that is meant to be displayed to the
3334
         * customer.
3335
         */
3336
        @SerializedName("description")
3337
        String description;
3338

3339
        /**
3340
         * End date of the mandate or subscription. If not provided, the mandate will be active
3341
         * until canceled. If provided, end date should be after start date.
3342
         */
3343
        @SerializedName("end_date")
3344
        Long endDate;
3345

3346
        /**
3347
         * Specifies payment frequency. One of {@code day}, {@code week}, {@code month}, {@code
3348
         * year}, or {@code sporadic}.
3349
         */
3350
        @SerializedName("interval")
3351
        String interval;
3352

3353
        /**
3354
         * The number of intervals between payments. For example, {@code interval=month} and {@code
3355
         * interval_count=3} indicates one payment every three months. Maximum of one year interval
3356
         * allowed (1 year, 12 months, or 52 weeks). This parameter is optional when {@code
3357
         * interval=sporadic}.
3358
         */
3359
        @SerializedName("interval_count")
3360
        Long intervalCount;
3361

3362
        /** Unique identifier for the mandate or subscription. */
3363
        @SerializedName("reference")
3364
        String reference;
3365

3366
        /**
3367
         * Start date of the mandate or subscription. Start date should not be lesser than
3368
         * yesterday.
3369
         */
3370
        @SerializedName("start_date")
3371
        Long startDate;
3372

3373
        /** Specifies the type of mandates supported. Possible values are {@code india}. */
3374
        @SerializedName("supported_types")
3375
        List<String> supportedTypes;
3376
      }
3377
    }
3378

3379
    /**
3380
     * For more details about CardPresent, please refer to the <a
3381
     * href="https://docs.stripe.com/api">API Reference.</a>
3382
     */
3383
    @Getter
3384
    @Setter
3385
    @EqualsAndHashCode(callSuper = false)
3386
    public static class CardPresent extends StripeObject {
×
3387
      /**
3388
       * Request ability to capture this payment beyond the standard <a
3389
       * href="https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity">authorization
3390
       * validity window.</a>
3391
       */
3392
      @SerializedName("request_extended_authorization")
3393
      Boolean requestExtendedAuthorization;
3394

3395
      /**
3396
       * Request ability to <a
3397
       * href="https://stripe.com/docs/terminal/features/incremental-authorizations">increment</a>
3398
       * this PaymentIntent if the combination of MCC and card brand is eligible. Check <a
3399
       * href="https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported">incremental_authorization_supported</a>
3400
       * in the <a href="https://stripe.com/docs/api/payment_intents/confirm">Confirm</a> response
3401
       * to verify support.
3402
       */
3403
      @SerializedName("request_incremental_authorization_support")
3404
      Boolean requestIncrementalAuthorizationSupport;
3405

3406
      @SerializedName("routing")
3407
      Routing routing;
3408

3409
      /**
3410
       * For more details about Routing, please refer to the <a
3411
       * href="https://docs.stripe.com/api">API Reference.</a>
3412
       */
3413
      @Getter
3414
      @Setter
3415
      @EqualsAndHashCode(callSuper = false)
3416
      public static class Routing extends StripeObject {
×
3417
        /**
3418
         * Requested routing priority
3419
         *
3420
         * <p>One of {@code domestic}, or {@code international}.
3421
         */
3422
        @SerializedName("requested_priority")
3423
        String requestedPriority;
3424
      }
3425
    }
3426

3427
    /**
3428
     * For more details about Cashapp, please refer to the <a href="https://docs.stripe.com/api">API
3429
     * Reference.</a>
3430
     */
3431
    @Getter
3432
    @Setter
3433
    @EqualsAndHashCode(callSuper = false)
3434
    public static class Cashapp extends StripeObject {
×
3435
      /**
3436
       * Controls when the funds will be captured from the customer's account.
3437
       *
3438
       * <p>Equal to {@code manual}.
3439
       */
3440
      @SerializedName("capture_method")
3441
      String captureMethod;
3442

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

3468
    /**
3469
     * For more details about CustomerBalance, please refer to the <a
3470
     * href="https://docs.stripe.com/api">API Reference.</a>
3471
     */
3472
    @Getter
3473
    @Setter
3474
    @EqualsAndHashCode(callSuper = false)
3475
    public static class CustomerBalance extends StripeObject {
×
3476
      @SerializedName("bank_transfer")
3477
      BankTransfer bankTransfer;
3478

3479
      /**
3480
       * The funding method type to be used when there are not enough funds in the customer balance.
3481
       * Permitted values include: {@code bank_transfer}.
3482
       *
3483
       * <p>Equal to {@code bank_transfer}.
3484
       */
3485
      @SerializedName("funding_type")
3486
      String fundingType;
3487

3488
      /**
3489
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3490
       *
3491
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3492
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3493
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3494
       * actions. If you don't provide a Customer, you can still <a
3495
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3496
       * Customer after the transaction completes.
3497
       *
3498
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3499
       * and attaches a <a
3500
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3501
       * payment method representing the card to the Customer instead.
3502
       *
3503
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3504
       * with regional legislation and network rules, such as <a
3505
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3506
       *
3507
       * <p>Equal to {@code none}.
3508
       */
3509
      @SerializedName("setup_future_usage")
3510
      String setupFutureUsage;
3511

3512
      /**
3513
       * For more details about BankTransfer, please refer to the <a
3514
       * href="https://docs.stripe.com/api">API Reference.</a>
3515
       */
3516
      @Getter
3517
      @Setter
3518
      @EqualsAndHashCode(callSuper = false)
3519
      public static class BankTransfer extends StripeObject {
×
3520
        @SerializedName("eu_bank_transfer")
3521
        EuBankTransfer euBankTransfer;
3522

3523
        /**
3524
         * List of address types that should be returned in the financial_addresses response. If not
3525
         * specified, all valid types will be returned.
3526
         *
3527
         * <p>Permitted values include: {@code sort_code}, {@code zengin}, {@code iban}, or {@code
3528
         * spei}.
3529
         */
3530
        @SerializedName("requested_address_types")
3531
        List<String> requestedAddressTypes;
3532

3533
        /**
3534
         * The bank transfer type that this PaymentIntent is allowed to use for funding Permitted
3535
         * values include: {@code eu_bank_transfer}, {@code gb_bank_transfer}, {@code
3536
         * jp_bank_transfer}, {@code mx_bank_transfer}, or {@code us_bank_transfer}.
3537
         *
3538
         * <p>One of {@code eu_bank_transfer}, {@code gb_bank_transfer}, {@code jp_bank_transfer},
3539
         * {@code mx_bank_transfer}, or {@code us_bank_transfer}.
3540
         */
3541
        @SerializedName("type")
3542
        String type;
3543

3544
        /**
3545
         * For more details about EuBankTransfer, please refer to the <a
3546
         * href="https://docs.stripe.com/api">API Reference.</a>
3547
         */
3548
        @Getter
3549
        @Setter
3550
        @EqualsAndHashCode(callSuper = false)
3551
        public static class EuBankTransfer extends StripeObject {
×
3552
          /**
3553
           * The desired country code of the bank account information. Permitted values include:
3554
           * {@code BE}, {@code DE}, {@code ES}, {@code FR}, {@code IE}, or {@code NL}.
3555
           *
3556
           * <p>One of {@code BE}, {@code DE}, {@code ES}, {@code FR}, {@code IE}, or {@code NL}.
3557
           */
3558
          @SerializedName("country")
3559
          String country;
3560
        }
3561
      }
3562
    }
3563

3564
    /**
3565
     * For more details about Eps, please refer to the <a href="https://docs.stripe.com/api">API
3566
     * Reference.</a>
3567
     */
3568
    @Getter
3569
    @Setter
3570
    @EqualsAndHashCode(callSuper = false)
3571
    public static class Eps extends StripeObject {
×
3572
      /**
3573
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3574
       *
3575
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3576
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3577
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3578
       * actions. If you don't provide a Customer, you can still <a
3579
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3580
       * Customer after the transaction completes.
3581
       *
3582
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3583
       * and attaches a <a
3584
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3585
       * payment method representing the card to the Customer instead.
3586
       *
3587
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3588
       * with regional legislation and network rules, such as <a
3589
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3590
       *
3591
       * <p>Equal to {@code none}.
3592
       */
3593
      @SerializedName("setup_future_usage")
3594
      String setupFutureUsage;
3595
    }
3596

3597
    /**
3598
     * For more details about Fpx, please refer to the <a href="https://docs.stripe.com/api">API
3599
     * Reference.</a>
3600
     */
3601
    @Getter
3602
    @Setter
3603
    @EqualsAndHashCode(callSuper = false)
3604
    public static class Fpx extends StripeObject {
×
3605
      /**
3606
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3607
       *
3608
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3609
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3610
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3611
       * actions. If you don't provide a Customer, you can still <a
3612
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3613
       * Customer after the transaction completes.
3614
       *
3615
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3616
       * and attaches a <a
3617
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3618
       * payment method representing the card to the Customer instead.
3619
       *
3620
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3621
       * with regional legislation and network rules, such as <a
3622
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3623
       *
3624
       * <p>Equal to {@code none}.
3625
       */
3626
      @SerializedName("setup_future_usage")
3627
      String setupFutureUsage;
3628
    }
3629

3630
    /**
3631
     * For more details about Giropay, please refer to the <a href="https://docs.stripe.com/api">API
3632
     * Reference.</a>
3633
     */
3634
    @Getter
3635
    @Setter
3636
    @EqualsAndHashCode(callSuper = false)
3637
    public static class Giropay extends StripeObject {
×
3638
      /**
3639
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3640
       *
3641
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3642
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3643
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3644
       * actions. If you don't provide a Customer, you can still <a
3645
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3646
       * Customer after the transaction completes.
3647
       *
3648
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3649
       * and attaches a <a
3650
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3651
       * payment method representing the card to the Customer instead.
3652
       *
3653
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3654
       * with regional legislation and network rules, such as <a
3655
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3656
       *
3657
       * <p>Equal to {@code none}.
3658
       */
3659
      @SerializedName("setup_future_usage")
3660
      String setupFutureUsage;
3661
    }
3662

3663
    /**
3664
     * For more details about Grabpay, please refer to the <a href="https://docs.stripe.com/api">API
3665
     * Reference.</a>
3666
     */
3667
    @Getter
3668
    @Setter
3669
    @EqualsAndHashCode(callSuper = false)
3670
    public static class Grabpay extends StripeObject {
×
3671
      /**
3672
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3673
       *
3674
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3675
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3676
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3677
       * actions. If you don't provide a Customer, you can still <a
3678
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3679
       * Customer after the transaction completes.
3680
       *
3681
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3682
       * and attaches a <a
3683
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3684
       * payment method representing the card to the Customer instead.
3685
       *
3686
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3687
       * with regional legislation and network rules, such as <a
3688
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3689
       *
3690
       * <p>Equal to {@code none}.
3691
       */
3692
      @SerializedName("setup_future_usage")
3693
      String setupFutureUsage;
3694
    }
3695

3696
    /**
3697
     * For more details about Ideal, please refer to the <a href="https://docs.stripe.com/api">API
3698
     * Reference.</a>
3699
     */
3700
    @Getter
3701
    @Setter
3702
    @EqualsAndHashCode(callSuper = false)
3703
    public static class Ideal extends StripeObject {
×
3704
      /**
3705
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3706
       *
3707
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3708
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3709
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3710
       * actions. If you don't provide a Customer, you can still <a
3711
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3712
       * Customer after the transaction completes.
3713
       *
3714
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3715
       * and attaches a <a
3716
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3717
       * payment method representing the card to the Customer instead.
3718
       *
3719
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3720
       * with regional legislation and network rules, such as <a
3721
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3722
       *
3723
       * <p>One of {@code none}, or {@code off_session}.
3724
       */
3725
      @SerializedName("setup_future_usage")
3726
      String setupFutureUsage;
3727
    }
3728

3729
    /**
3730
     * For more details about InteracPresent, please refer to the <a
3731
     * href="https://docs.stripe.com/api">API Reference.</a>
3732
     */
3733
    @Getter
3734
    @Setter
3735
    @EqualsAndHashCode(callSuper = false)
3736
    public static class InteracPresent extends StripeObject {}
×
3737

3738
    /**
3739
     * For more details about KakaoPay, please refer to the <a
3740
     * href="https://docs.stripe.com/api">API Reference.</a>
3741
     */
3742
    @Getter
3743
    @Setter
3744
    @EqualsAndHashCode(callSuper = false)
3745
    public static class KakaoPay extends StripeObject {
×
3746
      /**
3747
       * Controls when the funds will be captured from the customer's account.
3748
       *
3749
       * <p>Equal to {@code manual}.
3750
       */
3751
      @SerializedName("capture_method")
3752
      String captureMethod;
3753

3754
      /**
3755
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3756
       *
3757
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3758
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3759
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3760
       * actions. If you don't provide a Customer, you can still <a
3761
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3762
       * Customer after the transaction completes.
3763
       *
3764
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3765
       * and attaches a <a
3766
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3767
       * payment method representing the card to the Customer instead.
3768
       *
3769
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3770
       * with regional legislation and network rules, such as <a
3771
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3772
       *
3773
       * <p>One of {@code none}, or {@code off_session}.
3774
       */
3775
      @SerializedName("setup_future_usage")
3776
      String setupFutureUsage;
3777
    }
3778

3779
    /**
3780
     * For more details about Klarna, please refer to the <a href="https://docs.stripe.com/api">API
3781
     * Reference.</a>
3782
     */
3783
    @Getter
3784
    @Setter
3785
    @EqualsAndHashCode(callSuper = false)
3786
    public static class Klarna extends StripeObject {
×
3787
      /**
3788
       * Controls when the funds will be captured from the customer's account.
3789
       *
3790
       * <p>Equal to {@code manual}.
3791
       */
3792
      @SerializedName("capture_method")
3793
      String captureMethod;
3794

3795
      /** Preferred locale of the Klarna checkout page that the customer is redirected to. */
3796
      @SerializedName("preferred_locale")
3797
      String preferredLocale;
3798

3799
      /**
3800
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3801
       *
3802
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3803
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3804
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3805
       * actions. If you don't provide a Customer, you can still <a
3806
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3807
       * Customer after the transaction completes.
3808
       *
3809
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3810
       * and attaches a <a
3811
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3812
       * payment method representing the card to the Customer instead.
3813
       *
3814
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3815
       * with regional legislation and network rules, such as <a
3816
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3817
       *
3818
       * <p>Equal to {@code none}.
3819
       */
3820
      @SerializedName("setup_future_usage")
3821
      String setupFutureUsage;
3822
    }
3823

3824
    /**
3825
     * For more details about Konbini, please refer to the <a href="https://docs.stripe.com/api">API
3826
     * Reference.</a>
3827
     */
3828
    @Getter
3829
    @Setter
3830
    @EqualsAndHashCode(callSuper = false)
3831
    public static class Konbini extends StripeObject {
×
3832
      /**
3833
       * An optional 10 to 11 digit numeric-only string determining the confirmation code at
3834
       * applicable convenience stores.
3835
       */
3836
      @SerializedName("confirmation_number")
3837
      String confirmationNumber;
3838

3839
      /**
3840
       * The number of calendar days (between 1 and 60) after which Konbini payment instructions
3841
       * will expire. For example, if a PaymentIntent is confirmed with Konbini and {@code
3842
       * expires_after_days} set to 2 on Monday JST, the instructions will expire on Wednesday
3843
       * 23:59:59 JST.
3844
       */
3845
      @SerializedName("expires_after_days")
3846
      Long expiresAfterDays;
3847

3848
      /**
3849
       * The timestamp at which the Konbini payment instructions will expire. Only one of {@code
3850
       * expires_after_days} or {@code expires_at} may be set.
3851
       */
3852
      @SerializedName("expires_at")
3853
      Long expiresAt;
3854

3855
      /**
3856
       * A product descriptor of up to 22 characters, which will appear to customers at the
3857
       * convenience store.
3858
       */
3859
      @SerializedName("product_description")
3860
      String productDescription;
3861

3862
      /**
3863
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3864
       *
3865
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3866
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3867
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3868
       * actions. If you don't provide a Customer, you can still <a
3869
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3870
       * Customer after the transaction completes.
3871
       *
3872
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3873
       * and attaches a <a
3874
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3875
       * payment method representing the card to the Customer instead.
3876
       *
3877
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3878
       * with regional legislation and network rules, such as <a
3879
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3880
       *
3881
       * <p>Equal to {@code none}.
3882
       */
3883
      @SerializedName("setup_future_usage")
3884
      String setupFutureUsage;
3885
    }
3886

3887
    /**
3888
     * For more details about KrCard, please refer to the <a href="https://docs.stripe.com/api">API
3889
     * Reference.</a>
3890
     */
3891
    @Getter
3892
    @Setter
3893
    @EqualsAndHashCode(callSuper = false)
3894
    public static class KrCard extends StripeObject {
×
3895
      /**
3896
       * Controls when the funds will be captured from the customer's account.
3897
       *
3898
       * <p>Equal to {@code manual}.
3899
       */
3900
      @SerializedName("capture_method")
3901
      String captureMethod;
3902

3903
      /**
3904
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3905
       *
3906
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3907
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3908
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3909
       * actions. If you don't provide a Customer, you can still <a
3910
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3911
       * Customer after the transaction completes.
3912
       *
3913
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3914
       * and attaches a <a
3915
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3916
       * payment method representing the card to the Customer instead.
3917
       *
3918
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3919
       * with regional legislation and network rules, such as <a
3920
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3921
       *
3922
       * <p>One of {@code none}, or {@code off_session}.
3923
       */
3924
      @SerializedName("setup_future_usage")
3925
      String setupFutureUsage;
3926
    }
3927

3928
    /**
3929
     * For more details about Link, please refer to the <a href="https://docs.stripe.com/api">API
3930
     * Reference.</a>
3931
     */
3932
    @Getter
3933
    @Setter
3934
    @EqualsAndHashCode(callSuper = false)
3935
    public static class Link extends StripeObject {
×
3936
      /**
3937
       * Controls when the funds will be captured from the customer's account.
3938
       *
3939
       * <p>Equal to {@code manual}.
3940
       */
3941
      @SerializedName("capture_method")
3942
      String captureMethod;
3943

3944
      /** [Deprecated] This is a legacy parameter that no longer has any function. */
3945
      @SerializedName("persistent_token")
3946
      @Deprecated
3947
      String persistentToken;
3948

3949
      /**
3950
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3951
       *
3952
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3953
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3954
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3955
       * actions. If you don't provide a Customer, you can still <a
3956
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3957
       * Customer after the transaction completes.
3958
       *
3959
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
3960
       * and attaches a <a
3961
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
3962
       * payment method representing the card to the Customer instead.
3963
       *
3964
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
3965
       * with regional legislation and network rules, such as <a
3966
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
3967
       *
3968
       * <p>One of {@code none}, or {@code off_session}.
3969
       */
3970
      @SerializedName("setup_future_usage")
3971
      String setupFutureUsage;
3972
    }
3973

3974
    /**
3975
     * For more details about Mobilepay, please refer to the <a
3976
     * href="https://docs.stripe.com/api">API Reference.</a>
3977
     */
3978
    @Getter
3979
    @Setter
3980
    @EqualsAndHashCode(callSuper = false)
3981
    public static class Mobilepay extends StripeObject {
×
3982
      /**
3983
       * Controls when the funds will be captured from the customer's account.
3984
       *
3985
       * <p>Equal to {@code manual}.
3986
       */
3987
      @SerializedName("capture_method")
3988
      String captureMethod;
3989

3990
      /**
3991
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
3992
       *
3993
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
3994
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
3995
       * Customer after the PaymentIntent is confirmed and the customer completes any required
3996
       * actions. If you don't provide a Customer, you can still <a
3997
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
3998
       * Customer after the transaction completes.
3999
       *
4000
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
4001
       * and attaches a <a
4002
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
4003
       * payment method representing the card to the Customer instead.
4004
       *
4005
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
4006
       * with regional legislation and network rules, such as <a
4007
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
4008
       *
4009
       * <p>Equal to {@code none}.
4010
       */
4011
      @SerializedName("setup_future_usage")
4012
      String setupFutureUsage;
4013
    }
4014

4015
    /**
4016
     * For more details about Multibanco, please refer to the <a
4017
     * href="https://docs.stripe.com/api">API Reference.</a>
4018
     */
4019
    @Getter
4020
    @Setter
4021
    @EqualsAndHashCode(callSuper = false)
4022
    public static class Multibanco extends StripeObject {
×
4023
      /**
4024
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
4025
       *
4026
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
4027
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
4028
       * Customer after the PaymentIntent is confirmed and the customer completes any required
4029
       * actions. If you don't provide a Customer, you can still <a
4030
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
4031
       * Customer after the transaction completes.
4032
       *
4033
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
4034
       * and attaches a <a
4035
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
4036
       * payment method representing the card to the Customer instead.
4037
       *
4038
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
4039
       * with regional legislation and network rules, such as <a
4040
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
4041
       *
4042
       * <p>Equal to {@code none}.
4043
       */
4044
      @SerializedName("setup_future_usage")
4045
      String setupFutureUsage;
4046
    }
4047

4048
    /**
4049
     * For more details about NaverPay, please refer to the <a
4050
     * href="https://docs.stripe.com/api">API Reference.</a>
4051
     */
4052
    @Getter
4053
    @Setter
4054
    @EqualsAndHashCode(callSuper = false)
4055
    public static class NaverPay extends StripeObject {
×
4056
      /**
4057
       * Controls when the funds will be captured from the customer's account.
4058
       *
4059
       * <p>Equal to {@code manual}.
4060
       */
4061
      @SerializedName("capture_method")
4062
      String captureMethod;
4063
    }
4064

4065
    /**
4066
     * For more details about Oxxo, please refer to the <a href="https://docs.stripe.com/api">API
4067
     * Reference.</a>
4068
     */
4069
    @Getter
4070
    @Setter
4071
    @EqualsAndHashCode(callSuper = false)
4072
    public static class Oxxo extends StripeObject {
×
4073
      /**
4074
       * The number of calendar days before an OXXO invoice expires. For example, if you create an
4075
       * OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on
4076
       * Wednesday at 23:59 America/Mexico_City time.
4077
       */
4078
      @SerializedName("expires_after_days")
4079
      Long expiresAfterDays;
4080

4081
      /**
4082
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
4083
       *
4084
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
4085
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
4086
       * Customer after the PaymentIntent is confirmed and the customer completes any required
4087
       * actions. If you don't provide a Customer, you can still <a
4088
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
4089
       * Customer after the transaction completes.
4090
       *
4091
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
4092
       * and attaches a <a
4093
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
4094
       * payment method representing the card to the Customer instead.
4095
       *
4096
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
4097
       * with regional legislation and network rules, such as <a
4098
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
4099
       *
4100
       * <p>Equal to {@code none}.
4101
       */
4102
      @SerializedName("setup_future_usage")
4103
      String setupFutureUsage;
4104
    }
4105

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

4139
    /**
4140
     * For more details about Payco, please refer to the <a href="https://docs.stripe.com/api">API
4141
     * Reference.</a>
4142
     */
4143
    @Getter
4144
    @Setter
4145
    @EqualsAndHashCode(callSuper = false)
4146
    public static class Payco extends StripeObject {
×
4147
      /**
4148
       * Controls when the funds will be captured from the customer's account.
4149
       *
4150
       * <p>Equal to {@code manual}.
4151
       */
4152
      @SerializedName("capture_method")
4153
      String captureMethod;
4154
    }
4155

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

4189
    /**
4190
     * For more details about Paypal, please refer to the <a href="https://docs.stripe.com/api">API
4191
     * Reference.</a>
4192
     */
4193
    @Getter
4194
    @Setter
4195
    @EqualsAndHashCode(callSuper = false)
4196
    public static class Paypal extends StripeObject {
×
4197
      /**
4198
       * Controls when the funds will be captured from the customer's account.
4199
       *
4200
       * <p>Equal to {@code manual}.
4201
       */
4202
      @SerializedName("capture_method")
4203
      String captureMethod;
4204

4205
      /** Preferred locale of the PayPal checkout page that the customer is redirected to. */
4206
      @SerializedName("preferred_locale")
4207
      String preferredLocale;
4208

4209
      /**
4210
       * A reference of the PayPal transaction visible to customer which is mapped to PayPal's
4211
       * invoice ID. This must be a globally unique ID if you have configured in your PayPal
4212
       * settings to block multiple payments per invoice ID.
4213
       */
4214
      @SerializedName("reference")
4215
      String reference;
4216

4217
      /**
4218
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
4219
       *
4220
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
4221
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
4222
       * Customer after the PaymentIntent is confirmed and the customer completes any required
4223
       * actions. If you don't provide a Customer, you can still <a
4224
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
4225
       * Customer after the transaction completes.
4226
       *
4227
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
4228
       * and attaches a <a
4229
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
4230
       * payment method representing the card to the Customer instead.
4231
       *
4232
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
4233
       * with regional legislation and network rules, such as <a
4234
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
4235
       *
4236
       * <p>One of {@code none}, or {@code off_session}.
4237
       */
4238
      @SerializedName("setup_future_usage")
4239
      String setupFutureUsage;
4240
    }
4241

4242
    /**
4243
     * For more details about Pix, please refer to the <a href="https://docs.stripe.com/api">API
4244
     * Reference.</a>
4245
     */
4246
    @Getter
4247
    @Setter
4248
    @EqualsAndHashCode(callSuper = false)
4249
    public static class Pix extends StripeObject {
×
4250
      /** The number of seconds (between 10 and 1209600) after which Pix payment will expire. */
4251
      @SerializedName("expires_after_seconds")
4252
      Long expiresAfterSeconds;
4253

4254
      /** The timestamp at which the Pix expires. */
4255
      @SerializedName("expires_at")
4256
      Long expiresAt;
4257

4258
      /**
4259
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
4260
       *
4261
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
4262
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
4263
       * Customer after the PaymentIntent is confirmed and the customer completes any required
4264
       * actions. If you don't provide a Customer, you can still <a
4265
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
4266
       * Customer after the transaction completes.
4267
       *
4268
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
4269
       * and attaches a <a
4270
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
4271
       * payment method representing the card to the Customer instead.
4272
       *
4273
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
4274
       * with regional legislation and network rules, such as <a
4275
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
4276
       *
4277
       * <p>Equal to {@code none}.
4278
       */
4279
      @SerializedName("setup_future_usage")
4280
      String setupFutureUsage;
4281
    }
4282

4283
    /**
4284
     * For more details about Promptpay, please refer to the <a
4285
     * href="https://docs.stripe.com/api">API Reference.</a>
4286
     */
4287
    @Getter
4288
    @Setter
4289
    @EqualsAndHashCode(callSuper = false)
4290
    public static class Promptpay extends StripeObject {
×
4291
      /**
4292
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
4293
       *
4294
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
4295
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
4296
       * Customer after the PaymentIntent is confirmed and the customer completes any required
4297
       * actions. If you don't provide a Customer, you can still <a
4298
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
4299
       * Customer after the transaction completes.
4300
       *
4301
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
4302
       * and attaches a <a
4303
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
4304
       * payment method representing the card to the Customer instead.
4305
       *
4306
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
4307
       * with regional legislation and network rules, such as <a
4308
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
4309
       *
4310
       * <p>Equal to {@code none}.
4311
       */
4312
      @SerializedName("setup_future_usage")
4313
      String setupFutureUsage;
4314
    }
4315

4316
    /**
4317
     * For more details about RevolutPay, please refer to the <a
4318
     * href="https://docs.stripe.com/api">API Reference.</a>
4319
     */
4320
    @Getter
4321
    @Setter
4322
    @EqualsAndHashCode(callSuper = false)
4323
    public static class RevolutPay extends StripeObject {
×
4324
      /**
4325
       * Controls when the funds will be captured from the customer's account.
4326
       *
4327
       * <p>Equal to {@code manual}.
4328
       */
4329
      @SerializedName("capture_method")
4330
      String captureMethod;
4331

4332
      /**
4333
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
4334
       *
4335
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
4336
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
4337
       * Customer after the PaymentIntent is confirmed and the customer completes any required
4338
       * actions. If you don't provide a Customer, you can still <a
4339
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
4340
       * Customer after the transaction completes.
4341
       *
4342
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
4343
       * and attaches a <a
4344
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
4345
       * payment method representing the card to the Customer instead.
4346
       *
4347
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
4348
       * with regional legislation and network rules, such as <a
4349
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
4350
       *
4351
       * <p>One of {@code none}, or {@code off_session}.
4352
       */
4353
      @SerializedName("setup_future_usage")
4354
      String setupFutureUsage;
4355
    }
4356

4357
    /**
4358
     * For more details about SamsungPay, please refer to the <a
4359
     * href="https://docs.stripe.com/api">API Reference.</a>
4360
     */
4361
    @Getter
4362
    @Setter
4363
    @EqualsAndHashCode(callSuper = false)
4364
    public static class SamsungPay extends StripeObject {
×
4365
      /**
4366
       * Controls when the funds will be captured from the customer's account.
4367
       *
4368
       * <p>Equal to {@code manual}.
4369
       */
4370
      @SerializedName("capture_method")
4371
      String captureMethod;
4372
    }
4373

4374
    /**
4375
     * For more details about SepaDebit, please refer to the <a
4376
     * href="https://docs.stripe.com/api">API Reference.</a>
4377
     */
4378
    @Getter
4379
    @Setter
4380
    @EqualsAndHashCode(callSuper = false)
4381
    public static class SepaDebit extends StripeObject {
×
4382
      @SerializedName("mandate_options")
4383
      MandateOptions mandateOptions;
4384

4385
      /**
4386
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
4387
       *
4388
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
4389
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
4390
       * Customer after the PaymentIntent is confirmed and the customer completes any required
4391
       * actions. If you don't provide a Customer, you can still <a
4392
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
4393
       * Customer after the transaction completes.
4394
       *
4395
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
4396
       * and attaches a <a
4397
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
4398
       * payment method representing the card to the Customer instead.
4399
       *
4400
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
4401
       * with regional legislation and network rules, such as <a
4402
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
4403
       *
4404
       * <p>One of {@code none}, {@code off_session}, or {@code on_session}.
4405
       */
4406
      @SerializedName("setup_future_usage")
4407
      String setupFutureUsage;
4408

4409
      /**
4410
       * For more details about MandateOptions, please refer to the <a
4411
       * href="https://docs.stripe.com/api">API Reference.</a>
4412
       */
4413
      @Getter
4414
      @Setter
4415
      @EqualsAndHashCode(callSuper = false)
NEW
4416
      public static class MandateOptions extends StripeObject {
×
4417
        /**
4418
         * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must
4419
         * consist of only uppercase letters, numbers, spaces, or the following special characters:
4420
         * '/', '_', '-', '&amp;', '.'. Cannot begin with 'STRIPE'.
4421
         */
4422
        @SerializedName("reference_prefix")
4423
        String referencePrefix;
4424
      }
4425
    }
4426

4427
    /**
4428
     * For more details about Sofort, please refer to the <a href="https://docs.stripe.com/api">API
4429
     * Reference.</a>
4430
     */
4431
    @Getter
4432
    @Setter
4433
    @EqualsAndHashCode(callSuper = false)
4434
    public static class Sofort extends StripeObject {
×
4435
      /**
4436
       * Preferred language of the SOFORT authorization page that the customer is redirected to.
4437
       *
4438
       * <p>One of {@code de}, {@code en}, {@code es}, {@code fr}, {@code it}, {@code nl}, or {@code
4439
       * pl}.
4440
       */
4441
      @SerializedName("preferred_language")
4442
      String preferredLanguage;
4443

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

4469
    /**
4470
     * For more details about Swish, please refer to the <a href="https://docs.stripe.com/api">API
4471
     * Reference.</a>
4472
     */
4473
    @Getter
4474
    @Setter
4475
    @EqualsAndHashCode(callSuper = false)
4476
    public static class Swish extends StripeObject {
×
4477
      /** A reference for this payment to be displayed in the Swish app. */
4478
      @SerializedName("reference")
4479
      String reference;
4480

4481
      /**
4482
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
4483
       *
4484
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
4485
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
4486
       * Customer after the PaymentIntent is confirmed and the customer completes any required
4487
       * actions. If you don't provide a Customer, you can still <a
4488
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
4489
       * Customer after the transaction completes.
4490
       *
4491
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
4492
       * and attaches a <a
4493
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
4494
       * payment method representing the card to the Customer instead.
4495
       *
4496
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
4497
       * with regional legislation and network rules, such as <a
4498
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
4499
       *
4500
       * <p>Equal to {@code none}.
4501
       */
4502
      @SerializedName("setup_future_usage")
4503
      String setupFutureUsage;
4504
    }
4505

4506
    /**
4507
     * For more details about Twint, please refer to the <a href="https://docs.stripe.com/api">API
4508
     * Reference.</a>
4509
     */
4510
    @Getter
4511
    @Setter
4512
    @EqualsAndHashCode(callSuper = false)
4513
    public static class Twint extends StripeObject {
×
4514
      /**
4515
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
4516
       *
4517
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
4518
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
4519
       * Customer after the PaymentIntent is confirmed and the customer completes any required
4520
       * actions. If you don't provide a Customer, you can still <a
4521
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
4522
       * Customer after the transaction completes.
4523
       *
4524
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
4525
       * and attaches a <a
4526
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
4527
       * payment method representing the card to the Customer instead.
4528
       *
4529
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
4530
       * with regional legislation and network rules, such as <a
4531
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
4532
       *
4533
       * <p>Equal to {@code none}.
4534
       */
4535
      @SerializedName("setup_future_usage")
4536
      String setupFutureUsage;
4537
    }
4538

4539
    /**
4540
     * For more details about UsBankAccount, please refer to the <a
4541
     * href="https://docs.stripe.com/api">API Reference.</a>
4542
     */
4543
    @Getter
4544
    @Setter
4545
    @EqualsAndHashCode(callSuper = false)
4546
    public static class UsBankAccount extends StripeObject {
×
4547
      @SerializedName("financial_connections")
4548
      FinancialConnections financialConnections;
4549

4550
      @SerializedName("mandate_options")
4551
      MandateOptions mandateOptions;
4552

4553
      /**
4554
       * Preferred transaction settlement speed
4555
       *
4556
       * <p>One of {@code fastest}, or {@code standard}.
4557
       */
4558
      @SerializedName("preferred_settlement_speed")
4559
      String preferredSettlementSpeed;
4560

4561
      /**
4562
       * Indicates that you intend to make future payments with this PaymentIntent's payment method.
4563
       *
4564
       * <p>If you provide a Customer with the PaymentIntent, you can use this parameter to <a
4565
       * href="https://stripe.com/payments/save-during-payment">attach the payment method</a> to the
4566
       * Customer after the PaymentIntent is confirmed and the customer completes any required
4567
       * actions. If you don't provide a Customer, you can still <a
4568
       * href="https://stripe.com/api/payment_methods/attach">attach</a> the payment method to a
4569
       * Customer after the transaction completes.
4570
       *
4571
       * <p>If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
4572
       * and attaches a <a
4573
       * href="https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card">generated_card</a>
4574
       * payment method representing the card to the Customer instead.
4575
       *
4576
       * <p>When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
4577
       * with regional legislation and network rules, such as <a
4578
       * href="https://stripe.com/strong-customer-authentication">SCA</a>.
4579
       *
4580
       * <p>One of {@code none}, {@code off_session}, or {@code on_session}.
4581
       */
4582
      @SerializedName("setup_future_usage")
4583
      String setupFutureUsage;
4584

4585
      /**
4586
       * Bank account verification method.
4587
       *
4588
       * <p>One of {@code automatic}, {@code instant}, or {@code microdeposits}.
4589
       */
4590
      @SerializedName("verification_method")
4591
      String verificationMethod;
4592

4593
      /**
4594
       * For more details about FinancialConnections, please refer to the <a
4595
       * href="https://docs.stripe.com/api">API Reference.</a>
4596
       */
4597
      @Getter
4598
      @Setter
4599
      @EqualsAndHashCode(callSuper = false)
4600
      public static class FinancialConnections extends StripeObject {
×
4601
        @SerializedName("filters")
4602
        Filters filters;
4603

4604
        /**
4605
         * The list of permissions to request. The {@code payment_method} permission must be
4606
         * included.
4607
         */
4608
        @SerializedName("permissions")
4609
        List<String> permissions;
4610

4611
        /** Data features requested to be retrieved upon account creation. */
4612
        @SerializedName("prefetch")
4613
        List<String> prefetch;
4614

4615
        /**
4616
         * For webview integrations only. Upon completing OAuth login in the native browser, the
4617
         * user will be redirected to this URL to return to your app.
4618
         */
4619
        @SerializedName("return_url")
4620
        String returnUrl;
4621

4622
        /**
4623
         * For more details about Filters, please refer to the <a
4624
         * href="https://docs.stripe.com/api">API Reference.</a>
4625
         */
4626
        @Getter
4627
        @Setter
4628
        @EqualsAndHashCode(callSuper = false)
4629
        public static class Filters extends StripeObject {
×
4630
          /**
4631
           * The account subcategories to use to filter for possible accounts to link. Valid
4632
           * subcategories are {@code checking} and {@code savings}.
4633
           */
4634
          @SerializedName("account_subcategories")
4635
          List<String> accountSubcategories;
4636
        }
4637
      }
4638

4639
      /**
4640
       * For more details about MandateOptions, please refer to the <a
4641
       * href="https://docs.stripe.com/api">API Reference.</a>
4642
       */
4643
      @Getter
4644
      @Setter
4645
      @EqualsAndHashCode(callSuper = false)
4646
      public static class MandateOptions extends StripeObject {
×
4647
        /**
4648
         * Mandate collection method
4649
         *
4650
         * <p>Equal to {@code paper}.
4651
         */
4652
        @SerializedName("collection_method")
4653
        String collectionMethod;
4654
      }
4655
    }
4656

4657
    /**
4658
     * For more details about WechatPay, please refer to the <a
4659
     * href="https://docs.stripe.com/api">API Reference.</a>
4660
     */
4661
    @Getter
4662
    @Setter
4663
    @EqualsAndHashCode(callSuper = false)
4664
    public static class WechatPay extends StripeObject {
×
4665
      /** The app ID registered with WeChat Pay. Only required when client is ios or android. */
4666
      @SerializedName("app_id")
4667
      String appId;
4668

4669
      /**
4670
       * The client type that the end customer will pay from
4671
       *
4672
       * <p>One of {@code android}, {@code ios}, or {@code web}.
4673
       */
4674
      @SerializedName("client")
4675
      String client;
4676

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

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

4736
  /**
4737
   * For more details about Processing, please refer to the <a
4738
   * href="https://docs.stripe.com/api">API Reference.</a>
4739
   */
4740
  @Getter
4741
  @Setter
4742
  @EqualsAndHashCode(callSuper = false)
4743
  public static class Processing extends StripeObject {
×
4744
    @SerializedName("card")
4745
    Card card;
4746

4747
    /**
4748
     * Type of the payment method for which payment is in {@code processing} state, one of {@code
4749
     * card}.
4750
     */
4751
    @SerializedName("type")
4752
    String type;
4753

4754
    /**
4755
     * For more details about Card, please refer to the <a href="https://docs.stripe.com/api">API
4756
     * Reference.</a>
4757
     */
4758
    @Getter
4759
    @Setter
4760
    @EqualsAndHashCode(callSuper = false)
4761
    public static class Card extends StripeObject {
×
4762
      @SerializedName("customer_notification")
4763
      CustomerNotification customerNotification;
4764

4765
      /**
4766
       * For more details about CustomerNotification, please refer to the <a
4767
       * href="https://docs.stripe.com/api">API Reference.</a>
4768
       */
4769
      @Getter
4770
      @Setter
4771
      @EqualsAndHashCode(callSuper = false)
4772
      public static class CustomerNotification extends StripeObject {
×
4773
        /**
4774
         * Whether customer approval has been requested for this payment. For payments greater than
4775
         * INR 15000 or mandate amount, the customer must provide explicit approval of the payment
4776
         * with their bank.
4777
         */
4778
        @SerializedName("approval_requested")
4779
        Boolean approvalRequested;
4780

4781
        /** If customer approval is required, they need to provide approval before this time. */
4782
        @SerializedName("completes_at")
4783
        Long completesAt;
4784
      }
4785
    }
4786
  }
4787

4788
  /**
4789
   * For more details about TransferData, please refer to the <a
4790
   * href="https://docs.stripe.com/api">API Reference.</a>
4791
   */
4792
  @Getter
4793
  @Setter
4794
  @EqualsAndHashCode(callSuper = false)
4795
  public static class TransferData extends StripeObject {
1✔
4796
    /**
4797
     * Amount intended to be collected by this PaymentIntent. A positive integer representing how
4798
     * much to charge in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest
4799
     * currency unit</a> (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal
4800
     * currency). The minimum amount is $0.50 US or <a
4801
     * href="https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts">equivalent in
4802
     * charge currency</a>. The amount value supports up to eight digits (e.g., a value of 99999999
4803
     * for a USD charge of $999,999.99).
4804
     */
4805
    @SerializedName("amount")
4806
    Long amount;
4807

4808
    /**
4809
     * The account (if any) that the payment is attributed to for tax reporting, and where funds
4810
     * from the payment are transferred to after payment success.
4811
     */
4812
    @SerializedName("destination")
4813
    @Getter(lombok.AccessLevel.NONE)
4814
    @Setter(lombok.AccessLevel.NONE)
4815
    ExpandableField<Account> destination;
4816

4817
    /** Get ID of expandable {@code destination} object. */
4818
    public String getDestination() {
4819
      return (this.destination != null) ? this.destination.getId() : null;
1✔
4820
    }
4821

4822
    public void setDestination(String id) {
4823
      this.destination = ApiResource.setExpandableFieldId(id, this.destination);
×
4824
    }
×
4825

4826
    /** Get expanded {@code destination}. */
4827
    public Account getDestinationObject() {
4828
      return (this.destination != null) ? this.destination.getExpanded() : null;
1✔
4829
    }
4830

4831
    public void setDestinationObject(Account expandableObject) {
4832
      this.destination = new ExpandableField<Account>(expandableObject.getId(), expandableObject);
×
4833
    }
×
4834
  }
4835

4836
  @Override
4837
  public void setResponseGetter(StripeResponseGetter responseGetter) {
4838
    super.setResponseGetter(responseGetter);
1✔
4839
    trySetResponseGetter(amountDetails, responseGetter);
1✔
4840
    trySetResponseGetter(application, responseGetter);
1✔
4841
    trySetResponseGetter(automaticPaymentMethods, responseGetter);
1✔
4842
    trySetResponseGetter(customer, responseGetter);
1✔
4843
    trySetResponseGetter(invoice, responseGetter);
1✔
4844
    trySetResponseGetter(lastPaymentError, responseGetter);
1✔
4845
    trySetResponseGetter(latestCharge, responseGetter);
1✔
4846
    trySetResponseGetter(nextAction, responseGetter);
1✔
4847
    trySetResponseGetter(onBehalfOf, responseGetter);
1✔
4848
    trySetResponseGetter(paymentMethod, responseGetter);
1✔
4849
    trySetResponseGetter(paymentMethodConfigurationDetails, responseGetter);
1✔
4850
    trySetResponseGetter(paymentMethodOptions, responseGetter);
1✔
4851
    trySetResponseGetter(processing, responseGetter);
1✔
4852
    trySetResponseGetter(review, responseGetter);
1✔
4853
    trySetResponseGetter(shipping, responseGetter);
1✔
4854
    trySetResponseGetter(source, responseGetter);
1✔
4855
    trySetResponseGetter(transferData, responseGetter);
1✔
4856
  }
1✔
4857
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc