stripe 10.5.0.pre.beta.1 → 10.6.0.pre.beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/OPENAPI_VERSION +1 -1
  4. data/VERSION +1 -1
  5. data/lib/stripe/resources/account.rb +8 -0
  6. data/lib/stripe/resources/apps/secret.rb +2 -0
  7. data/lib/stripe/resources/capital/financing_offer.rb +4 -0
  8. data/lib/stripe/resources/charge.rb +10 -0
  9. data/lib/stripe/resources/checkout/session.rb +8 -0
  10. data/lib/stripe/resources/climate/order.rb +8 -0
  11. data/lib/stripe/resources/credit_note.rb +4 -0
  12. data/lib/stripe/resources/customer.rb +16 -0
  13. data/lib/stripe/resources/dispute.rb +6 -0
  14. data/lib/stripe/resources/financial_connections/account.rb +10 -0
  15. data/lib/stripe/resources/gift_cards/card.rb +1 -0
  16. data/lib/stripe/resources/gift_cards/transaction.rb +4 -0
  17. data/lib/stripe/resources/identity/verification_session.rb +44 -0
  18. data/lib/stripe/resources/invoice.rb +38 -0
  19. data/lib/stripe/resources/issuing/authorization.rb +17 -0
  20. data/lib/stripe/resources/issuing/card.rb +8 -0
  21. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +6 -0
  22. data/lib/stripe/resources/issuing/dispute.rb +2 -0
  23. data/lib/stripe/resources/issuing/personalization_design.rb +6 -0
  24. data/lib/stripe/resources/issuing/transaction.rb +4 -0
  25. data/lib/stripe/resources/order.rb +8 -0
  26. data/lib/stripe/resources/payment_intent.rb +118 -0
  27. data/lib/stripe/resources/payment_link.rb +2 -0
  28. data/lib/stripe/resources/payment_method.rb +28 -0
  29. data/lib/stripe/resources/payment_method_domain.rb +12 -0
  30. data/lib/stripe/resources/payout.rb +8 -0
  31. data/lib/stripe/resources/quote.rb +22 -0
  32. data/lib/stripe/resources/quote_phase.rb +2 -0
  33. data/lib/stripe/resources/refund.rb +8 -0
  34. data/lib/stripe/resources/review.rb +2 -0
  35. data/lib/stripe/resources/setup_intent.rb +36 -0
  36. data/lib/stripe/resources/source.rb +2 -0
  37. data/lib/stripe/resources/subscription.rb +14 -0
  38. data/lib/stripe/resources/subscription_schedule.rb +6 -0
  39. data/lib/stripe/resources/tax/calculation.rb +2 -0
  40. data/lib/stripe/resources/tax/form.rb +2 -0
  41. data/lib/stripe/resources/tax/transaction.rb +4 -0
  42. data/lib/stripe/resources/terminal/reader.rb +18 -0
  43. data/lib/stripe/resources/test_helpers/test_clock.rb +2 -0
  44. data/lib/stripe/resources/topup.rb +2 -0
  45. data/lib/stripe/resources/treasury/financial_account.rb +4 -0
  46. data/lib/stripe/resources/treasury/inbound_transfer.rb +8 -0
  47. data/lib/stripe/resources/treasury/outbound_payment.rb +8 -0
  48. data/lib/stripe/resources/treasury/outbound_transfer.rb +8 -0
  49. data/lib/stripe/resources/treasury/received_credit.rb +1 -0
  50. data/lib/stripe/resources/treasury/received_debit.rb +1 -0
  51. data/lib/stripe/version.rb +1 -1
  52. metadata +2 -2
@@ -14,6 +14,8 @@ module Stripe
14
14
 
15
15
  OBJECT_NAME = "issuing.authorization"
16
16
 
17
+ # [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
18
+ # This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
17
19
  def approve(params = {}, opts = {})
18
20
  request_stripe_object(
19
21
  method: :post,
@@ -23,6 +25,8 @@ module Stripe
23
25
  )
24
26
  end
25
27
 
