NAME

Net::API::Stripe::SetupAttempt - The SetupAttempt object

SYNOPSIS

my $setup = $stripe->setup_attempt({
    ## Net::API::Stripe::Connect::Account
    application => $connect_account_object,
    created => '2020-11-17T12:15:20',
    ## Net::API::Stripe::Customer
    customer => $customer_id_or_object,
    livemode => $stripe->true,
    on_behalf_of => $account_object,
    payment_method => $stripe_pm_id,
    payment_method_details => $hash,
    setup_error => $hash,
    ## Net::API::Stripe::Payment::Intent::Setup
    setup_intent => $intent_id_or_object,
    status => 'succeeded',
    usage => 'off_session',
});

VERSION

v0.2.0

DESCRIPTION

A SetupAttempt describes one attempted confirmation of a SetupIntent, whether that confirmation was successful or unsuccessful. You can use SetupAttempts to inspect details of a specific attempt at setting up a payment method using a SetupIntent.

METHODS

id string

Unique identifier for the object.

object string

String representing the object's type. Objects of the same type share the same value.

application expandable

The value of application on the SetupIntent at the time of this confirmation.

When expanded this is an Net::API::Stripe::Connect::Account object.

attach_to_self boolean

If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.

It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.

created timestamp

Time at which the object was created. Measured in seconds since the Unix epoch.

customer expandable

The value of customer on the SetupIntent at the time of this confirmation.

When expanded this is an Net::API::Stripe::Customer object.

flow_directions array

Indicates the directions of money movement for which this payment method is intended to be used.

Include inbound if you intend to use the payment method as the origin to pull funds from. Include outbound if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.

livemode boolean

Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.

on_behalf_of expandable

The value of on_behalf_of on the SetupIntent at the time of this confirmation.

When expanded this is an Net::API::Stripe::Connect::Account object.

payment_method expandable

ID of the payment method used with this SetupAttempt.

When expanded this is an Net::API::Stripe::Payment::Method object.

payment_method_details hash

Details about the payment method at the time of SetupIntent confirmation.

It has the following properties:

bancontact hash

If this is a bancontact payment method, this hash contains confirmation-specific information for the bancontact payment method.

bank_code string

Bank code of bank associated with the bank account.

bank_name string

Name of the bank associated with the bank account.

bic string

Bank Identifier Code of the bank associated with the bank account.

generated_sepa_debit string expandable

The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.

When expanded this is an Net::API::Stripe::Payment::Method object.

generated_sepa_debit_mandate string expandable

The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.

When expanded this is an Net::API::Stripe::Mandate object.

iban_last4 string

Last four characters of the IBAN.

preferred_language string

Preferred language of the Bancontact authorization page that the customer is redirected to. Can be one of en, de, fr, or nl

verified_name string

Owner's verified full name. Values are verified or provided by Bancontact directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.

card hash

If this is a card payment method, this hash contains confirmation-specific information for the card payment method.

three_d_secure hash

Populated if this authorization used 3D Secure authentication.

authentication_flow string

For authenticated transactions: how the customer was authenticated by the issuing bank.

result string

Indicates the outcome of 3D Secure authentication.

result_reason string

Additional information about why 3D Secure succeeded or failed based on the `result`.

version string

The version of 3D Secure that was used.

ideal hash

If this is a ideal payment method, this hash contains confirmation-specific information for the ideal payment method.

bank string

The customer's bank. Can be one of abn_amro, asn_bank, bunq, handelsbanken, ing, knab, moneyou, rabobank, regiobank, sns_bank, triodos_bank, or van_lanschot.

bic string

The Bank Identifier Code of the customer's bank.

generated_sepa_debit string expandable

The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.

When expanded this is an Net::API::Stripe::Payment::Method object.

generated_sepa_debit_mandate string expandable

The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.

When expanded this is an Net::API::Stripe::Mandate object.

iban_last4 string

Last four characters of the IBAN.

verified_name string

Owner's verified full name. Values are verified or provided by iDEAL directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.

sofort hash

If this is a sofort payment method, this hash contains confirmation-specific information for the sofort payment method.

bank_code string

Bank code of bank associated with the bank account.

bank_name string

Name of the bank associated with the bank account.

bic string

Bank Identifier Code of the bank associated with the bank account.

generated_sepa_debit string expandable

The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.

When expanded this is an Net::API::Stripe::Payment::Method object.

generated_sepa_debit_mandate string expandable

The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.

When expanded this is an Net::API::Stripe::Mandate object.

iban_last4 string

Last four characters of the IBAN.

preferred_language string

Preferred language of the Sofort authorization page that the customer is redirected to. Can be one of en, de, fr, or nl

verified_name string

Owner's verified full name. Values are verified or provided by Sofort directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.

type string

The type of the payment method used in the SetupIntent (e.g., card). An additional hash is included on payment_method_details with a name matching this value. It contains confirmation-specific information for the payment method.

setup_error hash

The error encountered during this attempt to confirm the SetupIntent, if any.

It has the following properties:

code string

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

decline_code string

For card errors resulting from a card issuer decline, a short string indicating the card issuer's reason for the decline if they provide one.

doc_url string

A URL to more information about the error code reported.

message string

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

param string

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.

payment_method hash

The PaymentMethod object for errors returned on a request involving a PaymentMethod.

When expanded, this is a Net::API::Stripe::Payment::Method object.

payment_method_type string

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.

type string

The type of error returned. One of api_connection_error, api_error, authentication_error, card_error, idempotency_error, invalid_request_error, or rate_limit_error

setup_intent expandable

ID of the SetupIntent that this attempt belongs to.

When expanded this is an Net::API::Stripe::Payment::Intent::Setup object.

status string

Status of this SetupAttempt, one of requires_confirmation, requires_action, processing, succeeded, failed, or abandoned.

usage string

The value of usage on the SetupIntent at the time of this confirmation, one of off_session or on_session.

API SAMPLE

{
  "id": "setatt_1ErTsH2eZvKYlo2CI7ukcoF7",
  "object": "setup_attempt",
  "application": null,
  "created": 1562004309,
  "customer": null,
  "livemode": false,
  "on_behalf_of": null,
  "payment_method": "pm_1ErTsG2eZvKYlo2CH0DNen59",
  "payment_method_details": {
    "card": {
      "three_d_secure": null
    },
    "type": "card"
  },
  "setup_error": null,
  "setup_intent": "seti_1ErTsG2eZvKYlo2CKaT8MITz",
  "status": "succeeded",
  "usage": "off_session"
}

HISTORY

v0.1.0

Initial version

AUTHOR

Jacques Deguest <jack@deguest.jp>

SEE ALSO

Stripe API documentation:

https://stripe.com/docs/api#setup_attempt_object

COPYRIGHT & LICENSE

Copyright (c) 2019-2020 DEGUEST Pte. Ltd.

You can use, copy, modify and redistribute this package and associated files under the same terms as Perl itself.