The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Net::API::Stripe::Payment::Intent::NextAction - A Stripe Payment Next Action Object

SYNOPSIS

    my $next = $stripe->payment_intent->next_action({
        redirect_to_url => 
        {
        return_url => 'https://example.com/pay/return',
        url => 'https://example.com/pay/auth',
        },
        type => 'redirect_to_url',
    });

VERSION

    0.1

DESCRIPTION

If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source.

It used to be NextSourceAction, but the naming changed in Stripe API as of 2019-02-11

This is instantiated by method next_action in module Net::API::Stripe::Payment::Intent

CONSTRUCTOR

new( %ARG )

Creates a new Net::API::Stripe::Payment::Intent::NextAction object. It may also take an hash like arguments, that also are method of the same name.

METHODS

redirect_to_url hash

Contains instructions for authenticating a payment by redirecting your customer to another page or application.

This is actually a dynamic class Net::API::Stripe::Payment::Intent::NextAction::RedirectToUrl so the following property can be accessed as methods:

return_url string

If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.

url string

The URL you must redirect your customer to in order to authenticate the payment.

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.

API SAMPLE

        {
          "id": "pi_fake123456789",
          "object": "payment_intent",
          "amount": 1099,
          "amount_capturable": 0,
          "amount_received": 0,
          "application": null,
          "application_fee_amount": null,
          "canceled_at": null,
          "cancellation_reason": null,
          "capture_method": "automatic",
          "charges": {
                "object": "list",
                "data": [],
                "has_more": false,
                "url": "/v1/charges?payment_intent=pi_fake123456789"
          },
          "client_secret": "pi_fake123456789_secret_ksjfjfbsjbfsmbfmf",
          "confirmation_method": "automatic",
          "created": 1556596976,
          "currency": "jpy",
          "customer": null,
          "description": null,
          "invoice": null,
          "last_payment_error": null,
          "livemode": false,
          "metadata": {},
          "next_action": null,
          "on_behalf_of": null,
          "payment_method": null,
          "payment_method_options": {},
          "payment_method_types": [
                "card"
          ],
          "receipt_email": null,
          "review": null,
          "setup_future_usage": null,
          "shipping": null,
          "statement_descriptor": null,
          "statement_descriptor_suffix": null,
          "status": "requires_payment_method",
          "transfer_data": null,
          "transfer_group": null
        }

HISTORY

v0.1

Initial version

AUTHOR

Jacques Deguest <jack@deguest.jp>

SEE ALSO

Stripe API documentation:

https://stripe.com/docs/api/payment_intents/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.