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::Issuing::Authorization - A Stripe Issued Authorization Object

SYNOPSIS

    my $auth = $stripe->authorization({
        approved => $stripe->true,
        authorization_method => 'online',
        authorized_amount => 2000,
        authorized_currency => 'jpy',
        balance_transactions => 
        [
            {
                        amount => 2000,
                        authorization => $authorization_object,
                        card => $card_object,
                        cardholder => $cardholder_object,
                        currency => 'jpy',
                        merchant_amount => 2000,
                        merchant_currency => 'jpy',
                        merchant_data => $merchant_data_object,
                        metadata => { transaction_id => 123 },
                        type => 'capture',
                        },
        ],
        card => $card_object,
        cardholder => $cardholder_object,
        created => '2020-04-12T04:07:30',
        held_amount => 2000,
        held_currency => 'jpy',
        is_held_amount_controllable => $stripe->true,
        merchant_data => $merchant_data_object,
        metadata => { transaction_id => 123 },
        pending_authorized_amount => 2000,
        pending_held_amount => 2000,
        request_history => [ $request_history_obj1, $request_history_obj2 ],
        status => 'pending',
        transactions => [ $transactions_obj1, $transactions_obj2, $transactions_obj3 ],
        verification_data => $verification_data_object,
        wallet_provider => undef,
    });

See documentation in Net::API::Stripe for example to make api calls to Stripe to create those objects.

VERSION

    v0.100.0

DESCRIPTION

When an issued card is used to make a purchase, an Issuing Authorization object is created. Authorisations (https://stripe.com/docs/issuing/authorizations) must be approved for the purchase to be completed successfully.

CONSTRUCTOR

new( %ARG )

Creates a new Net::API::Stripe::Issuing::Authorization object.

METHODS

id string

Unique identifier for the object.

object string, value is "issuing.authorization"

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

approved boolean

Whether the authorization has been approved.

authorization_method string

How the card details were provided. One of chip, contactless, keyed_in, online, or swipe.

authorized_amount integer

The amount that has been authorized. This will be 0 when the object is created, and increase after it has been approved.

authorized_currency currency

The currency that was presented to the cardholder for the authorization. Three-letter ISO currency code, in lowercase. Must be a supported currency.

balance_transactions array, contains: balance_transaction object

This is an array of Net::API::Stripe::Balance::Transaction objects.

card hash

This is a Net::API::Stripe::Issuing::Card object.

cardholder string (expandable)

The cardholder to whom this authorization belongs.

When expanded, this is a Net::API::Stripe::Issuing::Card::Holder object.

created timestamp

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

held_amount integer

The amount the authorization is expected to be in held_currency. When Stripe holds funds from you, this is the amount reserved for the authorization. This will be 0 when the object is created, and increase after it has been approved. For multi-currency transactions, held_amount can be used to determine the expected exchange rate.

held_currency currency

The currency of the held amount. This will always be the card currency.

is_held_amount_controllable boolean
livemode boolean

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

merchant_data hash

This is a Net::API::Stripe::Issuing::MerchantData 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.

pending_authorized_amount integer

The amount the user is requesting to be authorized. This field will only be non-zero during an issuing.authorization.request webhook.

pending_held_amount integer

The additional amount Stripe will hold if the authorization is approved. This field will only be non-zero during an issuing.authorization.request webhook.

request_history array of hashes

This is an array of Net::API::Stripe::Issuing::Authorization::RequestHistory objects.

status string

One of pending, reversed, or closed.

transactions array of hashes

This is an array of Net::API::Stripe::Issuing::Authorization::Transaction objects.

verification_data hash

This is a Net::API::Stripe::Issuing::Authorization::VerificationData object.

wallet_provider string

What, if any, digital wallet was used for this authorization. One of apple_pay, google_pay, or samsung_pay.

API SAMPLE

        {
          "id": "iauth_fake123456789",
          "object": "issuing.authorization",
          "approved": true,
          "authorization_method": "online",
          "authorized_amount": 500,
          "authorized_currency": "usd",
          "balance_transactions": [],
          "card": null,
          "cardholder": null,
          "created": 1540642827,
          "held_amount": 0,
          "held_currency": "usd",
          "is_held_amount_controllable": false,
          "livemode": false,
          "merchant_data": {
                "category": "taxicabs_limousines",
                "city": "San Francisco",
                "country": "US",
                "name": "Rocket Rides",
                "network_id": "1234567890",
                "postal_code": "94107",
                "state": "CA",
                "url": null
          },
          "metadata": {},
          "pending_authorized_amount": 0,
          "pending_held_amount": 0,
          "request_history": [],
          "status": "reversed",
          "transactions": [
                {
                  "id": "ipi_fake123456789",
                  "object": "issuing.transaction",
                  "amount": -100,
                  "authorization": "iauth_fake123456789",
                  "balance_transaction": null,
                  "card": "ic_fake123456789",
                  "cardholder": null,
                  "created": 1540642827,
                  "currency": "usd",
                  "dispute": null,
                  "livemode": false,
                  "merchant_amount": null,
                  "merchant_currency": null,
                  "merchant_data": {
                        "category": "taxicabs_limousines",
                        "city": "San Francisco",
                        "country": "US",
                        "name": "Rocket Rides",
                        "network_id": "1234567890",
                        "postal_code": "94107",
                        "state": "CA",
                        "url": null
                  },
                  "metadata": {},
                  "type": "capture"
                },
                {
                  "id": "ipi_fake123456789",
                  "object": "issuing.transaction",
                  "amount": -100,
                  "authorization": "iauth_fake123456789",
                  "balance_transaction": null,
                  "card": "ic_fake123456789",
                  "cardholder": null,
                  "created": 1540642827,
                  "currency": "usd",
                  "dispute": null,
                  "livemode": false,
                  "merchant_amount": null,
                  "merchant_currency": null,
                  "merchant_data": {
                        "category": "taxicabs_limousines",
                        "city": "San Francisco",
                        "country": "US",
                        "name": "Rocket Rides",
                        "network_id": "1234567890",
                        "postal_code": "94107",
                        "state": "CA",
                        "url": null
                  },
                  "metadata": {},
                  "type": "capture"
                }
          ],
          "verification_data": {
                "address_line1_check": "not_provided",
                "address_zip_check": "match",
                "authentication": "none",
                "cvc_check": "match"
          },
          "wallet_provider": null
        }

HISTORY

v0.1

Initial version

AUTHOR

Jacques Deguest <jack@deguest.jp>

SEE ALSO

Stripe API documentation:

https://stripe.com/docs/api/issuing/authorizations, https://stripe.com/docs/issuing/authorizations

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.