class Stripe::PaymentIntent
- Stripe::PaymentIntent
- Reference
- Object
Overview
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 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
Included Modules
- JSON::Serializable
- JSON::Serializable::Unmapped
- OpenApi::Json
- OpenApi::Validatable
Defined in:
stripe/models/payment_intent.crConstant Summary
-
ERROR_MESSAGE_FOR_CANCELLATION_REASON =
"invalid value for \"cancellation_reason\", must be one of [abandoned, automatic, duplicate, failed_invoice, fraudulent, requested_by_customer, void_invoice]."
-
ERROR_MESSAGE_FOR_CAPTURE_METHOD =
"invalid value for \"capture_method\", must be one of [automatic, automatic_async, manual]."
-
ERROR_MESSAGE_FOR_CONFIRMATION_METHOD =
"invalid value for \"confirmation_method\", must be one of [automatic, manual]."
-
ERROR_MESSAGE_FOR_OBJECT =
"invalid value for \"object\", must be one of [payment_intent]."
-
ERROR_MESSAGE_FOR_SETUP_FUTURE_USAGE =
"invalid value for \"setup_future_usage\", must be one of [off_session, on_session]."
-
ERROR_MESSAGE_FOR_STATUS =
"invalid value for \"status\", must be one of [canceled, processing, requires_action, requires_capture, requires_confirmation, requires_payment_method, succeeded]."
-
MAX_LENGTH_FOR_CLIENT_SECRET =
5000
-
MAX_LENGTH_FOR_DESCRIPTION =
5000
-
MAX_LENGTH_FOR_ID =
5000
-
MAX_LENGTH_FOR_RECEIPT_EMAIL =
5000
-
MAX_LENGTH_FOR_STATEMENT_DESCRIPTOR =
5000
-
MAX_LENGTH_FOR_STATEMENT_DESCRIPTOR_SUFFIX =
5000
-
MAX_LENGTH_FOR_TRANSFER_GROUP =
5000
-
VALID_VALUES_FOR_CANCELLATION_REASON =
String.static_array("abandoned", "automatic", "duplicate", "failed_invoice", "fraudulent", "requested_by_customer", "void_invoice")
-
VALID_VALUES_FOR_CAPTURE_METHOD =
String.static_array("automatic", "automatic_async", "manual")
-
VALID_VALUES_FOR_CONFIRMATION_METHOD =
String.static_array("automatic", "manual")
-
VALID_VALUES_FOR_OBJECT =
String.static_array("payment_intent")
-
VALID_VALUES_FOR_SETUP_FUTURE_USAGE =
String.static_array("off_session", "on_session")
-
VALID_VALUES_FOR_STATUS =
String.static_array("canceled", "processing", "requires_action", "requires_capture", "requires_confirmation", "requires_payment_method", "succeeded")
Constructors
- .new(pull : JSON::PullParser)
-
.new(*, amount : Int64 | Nil = nil, amount_capturable : Int64 | Nil = nil, amount_received : Int64 | Nil = nil, application : Stripe::PaymentIntentApplication | Nil = nil, application_fee_amount : Int64 | Nil = nil, automatic_payment_methods : Stripe::PaymentIntentAutomaticPaymentMethods | Nil = nil, canceled_at : Int64 | Nil = nil, cancellation_reason : String | Nil = nil, capture_method : String | Nil = nil, client_secret : String | Nil = nil, confirmation_method : String | Nil = nil, created : Int64 | Nil = nil, currency : String | Nil = nil, customer : Stripe::PaymentIntentCustomer | Nil = nil, description : String | Nil = nil, id : String | Nil = nil, invoice : Stripe::PaymentIntentInvoice | Nil = nil, last_payment_error : Stripe::PaymentIntentLastPaymentError | Nil = nil, latest_charge : Stripe::PaymentIntentLatestCharge | Nil = nil, livemode : Bool | Nil = nil, metadata : Hash(String, String) | Nil = nil, next_action : Stripe::PaymentIntentNextAction1 | Nil = nil, object : String | Nil = nil, on_behalf_of : Stripe::PaymentIntentOnBehalfOf | Nil = nil, payment_method : Stripe::PaymentIntentPaymentMethod | Nil = nil, payment_method_configuration_details : Stripe::PaymentIntentPaymentMethodConfigurationDetails | Nil = nil, payment_method_options : Stripe::PaymentIntentPaymentMethodOptions1 | Nil = nil, payment_method_types : Array(String) | Nil = nil, processing : Stripe::PaymentIntentProcessing1 | Nil = nil, receipt_email : String | Nil = nil, review : Stripe::PaymentIntentReview | Nil = nil, setup_future_usage : String | Nil = nil, shipping : Stripe::PaymentIntentShipping | Nil = nil, source : Stripe::PaymentIntentSource | Nil = nil, statement_descriptor : String | Nil = nil, statement_descriptor_suffix : String | Nil = nil, status : String | Nil = nil, transfer_data : Stripe::PaymentIntentTransferData | Nil = nil, transfer_group : String | Nil = nil, amount_details : Stripe::PaymentFlowsAmountDetails | Nil = nil)
Initializes the object @param [Hash] attributes Model attributes in the form of hash
Instance Method Summary
-
#==(other : self)
Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes.
- #amount : Int64 | Nil
-
#amount=(new_value : Int64 | Nil)
Custom attribute writer method checking allowed values (enum).
- #amount_capturable : Int64 | Nil
-
#amount_capturable=(new_value : Int64 | Nil)
Custom attribute writer method checking allowed values (enum).
- #amount_details : Stripe::PaymentFlowsAmountDetails | Nil
-
#amount_details=(new_value : Stripe::PaymentFlowsAmountDetails | Nil)
Custom attribute writer method checking allowed values (enum).
- #amount_received : Int64 | Nil
-
#amount_received=(new_value : Int64 | Nil)
Custom attribute writer method checking allowed values (enum).
- #application : Stripe::PaymentIntentApplication | Nil
-
#application=(new_value : Stripe::PaymentIntentApplication | Nil)
Custom attribute writer method checking allowed values (enum).
- #application_fee_amount : Int64 | Nil
-
#application_fee_amount=(new_value : Int64 | Nil)
Custom attribute writer method checking allowed values (enum).
- #automatic_payment_methods : Stripe::PaymentIntentAutomaticPaymentMethods | Nil
-
#automatic_payment_methods=(new_value : Stripe::PaymentIntentAutomaticPaymentMethods | Nil)
Custom attribute writer method checking allowed values (enum).
- #canceled_at : Int64 | Nil
-
#canceled_at=(new_value : Int64 | Nil)
Custom attribute writer method checking allowed values (enum).
- #cancellation_reason : String | Nil
-
#cancellation_reason=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #capture_method : String | Nil
-
#capture_method=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #client_secret : String | Nil
-
#client_secret=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #confirmation_method : String | Nil
-
#confirmation_method=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #created : Int64 | Nil
-
#created=(new_value : Int64 | Nil)
Custom attribute writer method checking allowed values (enum).
- #currency : String | Nil
-
#currency=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #customer : Stripe::PaymentIntentCustomer | Nil
-
#customer=(new_value : Stripe::PaymentIntentCustomer | Nil)
Custom attribute writer method checking allowed values (enum).
- #description : String | Nil
-
#description=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
-
#hash(hasher)
Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes.
- #id : String | Nil
-
#id=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #invoice : Stripe::PaymentIntentInvoice | Nil
-
#invoice=(new_value : Stripe::PaymentIntentInvoice | Nil)
Custom attribute writer method checking allowed values (enum).
- #last_payment_error : Stripe::PaymentIntentLastPaymentError | Nil
-
#last_payment_error=(new_value : Stripe::PaymentIntentLastPaymentError | Nil)
Custom attribute writer method checking allowed values (enum).
- #latest_charge : Stripe::PaymentIntentLatestCharge | Nil
-
#latest_charge=(new_value : Stripe::PaymentIntentLatestCharge | Nil)
Custom attribute writer method checking allowed values (enum).
-
#list_invalid_properties : Array(String)
Show invalid properties with the reasons.
- #livemode : Bool | Nil
-
#livemode=(new_value : Bool | Nil)
Custom attribute writer method checking allowed values (enum).
- #metadata : Hash(String, String) | Nil
-
#metadata=(new_value : Hash(String, String) | Nil)
Custom attribute writer method checking allowed values (enum).
- #next_action : Stripe::PaymentIntentNextAction1 | Nil
-
#next_action=(new_value : Stripe::PaymentIntentNextAction1 | Nil)
Custom attribute writer method checking allowed values (enum).
- #object : String | Nil
-
#object=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #on_behalf_of : Stripe::PaymentIntentOnBehalfOf | Nil
-
#on_behalf_of=(new_value : Stripe::PaymentIntentOnBehalfOf | Nil)
Custom attribute writer method checking allowed values (enum).
- #payment_method : Stripe::PaymentIntentPaymentMethod | Nil
-
#payment_method=(new_value : Stripe::PaymentIntentPaymentMethod | Nil)
Custom attribute writer method checking allowed values (enum).
- #payment_method_configuration_details : Stripe::PaymentIntentPaymentMethodConfigurationDetails | Nil
-
#payment_method_configuration_details=(new_value : Stripe::PaymentIntentPaymentMethodConfigurationDetails | Nil)
Custom attribute writer method checking allowed values (enum).
- #payment_method_options : Stripe::PaymentIntentPaymentMethodOptions1 | Nil
-
#payment_method_options=(new_value : Stripe::PaymentIntentPaymentMethodOptions1 | Nil)
Custom attribute writer method checking allowed values (enum).
- #payment_method_types : Array(String) | Nil
-
#payment_method_types=(new_value : Array(String) | Nil)
Custom attribute writer method checking allowed values (enum).
- #processing : Stripe::PaymentIntentProcessing1 | Nil
-
#processing=(new_value : Stripe::PaymentIntentProcessing1 | Nil)
Custom attribute writer method checking allowed values (enum).
- #receipt_email : String | Nil
-
#receipt_email=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #review : Stripe::PaymentIntentReview | Nil
-
#review=(new_value : Stripe::PaymentIntentReview | Nil)
Custom attribute writer method checking allowed values (enum).
- #setup_future_usage : String | Nil
-
#setup_future_usage=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #shipping : Stripe::PaymentIntentShipping | Nil
-
#shipping=(new_value : Stripe::PaymentIntentShipping | Nil)
Custom attribute writer method checking allowed values (enum).
- #source : Stripe::PaymentIntentSource | Nil
-
#source=(new_value : Stripe::PaymentIntentSource | Nil)
Custom attribute writer method checking allowed values (enum).
- #statement_descriptor : String | Nil
-
#statement_descriptor=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #statement_descriptor_suffix : String | Nil
-
#statement_descriptor_suffix=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #status : String | Nil
-
#status=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #transfer_data : Stripe::PaymentIntentTransferData | Nil
-
#transfer_data=(new_value : Stripe::PaymentIntentTransferData | Nil)
Custom attribute writer method checking allowed values (enum).
- #transfer_group : String | Nil
-
#transfer_group=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
-
#valid? : Bool
Check to see if the all the properties in the model are valid @return true if the model is valid
Instance methods inherited from module OpenApi::Json
after_initialize
after_initialize,
clone
clone,
eql?(o : self)
eql?,
to_hash : Hash(String, JSON::Any)
to_hash,
to_json_any : JSON::Any
to_json_any
Class methods inherited from module OpenApi::Json
build_from_hash(hash : Hash)
build_from_hash,
build_from_json_any(json_any : JSON::Any)
build_from_json_any
Instance methods inherited from module OpenApi::Validatable
list_invalid_properties : Array(String)
list_invalid_properties,
list_invalid_properties_for(key : String) : Array(String)
list_invalid_properties_for,
valid? : Bool
valid?,
validate : Nil
validate
Constructor Detail
Initializes the object @param [Hash] attributes Model attributes in the form of hash
Instance Method Detail
Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code
Custom attribute writer method checking allowed values (enum). @param [Object] amount Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] amount_capturable Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] amount_details Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] amount_received Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] application Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] application_fee_amount Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] automatic_payment_methods Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] canceled_at Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] cancellation_reason Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] capture_method Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] client_secret Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] confirmation_method Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] created Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] currency Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] customer Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] description Object to be assigned
Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code
Custom attribute writer method checking allowed values (enum). @param [Object] id Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] invoice Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] last_payment_error Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] latest_charge Object to be assigned
Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons
Custom attribute writer method checking allowed values (enum). @param [Object] livemode Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] metadata Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] next_action Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] object Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] on_behalf_of Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] payment_method Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] payment_method_configuration_details Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] payment_method_options Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] payment_method_types Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] processing Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] receipt_email Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] review Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] setup_future_usage Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] shipping Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] source Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] statement_descriptor Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] statement_descriptor_suffix Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] status Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] transfer_data Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] transfer_group Object to be assigned
Check to see if the all the properties in the model are valid @return true if the model is valid