Class: Stripe::PaymentIntent::LastPaymentError

Inherits:
StripeObject
  • Object
show all
Defined in:
lib/stripe/resources/payment_intent.rb

Constant Summary

Constants inherited from StripeObject

StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from StripeObject

#last_response

Class Method Summary collapse

Methods inherited from StripeObject

#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, field_encodings, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values

Constructor Details

This class inherits a constructor from Stripe::StripeObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject

Instance Attribute Details

#advice_codeObject (readonly)

For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](docs.stripe.com/declines#retrying-issuer-declines) if they provide one.



262
263
264
# File 'lib/stripe/resources/payment_intent.rb', line 262

def advice_code
  @advice_code
end

#chargeObject (readonly)

For card errors, the ID of the failed charge.



264
265
266
# File 'lib/stripe/resources/payment_intent.rb', line 264

def charge
  @charge
end

#codeObject (readonly)

For some errors that could be handled programmatically, a short string indicating the [error code](docs.stripe.com/error-codes) reported.



266
267
268
# File 'lib/stripe/resources/payment_intent.rb', line 266

def code
  @code
end

#decline_codeObject (readonly)

For card errors resulting from a card issuer decline, a short string indicating the [card issuer’s reason for the decline](docs.stripe.com/declines#issuer-declines) if they provide one.



268
269
270
# File 'lib/stripe/resources/payment_intent.rb', line 268

def decline_code
  @decline_code
end

#doc_urlObject (readonly)

A URL to more information about the [error code](docs.stripe.com/error-codes) reported.



270
271
272
# File 'lib/stripe/resources/payment_intent.rb', line 270

def doc_url
  @doc_url
end

#messageObject (readonly)

A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.



272
273
274
# File 'lib/stripe/resources/payment_intent.rb', line 272

def message
  @message
end

#network_advice_codeObject (readonly)

For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error.



274
275
276
# File 'lib/stripe/resources/payment_intent.rb', line 274

def network_advice_code
  @network_advice_code
end

#network_decline_codeObject (readonly)

For payments declined by the network, an alphanumeric code which indicates the reason the payment failed.



276
277
278
# File 'lib/stripe/resources/payment_intent.rb', line 276

def network_decline_code
  @network_decline_code
end

#paramObject (readonly)

If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.



278
279
280
# File 'lib/stripe/resources/payment_intent.rb', line 278

def param
  @param
end

#payment_intentObject (readonly)

A PaymentIntent guides you through the process of collecting a payment from your customer. We recommend that you create exactly one PaymentIntent for each order or customer session in your system. You can reference the PaymentIntent later to see the history of payment attempts for a particular session.

A PaymentIntent transitions through [multiple statuses](/payments/paymentintents/lifecycle) throughout its lifetime as it interfaces with Stripe.js to perform authentication flows and ultimately creates at most one successful charge.

Related guide: [Payment Intents API](docs.stripe.com/payments/payment-intents)



290
291
292
# File 'lib/stripe/resources/payment_intent.rb', line 290

def payment_intent
  @payment_intent
end

#payment_methodObject (readonly)

PaymentMethod objects represent your customer’s payment instruments. You can use them with [PaymentIntents](docs.stripe.com/payments/payment-intents) to collect payments or save them to Customer objects to store instrument details for future payments.

Related guides: [Payment Methods](docs.stripe.com/payments/payment-methods) and [More Payment Scenarios](docs.stripe.com/payments/more-payment-scenarios).



296
297
298
# File 'lib/stripe/resources/payment_intent.rb', line 296

def payment_method
  @payment_method
end

#payment_method_typeObject (readonly)

If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors.



298
299
300
# File 'lib/stripe/resources/payment_intent.rb', line 298

def payment_method_type
  @payment_method_type
end

#request_log_urlObject (readonly)

A URL to the request log entry in your dashboard.



300
301
302
# File 'lib/stripe/resources/payment_intent.rb', line 300

def request_log_url
  @request_log_url
end

#setup_intentObject (readonly)

A SetupIntent guides you through the process of setting up and saving a customer’s payment credentials for future payments. For example, you can use a SetupIntent to set up and save your customer’s card without immediately collecting a payment. Later, you can use [PaymentIntents](api.stripe.com#payment_intents) to drive the payment flow.

Create a SetupIntent when you’re ready to collect your customer’s payment credentials. Don’t maintain long-lived, unconfirmed SetupIntents because they might not be valid. The SetupIntent transitions through multiple [statuses](docs.stripe.com/payments/intents#intent-statuses) as it guides you through the setup process.

Successful SetupIntents result in payment credentials that are optimized for future payments. For example, cardholders in [certain regions](stripe.com/guides/strong-customer-authentication) might need to be run through [Strong Customer Authentication](docs.stripe.com/strong-customer-authentication) during payment method collection to streamline later [off-session payments](docs.stripe.com/payments/setup-intents). If you use the SetupIntent with a [Customer](api.stripe.com#setup_intent_object-customer), it automatically attaches the resulting payment method to that Customer after successful setup. We recommend using SetupIntents or [setup_future_usage](api.stripe.com#payment_intent_object-setup_future_usage) on PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods.

By using SetupIntents, you can reduce friction for your customers, even as regulations change over time.

Related guide: [Setup Intents API](docs.stripe.com/payments/setup-intents)



322
323
324
# File 'lib/stripe/resources/payment_intent.rb', line 322

def setup_intent
  @setup_intent
end

#sourceObject (readonly)

Attribute for field source



324
325
326
# File 'lib/stripe/resources/payment_intent.rb', line 324

def source
  @source
end

#typeObject (readonly)

The type of error returned. One of ‘api_error`, `card_error`, `idempotency_error`, or `invalid_request_error`



326
327
328
# File 'lib/stripe/resources/payment_intent.rb', line 326

def type
  @type
end

Class Method Details

.field_remappingsObject



332
333
334
# File 'lib/stripe/resources/payment_intent.rb', line 332

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



328
329
330
# File 'lib/stripe/resources/payment_intent.rb', line 328

def self.inner_class_types
  @inner_class_types = {}
end