28
+ # [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
29
+ # This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
26
30
  def decline(params = {}, opts = {})
27
31
  request_stripe_object(
28
32
  method: :post,
@@ -32,6 +36,8 @@ module Stripe
32
36
  )
33
37
  end
34
38
 
39
+ # [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
40
+ # This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
35
41
  def self.approve(authorization, params = {}, opts = {})
36
42
  request_stripe_object(
37
43
  method: :post,
@@ -41,6 +47,8 @@ module Stripe
41
47
  )
42
48
  end
43
49
 
50
+ # [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
51
+ # This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
44
52
  def self.decline(authorization, params = {}, opts = {})
45
53
  request_stripe_object(
46
54
  method: :post,
@@ -57,6 +65,7 @@ module Stripe
57
65
  class TestHelpers < APIResourceTestHelpers
58
66
  RESOURCE_CLASS = Authorization
59
67
 
68
+ # Capture a test-mode authorization.
60
69
  def self.capture(authorization, params = {}, opts = {})
61
70
  request_stripe_object(
62
71
  method: :post,
@@ -66,6 +75,7 @@ module Stripe
66
75
  )
67
76
  end
68
77
 
78
+ # Create a test-mode authorization.
69
79
  def self.create(params = {}, opts = {})
70
80
  request_stripe_object(
71
81
  method: :post,
@@ -75,6 +85,7 @@ module Stripe
75
85
  )
76
86
  end
77
87
 
88
+ # Expire a test-mode Authorization.
78
89
  def self.expire(authorization, params = {}, opts = {})
79
90
  request_stripe_object(
80
91
  method: :post,
@@ -84,6 +95,7 @@ module Stripe
84
95
  )
85
96
  end
86
97
 
98
+ # Increment a test-mode Authorization.
87
99
  def self.increment(authorization, params = {}, opts = {})
88
100
  request_stripe_object(
89
101
  method: :post,
@@ -93,6 +105,7 @@ module Stripe
93
105
  )
94
106
  end
95
107
 
108
+ # Reverse a test-mode Authorization.
96
109
  def self.reverse(authorization, params = {}, opts = {})
97
110
  request_stripe_object(
98
111
  method: :post,
@@ -102,6 +115,7 @@ module Stripe
102
115
  )
103
116
  end
104
117
 
118
+ # Capture a test-mode authorization.
105
119
  def capture(params = {}, opts = {})
106
120
  @resource.request_stripe_object(
107
121
  method: :post,
@@ -111,6 +125,7 @@ module Stripe
111
125
  )
112
126
  end
113
127
 
128
+ # Expire a test-mode Authorization.
114
129
  def expire(params = {}, opts = {})
115
130
  @resource.request_stripe_object(
116
131
  method: :post,
@@ -120,6 +135,7 @@ module Stripe
120
135
  )
121
136
  end
122
137
 
138
+ # Increment a test-mode Authorization.
123
139
  def increment(params = {}, opts = {})
124
140
  @resource.request_stripe_object(
125
141
  method: :post,
@@ -129,6 +145,7 @@ module Stripe
129
145
  )
130
146
  end
131
147
 
148
+ # Reverse a test-mode Authorization.
132
149
  def reverse(params = {}, opts = {})
133
150
  @resource.request_stripe_object(
134
151
  method: :post,
@@ -18,6 +18,7 @@ module Stripe
18
18
  class TestHelpers < APIResourceTestHelpers
19
19
  RESOURCE_CLASS = Card
20
20
 
21
+ # Updates the shipping status of the specified Issuing Card object to delivered.
21
22
  def self.deliver_card(card, params = {}, opts = {})
22
23
  request_stripe_object(
23
24
  method: :post,
@@ -27,6 +28,7 @@ module Stripe
27
28
  )
28
29
  end
29
30
 
31
+ # Updates the shipping status of the specified Issuing Card object to failure.
30
32
  def self.fail_card(card, params = {}, opts = {})
31
33
  request_stripe_object(
32
34
  method: :post,
@@ -36,6 +38,7 @@ module Stripe
36
38
  )
37
39
  end
38
40
 
41
+ # Updates the shipping status of the specified Issuing Card object to returned.
39
42
  def self.return_card(card, params = {}, opts = {})
40
43
  request_stripe_object(
41
44
  method: :post,
@@ -45,6 +48,7 @@ module Stripe
45
48
  )
46
49
  end
47
50
 
51
+ # Updates the shipping status of the specified Issuing Card object to shipped.
48
52
  def self.ship_card(card, params = {}, opts = {})
49
53
  request_stripe_object(
50
54
  method: :post,
@@ -54,6 +58,7 @@ module Stripe
54
58
  )
55
59
  end
56
60
 
61
+ # Updates the shipping status of the specified Issuing Card object to delivered.
57
62
  def deliver_card(params = {}, opts = {})
58
63
  @resource.request_stripe_object(
59
64
  method: :post,
@@ -63,6 +68,7 @@ module Stripe
63
68
  )
64
69
  end
65
70
 
71
+ # Updates the shipping status of the specified Issuing Card object to failure.
66
72
  def fail_card(params = {}, opts = {})
67
73
  @resource.request_stripe_object(
68
74
  method: :post,
@@ -72,6 +78,7 @@ module Stripe
72
78
  )
73
79
  end
74
80
 
81
+ # Updates the shipping status of the specified Issuing Card object to returned.
75
82
  def return_card(params = {}, opts = {})
76
83
  @resource.request_stripe_object(
77
84
  method: :post,
@@ -81,6 +88,7 @@ module Stripe
81
88
  )
82
89
  end
83
90
 
91
+ # Updates the shipping status of the specified Issuing Card object to shipped.
84
92
  def ship_card(params = {}, opts = {})
85
93
  @resource.request_stripe_object(
86
94
  method: :post,
@@ -11,6 +11,7 @@ module Stripe
11
11
 
12
12
  OBJECT_NAME = "issuing.credit_underwriting_record"
13
13
 
14
+ # Update a CreditUnderwritingRecord object to correct mistakes.
14
15
  def correct(params = {}, opts = {})
15
16
  request_stripe_object(
16
17
  method: :post,
@@ -20,6 +21,7 @@ module Stripe
20
21
  )
21
22
  end
22
23
 
24
+ # Update a CreditUnderwritingRecord object from a decision made on a credit application.
23
25
  def report_decision(params = {}, opts = {})
24
26
  request_stripe_object(
25
27
  method: :post,
@@ -29,6 +31,7 @@ module Stripe
29
31
  )
30
32
  end
31
33
 
34
+ # Update a CreditUnderwritingRecord object to correct mistakes.
32
35
  def self.correct(credit_underwriting_record, params = {}, opts = {})
33
36
  request_stripe_object(
34
37
  method: :post,
@@ -38,6 +41,7 @@ module Stripe
38
41
  )
39
42
  end
40
43
 
44
+ # Creates a CreditUnderwritingRecord object with information about a credit application submission.
41
45
  def self.create_from_application(params = {}, opts = {})
42
46
  request_stripe_object(
43
47
  method: :post,
@@ -47,6 +51,7 @@ module Stripe
47
51
  )
48
52
  end
49
53
 
54
+ # Creates a CreditUnderwritingRecord object from an underwriting decision coming from a proactive review of an existing accountholder.
50
55
  def self.create_from_proactive_review(params = {}, opts = {})
51
56
  request_stripe_object(
52
57
  method: :post,
@@ -56,6 +61,7 @@ module Stripe
56
61
  )
57
62
  end
58
63
 
64
+ # Update a CreditUnderwritingRecord object from a decision made on a credit application.
59
65
  def self.report_decision(credit_underwriting_record, params = {}, opts = {})
60
66
  request_stripe_object(
61
67
  method: :post,
@@ -13,6 +13,7 @@ module Stripe
13
13
 
14
14
  OBJECT_NAME = "issuing.dispute"
15
15
 
16
+ # Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
16
17
  def submit(params = {}, opts = {})
17
18
  request_stripe_object(
18
19
  method: :post,
@@ -22,6 +23,7 @@ module Stripe
22
23
  )
23
24
  end
24
25
 
26
+ # Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
25
27
  def self.submit(dispute, params = {}, opts = {})
26
28
  request_stripe_object(
27
29
  method: :post,
@@ -18,6 +18,7 @@ module Stripe
18
18
  class TestHelpers < APIResourceTestHelpers
19
19
  RESOURCE_CLASS = PersonalizationDesign
20
20
 
21
+ # Updates the status of the specified testmode personalization design object to active.
21
22
  def self.activate(personalization_design, params = {}, opts = {})
22
23
  request_stripe_object(
23
24
  method: :post,
@@ -27,6 +28,7 @@ module Stripe
27
28
  )
28
29
  end
29
30
 
31
+ # Updates the status of the specified testmode personalization design object to inactive.
30
32
  def self.deactivate(personalization_design, params = {}, opts = {})
31
33
  request_stripe_object(
32
34
  method: :post,
@@ -36,6 +38,7 @@ module Stripe
36
38
  )
37
39
  end
38
40
 
41
+ # Updates the status of the specified testmode personalization design object to rejected.
39
42
  def self.reject(personalization_design, params = {}, opts = {})
40
43
  request_stripe_object(
41
44
  method: :post,
@@ -45,6 +48,7 @@ module Stripe
45
48
  )
46
49
  end
47
50
 
51
+ # Updates the status of the specified testmode personalization design object to active.
48
52
  def activate(params = {}, opts = {})
49
53
  @resource.request_stripe_object(
50
54
  method: :post,
@@ -54,6 +58,7 @@ module Stripe
54
58
  )
55
59
  end
56
60
 
61
+ # Updates the status of the specified testmode personalization design object to inactive.
57
62
  def deactivate(params = {}, opts = {})
58
63
  @resource.request_stripe_object(
59
64
  method: :post,
@@ -63,6 +68,7 @@ module Stripe
63
68
  )
64
69
  end
65
70
 
71
+ # Updates the status of the specified testmode personalization design object to rejected.
66
72
  def reject(params = {}, opts = {})
67
73
  @resource.request_stripe_object(
68
74
  method: :post,
@@ -21,6 +21,7 @@ module Stripe
21
21
  class TestHelpers < APIResourceTestHelpers
22
22
  RESOURCE_CLASS = Transaction
23
23
 
24
+ # Allows the user to capture an arbitrary amount, also known as a forced capture.
24
25
  def self.create_force_capture(params = {}, opts = {})
25
26
  request_stripe_object(
26
27
  method: :post,
@@ -30,6 +31,7 @@ module Stripe
30
31
  )
31
32
  end
32
33
 
34
+ # Allows the user to refund an arbitrary amount, also known as a unlinked refund.
33
35
  def self.create_unlinked_refund(params = {}, opts = {})
34
36
  request_stripe_object(
35
37
  method: :post,
@@ -39,6 +41,7 @@ module Stripe
39
41
  )
40
42
  end
41
43
 
44
+ # Refund a test-mode Transaction.
42
45
  def self.refund(transaction, params = {}, opts = {})
43
46
  request_stripe_object(
44
47
  method: :post,
@@ -48,6 +51,7 @@ module Stripe
48
51
  )
49
52
  end
50
53
 
54
+ # Refund a test-mode Transaction.
51
55
  def refund(params = {}, opts = {})
52
56
  @resource.request_stripe_object(
53
57
  method: :post,
@@ -14,6 +14,7 @@ module Stripe
14
14
 
15
15
  OBJECT_NAME = "order"
16
16
 
17
+ # Cancels the order as well as the payment intent if one is attached.
17
18
  def cancel(params = {}, opts = {})
18
19
  request_stripe_object(
19
20
  method: :post,
@@ -23,6 +24,7 @@ module Stripe
23
24
  )
24
25
  end
25
26
 
27
+ # When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
26
28
  def list_line_items(params = {}, opts = {})
27
29
  request_stripe_object(
28
30
  method: :get,
@@ -32,6 +34,7 @@ module Stripe
32
34
  )
33
35
  end
34
36
 
37
+ # Reopens a submitted order.
35
38
  def reopen(params = {}, opts = {})
36
39
  request_stripe_object(
37
40
  method: :post,
@@ -41,6 +44,7 @@ module Stripe
41
44
  )
42
45
  end
43
46
 
47
+ # Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the [reopen](https://stripe.com/docs/api#reopen_order) method is called.
44
48
  def submit(params = {}, opts = {})
45
49
  request_stripe_object(
46
50
  method: :post,
@@ -50,6 +54,7 @@ module Stripe
50
54
  )
51
55
  end
52
56
 
57
+ # Cancels the order as well as the payment intent if one is attached.
53
58
  def self.cancel(id, params = {}, opts = {})
54
59
  request_stripe_object(
55
60
  method: :post,
@@ -59,6 +64,7 @@ module Stripe
59
64
  )
60
65
  end
61
66
 
67
+ # When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
62
68
  def self.list_line_items(id, params = {}, opts = {})
63
69
  request_stripe_object(
64
70
  method: :get,
@@ -68,6 +74,7 @@ module Stripe
68
74
  )
69
75
  end
70
76
 
77
+ # Reopens a submitted order.
71
78
  def self.reopen(id, params = {}, opts = {})
72
79
  request_stripe_object(
73
80
  method: :post,
@@ -77,6 +84,7 @@ module Stripe
77
84
  )
78
85
  end
79
86
 
87
+ # Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the [reopen](https://stripe.com/docs/api#reopen_order) method is called.
80
88
  def self.submit(id, params = {}, opts = {})
81
89
  request_stripe_object(
82
90
  method: :post,
@@ -21,6 +21,7 @@ module Stripe
21
21
 
22
22
  OBJECT_NAME = "payment_intent"
23
23
 
24
+ # Manually reconcile the remaining amount for a customer_balance PaymentIntent.
24
25
  def apply_customer_balance(params = {}, opts = {})
25
26
  request_stripe_object(
26
27
  method: :post,
@@ -30,6 +31,11 @@ module Stripe
30
31
  )
31
32
  end
32
33
 
34
+ # You can cancel a PaymentIntent object when it's in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, [in rare cases](https://stripe.com/docs/payments/intents), processing.
35
+ #
36
+ # After it's canceled, no additional charges are made by the PaymentIntent and any operations on the PaymentIntent fail with an error. For PaymentIntents with a status of requires_capture, the remaining amount_capturable is automatically refunded.
37
+ #
38
+ # You can't cancel the PaymentIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead.
33
39
  def cancel(params = {}, opts = {})
34
40
  request_stripe_object(
35
41
  method: :post,
@@ -39,6 +45,11 @@ module Stripe
39
45
  )
40
46
  end
41
47
 
48
+ # Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture.
49
+ #
50
+ # Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their creation.
51
+ #
52
+ # Learn more about [separate authorization and capture](https://stripe.com/docs/payments/capture-later).
42
53
  def capture(params = {}, opts = {})
43
54
  request_stripe_object(
44
55
  method: :post,
@@ -48,6 +59,29 @@ module Stripe
48
59
  )
49
60
  end
50
61
 
62
+ # Confirm that your customer intends to pay with current or provided
63
+ # payment method. Upon confirmation, the PaymentIntent will attempt to initiate
64
+ # a payment.
65
+ # If the selected payment method requires additional authentication steps, the
66
+ # PaymentIntent will transition to the requires_action status and
67
+ # suggest additional actions via next_action. If payment fails,
68
+ # the PaymentIntent transitions to the requires_payment_method status or the
69
+ # canceled status if the confirmation limit is reached. If
70
+ # payment succeeds, the PaymentIntent will transition to the succeeded
71
+ # status (or requires_capture, if capture_method is set to manual).
72
+ # If the confirmation_method is automatic, payment may be attempted
73
+ # using our [client SDKs](https://stripe.com/docs/stripe-js/reference#stripe-handle-card-payment)
74
+ # and the PaymentIntent's [client_secret](https://stripe.com/docs/api#payment_intent_object-client_secret).
75
+ # After next_actions are handled by the client, no additional
76
+ # confirmation is required to complete the payment.
77
+ # If the confirmation_method is manual, all payment attempts must be
78
+ # initiated using a secret key.
79
+ # If any actions are required for the payment, the PaymentIntent will
80
+ # return to the requires_confirmation state
81
+ # after those actions are completed. Your server needs to then
82
+ # explicitly re-confirm the PaymentIntent to initiate the next payment
83
+ # attempt. Read the [expanded documentation](https://stripe.com/docs/payments/payment-intents/web-manual)
84
+ # to learn more about manual confirmation.
51
85
  def confirm(params = {}, opts = {})
52
86
  request_stripe_object(
53
87
  method: :post,
@@ -57,6 +91,30 @@ module Stripe
57
91
  )
58
92
  end
59
93
 
94
+ # Perform an incremental authorization on an eligible
95
+ # [PaymentIntent](https://stripe.com/docs/api/payment_intents/object). To be eligible, the
96
+ # PaymentIntent's status must be requires_capture and
97
+ # [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported)
98
+ # must be true.
99
+ #
100
+ # Incremental authorizations attempt to increase the authorized amount on
101
+ # your customer's card to the new, higher amount provided. Similar to the
102
+ # initial authorization, incremental authorizations can be declined. A
103
+ # single PaymentIntent can call this endpoint multiple times to further
104
+ # increase the authorized amount.
105
+ #
106
+ # If the incremental authorization succeeds, the PaymentIntent object
107
+ # returns with the updated
108
+ # [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount).
109
+ # If the incremental authorization fails, a
110
+ # [card_declined](https://stripe.com/docs/error-codes#card-declined) error returns, and no other
111
+ # fields on the PaymentIntent or Charge update. The PaymentIntent
112
+ # object remains capturable for the previously authorized amount.
113
+ #
114
+ # Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines.
115
+ # After it's captured, a PaymentIntent can no longer be incremented.
116
+ #
117
+ # Learn more about [incremental authorizations](https://stripe.com/docs/terminal/features/incremental-authorizations).
60
118
  def increment_authorization(params = {}, opts = {})
61
119
  request_stripe_object(
62
120
  method: :post,
@@ -66,6 +124,7 @@ module Stripe
66
124
  )
67
125
  end
68
126
 
127
+ # Verifies microdeposits on a PaymentIntent object.
69
128
  def verify_microdeposits(params = {}, opts = {})
70
129
  request_stripe_object(
71
130
  method: :post,
@@ -75,6 +134,7 @@ module Stripe
75
134
  )
76
135
  end
77
136
 
137
+ # Manually reconcile the remaining amount for a customer_balance PaymentIntent.
78
138
  def self.apply_customer_balance(intent, params = {}, opts = {})
79
139
  request_stripe_object(
80
140
  method: :post,
@@ -84,6 +144,11 @@ module Stripe
84
144
  )
85
145
  end
86
146
 
147
+ # You can cancel a PaymentIntent object when it's in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, [in rare cases](https://stripe.com/docs/payments/intents), processing.
148
+ #
149
+ # After it's canceled, no additional charges are made by the PaymentIntent and any operations on the PaymentIntent fail with an error. For PaymentIntents with a status of requires_capture, the remaining amount_capturable is automatically refunded.
150
+ #
151
+ # You can't cancel the PaymentIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead.
87
152
  def self.cancel(intent, params = {}, opts = {})
88
153
  request_stripe_object(
89
154
  method: :post,
@@ -93,6 +158,11 @@ module Stripe
93
158
  )
94
159
  end
95
160
 
161
+ # Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture.
162
+ #
163
+ # Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their creation.
164
+ #
165
+ # Learn more about [separate authorization and capture](https://stripe.com/docs/payments/capture-later).
96
166
  def self.capture(intent, params = {}, opts = {})
97
167
  request_stripe_object(
98
168
  method: :post,
@@ -102,6 +172,29 @@ module Stripe
102
172
  )
103
173
  end
104
174
 
175
+ # Confirm that your customer intends to pay with current or provided
176
+ # payment method. Upon confirmation, the PaymentIntent will attempt to initiate
177
+ # a payment.
178
+ # If the selected payment method requires additional authentication steps, the
179
+ # PaymentIntent will transition to the requires_action status and
180
+ # suggest additional actions via next_action. If payment fails,
181
+ # the PaymentIntent transitions to the requires_payment_method status or the
182
+ # canceled status if the confirmation limit is reached. If
183
+ # payment succeeds, the PaymentIntent will transition to the succeeded
184
+ # status (or requires_capture, if capture_method is set to manual).
185
+ # If the confirmation_method is automatic, payment may be attempted
186
+ # using our [client SDKs](https://stripe.com/docs/stripe-js/reference#stripe-handle-card-payment)
187
+ # and the PaymentIntent's [client_secret](https://stripe.com/docs/api#payment_intent_object-client_secret).
188
+ # After next_actions are handled by the client, no additional
189
+ # confirmation is required to complete the payment.
190
+ # If the confirmation_method is manual, all payment attempts must be
191
+ # initiated using a secret key.
192
+ # If any actions are required for the payment, the PaymentIntent will
193
+ # return to the requires_confirmation state
194
+ # after those actions are completed. Your server needs to then
195
+ # explicitly re-confirm the PaymentIntent to initiate the next payment
196
+ # attempt. Read the [expanded documentation](https://stripe.com/docs/payments/payment-intents/web-manual)
197
+ # to learn more about manual confirmation.
105
198
  def self.confirm(intent, params = {}, opts = {})
106
199
  request_stripe_object(
107
200
  method: :post,
@@ -111,6 +204,30 @@ module Stripe
111
204
  )
112
205
  end
113
206
 
207
+ # Perform an incremental authorization on an eligible
208
+ # [PaymentIntent](https://stripe.com/docs/api/payment_intents/object). To be eligible, the
209
+ # PaymentIntent's status must be requires_capture and
210
+ # [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported)
211
+ # must be true.
212
+ #
213
+ # Incremental authorizations attempt to increase the authorized amount on
214
+ # your customer's card to the new, higher amount provided. Similar to the
215
+ # initial authorization, incremental authorizations can be declined. A
216
+ # single PaymentIntent can call this endpoint multiple times to further
217
+ # increase the authorized amount.
218
+ #
219
+ # If the incremental authorization succeeds, the PaymentIntent object
220
+ # returns with the updated
221
+ # [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount).
222
+ # If the incremental authorization fails, a
223
+ # [card_declined](https://stripe.com/docs/error-codes#card-declined) error returns, and no other
224
+ # fields on the PaymentIntent or Charge update. The PaymentIntent
225
+ # object remains capturable for the previously authorized amount.
226
+ #
227
+ # Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines.
228
+ # After it's captured, a PaymentIntent can no longer be incremented.
229
+ #
230
+ # Learn more about [incremental authorizations](https://stripe.com/docs/terminal/features/incremental-authorizations).
114
231
  def self.increment_authorization(intent, params = {}, opts = {})
115
232
  request_stripe_object(
116
233
  method: :post,
@@ -120,6 +237,7 @@ module Stripe
120
237
  )
121
238
  end
122
239
 
240
+ # Verifies microdeposits on a PaymentIntent object.
123
241
  def self.verify_microdeposits(intent, params = {}, opts = {})
124
242
  request_stripe_object(
125
243
  method: :post,
@@ -14,6 +14,7 @@ module Stripe
14
14
 
15
15
  OBJECT_NAME = "payment_link"
16
16
 
17
+ # When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
17
18
  def list_line_items(params = {}, opts = {})
18
19
  request_stripe_object(
19
20
  method: :get,
@@ -23,6 +24,7 @@ module Stripe
23
24
  )
24
25
  end
25
26
 
27
+ # When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
26
28
  def self.list_line_items(payment_link, params = {}, opts = {})
27
29
  request_stripe_object(
28
30
  method: :get,
@@ -14,6 +14,19 @@ module Stripe
14
14
 
15
15
  OBJECT_NAME = "payment_method"
16
16
 
17
+ # Attaches a PaymentMethod object to a Customer.
18
+ #
19
+ # To attach a new PaymentMethod to a customer for future payments, we recommend you use a [SetupIntent](https://stripe.com/docs/api/setup_intents)
20
+ # or a PaymentIntent with [setup_future_usage](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage).
21
+ # These approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach
22
+ # endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for
23
+ # future use, which makes later declines and payment friction more likely.
24
+ # See [Optimizing cards for future payments](https://stripe.com/docs/payments/payment-intents#future-usage) for more information about setting up
25
+ # future payments.
26
+ #
27
+ # To use this PaymentMethod as the default for invoice or subscription payments,
28
+ # set [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method),
29
+ # on the Customer to the PaymentMethod's ID.
17
30
  def attach(params = {}, opts = {})
18
31
  request_stripe_object(
19
32
  method: :post,
@@ -23,6 +36,7 @@ module Stripe
23
36
  )
24
37
  end
25
38
 
39
+ # Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer.
26
40
  def detach(params = {}, opts = {})
27
41
  request_stripe_object(
28
42
  method: :post,
@@ -32,6 +46,19 @@ module Stripe
32
46
  )
33
47
  end
34
48
 
49
+ # Attaches a PaymentMethod object to a Customer.
50
+ #
51
+ # To attach a new PaymentMethod to a customer for future payments, we recommend you use a [SetupIntent](https://stripe.com/docs/api/setup_intents)
52
+ # or a PaymentIntent with [setup_future_usage](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage).
53
+ # These approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach
54
+ # endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for
55
+ # future use, which makes later declines and payment friction more likely.
56
+ # See [Optimizing cards for future payments](https://stripe.com/docs/payments/payment-intents#future-usage) for more information about setting up
57
+ # future payments.
58
+ #
59
+ # To use this PaymentMethod as the default for invoice or subscription payments,
60
+ # set [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method),
61
+ # on the Customer to the PaymentMethod's ID.
35
62
  def self.attach(payment_method, params = {}, opts = {})
36
63
  request_stripe_object(
37
64
  method: :post,
@@ -41,6 +68,7 @@ module Stripe
41
68
  )
42
69
  end
43
70
 
71
+ # Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer.
44
72
  def self.detach(payment_method, params = {}, opts = {})
45
73
  request_stripe_object(
46
74
  method: :post,
@@ -13,6 +13,12 @@ module Stripe
13
13
 
14
14
  OBJECT_NAME = "payment_method_domain"
15
15
 
16
+ # Some payment methods such as Apple Pay require additional steps to verify a domain. If the requirements weren't satisfied when the domain was created, the payment method will be inactive on the domain.
17
+ # The payment method doesn't appear in Elements for this domain until it is active.
18
+ #
19
+ # To activate a payment method on an existing payment method domain, complete the required validation steps specific to the payment method, and then validate the payment method domain with this endpoint.
20
+ #
21
+ # Related guides: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration).
16
22
  def validate(params = {}, opts = {})
17
23
  request_stripe_object(
18
24
  method: :post,
@@ -22,6 +28,12 @@ module Stripe
22
28
  )
23
29
  end
24
30
 
31
+ # Some payment methods such as Apple Pay require additional steps to verify a domain. If the requirements weren't satisfied when the domain was created, the payment method will be inactive on the domain.
32
+ # The payment method doesn't appear in Elements for this domain until it is active.
33
+ #
34
+ # To activate a payment method on an existing payment method domain, complete the required validation steps specific to the payment method, and then validate the payment method domain with this endpoint.
35
+ #
36
+ # Related guides: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration).
25
37
  def self.validate(payment_method_domain, params = {}, opts = {})
26
38
  request_stripe_object(
27
39
  method: :post,