NAME
Net::API::Stripe::Payment::Intent::Setup - A Stripe Charge Setup Intent
SYNOPSIS
VERSION
0.1
DESCRIPTION
A SetupIntent guides you through the process of setting up a customer's payment credentials for future payments. For example, you could use a SetupIntent to set up your customer's card without immediately collecting a payment. Later, you can use PaymentIntents (Net::API::Stripe::Payment::Intent
/ https://stripe.com/docs/api/setup_intents#payment_intents) to drive the payment flow.
Create a SetupIntent as soon as you're ready to collect your customer's payment credentials. Do not maintain long-lived, unconfirmed SetupIntents as they may no longer be valid. The SetupIntent then transitions through multiple 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 may need to be run through Strong Customer Authentication at the time of payment method collection in order to streamline later off-session payments.
By using SetupIntents, you ensure that your customers experience the minimum set of required friction, even as regulations change over time.
CONSTRUCTOR
- new( %ARG )
-
Creates a new
Net::API::Stripe
objects. It may also take an hash like arguments, that also are method of the same name.- verbose
-
Toggles verbose mode on/off
- debug
-
Toggles debug mode on/off
METHODS
- id retrievable with publishable key string
-
Unique identifier for the object.
- object retrievable with publishable key string, value is "setup_intent"
-
String representing the object’s type. Objects of the same type share the same value.
- application string expandable "application"
-
ID of the Connect application that created the SetupIntent. This is a string of the account or a
Net::API::Stripe::Connect::Account
object. - cancellation_reason retrievable with publishable key string
-
Reason for cancellation of this SetupIntent, one of abandoned, requested_by_customer, or duplicate.
- client_secret retrievable with publishable key string
-
The client secret of this SetupIntent. Used for client-side retrieval using a publishable key.
The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
- created retrievable with publishable key timestamp
-
Time at which the object was created. Measured in seconds since the Unix epoch.
- customer string (expandable)
-
ID of the Customer this SetupIntent belongs to, if one exists, or the corresponding
Net::API::Stripe::Customer
object.If present, payment methods used with this SetupIntent can only be attached to this Customer, and payment methods attached to other Customers cannot be used with this SetupIntent.
- description retrievable with publishable key string
-
An arbitrary string attached to the object. Often useful for displaying to users.
- last_setup_error retrievable with publishable key hash
-
The error encountered in the previous SetupIntent confirmation.
This is a
Net::API::Stripe::Error
object. - livemode retrievable with publishable key boolean
-
Has the value true if the object exists in live mode or the value false if the object exists in test mode.
- mandate string expandable
-
ID of the multi use Mandate generated by the SetupIntent. When expanded, this is a
Net::API::Stripe::Mandate
object. - metadata hash
-
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- next_action retrievable with publishable key hash
-
If present, this property tells you what actions you need to take in order for your customer to continue payment setup.
This is a
Net::API::Stripe::Payment::Intent::NextAction
object with the following properties:- redirect_to_url hash
-
Contains instructions for authenticating a payment by redirecting your customer to another page or application. Show child attributes
- type string
-
Type of the next action to perform, one of redirect_to_url or use_stripe_sdk.
- use_stripe_sdk hash
-
When confirming a PaymentIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js.
- on_behalf_of string (expandable)
-
The account (if any) for which the setup is intended.
- payment_method retrievable with publishable key string (expandable)
-
ID of the payment method used with this SetupIntent.
When expanded, this is a
Net::API::Stripe::Payment::Method
object. - payment_method_options hash
-
Payment-method-specific configuration for this SetupIntent. Show child attributes
- payment_method_types retrievable with publishable key array containing strings
-
The list of payment method types (e.g. card) that this SetupIntent is allowed to set up.
- single_use_mandate string expandable
-
ID of the single_use Mandate generated by the SetupIntent. When expanded, this is a
Net::API::Stripe::Mandate
object. - status retrievable with publishable key string
-
Status of this SetupIntent, one of requires_payment_method, requires_confirmation, requires_action, processing, canceled, or succeeded.
- usage retrievable with publishable key string
-
Indicates how the payment method is intended to be used in the future.
Use on_session if you intend to only reuse the payment method when the customer is in your checkout flow. Use off_session if your customer may or may not be in your checkout flow. If not provided, this value defaults to off_session.
API SAMPLE
{
"id": "seti_123456789",
"object": "setup_intent",
"application": null,
"cancellation_reason": null,
"client_secret": null,
"created": 123456789,
"customer": null,
"description": null,
"last_setup_error": null,
"livemode": false,
"metadata": {
"user_id": "guest"
},
"next_action": null,
"on_behalf_of": null,
"payment_method": null,
"payment_method_options": {},
"payment_method_types": [
"card"
],
"status": "requires_payment_method",
"usage": "off_session"
}
HISTORY
v0.1
Initial version
STRIPE HISTORY
2019-12-24
Stripe has added 2 new properties: mandate and single_use_mandate
AUTHOR
Jacques Deguest <jack@deguest.jp>
SEE ALSO
Stripe API documentation:
https://stripe.com/docs/api/setup_intents
COPYRIGHT & LICENSE
Copyright (c) 2018-2019 DEGUEST Pte. Ltd.
You can use, copy, modify and redistribute this package and associated files under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 109:
You forgot a '=back' before '=head1'