=encoding utf8

=head1 NAME

Net::API::Stripe - An interface to Stripe API

=head1 SYNOPSIS

    my $stripe = Net::API::Stripe->new({
        debug => 3,
        conf_file => './stripe-settings.json',
        livemode => 0,
        ignore_unknown_parameters => 1,
        expand => 'all',
    }) || die( Net::API::Stripe->error );

A Stripe json settings file looks like this:

    {
        "livemode": false,
        "test_secret_key": "sk_test_1234567890abcdefg",
        "test_public_key": "pk_test_1234567890abcdefg",
        "live_secret_key": "sk_live_0987654321zyxwvut",
        "live_public_key": "pk_live_0987654321zyxwvut",
        "version": "2020-03-02",
    }

Create a customer:

    # Create an address object
    my $addr;
    if( $v->{street} || $v->{city} || $v->{postal_code} || $v->{country} )
    {
        $addr = $stripe->address({
            line1 => $v->{street},
            line2 => $v->{building},
            city => $v->{city},
            postal_code => $v->{postal_code},
            state => $v->{state},
            country => $v->{country},
        }) || bailout( "Unable to create a postal address object: ", $stripe->error );
    }
    my $cust_object = $stripe->customer({
        balance => 20000,
        address => $addr,
        # Must be set up previously before using it
        coupon => '2020DISCOUNT50',
        # Japanese Yen
        currency => 'jpy',
        description => 'VIP customer',
        email => 'john@example.com',
        invoice_prefix => 'VIP',
        # Default payment must be set up beforehand for it to be declared here
        invoice_settings => { default_payment_method => 'pm_fake1234567' },
        metadata => { db_id => 123, process_id => 456 },
        name => 'John Doe',
        phone => '+81-90-1234-5678',
        preferred_locales => [qw( en ja )],
        shipping => $addr,
    });

    # Submit this customer to Stripe for creation
    my $cust = $stripe->customers( create => $cust_object ) || die( sprintf( "Failed with error message %s and code %d\n", $stripe->error->message, $stripe->error->code ) );

Retrieve customer:

    my $cust = $stripe->customers( retrieve => 'cust_fake12345' );
    # or we can also pass a customer object
    my $cust = $stripe->customers( retrieve => $cust_object ) || do
    {
        if( $stripe->http_response->code == 404 )
        {
            die( "Customer ", $cust_object->id, " does not exist!\n" );
        }
        else
        {
            die( "Some unexpected error occurred: ", $stripe->error, "\n" );
        }
    };

Other methods are describe below and the parameters they take are documented in their respective module.    

=head1 VERSION

    v2.0.2

=head1 DESCRIPTION

This is a comprehensive Stripe API. It provides an object oriented friendly interface for which I put a lot of hard work so you could spend your time on other aspects of your development.

This distribution is almost completely auto-generated based on Stripe API documentation version 2022-08-01 and contains 203 modules.

It inherits from L<Module::Generic> and L<Net::API::Stripe> sub modules inherits from L<Net::API::Stripe::Generic>

This interface aims at making it easy to make api calls to Stripe, however it is important and a time-saver to read Stripe documentation comprehensively.

This interface will do minimal data integrity check. Thus, even though this interface will check for proper data types like array, right property names used, mandatory parameters in api calls, etc it does not do any check on the data itself, so you should always check for return value from Stripe api calls and look at the Stripe error returned. If an error occured, the Stripe api method will return undef and set an error message accordingly. See L</"ERROR HANDLING">

=head1 CONSTRUCTOR

=head2 new

Provided with an hash of parameters and this creates a new L<Net::API::Stripe> objects.

Its arguments also have methods of the same name.

=over 4

=item C<api_uri>

The base uri of the Stripe API. This should not be changed.

=item C<browser>

The user agent id to use when making http api calls

=item C<conf_file>

The file path to the configuration file. Each property in this configuration file is same as the parameters to instantiate a new L<Net::API::Stripe> object.

=item C<debug>

Toggles debug mode on/off

=item C<expand>

Integer. Sets the depth level of expansion of Stripe objects. If objects are not expanded, Stripe API will return the object id, but when they are expanded, Stripe returns the entire object and its properties. You can then chain your code and do something like:

    print $cust->invoice_settings->default_payment_method->type

=item C<ignore_unknown_parameters>

Boolean. When this is on, this will ignore any properties sent back from Stripe API that are unknown to us. This happens frequently as Stripe updates its API. When this value is set to false, then unknown properties will cause this to stop processing and return an error.

=item C<livemode>

Boolean value to toggle test or live mode

=item C<verbose>

Toggles verbose mode on/off

=item C<version>

The version of the Stripe API to use. Example C<2020-03-02>

=back

=head1 METHODS

=head2 account

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Connect::Account> object.

=head2 account_bank_account

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Connect::ExternalAccount::Bank> object.

=head2 account_card

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Connect::ExternalAccount::Card> object.

=head2 account_link

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Connect::Account::Link> object.

=head2 address

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Address> object.

=head2 address_kana

Provided with optional hash parameters, this returns an L<Net::API::Stripe::AddressKana> object.

=head2 address_kanji

Provided with optional hash parameters, this returns an L<Net::API::Stripe::AddressKanji> object.

=head2 amount

Provided with a number, this returns a L<Module::Generic::Number> object, which extends L<Number::Format>

=head2 api_uri

Returns the L<URI> object of the Stripe api.

=head2 application_fee

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Connect::ApplicationFee> object.

=head2 application_fee_refund

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Connect::ApplicationFee::Refund> object.

=head2 apps_secret

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Connect::AppsSecret> object.

=head2 authorization

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Issuing::Authorization> object.

=head2 balance

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Balance> object.

=head2 balance_transaction

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Balance::Transaction> object.

=head2 bank_account

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Connect::ExternalAccount::Bank> object.

=head2 billing_details

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Billing::Details> object.

=head2 billing_portal_configuration

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Billing::PortalConfiguration> object.

=head2 billing_portal_session

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Billing::PortalSession> object.

=head2 billing_thresholds

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Billing::Thresholds> object.

=head2 browser

Set or get the user agent string used when making calls to Stripe API.

=head2 business_profile

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Connect::Business::Profile> object.

=head2 capability

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Connect::Account::Capability> object.

=head2 card

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Connect::ExternalAccount::Card> object.

=head2 card_holder

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Issuing::Card::Holder> object.

=head2 charge

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Charge> object.

=head2 checkout_session

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Checkout::Session> object.

=head2 code2error

Given a code returned by Stripe upon error, this returns the corresponding string.

    my $cust = $stripe->customers( retrieve => $id ) || 
      die( $stripe->code2error( $stripe->error->code ), "\n" );

=head2 code_verification

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Payment::Source::CodeVerification> object.

=head2 company

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Connect::Account::Company> object.

=head2 conf_file( [ file path ] )

Given a json configuration file, it will read the data, set the property I<conf_data> to the decoded hash and return it. When called without argument, it returns the current value of I<conf_data>.

=head2 connection_token

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Terminal::ConnectionToken> object.

=head2 country_spec

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Connect::CountrySpec> object.

=head2 coupon

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Billing::Coupon> object.

=head2 credit_note

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Billing::CreditNote> object.

=head2 currency

Set or get the 3-letter iso 4217 currency, such as C<jpy> for Japanese yen or C<eur> for Euro.

=head2 customer

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Customer> object.

=head2 customer_balance_transaction

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Customer::BalanceTransaction> object.

=head2 customer_cash_balance_transaction

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Cash::Transaction> object.

=head2 customer_tax_id

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Customer::TaxId> object.

=head2 data

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Event::Data> object.

=head2 delete( END POINT, HASH PAYLOAD )

Given a Stripe end point as a URI absolute path, and a payload as a hash reference, this will issue a C<DELETE> http query and return a hash reference corresponding to the json data returned by Stripe, or, in case of error, it will return undef and set the error which can be accessed with C<$stripe->error> (a L<Module::Generic::Exception> object).

=head2 discount

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Billing::Discount> object.

=head2 dispute

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Dispute> object.

=head2 document

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Connect::Account::Document> object.

=head2 encode_with_json

Takes a bollean value. This is used to set whether the payload should be encoded with json. This should not be changed.

=head2 event

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Event> object.

=head2 evidence

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Issuing::Dispute::Evidence> object.

=head2 evidence_details

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Dispute::EvidenceDetails> object.

=head2 expand

Integer. Sets or get the depth of Stripe object expansion. See Stripe api documentation for more information: L<https://stripe.com/docs/api/expanding_objects>

=head2 fee_refund

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Connect::ApplicationFee::Refund> object.

=head2 fields

Given an object type, this returns an array reference of all the methods (aka fields) for that module.

=head2 file

Provided with optional hash parameters, this returns a L<Net::API::Stripe::File> object.

=head2 file_link

Provided with optional hash parameters, this returns a L<Net::API::Stripe::File::Link> object.

=head2 financial_connections_account

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Financial::Connections::Account> object.

=head2 financial_connections_account_owner

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Financial::Connections::AccountOwner> object.

=head2 financial_connections_account_ownership

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Financial::Connections::AccountOwnership> object.

=head2 financial_connections_session

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Financial::Connections::Session> object.

=head2 fraud

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Fraud> object.

=head2 funding_instructions

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Issuing::FundingInstructions> object.

=head2 generate_uuid

Returns a uuid version 4. This uses L<Data::UUID> to achieve that.

=head2 get( END POINT, HASH PAYLOAD )

Given a Stripe absolute uri and a hash reference, this will issue a http C<GET> request and return a hash reference representing the json data returned by Stripe or undef if an error occurred. The error can then be retrieved like C<$stripe->error> which is a L<Module::Generic::Exception> object.

=head2 http_client

This returns the L<LWP::UserAgent> object and create it if it is not yet instantiated.

=head2 http_request

Get or set the L<HTTP::Request> based on the data provided.

=head2 http_response

Get or set the L<HTTP::Response> based on the data provided.

=head2 identity_verification_report

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Identity::VerificationReport> object.

=head2 identity_verification_session

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Identity::VerificationSession> object.

=head2 ignore_unknown_parameters

Boolean. When true, this module will ignore unknown properties returned from calls made to Stripe api. if set to false, and an unknown property is received, this will generate an error and return undef, stopping the flow of the request instead of ignoring it.

=head2 invoice

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Billing::Invoice> object.

=head2 invoice_item

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Billing::Invoice::Item> object.

=head2 invoice_line_item

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Billing::Invoice::LineItem> object.

=head2 invoice_settings

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Billing::Invoice::Settings> object.

=head2 invoiceitem

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Billing::Invoice::Item> object.

=head2 ip_address_location

Provided with optional hash parameters, this returns an L<Net::API::Stripe::GeoLocation> object.

=head2 issuing_authorization

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Issuing::Authorization> object.

=head2 issuing_card

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Issuing::Card> object.

=head2 issuing_cardholder

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Issuing::Card::Holder> object.

=head2 issuing_dispute

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Issuing::Dispute> object.

=head2 issuing_transaction

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Issuing::Transaction> object.

=head2 item

Provided with optional hash parameters, this returns an L<Net::API::Stripe::List::Item> object.

=head2 json

This returns a C<JSON> object with option I<allow_nonref> enabled.

=head2 key( STRIPE API SECRET KEY )

Provided with your Stripe api secret key, this will set this property accordingly, but will also set the B<auth> property as well. B<auth> is used to authenticate you when making calls to Stripe api. B<auth> would be something like this:

    Basic c2tfMTIzNDU2Nzg5MGFiY2RlZmdoaWo6Cg

=head2 line_item

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Billing::Invoice::LineItem> object.

=head2 livemode

Boolean. Set or get the livemode status. If it is true, then all api query will be mad in live mode.

=head2 location

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Terminal::Location> object.

=head2 login_link

Provided with optional hash parameters this returns a L<Net::API::Stripe::Connect::Account::LoginLink> object.

=head2 merchant_data

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Issuing::MerchantData> object.

=head2 next_action

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Payment::Intent::NextAction> object.

=head2 order

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Order> object.

=head2 order_item

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Order::Item> object.

=head2 outcome

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Charge::Outcome> object.

=head2 owner

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Payment::Source::Owner> object.

=head2 package_dimensions

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Order::SKU::PackageDimensions> object.

=head2 payment_intent

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Payment::Intent> object.

=head2 payment_method

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Payment::Method> object.

=head2 payment_method_details

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Payment::Method::Details> object.

=head2 payout

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Payout> object.

=head2 period

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Billing::Invoice::Period> object.

=head2 person

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Connect::Person> object.

=head2 plan

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Billing::Plan> object.

=head2 post( END POINT, HASH PAYLOAD )

Given a Stripe end point absolute uri and a hash reference, this will issue a C<POST> http request to the Stripe api and return a hash reference representing the object provided by Stripe or undef with an error set, which can be retrieved using the L</"error"> method.

If no I<idempotency> parameter was provided, B<post> will automatically create one.

=head2 post_multipart( END POINT, HASH PAYLOAD )

Given a Stripe end point absolute uri and a hash reference, this will issue a C<POST> multipart http request to the Stripe api and return a hash reference representing the object returned by Stripe. If an error had occurred, it will return undef and set an error that can be retrieved using the L</"error"> method.

This method is used primarily when upload file. See the section below on L</"FILES">

=head2 price

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Price> object.

=head2 product

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Product> object.

=head2 radar_early_fraud_warning

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Fraud> object.

=head2 radar_value_list

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Fraud::ValueList> object.

=head2 radar_value_list_item

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Fraud::ValueList::Item> object.

=head2 reader

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Terminal::Reader> object.

=head2 receiver

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Payment::Source::Receiver> object.

=head2 redirect

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Payment::Source::Redirect> object.

=head2 refund

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Refund> object.

=head2 relationship

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Connect::Account::Relationship> object.

=head2 reporting_report_run

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Reporting::ReportRun> object.

=head2 reporting_report_type

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Reporting::ReportType> object.

=head2 request

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Event::Request> object.

=head2 requirements

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Connect::Account::Requirements> object.

=head2 return

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Order::Return> object.

=head2 review

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Fraud::Review> object.

=head2 schedule

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Billing::Subscription::Schedule> object.

=head2 schedule_query

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Sigma::ScheduledQueryRun> object.

=head2 scheduled_query_run

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Sigma::ScheduledQueryRun> object.

=head2 session

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Checkout::Session> object.

=head2 settings

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Connect::Account::Settings> object.

=head2 setup_intent

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Payment::Intent::Setup> object.

=head2 shipping

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Shipping> object.

=head2 sku

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Order::SKU> object.

=head2 source

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Payment::Source> object.

=head2 source_order

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Order> object.

=head2 status_transitions

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Billing::Invoice::StatusTransition> object.

=head2 subscription

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Billing::Subscription> object.

=head2 subscription_item

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Billing::Subscription::Item> object.

=head2 subscription_schedule

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Billing::Subscription::Schedule> object.

=head2 tax_ids

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Billing::TaxID> object.

=head2 tax_rate

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Tax::Rate> object.

=head2 terminal_configuration

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Terminal::Configuration> object.

=head2 terminal_connection_token

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Terminal::ConnectionToken> object.

=head2 terminal_location

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Terminal::Location> object.

=head2 terminal_reader

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Terminal::Reader> object.

=head2 test_helpers_test_clock

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Billing::TestHelpersTestClock> object.

=head2 token

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Token> object.

=head2 topup

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Connect::TopUp> object.

=head2 tos_acceptance

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Connect::Account::TosAcceptance> object.

=head2 transfer

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Connect::Transfer> object.

=head2 transfer_data

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Payment::Intent::TransferData> object.

=head2 transfer_reversal

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Connect::Transfer::Reversal> object.

=head2 transform_usage

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Billing::Plan::TransformUsage> object.

=head2 treasury_credit_reversal

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Treasury::CreditReversal> object.

=head2 treasury_debit_reversal

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Treasury::DebitReversal> object.

=head2 treasury_financial_account

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Treasury::FinancialAccount> object.

=head2 treasury_financial_account_features

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Treasury::FinancialAccountFeatures> object.

=head2 treasury_inbound_transfer

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Treasury::InboundTransfer> object.

=head2 treasury_outbound_payment

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Treasury::OutboundPayment> object.

=head2 treasury_outbound_transfer

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Treasury::OutboundTransfer> object.

=head2 treasury_received_credit

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Treasury::ReceivedCredit> object.

=head2 treasury_received_debit

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Treasury::ReceivedDebit> object.

=head2 treasury_transaction

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Treasury::Transaction> object.

=head2 treasury_transaction_entry

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Treasury::TransactionEntry> object.

=head2 usage_record

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Billing::UsageRecord> object.

=head2 usage_record_summary

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Billing::UserRecord::Summary> object.

=head2 value_list

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Fraud::ValueList> object.

=head2 value_list_item

Provided with optional hash parameters, this returns a L<Net::API::Stripe::Fraud::ValueList::Item> object.

=head2 verification

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Connect::Account::Verification> object.

=head2 verification_data

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Issuing::Authorization::VerificationData> object.

=head2 verification_fields

Provided with optional hash parameters, this returns an L<Net::API::Stripe::Connect::CountrySpec::VerificationFields> object.

=head2 version

Set or get the api version. This must be set on the L<Stripe dashboard|https://dashboard.stripe.com/>

=head2 webhook

Provided with optional hash parameters, this returns a L<Net::API::Stripe::WebHook::Object> object.

=head2 webhook_endpoint

Provided with optional hash parameters, this returns an L<Net::API::Stripe::WebHook::Object> object.

=head1 ACCOUNT

You can create, delete, list, reject, retrieve or update account

=head2 create

    my $obj = $stripe->accounts( create => {
        capabilities =>
        {
            card_payments =>
            {
                requested => "1",
            }
            transfers     =>
            {
                requested => "1",
            }
        }
        country      => "US",
        email        => q{jenny.rosen@example.com},
        type         => "custom", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Connect::Account> object or a hash reference, this will create a Stripe account and return an L<Net::API::Stripe::Connect::Account> object.

Possible parameters are:

=over 4

=item C<account_token>

An L<account token|https://stripe.com/docs/api/tokens/create_account>, used to securely provide details to the account.

=item C<business_profile>

Business information about the account.

=item C<business_type>

The business type.

=item C<capabilities>

B<required for Custom accounts> Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. whether it has been requested or not). Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive. 

=item C<company>

Information about the company or business. This field is available for any C<business_type>.

=item C<country>

The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use C<CA> as the country for the account being created. Available countries include L<Stripe's global markets|https://stripe.com/global> as well as countries where L<cross-border payouts|https://stripe.com/docs/connect/cross-border-payouts> are supported.

=item C<default_currency>

Three-letter ISO currency code representing the default currency for the account. This must be a currency that L<Stripe supports in the account's country|https://stripe.com/docs/payouts>.

=item C<documents>

Documents that may be submitted to satisfy various informational requests.

=item C<email>

The email address of the account holder. This is only to make the account easier to identify to you. Stripe only emails Custom accounts with your consent.

=item C<external_account>

A card or bank account to attach to the account for receiving L<payouts|https://stripe.com/docs/connect/bank-debit-card-payouts> (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by L<Stripe.js|https://stripe.com/docs/js>, or a dictionary, as documented in the C<external_account> parameter for L<bank account|https://stripe.com/docs/api#account_create_bank_account> creation. <br><br>By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the L<bank account|https://stripe.com/docs/api#account_create_bank_account> or L<card creation|https://stripe.com/docs/api#account_create_card> APIs.

=item C<individual>

Information about the person represented by the account. This field is null unless C<business_type> is set to C<individual>.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<settings>

Options for customizing how the account functions within Stripe.

=item C<tos_acceptance>

Details on the account's acceptance of the L<Stripe Services Agreement|https://stripe.com/docs/connect/updating-accounts#tos-acceptance>.

=item C<type>

B<Required>. The type of Stripe account to create. May be one of C<custom>, C<express> or C<standard>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/accounts/create>

=head2 delete

    my $obj = $stripe->accounts( delete => $args ) || die( $stripe->error );

Provided with a L<account|Net::API::Stripe::Connect::Account>, or a hash reference, this will issue an api call to Stripe to remove the account. It returns the account object that was deleted with its property C<deleted> set to true.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/accounts/delete>

=head2 list

    my $obj = $stripe->accounts( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<account|Net::API::Stripe::Connect::Account> object, this issue an api call to get the list of all account.

Possible parameters are:

=over 4

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/accounts/list>

=head2 reject

    my $obj = $stripe->accounts( reject => {
        reason => "fraud", } ) || die( $stripe->error );

Provided with a L<account|Net::API::Stripe::Connect::Account>, or a hash reference, this will issue a reject api call.

Returns an account with C<payouts_enabled> and C<charges_enabled> set to false on success. If the account ID does not exist, this call returns L<an error|https://stripe.com/docs/api/errors>.

Possible parameters are:

=over 4

=item C<reason>

B<Required>. The reason for rejecting the account. Can be C<fraud>, C<terms_of_service>, or C<other>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/account/reject>

=head2 retrieve

    my $obj = $stripe->accounts( retrieve => $args ) || die( $stripe->error );

Provided with a L<account|Net::API::Stripe::Connect::Account> object or a hash reference, this will retrieve a Stripe account and return its corresponding L<object|Net::API::Stripe::Connect::Account>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/accounts/retrieve>

=head2 update

    my $obj = $stripe->accounts( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<account|Net::API::Stripe::Connect::Account> object or a hash reference, this will update a Stripe account and return its corresponding L<object|Net::API::Stripe::Connect::Account>

Possible parameters are:

=over 4

=item C<account_token>

An L<account token|https://stripe.com/docs/api/tokens/create_account>, used to securely provide details to the account.

=item C<business_profile>

Business information about the account.

=item C<business_type>

The business type.

=item C<capabilities>

Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. whether it has been requested or not). Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive. 

=item C<company>

Information about the company or business. This field is available for any C<business_type>.

=item C<default_currency>

Three-letter ISO currency code representing the default currency for the account. This must be a currency that L<Stripe supports in the account's country|https://stripe.com/docs/payouts>.

=item C<documents>

Documents that may be submitted to satisfy various informational requests.

=item C<email>

The email address of the account holder. This is only to make the account easier to identify to you. Stripe only emails Custom accounts with your consent.

=item C<external_account>

A card or bank account to attach to the account for receiving L<payouts|https://stripe.com/docs/connect/bank-debit-card-payouts> (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by L<Stripe.js|https://stripe.com/docs/js>, or a dictionary, as documented in the C<external_account> parameter for L<bank account|https://stripe.com/docs/api#account_create_bank_account> creation. <br><br>By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the L<bank account|https://stripe.com/docs/api#account_create_bank_account> or L<card creation|https://stripe.com/docs/api#account_create_card> APIs.

=item C<individual>

Information about the person represented by the account. This field is null unless C<business_type> is set to C<individual>.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<settings>

Options for customizing how the account functions within Stripe.

=item C<tos_acceptance>

Details on the account's acceptance of the L<Stripe Services Agreement|https://stripe.com/docs/connect/updating-accounts#tos-acceptance>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/accounts/update>

=head1 ACCOUNT BANK ACCOUNT

You can create, delete, list, retrieve or update account bank account

=head2 create

    my $obj = $stripe->account_bank_accounts( create => {
        external_account => "btok_1Le9F12eZvKYlo2CGBPhcUyo", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Connect::ExternalAccount::Bank> object or a hash reference, this will create a Stripe account bank account and return an L<Net::API::Stripe::Connect::ExternalAccount::Bank> object.

Possible parameters are:

=over 4

=item C<default_for_currency>

When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency.

=item C<external_account>

B<Required>. Either a token, like the ones returned by L<Stripe.js|https://stripe.com/docs/stripe.js>, or a dictionary containing a user’s bank account details (with the options shown below).

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/external_account_bank_accounts/create>

=head2 delete

    my $obj = $stripe->account_bank_accounts( delete => $args ) || die( $stripe->error );

Provided with a L<account bank account|Net::API::Stripe::Connect::ExternalAccount::Bank>, or a hash reference, this will issue an api call to Stripe to remove the account bank account. It returns the account bank account object that was deleted with its property C<deleted> set to true.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/external_account_bank_accounts/delete>

=head2 list

    my $obj = $stripe->account_bank_accounts( list => {
        limit  => "3",
        object => "bank_account", } ) || die( $stripe->error );

Provided with a L<account bank account|Net::API::Stripe::Connect::ExternalAccount::Bank> object, this issue an api call to get the list of all account bank account.

Possible parameters are:

=over 4

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/external_account_bank_accounts/list>

=head2 retrieve

    my $obj = $stripe->account_bank_accounts( retrieve => $args ) || die( $stripe->error );

Provided with a L<account bank account|Net::API::Stripe::Connect::ExternalAccount::Bank> object or a hash reference, this will retrieve a Stripe account bank account and return its corresponding L<object|Net::API::Stripe::Connect::ExternalAccount::Bank>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/external_account_bank_accounts/retrieve>

=head2 update

    my $obj = $stripe->account_bank_accounts( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<account bank account|Net::API::Stripe::Connect::ExternalAccount::Bank> object or a hash reference, this will update a Stripe account bank account and return its corresponding L<object|Net::API::Stripe::Connect::ExternalAccount::Bank>

Possible parameters are:

=over 4

=item C<account_holder_name>

The name of the person or business that owns the bank account.

=item C<account_holder_type>

The type of entity that holds the account. This can be either C<individual> or C<company>.

=item C<account_type>

The bank account type. This can only be C<checking> or C<savings> in most countries. In Japan, this can only be C<futsu> or C<toza>.

=item C<default_for_currency>

When set to true, this becomes the default external account for its currency.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/external_account_bank_accounts/update>

=head1 ACCOUNT CARD

You can create, delete, list, retrieve or update account card

=head2 create

    my $obj = $stripe->account_cards( create => {
        external_account => "tok_mastercard_debit", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Connect::ExternalAccount::Card> object or a hash reference, this will create a Stripe account card and return an L<Net::API::Stripe::Connect::ExternalAccount::Card> object.

Possible parameters are:

=over 4

=item C<default_for_currency>

When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency.

=item C<external_account>

B<Required>. A token, like the ones returned by L<Stripe.js|https://stripe.com/docs/stripe.js>. Stripe will automatically validate the card.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/external_account_cards/create>

=head2 delete

    my $obj = $stripe->account_cards( delete => $args ) || die( $stripe->error );

Provided with a L<account card|Net::API::Stripe::Connect::ExternalAccount::Card>, or a hash reference, this will issue an api call to Stripe to remove the account card. It returns the account card object that was deleted with its property C<deleted> set to true.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/external_account_cards/delete>

=head2 list

    my $obj = $stripe->account_cards( list => {
        limit  => "3",
        object => "card", } ) || die( $stripe->error );

Provided with a L<account card|Net::API::Stripe::Connect::ExternalAccount::Card> object, this issue an api call to get the list of all account card.

Possible parameters are:

=over 4

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/external_account_cards/list>

=head2 retrieve

    my $obj = $stripe->account_cards( retrieve => $args ) || die( $stripe->error );

Provided with a L<account card|Net::API::Stripe::Connect::ExternalAccount::Card> object or a hash reference, this will retrieve a Stripe account card and return its corresponding L<object|Net::API::Stripe::Connect::ExternalAccount::Card>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/external_account_cards/retrieve>

=head2 update

    my $obj = $stripe->account_cards( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<account card|Net::API::Stripe::Connect::ExternalAccount::Card> object or a hash reference, this will update a Stripe account card and return its corresponding L<object|Net::API::Stripe::Connect::ExternalAccount::Card>

Possible parameters are:

=over 4

=item C<address_city>

City/District/Suburb/Town/Village.

=item C<address_country>

Billing address country, if provided when creating card.

=item C<address_line1>

Address line 1 (Street address/PO Box/Company name).

=item C<address_line2>

Address line 2 (Apartment/Suite/Unit/Building).

=item C<address_state>

State/County/Province/Region.

=item C<address_zip>

ZIP or postal code.

=item C<default_for_currency>

When set to true, this becomes the default external account for its currency.

=item C<exp_month>

Two digit number representing the card’s expiration month.

=item C<exp_year>

Four digit number representing the card’s expiration year.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<name>

Cardholder name.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/external_account_cards/update>

=head1 ACCOUNT LINK

You can create account link

=head2 create

    my $obj = $stripe->account_links( create => {
        account     => "acct_1032D82eZvKYlo2C",
        refresh_url => "https://example.com/reauth",
        return_url  => "https://example.com/return",
        type        => "account_onboarding", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Connect::Account::Link> object or a hash reference, this will create a Stripe account link and return an L<Net::API::Stripe::Connect::Account::Link> object.

Possible parameters are:

=over 4

=item C<account>

B<Required>. The identifier of the account to create an account link for.

=item C<collect>

Which information the platform needs to collect from the user. One of C<currently_due> or C<eventually_due>. Default is C<currently_due>.

=item C<refresh_url>

B<required> The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user.

=item C<return_url>

B<required> The URL that the user will be redirected to upon leaving or completing the linked flow.

=item C<type>

B<Required>. The type of account link the user is requesting. Possible values are C<account_onboarding> or C<account_update>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/account_links/create>

=head1 APPLICATION FEE

You can list or retrieve application fee

=head2 list

    my $obj = $stripe->application_fees( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<application fee|Net::API::Stripe::Connect::ApplicationFee> object, this issue an api call to get the list of all application fee.

Possible parameters are:

=over 4

=item C<charge>

Only return application fees for the charge specified by this charge ID.

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/application_fees/list>

=head2 retrieve

    my $obj = $stripe->application_fees( retrieve => $args ) || die( $stripe->error );

Provided with a L<application fee|Net::API::Stripe::Connect::ApplicationFee> object or a hash reference, this will retrieve a Stripe application fee and return its corresponding L<object|Net::API::Stripe::Connect::ApplicationFee>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/application_fees/retrieve>

=head1 APPS SECRET

You can delete, find, list or set apps secret

=head2 delete

    my $obj = $stripe->apps_secrets( delete => {
        name  => "my-api-key",
        scope =>
        {
            type => "account",
        } } ) || die( $stripe->error );

Provided with a L<apps secret|Net::API::Stripe::Connect::AppsSecret>, or a hash reference, this will issue an api call to Stripe to remove the apps secret. It returns the apps secret object that was deleted with its property C<deleted> set to true.

Possible parameters are:

=over 4

=item C<name>

B<Required>. A name for the secret that's unique within the scope.

=item C<scope>

B<Required>. Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/apps/secret_store/delete>

=head2 find

    my $obj = $stripe->apps_secrets( find => {
        name  => "my-api-key",
        scope =>
        {
            type => "account",
        } } ) || die( $stripe->error );

Provided with a L<apps secret|Net::API::Stripe::Connect::AppsSecret>, or a hash reference, this will issue a find api call.

Returns a secret object.

Possible parameters are:

=over 4

=item C<name>

B<Required>. A name for the secret that's unique within the scope.

=item C<scope>

B<Required>. Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/apps/secret_store/find>

=head2 list

    my $obj = $stripe->apps_secrets( list => {
        limit => "2",
        scope =>
        {
            type => "account",
        } } ) || die( $stripe->error );

Provided with a L<apps secret|Net::API::Stripe::Connect::AppsSecret> object, this issue an api call to get the list of all apps secret.

Possible parameters are:

=over 4

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<scope>

B<Required>. Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/apps/secret_store/list>

=head2 set

    my $obj = $stripe->apps_secrets( set => {
        name    => "my-api-key",
        payload => "secret_key_xxxxxx",
        scope   =>
        {
            type => "account",
        } } ) || die( $stripe->error );

Provided with a L<apps secret|Net::API::Stripe::Connect::AppsSecret>, or a hash reference, this will issue a set api call.

Returns a secret object.

Possible parameters are:

=over 4

=item C<expires_at>

The Unix timestamp for the expiry time of the secret, after which the secret deletes.

=item C<name>

B<Required>. A name for the secret that's unique within the scope.

=item C<payload>

B<Required>. The plaintext secret value to be stored.

=item C<scope>

B<Required>. Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/apps/secret_store/set>

=head1 BALANCE

You can retrieve balance

=head2 retrieve

    my $obj = $stripe->balances( retrieve => $args ) || die( $stripe->error );

Provided with a L<balance|Net::API::Stripe::Balance> object or a hash reference, this will retrieve a Stripe balance and return its corresponding L<object|Net::API::Stripe::Balance>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/balance/balance_retrieve>

=head1 BALANCE TRANSACTION

You can B<retrieve> or B<list> the balance transactions.

=head2 list

This can take various parameter to influence the list of data returned by Stripe. It returns a L<Net::API::Stripe::List> object of L<Net::API::Stripe::Balance::Transaction> objects. Valid parameters are as follows. See Stripe API for more information: L<https://stripe.com/docs/api/balance_transactions/list>

    my $list = $stripe->balance_transactions( 'list' ) || die( $stripe->error );
    while( my $bt = $list->next )
    {
        printf( <<EOT, $bt->id, $bt->amount, $bt->created->iso8601, $bt->currency, $bt->customer->name, $bt->description );
Id: %s
Amount: %s
Created on: $s
Currency: %s
Cusomer name: %s
Description: %s
EOT
    }

Possible parameters are:

=over 4

=item I<available_on>

=item I<created>

=item I<currency>

3-letter iso 4217 currency

=item I<ending_before>

Stripe balance transaction id

=item I<limit>

Integer

=item I<payout>

=item I<source>

=item I<starting_after>

=item I<type>

Only returns transactions of the given type

=back

=head2 retrieve

    my $trans = $stripe->balances( retrieve => 'txn_fake1234567890' ) || die( $stripe->error );

Provided a C<balance_transaction> object or an id, this returns a L<Net::API::Stripe::Balance::Transaction> object or undef upon error.

=head1 BANK ACCOUNT

You can create, delete, list, retrieve, update or verify bank account

=head2 create

    my $acct = $stripe->bank_accounts( create => $stripe->bank_account({
        account_holder_name => 'Big Corp, Inc',
        account_holder_type => 'company',
        bank_name => 'Big Bank, Corp'
        country => 'us',
        currency => 'usd',
        # Net::API::Stripe::Customer object
        customer => $customer_object,
        default_for_currency => $stripe->true,
        fingerprint => 'kshfkjhfkjsjdla',
        last4 => 1234,
        metadata => { transaction_id => 2222 },
        routing_number => 123,
        status => 'new',
    })) || die( "Oops: ", $stripe->error );

Provided wuth a bank account object L<Net::API::Stripe::Connect::ExternalAccount::Bank> that has its I<account> property set, or simply a hash reference this will create a Stripe bank account and return its object as a L<Net::API::Stripe::Connect::ExternalAccount::Bank>

Possible parameters are:

=over 4

=item I<account>

A Stripe account id. This is required.

=item I<external_account> This is required. Either a token, like the ones returned by Stripe.js, or a hash reference containing a userâs bank account details with the following properties:

=over 8

=item I<object> (required)

=item I<country> (required)

=item I<currency> (required)

=item I<account_holder_name>

=item I<account_holder_type>

=item I<routing_number>

=item I<account_number> (required)

=back

=item I<default_for_currency> Boolean

=item I<metadata>

An arbitrary hash reference

=back

For more information see Stripe documentation here: L<https://stripe.com/docs/api/external_account_bank_accounts/create>

=head2 delete

    my $removed_acct = $stripe->bank_accounts( delete => 'ba_fake123456789' ) || die( "Oops: ", $stripe->error );

Provided wuth a bank account object L<Net::API::Stripe::Connect::ExternalAccount::Bank> that has its I<account> property set, or simply a hash reference this will remove a Stripe bank account and return its object as a L<Net::API::Stripe::Connect::ExternalAccount::Bank>

Possible parameters are:

=over 4

=item I<id>

A Stripe bank account id. This is required.

=item I<account>

A Stripe account id. This is required.

=back

For more information see Stripe documentation here: L<https://stripe.com/docs/api/external_account_bank_accounts/delete>

=head2 list

    my $list = $stripe->bank_accounts( 'list' ) || die( $stripe->error );
    printf( "%d total transaction(s) found\n", $list->count );
    while( my $acct = $list->next )
    {
        ## Do something with this object
    }

Provided wuth a bank account object L<Net::API::Stripe::Connect::ExternalAccount::Bank> that has its I<account> property set, or simply a hash reference this will list all Stripe bank accounts and return a list object as a L<Net::API::Stripe::List>

Possible parameters are:

=over 4

=item I<account>

A Stripe account id. This is required.

=back

For more information see Stripe documentation here: L<https://stripe.com/docs/api/external_account_bank_accounts/list>

=head2 retrieve

    my $acct = $stripe->bank_accounts( retrieve => 'ba_fake123456789' ) || die( "Oops: ", $stripe->error );

Provided wuth a bank account object L<Net::API::Stripe::Connect::ExternalAccount::Bank> that has its I<account> property set, or simply a hash reference this will retrieve a Stripe bank account and return its object as a L<Net::API::Stripe::Connect::ExternalAccount::Bank>

Possible parameters are:

=over 4

=item I<id>

A Stripe bank account id. This is required.

=item I<account>

A Stripe account id. This is required.

=back

For more information see Stripe documentation here: L<https://stripe.com/docs/api/external_account_bank_accounts/retrieve>

=head2 update

    my $acct = $stripe->bank_accounts( update => $stripe->bank_account({
        account_holder_name => 'Big Corp, Co., Ltd.',
        default_for_currency => $stripe->false,
    })) || die( "Oops: ", $stripe->error );

    # or passing a hash rather than an object

    my $acct = $stripe->bank_accounts( update => {
        account_holder_name => 'Big Corp, Co., Ltd.',
        default_for_currency => $stripe->false,
    }) || die( "Oops: ", $stripe->error );

Provided wuth a bank account object L<Net::API::Stripe::Connect::ExternalAccount::Bank> that has its I<account> property set, or simply a hash reference this will update a Stripe bank account and return its object as a L<Net::API::Stripe::Connect::ExternalAccount::Bank>

Possible parameters are:

=over 4

=item I<id>

A Stripe bank account id. This is required.

=item I<account>

A Stripe account id. This is required.

=item I<account_holder_name> String

=item I<account_holder_type> String

=item I<default_for_currency> Boolean

=item I<metadata>

An arbitrary hash reference

=back

For more information see Stripe documentation here: L<https://stripe.com/docs/api/external_account_bank_accounts/update>

=head2 verify

    my $obj = $stripe->bank_accounts( verify => {
        amounts => [qw( 32 45 )], } ) || die( $stripe->error );

Provided with a L<bank account|Net::API::Stripe::Customer::BankAccount>, or a hash reference, this will issue a verify api call.

Returns the bank account object with a C<status> of <strong>verified</strong>.

Possible parameters are:

=over 4

=item C<amounts>

Two positive integers, in I<cents>, equal to the values of the microdeposits sent to the bank account.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/customer_bank_accounts/verify>

=head1 BILLING PORTAL CONFIGURATION

You can create, list, retrieve or update billing portal configuration

=head2 create

    my $obj = $stripe->billing_portal_configurations( create => {
        business_profile =>
        {
            privacy_policy_url   => "https://example.com/privacy",
            terms_of_service_url => "https://example.com/terms",
        }
        features         =>
        {
            customer_update =>
            {
                allowed_updates => [qw( email tax_id )],
                enabled         => "1",
            }
            invoice_history =>
            {
                enabled => "1",
            }
        } } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Billing::PortalConfiguration> object or a hash reference, this will create a Stripe billing portal configuration and return an L<Net::API::Stripe::Billing::PortalConfiguration> object.

Possible parameters are:

=over 4

=item C<business_profile>

B<Required>. The business information shown to customers in the portal.

=item C<default_return_url>

The default URL to redirect customers to when they click on the portal's link to return to your website. This can be L<overriden|https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url> when creating the session.

=item C<features>

B<Required>. Information about the features available in the portal.

=item C<login_page>

The hosted login page for this configuration. Learn more about the portal login page in our L<integration docs|https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share>.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/customer_portal/configurations/create>

=head2 list

    my $obj = $stripe->billing_portal_configurations( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<billing portal configuration|Net::API::Stripe::Billing::PortalConfiguration> object, this issue an api call to get the list of all billing portal configuration.

Possible parameters are:

=over 4

=item C<active>

Only return configurations that are active or inactive (e.g., pass C<true> to only list active configurations).

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<is_default>

Only return the default or non-default configurations (e.g., pass C<true> to only list the default configuration).

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/customer_portal/configurations/list>

=head2 retrieve

    my $obj = $stripe->billing_portal_configurations( retrieve => $args ) || die( $stripe->error );

Provided with a L<billing portal configuration|Net::API::Stripe::Billing::PortalConfiguration> object or a hash reference, this will retrieve a Stripe billing portal configuration and return its corresponding L<object|Net::API::Stripe::Billing::PortalConfiguration>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/customer_portal/configurations/retrieve>

=head2 update

    my $obj = $stripe->billing_portal_configurations( update => {
        business_profile =>
        {
            privacy_policy_url   => "https://example.com/privacy",
            terms_of_service_url => "https://example.com/terms",
        } } ) || die( $stripe->error );

Provided with a L<billing portal configuration|Net::API::Stripe::Billing::PortalConfiguration> object or a hash reference, this will update a Stripe billing portal configuration and return its corresponding L<object|Net::API::Stripe::Billing::PortalConfiguration>

Possible parameters are:

=over 4

=item C<active>

Whether the configuration is active and can be used to create portal sessions.

=item C<business_profile>

The business information shown to customers in the portal.

=item C<default_return_url>

The default URL to redirect customers to when they click on the portal's link to return to your website. This can be L<overriden|https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url> when creating the session.

=item C<features>

Information about the features available in the portal.

=item C<login_page>

The hosted login page for this configuration. Learn more about the portal login page in our L<integration docs|https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share>.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/customer_portal/configurations/update>

=head1 BILLING PORTAL SESSION

You can create billing portal session

=head2 create

    my $obj = $stripe->billing_portal_sessions( create => {
        customer   => "cus_AJ78ZaALpqgiuZ",
        return_url => "https://example.com/account", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Billing::PortalSession> object or a hash reference, this will create a Stripe billing portal session and return an L<Net::API::Stripe::Billing::PortalSession> object.

Possible parameters are:

=over 4

=item C<configuration>

The ID of an existing L<configuration|https://stripe.com/docs/api/customer_portal/configuration> to use for this session, describing its functionality and features. If not specified, the session uses the default configuration.

=item C<customer>

B<Required>. The ID of an existing customer.

=item C<locale>

The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s C<preferred_locales> or browser’s locale is used.

=item C<on_behalf_of>

The C<on_behalf_of> account to use for this session. When specified, only subscriptions and invoices with this C<on_behalf_of> account appear in the portal. For more information, see the L<docs|https://stripe.com/docs/connect/charges-transfers#on-behalf-of>. Use the L<Accounts API|https://stripe.com/docs/api/accounts/object#account_object-settings-branding> to modify the C<on_behalf_of> account's branding settings, which the portal displays.

=item C<return_url>

The default URL to redirect customers to when they click on the portal's link to return to your website.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/customer_portal/sessions/create>

=head1 CAPABILITY

You can list, retrieve or update capability

=head2 list

    my $obj = $stripe->capabilitys( list => $args ) || die( $stripe->error );

Provided with a L<capability|Net::API::Stripe::Connect::Account::Capability> object, this issue an api call to get the list of all capability.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/capabilities/list>

=head2 retrieve

    my $obj = $stripe->capabilitys( retrieve => $args ) || die( $stripe->error );

Provided with a L<capability|Net::API::Stripe::Connect::Account::Capability> object or a hash reference, this will retrieve a Stripe capability and return its corresponding L<object|Net::API::Stripe::Connect::Account::Capability>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/capabilities/retrieve>

=head2 update

    my $obj = $stripe->capabilitys( update => {
        requested => "1", } ) || die( $stripe->error );

Provided with a L<capability|Net::API::Stripe::Connect::Account::Capability> object or a hash reference, this will update a Stripe capability and return its corresponding L<object|Net::API::Stripe::Connect::Account::Capability>

Possible parameters are:

=over 4

=item C<requested>

Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the C<requirements> arrays.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/capabilities/update>

=head1 CARD

You can B<create>, B<retrieve>, B<update>, B<delete> or B<list> cards.

=head2 create

Provided a customer object L<Net::API::Stripe::Customer> or a card object L<Net::API::Stripe::Payment::Card> that has its I<customer> property set, or simply a hash reference this will create a Stripe card and return its object as a L<Net::API::Stripe::Payment::Card>

Possible parameters are:

=over 4

=item I<id>

A customer id

=item I<source>

A hash reference with the following properties: object number exp_month exp_year cvc currency name metadata default_for_currency address_line1 address_line2 address_city address_state address_zip address_country

=item I<metadata> An arbitrary hash reference

=back

=head2 delete

Provided with a L<customer|Net::API::Stripe::Customer> or a L<card|Net::API::Stripe::Payment::Card> object, or a hash reference, this will issue an api call to Stripe to remove the customer's card. It returns the card object that was deleted with its property I<deleted> set to true.

Possible parameters are:

=over 4

=item I<id>

Stripe customer id

=item I<card_id>

Stripe card id

=back

=head2 list

Provided with a L<customer|Net::API::Stripe::Customer> object, this issue an api call to get the list of all cards for a given customer.

Possible parameters are:

=over 4

=item I<id>

Stripe customer id

=item I<ending_before>

A card id

=item I<limit> Integer

=item I<starting_after> A card id

=back

For more information, see Stripe api documentation here: L<https://stripe.com/docs/api/cards/list>

=head2 retrieve

Provided a customer object L<Net::API::Stripe::Customer> or a card object L<Net::API::Stripe::Payment::Card> that has its I<customer> property set, or simply a hash reference this will retrieve the customer card information as a L<Net::API::Stripe::Payment::Card> object

Possible parameters are:

=over 4

=item I<id>

Stripe card id

=item I<customer>

Stripe customer id

=back

=head2 update

Provided a customer object L<Net::API::Stripe::Customer> or a card object L<Net::API::Stripe::Payment::Card> that has its I<customer> property set, or simply a hash reference this will update the customer card information, but what can be updated is limited by Stripe and it is typically the expiration date or postal address

Possible parameters are:

=over 4

=item I<id>

Stripe card id

=item I<customer>

Stripe customer id

=item I<address_city> City

=item I<address_country>

Country as 2-letters ISO 3166 country code

=item I<address_line1>

Address first line

=item I<address_line2>

Address second line

=item I<address_state>

State / region

=item I<address_zip>

Postal code

=item I<exp_month>

Expiration month

=item I<exp_year>

Expiration year

=item I<metadata>

Arbitrary hash reference

=item I<name>

Name for this credit card

=back

=head1 CASH BALANCE

You can retrieve or update cash balance

=head2 retrieve

    my $obj = $stripe->cash_balances( retrieve => $args ) || die( $stripe->error );

Provided with a L<cash balance|Net::API::Stripe::Cash::Balance> object or a hash reference, this will retrieve a Stripe cash balance and return its corresponding L<object|Net::API::Stripe::Cash::Balance>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/cash_balance/retrieve>

=head2 update

    my $obj = $stripe->cash_balances( update => {
        settings =>
        {
            reconciliation_mode => "manual",
        } } ) || die( $stripe->error );

Provided with a L<cash balance|Net::API::Stripe::Cash::Balance> object or a hash reference, this will update a Stripe cash balance and return its corresponding L<object|Net::API::Stripe::Cash::Balance>

Possible parameters are:

=over 4

=item C<settings>

A hash of settings for this cash balance.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/cash_balance/update>

=head1 CHARGE

You can B<create>, B<retrieve>, B<update>, B<capture> or B<list> charges.

=head2 capture

Provided with a L<Net::API::Stripe::Charge> object or a hash reference, this will capture a Stripe charge and return its corresponding charge object L<Net::API::Stripe::Charge>

Possible parameters are:

=over 4

=item I<id> A Stripe charge id. This is required

=item I<amount> Integer

=item I<application_fee_amount> Integer

=item I<destination> A hash reference with one property: I<amount>

=item I<receipt_email> E-mail address

=item I<statement_descriptor> Text

=item I<statement_descriptor_suffix> String

=item I<transfer_data> A hash reference with one property: I<amount>

=item I<transfer_group> Text

=back

For more information see Stripe documentation here: L<https://stripe.com/docs/api/charges/capture>

=head2 create

Provided with a L<Net::API::Stripe::Charge> object or a hash reference, this will create a Stripe charge and return a charge object L<Net::API::Stripe::Charge>

Possible parameters are:

=over 4

=item I<amount> Amount as integer. This is required

=item I<currency> A 3-letter iso 4217 code such sa C<jpy> for Japanese Yen

=item I<application_fee_amount> Integer

=item I<capture> Boolean

=item I<customer> A customer id

=item I<description> An arbitrary text

=item I<destination> A hash with properties account and amount.

=item I<metadata> Arbitrary hash reference

=item I<on_behalf_of> Stripe account id

=item I<receipt_email> E-mail address

=item I<shipping> Shipping address as a hash reference with the following properties: address name carrier phone tracking_number. See also L<Net::API::Stripe::Shipping>

=item I<source> A source id

=item I<statement_descriptor> Text

=item I<statement_descriptor_suffix> Text

=item I<transfer_data> A date

=item I<transfer_group> Text

=item I<idempotency> identifier

=back

For more information see Stripe documentation here: L<https://stripe.com/docs/api/charges/create>

=head2 list

This will list all the charges for a given customer and return a L<Net::API::Stripe::List> object.

Possible parameters are:

=over 4

=item I<created> A date that can also be expressed as a unix timestamp

=item I<customer> A Stripe customer id

=item I<ending_before> A Stripe charge id

=item I<limit> Integer

=item I<payment_intent> A payment intent Stripe id

=item I<source> A source Stripe id

=item I<starting_after> A Stripe charge id

=item I<transfer_group> Text

=back

For more information see Stripe documentation here: L<https://stripe.com/docs/api/charges/list>

=head2 retrieve

Provided with a L<Net::API::Stripe::Charge> object or a hash reference, this will retrieve a Stripe charge and return its corresponding charge object L<Net::API::Stripe::Charge>

Possible parameters are:

=over 4

=item I<id> Stripe charge id. This is required

=back

For more information see Stripe documentation here: L<https://stripe.com/docs/api/charges/retrieve>

=head2 search

    my $obj = $stripe->charges( search => {
        query => "amount>999 AND metadata['order_id']:'6735'", } ) || die( $stripe->error );

Provided with a L<charge|Net::API::Stripe::Charge>, or a hash reference, this will issue a search api call.

A dictionary with a C<data> property that contains an array of up to C<limit> charges. If no objects match the query, the resulting array will be empty. See the related guide on L<expanding properties in lists|https://stripe.com/docs/expand#lists>.

Possible parameters are:

=over 4

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<page>

A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

=item C<query>

B<Required>. The search query string. See L<search query language|https://stripe.com/docs/search#search-query-language> and the list of supported L<query fields for charges|https://stripe.com/docs/search#query-fields-for-charges>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/charges/search>

=head2 update

Provided with a L<Net::API::Stripe::Charge> object or a hash reference, this will update a Stripe charge and return its corresponding charge object L<Net::API::Stripe::Charge>

Possible parameters are:

=over 4

=item I<id> A Stripe charge id. This is required

=item I<customer> A customer id

=item I<description> An arbitrary text

=item I<fraud_details> A hash with one property: I<user_report>

=item I<metadata> Arbitrary hash reference

=item I<receipt_email> E-mail address

=item I<shipping> Shipping address as a hash reference with the following properties: address name carrier phone tracking_number. See also L<Net::API::Stripe::Shipping>

=item I<transfer_group> Text

=back

For more information see Stripe documentation here: L<https://stripe.com/docs/api/charges/update>

=head1 CHECKOUT SESSION

You can create, expire, items, list or retrieve checkout session

=head2 create

    my $obj = $stripe->checkout_sessions( create => {
        cancel_url  => "https://example.com/cancel",
        line_items  => [,
            price    => "price_H5ggYwtDq4fbrJ",
            quantity => "2",
        ],
        mode        => "payment",
        success_url => "https://example.com/success", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Checkout::Session> object or a hash reference, this will create a Stripe checkout session and return an L<Net::API::Stripe::Checkout::Session> object.

Possible parameters are:

=over 4

=item C<after_expiration>

Configure actions after a Checkout Session has expired.

=item C<allow_promotion_codes>

Enables user redeemable promotion codes.

=item C<automatic_tax>

Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions.

=item C<billing_address_collection>

Specify whether Checkout should collect the customer's billing address.

=item C<cancel_url>

B<Required>. The URL the customer will be directed to if they decide to cancel payment and return to your website.

=item C<client_reference_id>

A unique string to reference the Checkout Session. This can be a customer ID, a cart ID, or similar, and can be used to reconcile the session with your internal systems.

=item C<consent_collection>

Configure fields for the Checkout Session to gather active consent from customers.

=item C<currency>

Three-letter L<ISO currency code|https://www.iso.org/iso-4217-currency-codes.html>, in lowercase. Must be a L<supported currency|https://stripe.com/docs/currencies>.

=item C<customer>

ID of an existing Customer, if one exists. In C<payment> mode, the customer’s most recent card payment method will be used to prefill the email, name, card details, and billing address on the Checkout page. In C<subscription> mode, the customer’s L<default payment method|https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method> will be used if it’s a card, and otherwise the most recent card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer's card details.

If the Customer already has a valid L<email|https://stripe.com/docs/api/customers/object#customer_object-email> set, the email will be prefilled and not editable in Checkout. If the Customer does not have a valid C<email>, Checkout will set the email entered during the session on the Customer.

If blank for Checkout Sessions in C<payment> or C<subscription> mode, Checkout will create a new Customer object based on information provided during the payment flow.

You can set L<C<payment_intent_data.setup_future_usage>|https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage> to have Checkout automatically attach the payment method to the Customer you pass in for future reuse.

=item C<customer_creation>

Configure whether a Checkout Session creates a L<Customer|https://stripe.com/docs/api/customers> during Session confirmation.

When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout with L<customer_details|https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details>.

Sessions that don't create Customers instead create L<Guest Customers|https://support.stripe.com/questions/guest-customer-faq> in the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions.

Can only be set in C<payment> and C<setup> mode.

=item C<customer_email>

If provided, this value will be used when the Customer object is created. If not provided, customers will be asked to enter their email address. Use this parameter to prefill customer data if you already have an email on file. To access information about the customer once a session is complete, use the C<customer> field.

=item C<customer_update>

Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when C<customer> is provided.

=item C<discounts>

The coupon or promotion code to apply to this Session. Currently, only up to one may be specified.

=item C<expires_at>

The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation.

=item C<line_items>

A list of items the customer is purchasing. Use this parameter to pass one-time or recurring L<Prices|https://stripe.com/docs/api/prices>.

For C<payment> mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen.

For C<subscription> mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only.

=item C<locale>

The IETF language tag of the locale Checkout is displayed in. If blank or C<auto>, the browser's locale is used.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<mode>

B<required conditionally> The mode of the Checkout Session. Required when using prices or C<setup> mode. Pass C<subscription> if the Checkout Session includes at least one recurring item.

=item C<payment_intent_data>

A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in C<payment> mode.

=item C<payment_method_collection>

Specify whether Checkout should collect a payment method. When set to C<if_required>, Checkout will not collect a payment method when the total due for the session is 0. This may occur if the Checkout Session includes a free trial or a discount.

Can only be set in C<subscription> mode.

If you'd like information on how to collect a payment method outside of Checkout, read the guide on configuring L<subscriptions with a free trial|https://stripe.com/docs/payments/checkout/free-trials>.

=item C<payment_method_options>

Payment-method-specific configuration.

=item C<payment_method_types>

A list of the types of payment methods (e.g., C<card>) this Checkout Session can accept.

Do not include this attribute if you prefer to manage your payment methods from the L<Stripe Dashboard|https://dashboard.stripe.com/settings/payment_methods>.

Read more about the supported payment methods and their requirements in our L<payment method details guide|https://stripe.com/docs/payments/checkout/payment-methods>.

If multiple payment methods are passed, Checkout will dynamically reorder them to prioritize the most relevant payment methods based on the customer's location and other characteristics.

=item C<phone_number_collection>

Controls phone number collection settings for the session.

We recommend that you review your privacy policy and check with your legal contacts before using this feature. Learn more about L<collecting phone numbers with Checkout|https://stripe.com/docs/payments/checkout/phone-numbers>.

=item C<setup_intent_data>

A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in C<setup> mode.

=item C<shipping_address_collection>

When set, provides configuration for Checkout to collect a shipping address from a customer.

=item C<shipping_options>

The shipping rate options to apply to this Session.

=item C<submit_type>

Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the submit button. C<submit_type> can only be specified on Checkout Sessions in C<payment> mode, but not Checkout Sessions in C<subscription> or C<setup> mode.

=item C<subscription_data>

A subset of parameters to be passed to subscription creation for Checkout Sessions in C<subscription> mode.

=item C<success_url>

B<Required>. The URL to which Stripe should send customers when payment or setup is complete. If you’d like to use information from the successful Checkout Session on your page, read the guide on L<customizing your success page|https://stripe.com/docs/payments/checkout/custom-success-page>.

=item C<tax_id_collection>

Controls tax ID collection settings for the session.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/checkout/sessions/create>

=head2 expire

    my $obj = $stripe->checkout_sessions( expire => $args ) || die( $stripe->error );

Provided with a L<checkout session|Net::API::Stripe::Checkout::Session>, or a hash reference, this will issue a expire api call.

Returns a Session object if the expiration succeeded. Returns an error if the Session has already expired or isn’t in an expireable state.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/checkout/sessions/expire>

=head2 items

    my $obj = $stripe->checkout_sessions( items => $args ) || die( $stripe->error );

Provided with a L<checkout session|Net::API::Stripe::Checkout::Session>, or a hash reference, this will issue a items api call.

A dictionary with a C<data> property that contains an array of up to C<limit> Checkout Session line items, starting after Line Item C<starting_after>. Each entry in the array is a separate Line Item object. If no more line items are available, the resulting array will be empty. 

Possible parameters are:

=over 4

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/checkout/sessions/line_items>

=head2 list

    my $obj = $stripe->checkout_sessions( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<checkout session|Net::API::Stripe::Checkout::Session> object, this issue an api call to get the list of all checkout session.

Possible parameters are:

=over 4

=item C<customer>

Only return the Checkout Sessions for the Customer specified.

=item C<customer_details>

Only return the Checkout Sessions for the Customer details specified.

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<payment_intent>

Only return the Checkout Session for the PaymentIntent specified.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<subscription>

Only return the Checkout Session for the subscription specified.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/checkout/sessions/list>

=head2 retrieve

    my $obj = $stripe->checkout_sessions( retrieve => $args ) || die( $stripe->error );

Provided with a L<checkout session|Net::API::Stripe::Checkout::Session> object or a hash reference, this will retrieve a Stripe checkout session and return its corresponding L<object|Net::API::Stripe::Checkout::Session>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/checkout/sessions/retrieve>

=head1 COUNTRY SPEC

You can list or retrieve country spec

=head2 list

    my $obj = $stripe->country_specs( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<country spec|Net::API::Stripe::Connect::CountrySpec> object, this issue an api call to get the list of all country spec.

Possible parameters are:

=over 4

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/country_specs/list>

=head2 retrieve

    my $obj = $stripe->country_specs( retrieve => $args ) || die( $stripe->error );

Provided with a L<country spec|Net::API::Stripe::Connect::CountrySpec> object or a hash reference, this will retrieve a Stripe country spec and return its corresponding L<object|Net::API::Stripe::Connect::CountrySpec>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/country_specs/retrieve>

=head1 COUPON

You can create, delete, list, retrieve or update coupon

=head2 create

    my $obj = $stripe->coupons( create => {
        duration           => "repeating",
        duration_in_months => "3",
        percent_off        => "25.5", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Billing::Coupon> object or a hash reference, this will create a Stripe coupon and return an L<Net::API::Stripe::Billing::Coupon> object.

Possible parameters are:

=over 4

=item C<amount_off>

A positive integer representing the amount to subtract from an invoice total (required if C<percent_off> is not passed).

=item C<applies_to>

A hash containing directions for what this Coupon will apply discounts to.

=item C<currency>

Three-letter L<ISO code for the currency|https://stripe.com/docs/currencies> of the C<amount_off> parameter (required if C<amount_off> is passed).

=item C<currency_options>

Coupons defined in each available currency option (only supported if C<amount_off> is passed). Each key must be a three-letter L<ISO currency code|https://www.iso.org/iso-4217-currency-codes.html> and a L<supported currency|https://stripe.com/docs/currencies>. For example, to define your coupon in C<eur>, pass the fields below in the C<eur> key of C<currency_options>.

=item C<duration>

Specifies how long the discount will be in effect if used on a subscription. Can be C<forever>, C<once>, or C<repeating>. Defaults to C<once>.

=item C<duration_in_months>

Required only if C<duration> is C<repeating>, in which case it must be a positive integer that specifies the number of months the discount will be in effect.

=item C<id>

Unique string of your choice that will be used to identify this coupon when applying it to a customer. If you don't want to specify a particular code, you can leave the ID blank and we'll generate a random code for you.

=item C<max_redemptions>

A positive integer specifying the number of times the coupon can be redeemed before it's no longer valid. For example, you might have a 50% off coupon that the first 20 readers of your blog can use.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<name>

Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the C<id> is shown if C<name> is not set.

=item C<percent_off>

A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if C<amount_off> is not passed).

=item C<redeem_by>

Unix timestamp specifying the last time at which the coupon can be redeemed. After the redeem_by date, the coupon can no longer be applied to new customers.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/coupons/create>

=head2 delete

    my $obj = $stripe->coupons( delete => $args ) || die( $stripe->error );

Provided with a L<coupon|Net::API::Stripe::Billing::Coupon>, or a hash reference, this will issue an api call to Stripe to remove the coupon. It returns the coupon object that was deleted with its property C<deleted> set to true.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/coupons/delete>

=head2 list

    my $obj = $stripe->coupons( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<coupon|Net::API::Stripe::Billing::Coupon> object, this issue an api call to get the list of all coupon.

Possible parameters are:

=over 4

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/coupons/list>

=head2 retrieve

    my $obj = $stripe->coupons( retrieve => $args ) || die( $stripe->error );

Provided with a L<coupon|Net::API::Stripe::Billing::Coupon> object or a hash reference, this will retrieve a Stripe coupon and return its corresponding L<object|Net::API::Stripe::Billing::Coupon>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/coupons/retrieve>

=head2 update

    my $obj = $stripe->coupons( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<coupon|Net::API::Stripe::Billing::Coupon> object or a hash reference, this will update a Stripe coupon and return its corresponding L<object|Net::API::Stripe::Billing::Coupon>

Possible parameters are:

=over 4

=item C<currency_options>

Coupons defined in each available currency option (only supported if the coupon is amount-based). Each key must be a three-letter L<ISO currency code|https://www.iso.org/iso-4217-currency-codes.html> and a L<supported currency|https://stripe.com/docs/currencies>. For example, to define your coupon in C<eur>, pass the fields below in the C<eur> key of C<currency_options>.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<name>

Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the C<id> is shown if C<name> is not set.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/coupons/update>

=head1 CREDIT NOTE

You can create, lines, lines_preview, list, preview, retrieve, update or void credit note

=head2 create

    my $obj = $stripe->credit_notes( create => {
        invoice => "in_1Le9F22eZvKYlo2C5gZ5i57e",
        lines   => [,
            invoice_line_item => "il_1Le9F22eZvKYlo2C8u1PfwX0",
            quantity          => "1",
            type              => "invoice_line_item",
        ], } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Billing::CreditNote> object or a hash reference, this will create a Stripe credit note and return an L<Net::API::Stripe::Billing::CreditNote> object.

Possible parameters are:

=over 4

=item C<amount>

The integer amount in JPY representing the total amount of the credit note.

=item C<credit_amount>

The integer amount in JPY representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.

=item C<invoice>

B<Required>. ID of the invoice.

=item C<lines>

Line items that make up the credit note.

=item C<memo>

The credit note's memo appears on the credit note PDF.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<out_of_band_amount>

The integer amount in JPY representing the amount that is credited outside of Stripe.

=item C<reason>

Reason for issuing this credit note, one of C<duplicate>, C<fraudulent>, C<order_change>, or C<product_unsatisfactory>

=item C<refund>

ID of an existing refund to link this credit note to.

=item C<refund_amount>

The integer amount in JPY representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/credit_notes/create>

=head2 lines

Provided with a L<Net::API::Stripe::Billing::CreditNote> object or a hash reference, this gets the list of all the credit note line items and return a L<Net::API::Stripe::List> object.

Possible parameters are:

=over 4

=item I<id> A Stripe credit note id. This is required.

=item I<ending_before> A Stripe credit note id.

=item I<limit> Integer

=item I<starting_after> A Stripe credit note id.

=back

For more information see Stripe documentation here: L<https://stripe.com/docs/api/credit_notes/lines>

=head2 lines_preview

Provided with a L<Net::API::Stripe::Billing::CreditNote> object or a hash reference, this gets the list of all the credit note preview line items and return a L<Net::API::Stripe::List> object.

Possible parameters are:

=over 4

=item I<amount> Integer

=item I<credit_amount> Integer

=item I<ending_before> A Stripe credit note id.

=item I<invoice> A Stripe invoice id. This is required.

=item I<limit> Integer

=item I<lines> An array of hash with properties: amount description invoice_line_item quantity tax_rates type unit_amount unit_amount_decimal

=item I<memo> Text

=item I<metadata> Arbitrary hash reference

=item I<out_of_band_amount> Integer

=item I<reason> Text

=item I<refund> A Stripe refund id

=item I<refund_amount> Integer

=item I<starting_after> A Stripe credit note id.

=back

For more information see Stripe documentation here: L<https://stripe.com/docs/api/credit_notes/lines>

=head2 list

    my $obj = $stripe->credit_notes( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<credit note|Net::API::Stripe::Billing::CreditNote> object, this issue an api call to get the list of all credit note.

Possible parameters are:

=over 4

=item C<customer>

Only return credit notes for the customer specified by this customer ID.

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<invoice>

Only return credit notes for the invoice specified by this invoice ID.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/credit_notes/list>

=head2 preview

    my $obj = $stripe->credit_notes( preview => {
        invoice => "in_1Le9F22eZvKYlo2C5gZ5i57e",
        lines   => [,
            invoice_line_item => "il_1Le9F22eZvKYlo2C8u1PfwX0",
            quantity          => "1",
            type              => "invoice_line_item",
        ], } ) || die( $stripe->error );

Provided with a L<credit note|Net::API::Stripe::Billing::CreditNote>, or a hash reference, this will issue a preview api call.

Returns a credit note object.

Possible parameters are:

=over 4

=item C<amount>

The integer amount in JPY representing the total amount of the credit note.

=item C<credit_amount>

The integer amount in JPY representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.

=item C<invoice>

B<Required>. ID of the invoice.

=item C<lines>

Line items that make up the credit note.

=item C<memo>

The credit note's memo appears on the credit note PDF.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<out_of_band_amount>

The integer amount in JPY representing the amount that is credited outside of Stripe.

=item C<reason>

Reason for issuing this credit note, one of C<duplicate>, C<fraudulent>, C<order_change>, or C<product_unsatisfactory>

=item C<refund>

ID of an existing refund to link this credit note to.

=item C<refund_amount>

The integer amount in JPY representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/credit_notes/preview>

=head2 retrieve

    my $obj = $stripe->credit_notes( retrieve => $args ) || die( $stripe->error );

Provided with a L<credit note|Net::API::Stripe::Billing::CreditNote> object or a hash reference, this will retrieve a Stripe credit note and return its corresponding L<object|Net::API::Stripe::Billing::CreditNote>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/credit_notes/retrieve>

=head2 update

    my $obj = $stripe->credit_notes( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<credit note|Net::API::Stripe::Billing::CreditNote> object or a hash reference, this will update a Stripe credit note and return its corresponding L<object|Net::API::Stripe::Billing::CreditNote>

Possible parameters are:

=over 4

=item C<memo>

Credit note memo.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/credit_notes/update>

=head2 void

    my $obj = $stripe->credit_notes( void => $args ) || die( $stripe->error );

Provided with a L<credit note|Net::API::Stripe::Billing::CreditNote>, or a hash reference, this will issue a void api call.

Returns the voided credit note object if the call succeeded.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/credit_notes/void>

=head1 CREDIT NOTE LINE ITEM

You can list credit note line item

=head2 list

    my $obj = $stripe->credit_note_line_items( list => {
        invoice => "in_1Le9F22eZvKYlo2C5gZ5i57e",
        lines   => [,
            invoice_line_item => "il_1Le9F22eZvKYlo2C8u1PfwX0",
            quantity          => "1",
            type              => "invoice_line_item",
        ], } ) || die( $stripe->error );

Provided with a L<credit note line item|Net::API::Stripe::Billing::CreditNote::LineItem> object, this issue an api call to get the list of all credit note line item.

Possible parameters are:

=over 4

=item C<amount>

The integer amount in JPY representing the total amount of the credit note.

=item C<credit_amount>

The integer amount in JPY representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<invoice>

B<Required>. ID of the invoice.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<lines>

Line items that make up the credit note.

=item C<memo>

The credit note's memo appears on the credit note PDF.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<out_of_band_amount>

The integer amount in JPY representing the amount that is credited outside of Stripe.

=item C<reason>

Reason for issuing this credit note, one of C<duplicate>, C<fraudulent>, C<order_change>, or C<product_unsatisfactory>

=item C<refund>

ID of an existing refund to link this credit note to.

=item C<refund_amount>

The integer amount in JPY representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/credit_notes/preview_lines>

=head1 CUSTOMER

You can create, delete, delete_discount, list, retrieve, search or update customer

=head2 create

    my $obj = $stripe->customers( create => {
        description => "My First Test Customer (created for API docs at https://www.stripe.com/docs/api)", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Customer> object or a hash reference, this will create a Stripe customer and return an L<Net::API::Stripe::Customer> object.

Possible parameters are:

=over 4

=item C<address>

The customer's address.

=item C<balance>

An integer amount in JPY that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice.

=item C<cash_balance>

Balance information and default balance settings for this customer.

=item C<coupon>

If you provide a coupon code, the customer will have a discount applied on all recurring charges. Charges you create through the API will not have the discount.

=item C<description>

An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard.

=item C<email>

Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to I<512 characters>.

=item C<invoice_prefix>

The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.

=item C<invoice_settings>

Default invoice settings for this customer.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<name>

The customer's full name or business name.

=item C<next_invoice_sequence>

The sequence to be used on the customer's next invoice. Defaults to 1.

=item C<payment_method>

The ID of the PaymentMethod to attach to the customer.

=item C<phone>

The customer's phone number.

=item C<preferred_locales>

Customer's preferred languages, ordered by preference.

=item C<promotion_code>

The API ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount.

=item C<shipping>

The customer's shipping information. Appears on invoices emailed to this customer.

=item C<source>

When using payment sources created via the Token or Sources APIs, passing C<source> will create a new source object, make it the new customer default source, and delete the old customer default if one exists. If you want to add additional sources instead of replacing the existing default, use the L<card creation API|https://stripe.com/docs/api#create_card>. Whenever you attach a card to a customer, Stripe will automatically validate the card.

=item C<tax>

Tax details about the customer.

=item C<tax_exempt>

The customer's tax exemption. One of C<none>, C<exempt>, or C<reverse>.

=item C<tax_id_data>

The customer's tax IDs.

=item C<test_clock>

ID of the test clock to attach to the customer.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/customers/create>

=head2 delete

    my $obj = $stripe->customers( delete => $args ) || die( $stripe->error );

Provided with a L<customer|Net::API::Stripe::Customer>, or a hash reference, this will issue an api call to Stripe to remove the customer. It returns the customer object that was deleted with its property C<deleted> set to true.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/customers/delete>

=head2 delete_discount

Provided with a L<Net::API::Stripe::Customer> object or a hash reference, this will remove a Stripe customer discount and return the discount removed as a L<Net::API::Stripe::Billing::Discount> object.

Possible parameters are:

=over 4

=item I<id> A Stripe customer id. This is required.

=back

For more information, see Stripe documentation here: L<https://stripe.com/docs/api/discounts/delete>

=head2 list

    my $obj = $stripe->customers( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<customer|Net::API::Stripe::Customer> object, this issue an api call to get the list of all customer.

Possible parameters are:

=over 4

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<email>

A case-sensitive filter on the list based on the customer's C<email> field. The value must be a string.

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<test_clock>

Provides a list of customers that are associated with the specified test clock. The response will not include customers with test clocks if this parameter is not set.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/customers/list>

=head2 retrieve

    my $obj = $stripe->customers( retrieve => $args ) || die( $stripe->error );

Provided with a L<customer|Net::API::Stripe::Customer> object or a hash reference, this will retrieve a Stripe customer and return its corresponding L<object|Net::API::Stripe::Customer>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/customers/retrieve>

=head2 search

    my $obj = $stripe->customers( search => {
        query => "name:'fakename' AND metadata['foo']:'bar'", } ) || die( $stripe->error );

Provided with a L<customer|Net::API::Stripe::Customer>, or a hash reference, this will issue a search api call.

A dictionary with a C<data> property that contains an array of up to C<limit> customers. If no objects match the query, the resulting array will be empty. See the related guide on L<expanding properties in lists|https://stripe.com/docs/expand#lists>.

Possible parameters are:

=over 4

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<page>

A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

=item C<query>

B<Required>. The search query string. See L<search query language|https://stripe.com/docs/search#search-query-language> and the list of supported L<query fields for customers|https://stripe.com/docs/search#query-fields-for-customers>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/customers/search>

=head2 update

    my $obj = $stripe->customers( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<customer|Net::API::Stripe::Customer> object or a hash reference, this will update a Stripe customer and return its corresponding L<object|Net::API::Stripe::Customer>

Possible parameters are:

=over 4

=item C<address>

The customer's address.

=item C<balance>

An integer amount in JPY that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice.

=item C<cash_balance>

Balance information and default balance settings for this customer.

=item C<coupon>

If you provide a coupon code, the customer will have a discount applied on all recurring charges. Charges you create through the API will not have the discount.

=item C<default_source>

If you are using payment methods created via the PaymentMethods API, see the L<invoiceI<settings.default>payment_method|https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method> parameter.

Provide the ID of a payment source already attached to this customer to make it this customer's default payment source.

If you want to add a new payment source and make it the default, see the L<source|https://stripe.com/docs/api/customers/update#update_customer-source> property.

=item C<description>

An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard.

=item C<email>

Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to I<512 characters>.

=item C<invoice_prefix>

The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.

=item C<invoice_settings>

Default invoice settings for this customer.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<name>

The customer's full name or business name.

=item C<next_invoice_sequence>

The sequence to be used on the customer's next invoice. Defaults to 1.

=item C<phone>

The customer's phone number.

=item C<preferred_locales>

Customer's preferred languages, ordered by preference.

=item C<promotion_code>

The API ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount.

=item C<shipping>

The customer's shipping information. Appears on invoices emailed to this customer.

=item C<source>

When using payment sources created via the Token or Sources APIs, passing C<source> will create a new source object, make it the new customer default source, and delete the old customer default if one exists. If you want to add additional sources instead of replacing the existing default, use the L<card creation API|https://stripe.com/docs/api#create_card>. Whenever you attach a card to a customer, Stripe will automatically validate the card.

=item C<tax>

Tax details about the customer.

=item C<tax_exempt>

The customer's tax exemption. One of C<none>, C<exempt>, or C<reverse>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/customers/update>

=head1 CUSTOMER BALANCE TRANSACTION

You can create, list, retrieve or update customer balance transaction

=head2 create

    my $obj = $stripe->customer_balance_transactions( create => {
        amount   => "-500",
        currency => "usd", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Customer::BalanceTransaction> object or a hash reference, this will create a Stripe customer balance transaction and return an L<Net::API::Stripe::Customer::BalanceTransaction> object.

Possible parameters are:

=over 4

=item C<amount>

B<Required>. The integer amount in B<JPY> to apply to the customer's credit balance.

=item C<currency>

B<Required>. Three-letter L<ISO currency code|https://www.iso.org/iso-4217-currency-codes.html>, in lowercase. Must be a L<supported currency|https://stripe.com/docs/currencies>. If the customer's L<C<currency>|https://stripe.com/docs/api/customers/object#customer_object-currency> is set, this value must match it. If the customer's C<currency> is not set, it will be updated to this value.

=item C<description>

An arbitrary string attached to the object. Often useful for displaying to users.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/customer_balance_transactions/create>

=head2 list

    my $obj = $stripe->customer_balance_transactions( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<customer balance transaction|Net::API::Stripe::Customer::BalanceTransaction> object, this issue an api call to get the list of all customer balance transaction.

Possible parameters are:

=over 4

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/customer_balance_transactions/list>

=head2 retrieve

    my $obj = $stripe->customer_balance_transactions( retrieve => $args ) || die( $stripe->error );

Provided with a L<customer balance transaction|Net::API::Stripe::Customer::BalanceTransaction> object or a hash reference, this will retrieve a Stripe customer balance transaction and return its corresponding L<object|Net::API::Stripe::Customer::BalanceTransaction>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/customer_balance_transactions/retrieve>

=head2 update

    my $obj = $stripe->customer_balance_transactions( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<customer balance transaction|Net::API::Stripe::Customer::BalanceTransaction> object or a hash reference, this will update a Stripe customer balance transaction and return its corresponding L<object|Net::API::Stripe::Customer::BalanceTransaction>

Possible parameters are:

=over 4

=item C<description>

An arbitrary string attached to the object. Often useful for displaying to users.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/customer_balance_transactions/update>

=head1 CUSTOMER CASH BALANCE TRANSACTION

You can fund_cash_balance, list or retrieve customer cash balance transaction

=head2 fund_cash_balance

    my $obj = $stripe->customer_cash_balance_transactions( fund_cash_balance => {
        amount   => "5000",
        currency => "eur", } ) || die( $stripe->error );

Provided with a L<customer cash balance transaction|Net::API::Stripe::Cash::Transaction>, or a hash reference, this will issue a fund_cash_balance api call.

Returns a specific cash balance transaction, which funded the customer’s L<cash balance|https://stripe.com/docs/payments/customer-balance>.

Possible parameters are:

=over 4

=item C<amount>

B<Required>. Amount to be used for this test cash balance transaction. A positive integer representing how much to fund in the L<smallest currency unit|https://stripe.com/docs/currencies#zero-decimal> (e.g., 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency).

=item C<currency>

B<Required>. Three-letter L<ISO currency code|https://www.iso.org/iso-4217-currency-codes.html>, in lowercase. Must be a L<supported currency|https://stripe.com/docs/currencies>.

=item C<reference>

A description of the test funding. This simulates free-text references supplied by customers when making bank transfers to their cash balance. You can use this to test how Stripe's L<reconciliation algorithm|https://stripe.com/docs/payments/customer-balance/reconciliation> applies to different user inputs.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/cash_balance_transactions/fund_cash_balance>

=head2 list

    my $obj = $stripe->customer_cash_balance_transactions( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<customer cash balance transaction|Net::API::Stripe::Cash::Transaction> object, this issue an api call to get the list of all customer cash balance transaction.

Possible parameters are:

=over 4

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/cash_balance_transactions/list>

=head2 retrieve

    my $obj = $stripe->customer_cash_balance_transactions( retrieve => $args ) || die( $stripe->error );

Provided with a L<customer cash balance transaction|Net::API::Stripe::Cash::Transaction> object or a hash reference, this will retrieve a Stripe customer cash balance transaction and return its corresponding L<object|Net::API::Stripe::Cash::Transaction>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/cash_balance_transactions/retrieve>

=head1 DISCOUNT

You can delete, delete_customer or delete_subscription discount

=head2 delete

    my $obj = $stripe->discounts( delete => $args ) || die( $stripe->error );

Provided with a L<discount|Net::API::Stripe::Billing::Discount>, or a hash reference, this will issue an api call to Stripe to remove the discount. It returns the discount object that was deleted with its property C<deleted> set to true.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/discounts/subscription_delete>

=head1 DISPUTE

You can close, list, retrieve or update dispute

=head2 close

    my $obj = $stripe->disputes( close => $args ) || die( $stripe->error );

Provided with a L<dispute|Net::API::Stripe::Dispute>, or a hash reference, this will issue a close api call.

Returns the dispute object.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/disputes/close>

=head2 list

    my $obj = $stripe->disputes( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<dispute|Net::API::Stripe::Dispute> object, this issue an api call to get the list of all dispute.

Possible parameters are:

=over 4

=item C<charge>

Only return disputes associated to the charge specified by this charge ID.

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<payment_intent>

Only return disputes associated to the PaymentIntent specified by this PaymentIntent ID.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/disputes/list>

=head2 retrieve

    my $obj = $stripe->disputes( retrieve => $args ) || die( $stripe->error );

Provided with a L<dispute|Net::API::Stripe::Dispute> object or a hash reference, this will retrieve a Stripe dispute and return its corresponding L<object|Net::API::Stripe::Dispute>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/disputes/retrieve>

=head2 update

    my $obj = $stripe->disputes( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<dispute|Net::API::Stripe::Dispute> object or a hash reference, this will update a Stripe dispute and return its corresponding L<object|Net::API::Stripe::Dispute>

Possible parameters are:

=over 4

=item C<evidence>

Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<submit>

Whether to immediately submit evidence to the bank. If C<false>, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to C<true> (the default).

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/disputes/update>

=head1 ERROR HANDLING

L<Net::API::Stripe> never dies, or at least not voluntarily. Instead, when an error occurs and is reported, it returns undef and the error can be retrieved with the L</"error"> method, such as:

    my $prod = $stripe->products( retrieve => $prod_id ) || die( $stripe->error, "\n" );

The B<error> method returns the L<Module::Generic::Exception> set. Please refer to the manual page of L<Module::Generic/"error"> for more information, but essentially, the following methods are available with the error objects:

=head2 as_string

This is triggered when the error object is stringified

=head2 code

The error code returned by Stripe

=head2 file

The file containing the error

=head2 line

The line number of the error

=head2 message

The actual error message

=head2 package

The package name where the error occurred.

=head2 rethrow

Used to re-trigger the error

=head2 subroutine

The subroutine name where the error originates

=head2 trace

The full stack trace object. This is a L<Devel::StackTrace>

=head2 type

The error type, if any

=head1 EVENT

You can list or retrieve event

=head2 list

    my $obj = $stripe->events( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<event|Net::API::Stripe::Event> object, this issue an api call to get the list of all event.

Possible parameters are:

=over 4

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<delivery_success>

Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned.

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<type>

A string containing a specific event name, or group of events using * as a wildcard. The list will be filtered to include only events with a matching event property.

=item C<types>

An array of up to 20 strings containing specific event names. The list will be filtered to include only events with a matching event property. You may pass either C<type> or C<types>, but not both.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/events/list>

=head2 retrieve

    my $obj = $stripe->events( retrieve => $args ) || die( $stripe->error );

Provided with a L<event|Net::API::Stripe::Event> object or a hash reference, this will retrieve a Stripe event and return its corresponding L<object|Net::API::Stripe::Event>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/events/retrieve>

=head1 FEE REFUND

You can create, list, retrieve or update fee refund

=head2 create

    my $obj = $stripe->fee_refunds( create => $args ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Connect::ApplicationFee::Refund> object or a hash reference, this will create a Stripe fee refund and return an L<Net::API::Stripe::Connect::ApplicationFee::Refund> object.

Possible parameters are:

=over 4

=item C<amount>

A positive integer, in I<JPY>, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/fee_refunds/create>

=head2 list

    my $obj = $stripe->fee_refunds( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<fee refund|Net::API::Stripe::Connect::ApplicationFee::Refund> object, this issue an api call to get the list of all fee refund.

Possible parameters are:

=over 4

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/fee_refunds/list>

=head2 retrieve

    my $obj = $stripe->fee_refunds( retrieve => $args ) || die( $stripe->error );

Provided with a L<fee refund|Net::API::Stripe::Connect::ApplicationFee::Refund> object or a hash reference, this will retrieve a Stripe fee refund and return its corresponding L<object|Net::API::Stripe::Connect::ApplicationFee::Refund>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/fee_refunds/retrieve>

=head2 update

    my $obj = $stripe->fee_refunds( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<fee refund|Net::API::Stripe::Connect::ApplicationFee::Refund> object or a hash reference, this will update a Stripe fee refund and return its corresponding L<object|Net::API::Stripe::Connect::ApplicationFee::Refund>

Possible parameters are:

=over 4

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/fee_refunds/update>

=head1 FILE

You can create, list or retrieve file

=head2 create

    my $obj = $stripe->files( create => {
        file    => "{a file descriptor}",
        purpose => "dispute_evidence", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::File> object or a hash reference, this will create a Stripe file and return an L<Net::API::Stripe::File> object.

Possible parameters are:

=over 4

=item C<file>

B<Required>. A file to upload. The file should follow the specifications of RFC 2388 (which defines file transfers for the C<multipart/form-data> protocol).

=item C<file_link_data>

Optional parameters to automatically create a L<file link|https://stripe.com/docs/api/file_links> for the newly created file.

=item C<purpose>

B<Required>. The L<purpose|https://stripe.com/docs/file-upload#uploading-a-file> of the uploaded file.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/files/create>

=head2 list

    my $obj = $stripe->files( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<file|Net::API::Stripe::File> object, this issue an api call to get the list of all file.

Possible parameters are:

=over 4

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<purpose>

The file purpose to filter queries by. If none is provided, files will not be filtered by purpose.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/files/list>

=head2 retrieve

    my $obj = $stripe->files( retrieve => $args ) || die( $stripe->error );

Provided with a L<file|Net::API::Stripe::File> object or a hash reference, this will retrieve a Stripe file and return its corresponding L<object|Net::API::Stripe::File>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/files/retrieve>

=head1 FILE LINK

You can create, list, retrieve or update file link

=head2 create

    my $obj = $stripe->file_links( create => {
        file => "file_1JXy922eZvKYlo2CV17dW6tI", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::File::Link> object or a hash reference, this will create a Stripe file link and return an L<Net::API::Stripe::File::Link> object.

Possible parameters are:

=over 4

=item C<expires_at>

A future timestamp after which the link will no longer be usable.

=item C<file>

B<Required>. The ID of the file. The file's C<purpose> must be one of the following: C<business_icon>, C<business_logo>, C<customer_signature>, C<dispute_evidence>, C<finance_report_run>, C<identity_document_downloadable>, C<pci_document>, C<selfie>, C<sigma_scheduled_query>, C<tax_document_user_upload>, or C<terminal_reader_splashscreen>.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/file_links/create>

=head2 list

    my $obj = $stripe->file_links( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<file link|Net::API::Stripe::File::Link> object, this issue an api call to get the list of all file link.

Possible parameters are:

=over 4

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<expired>

Filter links by their expiration status. By default, all links are returned.

=item C<file>

Only return links for the given file.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/file_links/list>

=head2 retrieve

    my $obj = $stripe->file_links( retrieve => $args ) || die( $stripe->error );

Provided with a L<file link|Net::API::Stripe::File::Link> object or a hash reference, this will retrieve a Stripe file link and return its corresponding L<object|Net::API::Stripe::File::Link>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/file_links/retrieve>

=head2 update

    my $obj = $stripe->file_links( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<file link|Net::API::Stripe::File::Link> object or a hash reference, this will update a Stripe file link and return its corresponding L<object|Net::API::Stripe::File::Link>

Possible parameters are:

=over 4

=item C<expires_at>

A future timestamp after which the link will no longer be usable, or C<now> to expire the link immediately.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/file_links/update>

=head1 FINANCIAL CONNECTIONS ACCOUNT

You can disconnect, list, refresh or retrieve financial connections account

=head2 disconnect

    my $obj = $stripe->financial_connections_accounts( disconnect => $args ) || die( $stripe->error );

Provided with a L<financial connections account|Net::API::Stripe::Financial::Connections::Account>, or a hash reference, this will issue a disconnect api call.

Returns an C<Account> object if a valid identifier was provided, and returns L<an error|https://stripe.com/docs/api/errors> otherwise.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/financial_connections/accounts/disconnect>

=head2 list

    my $obj = $stripe->financial_connections_accounts( list => {
        account_holder =>
        {
            customer => "cus_AJ78ZaALpqgiuZ",
        } } ) || die( $stripe->error );

Provided with a L<financial connections account|Net::API::Stripe::Financial::Connections::Account> object, this issue an api call to get the list of all financial connections account.

Possible parameters are:

=over 4

=item C<account_holder>

If present, only return accounts that belong to the specified account holder. C<account_holder[customer]> and C<account_holder[account]> are mutually exclusive.

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<session>

If present, only return accounts that were collected as part of the given session.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/financial_connections/accounts/list>

=head2 refresh

    my $obj = $stripe->financial_connections_accounts( refresh => $args ) || die( $stripe->error );

Provided with a L<financial connections account|Net::API::Stripe::Financial::Connections::Account>, or a hash reference, this will issue a refresh api call.

Returns an C<Account> object if a valid identifier was provided and if you have sufficient permissions to that account. Returns L<an error|https://stripe.com/docs/api/errors> otherwise.

Possible parameters are:

=over 4

=item C<features>

B<Required>. The list of account features that you would like to refresh. Either: C<balance> or C<ownership>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/financial_connections/accounts/refresh>

=head2 retrieve

    my $obj = $stripe->financial_connections_accounts( retrieve => $args ) || die( $stripe->error );

Provided with a L<financial connections account|Net::API::Stripe::Financial::Connections::Account> object or a hash reference, this will retrieve a Stripe financial connections account and return its corresponding L<object|Net::API::Stripe::Financial::Connections::Account>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/financial_connections/accounts/retrieve>

=head1 FINANCIAL CONNECTIONS ACCOUNT OWNER

You can list financial connections account owner

=head2 list

    my $obj = $stripe->financial_connections_account_owners( list => {
        limit     => "3",
        ownership => "fcaowns_1Le9F42eZvKYlo2CfwkUGxZt", } ) || die( $stripe->error );

Provided with a L<financial connections account owner|Net::API::Stripe::Financial::Connections::AccountOwner> object, this issue an api call to get the list of all financial connections account owner.

Possible parameters are:

=over 4

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<ownership>

B<Required>. The ID of the ownership object to fetch owners from.


=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/financial_connections/ownership/list>

=head1 FINANCIAL CONNECTIONS SESSION

You can create or retrieve financial connections session

=head2 create

    my $obj = $stripe->financial_connections_sessions( create => {
        account_holder =>
        {
            customer => "cus_AJ78ZaALpqgiuZ",
            type     => "customer",
        }
        filters        =>
        {
            countries => [qw( US )],
        }
        permissions    => [qw( payment_method balances )], } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Financial::Connections::Session> object or a hash reference, this will create a Stripe financial connections session and return an L<Net::API::Stripe::Financial::Connections::Session> object.

Possible parameters are:

=over 4

=item C<account_holder>

B<Required>. The account holder to link accounts for.

=item C<filters>

Filters to restrict the kinds of accounts to collect.


=item C<permissions>

B<Required>. List of data features that you would like to request access to.

Possible values are C<balances>, C<transactions>, C<ownership>, and C<payment_method>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/financial_connections/sessions/create>

=head2 retrieve

    my $obj = $stripe->financial_connections_sessions( retrieve => $args ) || die( $stripe->error );

Provided with a L<financial connections session|Net::API::Stripe::Financial::Connections::Session> object or a hash reference, this will retrieve a Stripe financial connections session and return its corresponding L<object|Net::API::Stripe::Financial::Connections::Session>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/financial_connections/sessions/retrieve>

=head1 FUNDING INSTRUCTIONS

You can create, fund or list funding instructions

=head2 create

    my $obj = $stripe->funding_instructionss( create => {
        bank_transfer =>
        {
            type => "eu_bank_transfer",
        }
        currency      => "eur",
        funding_type  => "bank_transfer", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Issuing::FundingInstructions> object or a hash reference, this will create a Stripe funding instructions and return an L<Net::API::Stripe::Issuing::FundingInstructions> object.

Possible parameters are:

=over 4

=item C<bank_transfer>

B<Required>. Additional parameters for C<bank_transfer> funding types

=item C<currency>

B<Required>. Three-letter L<ISO currency code|https://www.iso.org/iso-4217-currency-codes.html>, in lowercase. Must be a L<supported currency|https://stripe.com/docs/currencies>.

=item C<funding_type>

B<Required>. The C<funding_type> to get the instructions for.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/issuing/funding_instructions/create>

=head2 fund

    my $obj = $stripe->funding_instructionss( fund => {
        amount   => "4200",
        currency => "eur", } ) || die( $stripe->error );

Provided with a L<funding instructions|Net::API::Stripe::Issuing::FundingInstructions>, or a hash reference, this will issue a fund api call.

Returns testmode funding instructions for an Issuing balance

Possible parameters are:

=over 4

=item C<amount>

B<Required>. The amount to top up

=item C<currency>

B<Required>. The currency to top up

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/issuing/funding_instructions/fund>

=head2 list

    my $obj = $stripe->funding_instructionss( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<funding instructions|Net::API::Stripe::Issuing::FundingInstructions> object, this issue an api call to get the list of all funding instructions.

Possible parameters are:

=over 4

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/issuing/funding_instructions/list>

=head1 IDENTITY VERIFICATION REPORT

You can list or retrieve identity verification report

=head2 list

    my $obj = $stripe->identity_verification_reports( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<identity verification report|Net::API::Stripe::Identity::VerificationReport> object, this issue an api call to get the list of all identity verification report.

Possible parameters are:

=over 4

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<type>

Only return VerificationReports of this type

=item C<verification_session>

Only return VerificationReports created by this VerificationSession ID. It is allowed to provide a VerificationIntent ID.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/identity/verification_reports/list>

=head2 retrieve

    my $obj = $stripe->identity_verification_reports( retrieve => $args ) || die( $stripe->error );

Provided with a L<identity verification report|Net::API::Stripe::Identity::VerificationReport> object or a hash reference, this will retrieve a Stripe identity verification report and return its corresponding L<object|Net::API::Stripe::Identity::VerificationReport>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/identity/verification_reports/retrieve>

=head1 IDENTITY VERIFICATION SESSION

You can cancel, create, list, redact, retrieve or update identity verification session

=head2 cancel

    my $obj = $stripe->identity_verification_sessions( cancel => $args ) || die( $stripe->error );

Provided with a L<identity verification session|Net::API::Stripe::Identity::VerificationSession>, or a hash reference, this will issue a cancel api call.

Returns the canceled VerificationSession object

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/identity/verification_sessions/cancel>

=head2 create

    my $obj = $stripe->identity_verification_sessions( create => {
        type => "document", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Identity::VerificationSession> object or a hash reference, this will create a Stripe identity verification session and return an L<Net::API::Stripe::Identity::VerificationSession> object.

Possible parameters are:

=over 4

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<options>

A set of options for the session’s verification checks.

=item C<return_url>

The URL that the user will be redirected to upon completing the verification flow.

=item C<type>

B<Required>. The type of L<verification check|https://stripe.com/docs/identity/verification-checks> to be performed.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/identity/verification_sessions/create>

=head2 list

    my $obj = $stripe->identity_verification_sessions( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<identity verification session|Net::API::Stripe::Identity::VerificationSession> object, this issue an api call to get the list of all identity verification session.

Possible parameters are:

=over 4

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<status>

Only return VerificationSessions with this status. L<Learn more about the lifecycle of sessions|https://stripe.com/docs/identity/how-sessions-work>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/identity/verification_sessions/list>

=head2 redact

    my $obj = $stripe->identity_verification_sessions( redact => $args ) || die( $stripe->error );

Provided with a L<identity verification session|Net::API::Stripe::Identity::VerificationSession>, or a hash reference, this will issue a redact api call.

Returns the redacted VerificationSession object

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/identity/verification_sessions/redact>

=head2 retrieve

    my $obj = $stripe->identity_verification_sessions( retrieve => $args ) || die( $stripe->error );

Provided with a L<identity verification session|Net::API::Stripe::Identity::VerificationSession> object or a hash reference, this will retrieve a Stripe identity verification session and return its corresponding L<object|Net::API::Stripe::Identity::VerificationSession>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/identity/verification_sessions/retrieve>

=head2 update

    my $obj = $stripe->identity_verification_sessions( update => {
        type => "id_number", } ) || die( $stripe->error );

Provided with a L<identity verification session|Net::API::Stripe::Identity::VerificationSession> object or a hash reference, this will update a Stripe identity verification session and return its corresponding L<object|Net::API::Stripe::Identity::VerificationSession>

Possible parameters are:

=over 4

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<options>

A set of options for the session’s verification checks.

=item C<type>

The type of L<verification check|https://stripe.com/docs/identity/verification-checks> to be performed.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/identity/verification_sessions/update>

=head1 INVOICE

You can create, delete, finalise, finalize, invoice_write_off, lines, lines_upcoming, list, pay, retrieve, search, send, uncollectible, upcoming, update or void invoice

=head2 create

    my $obj = $stripe->invoices( create => {
        customer => "cus_AJ78ZaALpqgiuZ", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Billing::Invoice> object or a hash reference, this will create a Stripe invoice and return an L<Net::API::Stripe::Billing::Invoice> object.

Possible parameters are:

=over 4

=item C<account_tax_ids>

The account tax IDs associated with the invoice. Only editable when the invoice is a draft.

=item C<application_fee_amount>

A fee in JPY that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees L<documentation|https://stripe.com/docs/billing/invoices/connect#collecting-fees>.

=item C<auto_advance>

Controls whether Stripe will perform L<automatic collection|https://stripe.com/docs/billing/invoices/workflow/#auto_advance> of the invoice. When C<false>, the invoice's state will not automatically advance without an explicit action.

=item C<automatic_tax>

Settings for automatic tax lookup for this invoice.

=item C<collection_method>

Either C<charge_automatically>, or C<send_invoice>. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. Defaults to C<charge_automatically>.

=item C<currency>

The currency to create this invoice in. Defaults to that of C<customer> if not specified.

=item C<custom_fields>

A list of up to 4 custom fields to be displayed on the invoice.

=item C<customer>

The ID of the customer who will be billed.

=item C<days_until_due>

The number of days from when the invoice is created until it is due. Valid only for invoices where C<collection_method=send_invoice>.

=item C<default_payment_method>

ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.

=item C<default_source>

ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.

=item C<default_tax_rates>

The tax rates that will apply to any line item that does not have C<tax_rates> set.

=item C<description>

An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.

=item C<discounts>

The coupons to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice's customer. Pass an empty string to avoid inheriting any discounts.

=item C<due_date>

The date on which payment for this invoice is due. Valid only for invoices where C<collection_method=send_invoice>.

=item C<footer>

Footer to be displayed on the invoice.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<on_behalf_of>

The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the L<Invoices with Connect|https://stripe.com/docs/billing/invoices/connect> documentation for details. 

=item C<payment_settings>

Configuration settings for the PaymentIntent that is generated when the invoice is finalized.

=item C<pending_invoice_items_behavior>

How to handle pending invoice items on invoice creation. One of C<include> or C<exclude>. C<include> will include any pending invoice items, and will create an empty draft invoice if no pending invoice items exist. C<exclude> will always create an empty invoice draft regardless if there are pending invoice items or not. Defaults to C<exclude> if the parameter is omitted.

=item C<rendering_options>

Options for invoice PDF rendering.

=item C<statement_descriptor>

Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default C<statement_descriptor> will be set to the first subscription item's product's C<statement_descriptor>.

=item C<subscription>

The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription and pending invoice items not associated with any subscription if C<pending_invoice_items_behavior> is C<include>. The subscription's billing cycle and regular subscription events won't be affected.

=item C<transfer_data>

If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/invoices/create>

=head2 delete

    my $obj = $stripe->invoices( delete => $args ) || die( $stripe->error );

Provided with a L<invoice|Net::API::Stripe::Billing::Invoice>, or a hash reference, this will issue an api call to Stripe to remove the invoice. It returns the invoice object that was deleted with its property C<deleted> set to true.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/invoices/delete>

=head2 finalize

    my $obj = $stripe->invoices( finalize => $args ) || die( $stripe->error );

Provided with a L<invoice|Net::API::Stripe::Billing::Invoice>, or a hash reference, this will issue a finalize api call.

Returns an invoice object with C<status=open>.

Possible parameters are:

=over 4

=item C<auto_advance>

Controls whether Stripe will perform L<automatic collection|https://stripe.com/docs/invoicing/automatic-charging> of the invoice. When C<false>, the invoice's state will not automatically advance without an explicit action.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/invoices/finalize>

=head2 invoice_write_off

Provided with a L<Net::API::Stripe::Billing::Invoice> object or an hash reference of parameters, this will write off an invoice and return its L<Net::API::Stripe::Billing::Invoice> object.

Possible parameters are:

=over 4

=item I<id> A Stripe invoice id. This is required.

=back

For more information, see Stripe documentation here: L<https://stripe.com/docs/api/invoices/mark_uncollectible>

=head2 lines

Provided with a L<Net::API::Stripe::Billing::Invoice> object or an hash reference of parameters, this will retrieve the list of invoice lines and return a L<Net:API::Stripe::List>

Possible parameters are:

=over 4

=item I<id> A Stripe invoice id. This is required.

=item I<ending_before> A Stripe credit note id

=item I<limit> Integer

=item I<starting_after> A Stripe credit note id

=back

For more information, see Stripe documentation here: L<https://stripe.com/docs/api/invoices/invoice_lines>

=head2 lines_upcoming

Provided with a L<Net::API::Stripe::Billing::Invoice> object or an hash reference of parameters, this will retrieve the list of upcoming invoice lines and return a L<Net:API::Stripe::List>

Possible parameters are:

=over 4

=item I<customer> A Stripe customer id. This is required

=item I<coupon> String

=item I<ending_before> A Stripe invoice id

=item I<invoice_items> An array of hash with the following properties:

=over 8

=item I<amount>

=item I<currency>

=item I<description>

=item I<discountable>

=item I<invoiceitem>

=item I<metadata>

=item I<period.end>

=item I<period.start>

=item I<quantity>

=item I<tax_rates>

=item I<unit_amount>

=item I<unit_amount_decimal>

=back

=item I<limit> Integer

=item I<schedule> A Stripe schedule id

=item I<starting_after> A Stripe invoice id

=item I<subscription> A Stripe subscription id

=item I<subscription_billing_cycle_anchor> A timestamp

=item I<subscription_cancel_at> A timestamp

=item I<subscription_cancel_at_period_end> Boolean

=item I<subscription_cancel_now> Boolean

=item I<subscription_default_tax_rates> Array of tax rates

=item I<subscription_items> List of subscription items, each with an attached plan.

=item I<subscription_prorate> String. If previewing an update to a subscription, this decides whether the preview will show the result of applying prorations or not. If set, one of subscription_items or subscription, and one of subscription_items or subscription_trial_end are required.

=item I<subscription_proration_behavior> String. Determines how to handle prorations when the billing cycle changes.

=item I<subscription_proration_date> Date/timestamp. If previewing an update to a subscription, and doing proration, subscription_proration_date forces the proration to be calculated as though the update was done at the specified time.

=item I<subscription_start_date> Date/timestamp.

=item I<subscription_tax_percent> Decimal

=item I<subscription_trial_end> Boolean. If set, one of subscription_items or subscription is required.

=item I<subscription_trial_from_plan> Boolean. Indicates if a planâs trial_period_days should be applied to the subscription. Setting this flag to true together with subscription_trial_end is not allowed.

=back

For more information, see Stripe documentation here: L<https://stripe.com/docs/api/invoices/upcoming_invoice_lines>

=head2 list

    my $obj = $stripe->invoices( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<invoice|Net::API::Stripe::Billing::Invoice> object, this issue an api call to get the list of all invoice.

Possible parameters are:

=over 4

=item C<collection_method>

The collection method of the invoice to retrieve. Either C<charge_automatically> or C<send_invoice>.

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<customer>

Only return invoices for the customer specified by this customer ID.

=item C<due_date>

A filter on the list based on the object C<due_date> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<status>

The status of the invoice, one of C<draft>, C<open>, C<paid>, C<uncollectible>, or C<void>. L<Learn more|https://stripe.com/docs/billing/invoices/workflow#workflow-overview>

=item C<subscription>

Only return invoices for the subscription specified by this subscription ID.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/invoices/list>

=head2 pay

    my $obj = $stripe->invoices( pay => $args ) || die( $stripe->error );

Provided with a L<invoice|Net::API::Stripe::Billing::Invoice>, or a hash reference, this will issue a pay api call.

Returns the invoice object.

Possible parameters are:

=over 4

=item C<forgive>

In cases where the source used to pay the invoice has insufficient funds, passing C<forgive=true> controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due. 

Passing C<forgive=false> will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to C<false>.

=item C<mandate>

ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the paymentI<method param or the invoice's default>paymentI<method or default>source, if set.

=item C<off_session>

Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to C<true> (off-session).

=item C<paid_out_of_band>

Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to C<false>.

=item C<payment_method>

A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid.

=item C<source>

A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/invoices/pay>

=head2 retrieve

    my $obj = $stripe->invoices( retrieve => $args ) || die( $stripe->error );

Provided with a L<invoice|Net::API::Stripe::Billing::Invoice> object or a hash reference, this will retrieve a Stripe invoice and return its corresponding L<object|Net::API::Stripe::Billing::Invoice>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/invoices/retrieve>

=head2 search

    my $obj = $stripe->invoices( search => {
        query => "total>999 AND metadata['order_id']:'6735'", } ) || die( $stripe->error );

Provided with a L<invoice|Net::API::Stripe::Billing::Invoice>, or a hash reference, this will issue a search api call.

A dictionary with a C<data> property that contains an array of up to C<limit> invoices. If no objects match the query, the resulting array will be empty. See the related guide on L<expanding properties in lists|https://stripe.com/docs/expand#lists>.

Possible parameters are:

=over 4

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<page>

A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

=item C<query>

B<Required>. The search query string. See L<search query language|https://stripe.com/docs/search#search-query-language> and the list of supported L<query fields for invoices|https://stripe.com/docs/search#query-fields-for-invoices>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/invoices/search>

=head2 send

    my $obj = $stripe->invoices( send => $args ) || die( $stripe->error );

Provided with a L<invoice|Net::API::Stripe::Billing::Invoice>, or a hash reference, this will issue a send api call.

Returns the invoice object.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/invoices/send>

=head2 uncollectible

    my $obj = $stripe->invoices( uncollectible => $args ) || die( $stripe->error );

Provided with a L<invoice|Net::API::Stripe::Billing::Invoice>, or a hash reference, this will issue a uncollectible api call.

Returns the invoice object.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/invoices/mark_uncollectible>

=head2 upcoming

    my $obj = $stripe->invoices( upcoming => $args ) || die( $stripe->error );

Provided with a L<invoice|Net::API::Stripe::Billing::Invoice>, or a hash reference, this will issue a upcoming api call.

Returns an invoice if valid customer information is provided. Returns L<an error|https://stripe.com/docs/api/errors> otherwise.

Possible parameters are:

=over 4

=item C<automatic_tax>

Settings for automatic tax lookup for this invoice preview.

=item C<coupon>

The code of the coupon to apply. If C<subscription> or C<subscription_items> is provided, the invoice returned will preview updating or creating a subscription with that coupon. Otherwise, it will preview applying that coupon to the customer for the next upcoming invoice from among the customer's subscriptions. The invoice can be previewed without a coupon by passing this value as an empty string.

=item C<currency>

The currency to preview this invoice in. Defaults to that of C<customer> if not specified.

=item C<customer>

B<Required if subscription unset> The identifier of the customer whose upcoming invoice you'd like to retrieve.

=item C<customer_details>

B<Required if subscription and customer unset> Details about the customer you want to invoice or overrides for an existing customer.

=item C<discounts>

The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the customer or subscription. This only works for coupons directly applied to the invoice. To apply a coupon to a subscription, you must use the C<coupon> parameter instead. Pass an empty string to avoid inheriting any discounts. To preview the upcoming invoice for a subscription that hasn't been created, use C<coupon> instead.

=item C<invoice_items>

List of invoice items to add or update in the upcoming invoice preview.

=item C<schedule>

The identifier of the unstarted schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.

=item C<subscription>

The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a C<subscription_items> is provided, you will preview creating a subscription with those items. If neither C<subscription> nor C<subscription_items> is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions.

=item C<subscription_billing_cycle_anchor>

For new subscriptions, a future timestamp to anchor the subscription's L<billing cycle|https://stripe.com/docs/subscriptions/billing-cycle>. This is used to determine the date of the first full invoice, and, for plans with C<month> or C<year> intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to C<now> or C<unchanged>.

=item C<subscription_cancel_at>

Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using C<proration_behavior>.

=item C<subscription_cancel_at_period_end>

Boolean indicating whether this subscription should cancel at the end of the current period.

=item C<subscription_cancel_now>

This simulates the subscription being canceled or expired immediately.

=item C<subscription_default_tax_rates>

If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have C<tax_rates> set.

=item C<subscription_items>

A list of up to 20 subscription items, each with an attached price.

=item C<subscription_proration_behavior>

Determines how to handle L<prorations|https://stripe.com/docs/subscriptions/billing-cycle#prorations> when the billing cycle changes (e.g., when switching plans, resetting C<billing_cycle_anchor=now>, or starting a trial), or if an item's C<quantity> changes.

=item C<subscription_proration_date>

If previewing an update to a subscription, and doing proration, C<subscription_proration_date> forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period, and cannot be before the subscription was on its current plan. If set, C<subscription>, and one of C<subscription_items>, or C<subscription_trial_end> are required. Also, C<subscription_proration_behavior> cannot be set to 'none'.

=item C<subscription_start_date>

Date a subscription is intended to start (can be future or past)

=item C<subscription_trial_end>

If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of C<subscription_items> or C<subscription> is required.

=item C<subscription_trial_from_plan>

Indicates if a plan's C<trial_period_days> should be applied to the subscription. Setting C<subscription_trial_end> per subscription is preferred, and this defaults to C<false>. Setting this flag to C<true> together with C<subscription_trial_end> is not allowed. See L<Using trial periods on subscriptions|https://stripe.com/docs/billing/subscriptions/trials> to learn more.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/invoices/upcoming>

=head2 update

    my $obj = $stripe->invoices( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<invoice|Net::API::Stripe::Billing::Invoice> object or a hash reference, this will update a Stripe invoice and return its corresponding L<object|Net::API::Stripe::Billing::Invoice>

Possible parameters are:

=over 4

=item C<account_tax_ids>

The account tax IDs associated with the invoice. Only editable when the invoice is a draft.

=item C<application_fee_amount>

A fee in JPY that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees L<documentation|https://stripe.com/docs/billing/invoices/connect#collecting-fees>.

=item C<auto_advance>

Controls whether Stripe will perform L<automatic collection|https://stripe.com/docs/billing/invoices/workflow/#auto_advance> of the invoice.

=item C<automatic_tax>

Settings for automatic tax lookup for this invoice.

=item C<collection_method>

Either C<charge_automatically> or C<send_invoice>. This field can be updated only on C<draft> invoices.

=item C<custom_fields>

A list of up to 4 custom fields to be displayed on the invoice. If a value for C<custom_fields> is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields.

=item C<days_until_due>

The number of days from which the invoice is created until it is due. Only valid for invoices where C<collection_method=send_invoice>. This field can only be updated on C<draft> invoices.

=item C<default_payment_method>

ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.

=item C<default_source>

ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.

=item C<default_tax_rates>

The tax rates that will apply to any line item that does not have C<tax_rates> set. Pass an empty string to remove previously-defined tax rates.

=item C<description>

An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.

=item C<discounts>

The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts.

=item C<due_date>

The date on which payment for this invoice is due. Only valid for invoices where C<collection_method=send_invoice>. This field can only be updated on C<draft> invoices.

=item C<footer>

Footer to be displayed on the invoice.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<on_behalf_of>

The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the L<Invoices with Connect|https://stripe.com/docs/billing/invoices/connect> documentation for details. 

=item C<payment_settings>

Configuration settings for the PaymentIntent that is generated when the invoice is finalized.

=item C<rendering_options>

Options for invoice PDF rendering.

=item C<statement_descriptor>

Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default C<statement_descriptor> will be set to the first subscription item's product's C<statement_descriptor>.

=item C<transfer_data>

If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/invoices/update>

=head2 void

    my $obj = $stripe->invoices( void => $args ) || die( $stripe->error );

Provided with a L<invoice|Net::API::Stripe::Billing::Invoice>, or a hash reference, this will issue a void api call.

Returns the voided invoice object.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/invoices/void>

=head1 INVOICEITEM

You can create, delete, list, retrieve or update invoiceitem

=head2 create

    my $obj = $stripe->invoiceitems( create => {
        customer => "cus_AJ78ZaALpqgiuZ",
        price    => "price_1Le4Uy2eZvKYlo2Cby2Mg3bR", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Billing::Invoice::Item> object or a hash reference, this will create a Stripe invoiceitem and return an L<Net::API::Stripe::Billing::Invoice::Item> object.

Possible parameters are:

=over 4

=item C<amount>

The integer amount in JPY of the charge to be applied to the upcoming invoice. Passing in a negative C<amount> will reduce the C<amount_due> on the invoice.

=item C<currency>

Three-letter L<ISO currency code|https://www.iso.org/iso-4217-currency-codes.html>, in lowercase. Must be a L<supported currency|https://stripe.com/docs/currencies>.

=item C<customer>

B<Required>. The ID of the customer who will be billed when this invoice item is billed.

=item C<description>

An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.

=item C<discountable>

Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items.

=item C<discounts>

The coupons to redeem into discounts for the invoice item or invoice line item.

=item C<invoice>

The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<period>

The period associated with this invoice item. When set to different values, the period will be rendered on the invoice.

=item C<price>

The ID of the price object.

=item C<price_data>

Data used to generate a new L<Price|https://stripe.com/docs/api/prices> object inline.

=item C<quantity>

Non-negative integer. The quantity of units for the invoice item.

=item C<subscription>

The ID of a subscription to add this invoice item to. When left blank, the invoice item will be be added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription.

=item C<tax_rates>

The tax rates which apply to the invoice item. When set, the C<default_tax_rates> on the invoice do not apply to this invoice item.

=item C<unit_amount>

The integer unit amount in JPY of the charge to be applied to the upcoming invoice. This C<unit_amount> will be multiplied by the quantity to get the full amount. Passing in a negative C<unit_amount> will reduce the C<amount_due> on the invoice.

=item C<unit_amount_decimal>

Same as C<unit_amount>, but accepts a decimal value in JPY with at most 12 decimal places. Only one of C<unit_amount> and C<unit_amount_decimal> can be set.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/invoiceitems/create>

=head2 delete

    my $obj = $stripe->invoiceitems( delete => $args ) || die( $stripe->error );

Provided with a L<invoiceitem|Net::API::Stripe::Billing::Invoice::Item>, or a hash reference, this will issue an api call to Stripe to remove the invoiceitem. It returns the invoiceitem object that was deleted with its property C<deleted> set to true.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/invoiceitems/delete>

=head2 list

    my $obj = $stripe->invoiceitems( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<invoiceitem|Net::API::Stripe::Billing::Invoice::Item> object, this issue an api call to get the list of all invoiceitem.

Possible parameters are:

=over 4

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<customer>

The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned.

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<invoice>

Only return invoice items belonging to this invoice. If none is provided, all invoice items will be returned. If specifying an invoice, no customer identifier is needed.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<pending>

Set to C<true> to only show pending invoice items, which are not yet attached to any invoices. Set to C<false> to only show invoice items already attached to invoices. If unspecified, no filter is applied.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/invoiceitems/list>

=head2 retrieve

    my $obj = $stripe->invoiceitems( retrieve => $args ) || die( $stripe->error );

Provided with a L<invoiceitem|Net::API::Stripe::Billing::Invoice::Item> object or a hash reference, this will retrieve a Stripe invoiceitem and return its corresponding L<object|Net::API::Stripe::Billing::Invoice::Item>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/invoiceitems/retrieve>

=head2 update

    my $obj = $stripe->invoiceitems( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<invoiceitem|Net::API::Stripe::Billing::Invoice::Item> object or a hash reference, this will update a Stripe invoiceitem and return its corresponding L<object|Net::API::Stripe::Billing::Invoice::Item>

Possible parameters are:

=over 4

=item C<amount>

The integer amount in JPY of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.

=item C<description>

An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.

=item C<discountable>

Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations.

=item C<discounts>

The coupons & existing discounts which apply to the invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<period>

The period associated with this invoice item. When set to different values, the period will be rendered on the invoice.

=item C<price>

The ID of the price object.

=item C<price_data>

Data used to generate a new L<Price|https://stripe.com/docs/api/prices> object inline.

=item C<quantity>

Non-negative integer. The quantity of units for the invoice item.

=item C<tax_rates>

The tax rates which apply to the invoice item. When set, the C<default_tax_rates> on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates.

=item C<unit_amount>

The integer unit amount in JPY of the charge to be applied to the upcoming invoice. This unitI<amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit>amount.

=item C<unit_amount_decimal>

Same as C<unit_amount>, but accepts a decimal value in JPY with at most 12 decimal places. Only one of C<unit_amount> and C<unit_amount_decimal> can be set.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/invoiceitems/update>

=head1 ISSUING AUTHORIZATION

You can approve, decline, list, retrieve or update issuing authorization

=head2 approve

    my $obj = $stripe->issuing_authorizations( approve => $args ) || die( $stripe->error );

Provided with a L<issuing authorization|Net::API::Stripe::Issuing::Authorization>, or a hash reference, this will issue a approve api call.

Returns an approved Issuing C<Authorization> object.

Possible parameters are:

=over 4

=item C<amount>

If the authorization's C<pending_request.is_amount_controllable> property is C<true>, you may provide this value to control how much to hold for the authorization. Must be positive (use L<C<decline>|https://stripe.com/docs/api/issuing/authorizations/decline> to decline an authorization request).

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/issuing/authorizations/approve>

=head2 decline

    my $obj = $stripe->issuing_authorizations( decline => $args ) || die( $stripe->error );

Provided with a L<issuing authorization|Net::API::Stripe::Issuing::Authorization>, or a hash reference, this will issue a decline api call.

Returns a declined Issuing C<Authorization> object.

Possible parameters are:

=over 4

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/issuing/authorizations/decline>

=head2 list

    my $obj = $stripe->issuing_authorizations( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<issuing authorization|Net::API::Stripe::Issuing::Authorization> object, this issue an api call to get the list of all issuing authorization.

Possible parameters are:

=over 4

=item C<card>

Only return authorizations that belong to the given card.

=item C<cardholder>

Only return authorizations that belong to the given cardholder.

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<status>

Only return authorizations with the given status. One of C<pending>, C<closed>, or C<reversed>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/issuing/authorizations/list>

=head2 retrieve

    my $obj = $stripe->issuing_authorizations( retrieve => $args ) || die( $stripe->error );

Provided with a L<issuing authorization|Net::API::Stripe::Issuing::Authorization> object or a hash reference, this will retrieve a Stripe issuing authorization and return its corresponding L<object|Net::API::Stripe::Issuing::Authorization>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/issuing/authorizations/retrieve>

=head2 update

    my $obj = $stripe->issuing_authorizations( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<issuing authorization|Net::API::Stripe::Issuing::Authorization> object or a hash reference, this will update a Stripe issuing authorization and return its corresponding L<object|Net::API::Stripe::Issuing::Authorization>

Possible parameters are:

=over 4

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/issuing/authorizations/update>

=head1 ISSUING CARD

You can create, deliver, fail, list, retrieve, return, ship or update issuing card

=head2 create

    my $obj = $stripe->issuing_cards( create => {
        cardholder => "ich_1KwsZz2eZvKYlo2Cz5eys5Kb",
        currency   => "usd",
        type       => "virtual", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Issuing::Card> object or a hash reference, this will create a Stripe issuing card and return an L<Net::API::Stripe::Issuing::Card> object.

Possible parameters are:

=over 4

=item C<cardholder>

B<required> The L<Cardholder|https://stripe.com/docs/api#issuing_cardholder_object> object with which the card will be associated.

=item C<currency>

B<Required>. The currency for the card.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<replacement_for>

The card this is meant to be a replacement for (if any).

=item C<replacement_reason>

If C<replacement_for> is specified, this should indicate why that card is being replaced.

=item C<shipping>

The address where the card will be shipped.

=item C<spending_controls>

Rules that control spending for this card. Refer to our L<documentation|https://stripe.com/docs/issuing/controls/spending-controls> for more details.

=item C<status>

Whether authorizations can be approved on this card. Defaults to C<inactive>.

=item C<type>

B<Required>. The type of card to issue. Possible values are C<physical> or C<virtual>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/issuing/cards/create>

=head2 deliver

    my $obj = $stripe->issuing_cards( deliver => $args ) || die( $stripe->error );

Provided with a L<issuing card|Net::API::Stripe::Issuing::Card>, or a hash reference, this will issue a deliver api call.

Returns an updated Issuing C<Card> object.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/issuing/cards/test_mode_deliver>

=head2 fail

    my $obj = $stripe->issuing_cards( fail => $args ) || die( $stripe->error );

Provided with a L<issuing card|Net::API::Stripe::Issuing::Card>, or a hash reference, this will issue a fail api call.

Returns an updated Issuing C<Card> object.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/issuing/cards/test_mode_fail>

=head2 list

    my $obj = $stripe->issuing_cards( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<issuing card|Net::API::Stripe::Issuing::Card> object, this issue an api call to get the list of all issuing card.

Possible parameters are:

=over 4

=item C<cardholder>

Only return cards belonging to the Cardholder with the provided ID.

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<exp_month>

Only return cards that have the given expiration month.

=item C<exp_year>

Only return cards that have the given expiration year.

=item C<last4>

Only return cards that have the given last four digits.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<status>

Only return cards that have the given status. One of C<active>, C<inactive>, or C<canceled>.

=item C<type>

Only return cards that have the given type. One of C<virtual> or C<physical>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/issuing/cards/list>

=head2 retrieve

    my $obj = $stripe->issuing_cards( retrieve => $args ) || die( $stripe->error );

Provided with a L<issuing card|Net::API::Stripe::Issuing::Card> object or a hash reference, this will retrieve a Stripe issuing card and return its corresponding L<object|Net::API::Stripe::Issuing::Card>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/issuing/cards/retrieve>

=head2 return

    my $obj = $stripe->issuing_cards( return => $args ) || die( $stripe->error );

Provided with a L<issuing card|Net::API::Stripe::Issuing::Card>, or a hash reference, this will issue a return api call.

Returns an updated Issuing C<Card> object.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/issuing/cards/test_mode_return>

=head2 ship

    my $obj = $stripe->issuing_cards( ship => $args ) || die( $stripe->error );

Provided with a L<issuing card|Net::API::Stripe::Issuing::Card>, or a hash reference, this will issue a ship api call.

Returns an updated Issuing C<Card> object.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/issuing/cards/test_mode_ship>

=head2 update

    my $obj = $stripe->issuing_cards( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<issuing card|Net::API::Stripe::Issuing::Card> object or a hash reference, this will update a Stripe issuing card and return its corresponding L<object|Net::API::Stripe::Issuing::Card>

Possible parameters are:

=over 4

=item C<cancellation_reason>

Reason why the C<status> of this card is C<canceled>.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<pin>

The desired new PIN for this card.

=item C<spending_controls>

Rules that control spending for this card. Refer to our L<documentation|https://stripe.com/docs/issuing/controls/spending-controls> for more details.

=item C<status>

Dictates whether authorizations can be approved on this card. If this card is being canceled because it was lost or stolen, this information should be provided as C<cancellation_reason>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/issuing/cards/update>

=head1 ISSUING CARDHOLDER

You can create, list, retrieve or update issuing cardholder

=head2 create

    my $obj = $stripe->issuing_cardholders( create => {
        billing      =>
        {
            address =>
            {
                city        => "San Francisco",
                country     => "US",
                line1       => "1234 Main Street",
                postal_code => "94111",
                state       => "CA",
            }
        }
        email        => q{jenny.rosen@example.com},
        name         => "Jenny Rosen",
        phone_number => "+18888675309",
        type         => "individual", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Issuing::Card::Holder> object or a hash reference, this will create a Stripe issuing cardholder and return an L<Net::API::Stripe::Issuing::Card::Holder> object.

Possible parameters are:

=over 4

=item C<billing>

B<Required>. The cardholder's billing address.

=item C<company>

Additional information about a C<company> cardholder.

=item C<email>

The cardholder's email address.

=item C<individual>

Additional information about an C<individual> cardholder.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<name>

B<Required>. The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. This field cannot contain any special characters or numbers.

=item C<phone_number>

The cardholder's phone number. This will be transformed to L<E.164|https://en.wikipedia.org/wiki/E.164> if it is not provided in that format already. This is required for all cardholders who will be creating EU cards. See the L<3D Secure documentation|https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied> for more details.

=item C<spending_controls>

Rules that control spending across this cardholder's cards. Refer to our L<documentation|https://stripe.com/docs/issuing/controls/spending-controls> for more details.

=item C<status>

Specifies whether to permit authorizations on this cardholder's cards. Defaults to C<active>.

=item C<type>

B<Required>. One of C<individual> or C<company>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/issuing/cardholders/create>

=head2 list

    my $obj = $stripe->issuing_cardholders( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<issuing cardholder|Net::API::Stripe::Issuing::Card::Holder> object, this issue an api call to get the list of all issuing cardholder.

Possible parameters are:

=over 4

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<email>

Only return cardholders that have the given email address.

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<phone_number>

Only return cardholders that have the given phone number.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<status>

Only return cardholders that have the given status. One of C<active>, C<inactive>, or C<blocked>.

=item C<type>

Only return cardholders that have the given type. One of C<individual> or C<company>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/issuing/cardholders/list>

=head2 retrieve

    my $obj = $stripe->issuing_cardholders( retrieve => $args ) || die( $stripe->error );

Provided with a L<issuing cardholder|Net::API::Stripe::Issuing::Card::Holder> object or a hash reference, this will retrieve a Stripe issuing cardholder and return its corresponding L<object|Net::API::Stripe::Issuing::Card::Holder>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/issuing/cardholders/retrieve>

=head2 update

    my $obj = $stripe->issuing_cardholders( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<issuing cardholder|Net::API::Stripe::Issuing::Card::Holder> object or a hash reference, this will update a Stripe issuing cardholder and return its corresponding L<object|Net::API::Stripe::Issuing::Card::Holder>

Possible parameters are:

=over 4

=item C<billing>

The cardholder's billing address.

=item C<company>

Additional information about a C<company> cardholder.

=item C<email>

The cardholder's email address.

=item C<individual>

Additional information about an C<individual> cardholder.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<phone_number>

The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the L<3D Secure documentation|https://stripe.com/docs/issuing/3d-secure> for more details.

=item C<spending_controls>

Rules that control spending across this cardholder's cards. Refer to our L<documentation|https://stripe.com/docs/issuing/controls/spending-controls> for more details.

=item C<status>

Specifies whether to permit authorizations on this cardholder's cards.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/issuing/cardholders/update>

=head1 ISSUING DISPUTE

You can create, list, retrieve, submit or update issuing dispute

=head2 create

    my $obj = $stripe->issuing_disputes( create => {
        evidence    =>
        {
            fraudulent =>
            {
                explanation => "Purchase was unrecognized.",
            }
            reason     => "fraudulent",
        }
        transaction => "ipi_1JIdAl2eZvKYlo2Cfr8US8uB", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Issuing::Dispute> object or a hash reference, this will create a Stripe issuing dispute and return an L<Net::API::Stripe::Issuing::Dispute> object.

Possible parameters are:

=over 4

=item C<evidence>

Evidence provided for the dispute.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<transaction>

The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use C<treasury.received_debit>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/issuing/disputes/create>

=head2 list

    my $obj = $stripe->issuing_disputes( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<issuing dispute|Net::API::Stripe::Issuing::Dispute> object, this issue an api call to get the list of all issuing dispute.

Possible parameters are:

=over 4

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<status>

Select Issuing disputes with the given status.

=item C<transaction>

Select the Issuing dispute for the given transaction.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/issuing/disputes/list>

=head2 retrieve

    my $obj = $stripe->issuing_disputes( retrieve => $args ) || die( $stripe->error );

Provided with a L<issuing dispute|Net::API::Stripe::Issuing::Dispute> object or a hash reference, this will retrieve a Stripe issuing dispute and return its corresponding L<object|Net::API::Stripe::Issuing::Dispute>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/issuing/disputes/retrieve>

=head2 submit

    my $obj = $stripe->issuing_disputes( submit => $args ) || die( $stripe->error );

Provided with a L<issuing dispute|Net::API::Stripe::Issuing::Dispute>, or a hash reference, this will issue a submit api call.

Returns an Issuing C<Dispute> object in C<submitted> status if submission succeeds.

Possible parameters are:

=over 4

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/issuing/dispute/submit>

=head2 update

    my $obj = $stripe->issuing_disputes( update => {
        evidence =>
        {
            not_received =>
            {
                expected_at         => "1590000000",
                explanation         => "",
                product_description => "Baseball cap",
                product_type        => "merchandise",
            }
            reason       => "not_received",
        } } ) || die( $stripe->error );

Provided with a L<issuing dispute|Net::API::Stripe::Issuing::Dispute> object or a hash reference, this will update a Stripe issuing dispute and return its corresponding L<object|Net::API::Stripe::Issuing::Dispute>

Possible parameters are:

=over 4

=item C<evidence>

Evidence provided for the dispute.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/issuing/disputes/update>

=head1 ISSUING TRANSACTION

You can list, retrieve or update issuing transaction

=head2 list

    my $obj = $stripe->issuing_transactions( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<issuing transaction|Net::API::Stripe::Issuing::Transaction> object, this issue an api call to get the list of all issuing transaction.

Possible parameters are:

=over 4

=item C<card>

Only return transactions that belong to the given card.

=item C<cardholder>

Only return transactions that belong to the given cardholder.

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<type>

Only return transactions that have the given type. One of C<capture> or C<refund>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/issuing/transactions/list>

=head2 retrieve

    my $obj = $stripe->issuing_transactions( retrieve => $args ) || die( $stripe->error );

Provided with a L<issuing transaction|Net::API::Stripe::Issuing::Transaction> object or a hash reference, this will retrieve a Stripe issuing transaction and return its corresponding L<object|Net::API::Stripe::Issuing::Transaction>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/issuing/transactions/retrieve>

=head2 update

    my $obj = $stripe->issuing_transactions( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<issuing transaction|Net::API::Stripe::Issuing::Transaction> object or a hash reference, this will update a Stripe issuing transaction and return its corresponding L<object|Net::API::Stripe::Issuing::Transaction>

Possible parameters are:

=over 4

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/issuing/transactions/update>

=head1 LINE ITEM

You can lines line item

=head2 lines

    my $obj = $stripe->line_items( lines => $args ) || die( $stripe->error );

Provided with a L<line item|Net::API::Stripe::Billing::Invoice::LineItem>, or a hash reference, this will issue a lines api call.

Returns a list of L<line_item objects|https://stripe.com/docs/api/invoices/line_item>.

Possible parameters are:

=over 4

=item C<automatic_tax>

Settings for automatic tax lookup for this invoice preview.

=item C<coupon>

The code of the coupon to apply. If C<subscription> or C<subscription_items> is provided, the invoice returned will preview updating or creating a subscription with that coupon. Otherwise, it will preview applying that coupon to the customer for the next upcoming invoice from among the customer's subscriptions. The invoice can be previewed without a coupon by passing this value as an empty string.

=item C<currency>

The currency to preview this invoice in. Defaults to that of C<customer> if not specified.

=item C<customer>

B<Required if subscription unset> The identifier of the customer whose upcoming invoice you'd like to retrieve.

=item C<customer_details>

B<Required if subscription and customer unset> Details about the customer you want to invoice or overrides for an existing customer.

=item C<discounts>

The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the customer or subscription. This only works for coupons directly applied to the invoice. To apply a coupon to a subscription, you must use the C<coupon> parameter instead. Pass an empty string to avoid inheriting any discounts. To preview the upcoming invoice for a subscription that hasn't been created, use C<coupon> instead.

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<invoice_items>

List of invoice items to add or update in the upcoming invoice preview.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<schedule>

The identifier of the unstarted schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<subscription>

The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a C<subscription_items> is provided, you will preview creating a subscription with those items. If neither C<subscription> nor C<subscription_items> is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions.

=item C<subscription_billing_cycle_anchor>

For new subscriptions, a future timestamp to anchor the subscription's L<billing cycle|https://stripe.com/docs/subscriptions/billing-cycle>. This is used to determine the date of the first full invoice, and, for plans with C<month> or C<year> intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to C<now> or C<unchanged>.

=item C<subscription_cancel_at>

Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using C<proration_behavior>.

=item C<subscription_cancel_at_period_end>

Boolean indicating whether this subscription should cancel at the end of the current period.

=item C<subscription_cancel_now>

This simulates the subscription being canceled or expired immediately.

=item C<subscription_default_tax_rates>

If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have C<tax_rates> set.

=item C<subscription_items>

A list of up to 20 subscription items, each with an attached price.

=item C<subscription_proration_behavior>

Determines how to handle L<prorations|https://stripe.com/docs/subscriptions/billing-cycle#prorations> when the billing cycle changes (e.g., when switching plans, resetting C<billing_cycle_anchor=now>, or starting a trial), or if an item's C<quantity> changes.

=item C<subscription_proration_date>

If previewing an update to a subscription, and doing proration, C<subscription_proration_date> forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period, and cannot be before the subscription was on its current plan. If set, C<subscription>, and one of C<subscription_items>, or C<subscription_trial_end> are required. Also, C<subscription_proration_behavior> cannot be set to 'none'.

=item C<subscription_start_date>

Date a subscription is intended to start (can be future or past)

=item C<subscription_trial_end>

If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of C<subscription_items> or C<subscription> is required.

=item C<subscription_trial_from_plan>

Indicates if a plan's C<trial_period_days> should be applied to the subscription. Setting C<subscription_trial_end> per subscription is preferred, and this defaults to C<false>. Setting this flag to C<true> together with C<subscription_trial_end> is not allowed. See L<Using trial periods on subscriptions|https://stripe.com/docs/billing/subscriptions/trials> to learn more.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/invoices/upcoming_invoice_lines>

=head1 LOGIN LINK

You can create login link

=head2 create

    my $obj = $stripe->login_links( create => $args ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Connect::Account::LoginLink> object or a hash reference, this will create a Stripe login link and return an L<Net::API::Stripe::Connect::Account::LoginLink> object.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/account/create_login_link>

=head1 MANDATE

You can retrieve mandate

=head2 retrieve

    my $obj = $stripe->mandates( retrieve => $args ) || die( $stripe->error );

Provided with a L<mandate|Net::API::Stripe::Mandate> object or a hash reference, this will retrieve a Stripe mandate and return its corresponding L<object|Net::API::Stripe::Mandate>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/mandates/retrieve>

=head1 PAYMENT INTENT

You can apply_customer_balance, cancel, capture, confirm, create, increment, increment_authorization, list, reconcile, retrieve, search, update, verify or verify_microdeposits payment intent

=head2 apply_customer_balance

    my $obj = $stripe->payment_intents( apply_customer_balance => $args ) || die( $stripe->error );

Provided with a L<payment intent|Net::API::Stripe::Payment::Intent>, or a hash reference, this will issue a apply_customer_balance api call.

Returns a PaymentIntent object.

Possible parameters are:

=over 4

=item C<amount>

Amount intended to be applied to this PaymentIntent from the customer’s cash balance.

A positive integer representing how much to charge in the L<smallest currency unit|https://stripe.com/docs/currencies#zero-decimal> (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency).

The maximum amount is the amount of the PaymentIntent.

When omitted, the amount defaults to the remaining amount requested on the PaymentIntent.

=item C<currency>

Three-letter L<ISO currency code|https://www.iso.org/iso-4217-currency-codes.html>, in lowercase. Must be a L<supported currency|https://stripe.com/docs/currencies>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/payment_intents/apply_customer_balance>

=head2 cancel

    my $obj = $stripe->payment_intents( cancel => $args ) || die( $stripe->error );

Provided with a L<payment intent|Net::API::Stripe::Payment::Intent>, or a hash reference, this will issue a cancel api call.

Returns a PaymentIntent object if the cancellation succeeded. Returns an error if the PaymentIntent has already been canceled or is not in a cancelable state.

Possible parameters are:

=over 4

=item C<cancellation_reason>

Reason for canceling this PaymentIntent. Possible values are C<duplicate>, C<fraudulent>, C<requested_by_customer>, or C<abandoned>

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/payment_intents/cancel>

=head2 capture

    my $obj = $stripe->payment_intents( capture => $args ) || die( $stripe->error );

Provided with a L<payment intent|Net::API::Stripe::Payment::Intent>, or a hash reference, this will issue a capture api call.

Returns a PaymentIntent object with C<status="succeeded"> if the PaymentIntent was capturable. Returns an error if the PaymentIntent was not capturable or an invalid amount to capture was provided.

Possible parameters are:

=over 4

=item C<amount_to_capture>

The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. Defaults to the full C<amount_capturable> if not provided.

=item C<application_fee_amount>

The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents L<use case for connected accounts|https://stripe.com/docs/payments/connected-accounts>.

=item C<statement_descriptor>

For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters.

=item C<statement_descriptor_suffix>

Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.

=item C<transfer_data>

The parameters used to automatically create a Transfer when the payment is captured. For more information, see the PaymentIntents L<use case for connected accounts|https://stripe.com/docs/payments/connected-accounts>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/payment_intents/capture>

=head2 confirm

    my $obj = $stripe->payment_intents( confirm => {
        payment_method => "pm_card_visa", } ) || die( $stripe->error );

Provided with a L<payment intent|Net::API::Stripe::Payment::Intent>, or a hash reference, this will issue a confirm api call.

Returns the resulting PaymentIntent after all possible transitions are applied.

Possible parameters are:

=over 4

=item C<capture_method>

Controls when the funds will be captured from the customer's account.


=item C<error_on_requires_action>

Set to C<true> to fail the payment attempt if the PaymentIntent transitions into C<requires_action>. This parameter is intended for simpler integrations that do not handle customer actions, like L<saving cards without authentication|https://stripe.com/docs/payments/save-card-without-authentication>.

=item C<mandate>

ID of the mandate to be used for this payment.

=item C<mandate_data>

This hash contains details about the Mandate to create

=item C<off_session>

Set to C<true> to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and L<charge them later|https://stripe.com/docs/payments/cards/charging-saved-cards>.

=item C<payment_method>

ID of the payment method (a PaymentMethod, Card, or L<compatible Source|https://stripe.com/docs/payments/payment-methods/transitioning#compatibility> object) to attach to this PaymentIntent.

=item C<payment_method_data>

If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear in the L<payment_method|https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method> property on the PaymentIntent.

=item C<payment_method_options>

Payment-method-specific configuration for this PaymentIntent.

=item C<payment_method_types>

The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. Use automaticI<payment>methods to manage payment methods from the L<Stripe Dashboard|https://dashboard.stripe.com/settings/payment_methods>.

=item C<radar_options>

Options to configure Radar. See L<Radar Session|https://stripe.com/docs/radar/radar-session> for more information.

=item C<receipt_email>

Email address that the receipt for the resulting payment will be sent to. If C<receipt_email> is specified for a payment in live mode, a receipt will be sent regardless of your L<email settings|https://dashboard.stripe.com/account/emails>.

=item C<return_url>

The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter is only used for cards and other redirect-based payment methods.

=item C<setup_future_usage>

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will L<attach the payment method|https://stripe.com/docs/payments/save-during-payment> to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be L<attached|https://stripe.com/docs/api/payment_methods/attach> to a Customer after the transaction completes.

When processing card payments, Stripe also uses C<setup_future_usage> to dynamically optimize your payment flow and comply with regional legislation and network rules, such as L<SCA|https://stripe.com/docs/strong-customer-authentication>.

If C<setup_future_usage> is already set and you are performing a request using a publishable key, you may only update the value from C<on_session> to C<off_session>.

=item C<shipping>

Shipping information for this PaymentIntent.

=item C<use_stripe_sdk>

Set to C<true> only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/payment_intents/confirm>

=head2 create

    my $obj = $stripe->payment_intents( create => {
        amount               => "2000",
        currency             => "usd",
        payment_method_types => [qw( card )], } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Payment::Intent> object or a hash reference, this will create a Stripe payment intent and return an L<Net::API::Stripe::Payment::Intent> object.

Possible parameters are:

=over 4

=item C<amount>

B<Required>. Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the L<smallest currency unit|https://stripe.com/docs/currencies#zero-decimal> (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or L<equivalent in charge currency|https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts>. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).

=item C<application_fee_amount>

The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents L<use case for connected accounts|https://stripe.com/docs/payments/connected-accounts>.

=item C<automatic_payment_methods>

When enabled, this PaymentIntent will accept payment methods that you have enabled in the Dashboard and are compatible with this PaymentIntent's other parameters.

=item C<capture_method>

Controls when the funds will be captured from the customer's account.


=item C<confirm>

Set to C<true> to attempt to L<confirm|https://stripe.com/docs/api/payment_intents/confirm> this PaymentIntent immediately. This parameter defaults to C<false>. When creating and confirming a PaymentIntent at the same time, parameters available in the L<confirm|https://stripe.com/docs/api/payment_intents/confirm> API may also be provided.

=item C<confirmation_method>



=item C<currency>

B<Required>. Three-letter L<ISO currency code|https://www.iso.org/iso-4217-currency-codes.html>, in lowercase. Must be a L<supported currency|https://stripe.com/docs/currencies>.

=item C<customer>

ID of the Customer this PaymentIntent belongs to, if one exists.

Payment methods attached to other Customers cannot be used with this PaymentIntent.

If present in combination with L<setupI<future>usage|https://stripe.com/docs/api/payment_intents/object#payment_intent_object-setup_future_usage>, this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete.

=item C<description>

An arbitrary string attached to the object. Often useful for displaying to users.

=item C<error_on_requires_action>

Set to C<true> to fail the payment attempt if the PaymentIntent transitions into C<requires_action>. This parameter is intended for simpler integrations that do not handle customer actions, like L<saving cards without authentication|https://stripe.com/docs/payments/save-card-without-authentication>. This parameter can only be used with L<C<confirm=true>|https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm>.

=item C<mandate>

ID of the mandate to be used for this payment. This parameter can only be used with L<C<confirm=true>|https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm>.

=item C<mandate_data>

This hash contains details about the Mandate to create. This parameter can only be used with L<C<confirm=true>|https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm>.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<off_session>

Set to C<true> to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and L<charge them later|https://stripe.com/docs/payments/cards/charging-saved-cards>. This parameter can only be used with L<C<confirm=true>|https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm>.

=item C<on_behalf_of>

The Stripe account ID for which these funds are intended. For details, see the PaymentIntents L<use case for connected accounts|https://stripe.com/docs/payments/connected-accounts>.

=item C<payment_method>

ID of the payment method (a PaymentMethod, Card, or L<compatible Source|https://stripe.com/docs/payments/payment-methods/transitioning#compatibility> object) to attach to this PaymentIntent.

If this parameter is omitted with C<confirm=true>, C<customer.default_source> will be attached as this PaymentIntent's payment instrument to improve the migration experience for users of the Charges API. We recommend that you explicitly provide the C<payment_method> going forward.

=item C<payment_method_data>

If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear in the L<payment_method|https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method> property on the PaymentIntent.

=item C<payment_method_options>

Payment-method-specific configuration for this PaymentIntent.

=item C<payment_method_types>

The list of L<payment method types|https://stripe.com/docs/payments/payment-methods/overview> that this PaymentIntent is allowed to use. If this is not provided, defaults to C<[“card”]>. Valid payment method types include: C<acss_debit>, C<affirm>, C<afterpay_clearpay>, C<alipay>, C<au_becs_debit>, C<bacs_debit>, C<bancontact>, C<blik>, C<boleto>, C<card>, C<card_present>, C<eps>, C<fpx>, C<giropay>, C<grabpay>, C<ideal>, C<klarna>, C<konbini>, C<link>, C<oxxo>, C<p24>, C<paynow>, C<promptpay>, C<sepa_debit>, C<sofort>, C<us_bank_account>, and C<wechat_pay>.

=item C<radar_options>

Options to configure Radar. See L<Radar Session|https://stripe.com/docs/radar/radar-session> for more information.

=item C<receipt_email>

Email address that the receipt for the resulting payment will be sent to. If C<receipt_email> is specified for a payment in live mode, a receipt will be sent regardless of your L<email settings|https://dashboard.stripe.com/account/emails>.

=item C<return_url>

The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with L<C<confirm=true>|https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm>.

=item C<setup_future_usage>

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will L<attach the payment method|https://stripe.com/docs/payments/save-during-payment> to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be L<attached|https://stripe.com/docs/api/payment_methods/attach> to a Customer after the transaction completes.

When processing card payments, Stripe also uses C<setup_future_usage> to dynamically optimize your payment flow and comply with regional legislation and network rules, such as L<SCA|https://stripe.com/docs/strong-customer-authentication>.

=item C<shipping>

Shipping information for this PaymentIntent.

=item C<statement_descriptor>

For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters.

=item C<statement_descriptor_suffix>

Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.

=item C<transfer_data>

The parameters used to automatically create a Transfer when the payment succeeds. For more information, see the PaymentIntents L<use case for connected accounts|https://stripe.com/docs/payments/connected-accounts>.

=item C<transfer_group>

A string that identifies the resulting payment as part of a group. See the PaymentIntents L<use case for connected accounts|https://stripe.com/docs/payments/connected-accounts> for details.

=item C<use_stripe_sdk>

Set to C<true> only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/payment_intents/create>

=head2 increment_authorization

    my $obj = $stripe->payment_intents( increment_authorization => {
        amount => "2099", } ) || die( $stripe->error );

Provided with a L<payment intent|Net::API::Stripe::Payment::Intent>, or a hash reference, this will issue a increment_authorization api call.

Returns a PaymentIntent object with the updated amount if the incremental authorization succeeded. Returns an error if the incremental authorization failed or the PaymentIntent isn’t eligible for incremental authorizations.

Possible parameters are:

=over 4

=item C<amount>

B<Required>. The updated total amount you intend to collect from the cardholder. This amount must be greater than the currently authorized amount.

=item C<application_fee_amount>

The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents L<use case for connected accounts|https://stripe.com/docs/payments/connected-accounts>.

=item C<description>

An arbitrary string attached to the object. Often useful for displaying to users.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<transfer_data>

The parameters used to automatically create a Transfer when the payment is captured. For more information, see the PaymentIntents L<use case for connected accounts|https://stripe.com/docs/payments/connected-accounts>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/payment_intents/increment_authorization>

=head2 list

    my $obj = $stripe->payment_intents( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<payment intent|Net::API::Stripe::Payment::Intent> object, this issue an api call to get the list of all payment intent.

Possible parameters are:

=over 4

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<customer>

Only return PaymentIntents for the customer specified by this customer ID.

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/payment_intents/list>

=head2 retrieve

    my $obj = $stripe->payment_intents( retrieve => $args ) || die( $stripe->error );

Provided with a L<payment intent|Net::API::Stripe::Payment::Intent> object or a hash reference, this will retrieve a Stripe payment intent and return its corresponding L<object|Net::API::Stripe::Payment::Intent>

Possible parameters are:

=over 4

=item C<client_secret>

B<Required>. The client secret of the PaymentIntent. Required if a publishable key is used to retrieve the source.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/payment_intents/retrieve>

=head2 search

    my $obj = $stripe->payment_intents( search => {
        query => "status:'succeeded' AND metadata['order_id']:'6735'", } ) || die( $stripe->error );

Provided with a L<payment intent|Net::API::Stripe::Payment::Intent>, or a hash reference, this will issue a search api call.

A dictionary with a C<data> property that contains an array of up to C<limit> PaymentIntents. If no objects match the query, the resulting array will be empty. See the related guide on L<expanding properties in lists|https://stripe.com/docs/expand#lists>.

Possible parameters are:

=over 4

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<page>

A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

=item C<query>

B<Required>. The search query string. See L<search query language|https://stripe.com/docs/search#search-query-language> and the list of supported L<query fields for payment intents|https://stripe.com/docs/search#query-fields-for-payment-intents>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/payment_intents/search>

=head2 update

    my $obj = $stripe->payment_intents( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<payment intent|Net::API::Stripe::Payment::Intent> object or a hash reference, this will update a Stripe payment intent and return its corresponding L<object|Net::API::Stripe::Payment::Intent>

Possible parameters are:

=over 4

=item C<amount>

Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the L<smallest currency unit|https://stripe.com/docs/currencies#zero-decimal> (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or L<equivalent in charge currency|https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts>. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).

=item C<application_fee_amount>

The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents L<use case for connected accounts|https://stripe.com/docs/payments/connected-accounts>.

=item C<capture_method>

Controls when the funds will be captured from the customer's account.


=item C<currency>

Three-letter L<ISO currency code|https://www.iso.org/iso-4217-currency-codes.html>, in lowercase. Must be a L<supported currency|https://stripe.com/docs/currencies>.

=item C<customer>

ID of the Customer this PaymentIntent belongs to, if one exists.

Payment methods attached to other Customers cannot be used with this PaymentIntent.

If present in combination with L<setupI<future>usage|https://stripe.com/docs/api/payment_intents/object#payment_intent_object-setup_future_usage>, this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete.

=item C<description>

An arbitrary string attached to the object. Often useful for displaying to users.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<payment_method>

ID of the payment method (a PaymentMethod, Card, or L<compatible Source|https://stripe.com/docs/payments/payment-methods/transitioning#compatibility> object) to attach to this PaymentIntent.

=item C<payment_method_data>

If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear in the L<payment_method|https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method> property on the PaymentIntent.

=item C<payment_method_options>

Payment-method-specific configuration for this PaymentIntent.

=item C<payment_method_types>

The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. Use automaticI<payment>methods to manage payment methods from the L<Stripe Dashboard|https://dashboard.stripe.com/settings/payment_methods>.

=item C<receipt_email>

Email address that the receipt for the resulting payment will be sent to. If C<receipt_email> is specified for a payment in live mode, a receipt will be sent regardless of your L<email settings|https://dashboard.stripe.com/account/emails>.

=item C<setup_future_usage>

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will L<attach the payment method|https://stripe.com/docs/payments/save-during-payment> to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be L<attached|https://stripe.com/docs/api/payment_methods/attach> to a Customer after the transaction completes.

When processing card payments, Stripe also uses C<setup_future_usage> to dynamically optimize your payment flow and comply with regional legislation and network rules, such as L<SCA|https://stripe.com/docs/strong-customer-authentication>.

If C<setup_future_usage> is already set and you are performing a request using a publishable key, you may only update the value from C<on_session> to C<off_session>.

=item C<shipping>

Shipping information for this PaymentIntent.

=item C<statement_descriptor>

For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters.

=item C<statement_descriptor_suffix>

Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.

=item C<transfer_data>

The parameters used to automatically create a Transfer when the payment succeeds. For more information, see the PaymentIntents L<use case for connected accounts|https://stripe.com/docs/payments/connected-accounts>.

=item C<transfer_group>

A string that identifies the resulting payment as part of a group. C<transfer_group> may only be provided if it has not been set. See the PaymentIntents L<use case for connected accounts|https://stripe.com/docs/payments/connected-accounts> for details.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/payment_intents/update>

=head2 verify_microdeposits

    my $obj = $stripe->payment_intents( verify_microdeposits => $args ) || die( $stripe->error );

Provided with a L<payment intent|Net::API::Stripe::Payment::Intent>, or a hash reference, this will issue a verify_microdeposits api call.

Returns a PaymentIntent object.

Possible parameters are:

=over 4

=item C<amounts>

Two positive integers, in I<cents>, equal to the values of the microdeposits sent to the bank account.

=item C<client_secret>

B<Required>. The client secret of the PaymentIntent.

=item C<descriptor_code>

A six-character code starting with SM present in the microdeposit sent to the bank account.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/payment_intents/verify_microdeposits>

=head1 PAYMENT LINK

You can create, items, line_items, list, retrieve or update payment link

=head2 create

    my $obj = $stripe->payment_links( create => {
        line_items => [,
            price    => "price_1Le1oa2eZvKYlo2CuD7mwpZu",
            quantity => "1",
        ], } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Payment::Link> object or a hash reference, this will create a Stripe payment link and return an L<Net::API::Stripe::Payment::Link> object.

Possible parameters are:

=over 4

=item C<after_completion>

Behavior after the purchase is complete.

=item C<allow_promotion_codes>

Enables user redeemable promotion codes.

=item C<application_fee_amount>

The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Can only be applied when there are no line items with recurring prices.

=item C<application_fee_percent>

A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field.

=item C<automatic_tax>

Configuration for automatic tax collection.

=item C<billing_address_collection>

Configuration for collecting the customer's billing address.

=item C<consent_collection>

Configure fields to gather active consent from customers.

=item C<currency>

Three-letter L<ISO currency code|https://www.iso.org/iso-4217-currency-codes.html>, in lowercase. Must be a L<supported currency|https://stripe.com/docs/currencies> and supported by each line item's price.

=item C<customer_creation>

Configures whether L<checkout sessions|https://stripe.com/docs/api/checkout/sessions> created by this payment link create a L<Customer|https://stripe.com/docs/api/customers>.

=item C<line_items>

B<Required>. The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>. Metadata associated with this Payment Link will automatically be copied to L<checkout sessions|https://stripe.com/docs/api/checkout/sessions> created by this payment link.

=item C<on_behalf_of>

The account on behalf of which to charge.

=item C<payment_intent_data>

A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in C<payment> mode.

=item C<payment_method_collection>

Specify whether Checkout should collect a payment method. When set to C<if_required>, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount.

Can only be set in C<subscription> mode.

If you'd like information on how to collect a payment method outside of Checkout, read the guide on L<configuring subscriptions with a free trial|https://stripe.com/docs/payments/checkout/free-trials>.

=item C<payment_method_types>

The list of payment method types that customers can use. If no value is passed, Stripe will dynamically show relevant payment methods from your L<payment method settings|https://dashboard.stripe.com/settings/payment_methods> (20+ payment methods L<supported|https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support>).

=item C<phone_number_collection>

Controls phone number collection settings during checkout.

We recommend that you review your privacy policy and check with your legal contacts.


=item C<shipping_address_collection>

Configuration for collecting the customer's shipping address.

=item C<shipping_options>

The shipping rate options to apply to L<checkout sessions|https://stripe.com/docs/api/checkout/sessions> created by this payment link.

=item C<submit_type>

Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the L<url|https://stripe.com/docs/api/payment_links/payment_links/object#url> property (example: C<donate.stripe.com>).

=item C<subscription_data>

When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use C<subscription_data>.

=item C<tax_id_collection>

Controls tax ID collection during checkout.

=item C<transfer_data>

The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/payment_links/payment_links/create>

=head2 line_items

    my $obj = $stripe->payment_links( line_items => $args ) || die( $stripe->error );

Provided with a L<payment link|Net::API::Stripe::Payment::Link>, or a hash reference, this will issue a line_items api call.

A dictionary with a C<data> property that contains an array of up to C<limit> payment link line items, starting after Line Item C<starting_after>. Each entry in the array is a separate Line Item object. If no more line items are available, the resulting array will be empty. 

Possible parameters are:

=over 4

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/payment_links/line_items>

=head2 list

    my $obj = $stripe->payment_links( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<payment link|Net::API::Stripe::Payment::Link> object, this issue an api call to get the list of all payment link.

Possible parameters are:

=over 4

=item C<active>

Only return payment links that are active or inactive (e.g., pass C<false> to list all inactive payment links).

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/payment_links/payment_links/list>

=head2 retrieve

    my $obj = $stripe->payment_links( retrieve => $args ) || die( $stripe->error );

Provided with a L<payment link|Net::API::Stripe::Payment::Link> object or a hash reference, this will retrieve a Stripe payment link and return its corresponding L<object|Net::API::Stripe::Payment::Link>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/payment_links/payment_links/retrieve>

=head2 update

    my $obj = $stripe->payment_links( update => {
        active => "0", } ) || die( $stripe->error );

Provided with a L<payment link|Net::API::Stripe::Payment::Link> object or a hash reference, this will update a Stripe payment link and return its corresponding L<object|Net::API::Stripe::Payment::Link>

Possible parameters are:

=over 4

=item C<active>

Whether the payment link's C<url> is active. If C<false>, customers visiting the URL will be shown a page saying that the link has been deactivated.

=item C<after_completion>

Behavior after the purchase is complete.

=item C<allow_promotion_codes>

Enables user redeemable promotion codes.

=item C<automatic_tax>

Configuration for automatic tax collection.

=item C<billing_address_collection>

Configuration for collecting the customer's billing address.

=item C<customer_creation>

Configures whether L<checkout sessions|https://stripe.com/docs/api/checkout/sessions> created by this payment link create a L<Customer|https://stripe.com/docs/api/customers>.

=item C<line_items>

The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>. Metadata associated with this Payment Link will automatically be copied to L<checkout sessions|https://stripe.com/docs/api/checkout/sessions> created by this payment link.

=item C<payment_method_collection>

Specify whether Checkout should collect a payment method. When set to C<if_required>, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount.

Can only be set in C<subscription> mode.

If you'd like information on how to collect a payment method outside of Checkout, read the guide on L<configuring subscriptions with a free trial|https://stripe.com/docs/payments/checkout/free-trials>.

=item C<payment_method_types>

The list of payment method types that customers can use. Pass an empty string to enable automatic payment methods that use your L<payment method settings|https://dashboard.stripe.com/settings/payment_methods>.

=item C<shipping_address_collection>

Configuration for collecting the customer's shipping address.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/payment_links/payment_links/update>

=head1 PAYMENT METHOD

You can attach, create, detach, list, list_customer_payment_methods, retrieve, retrieve_customer_payment_method or update payment method

=head2 attach

    my $obj = $stripe->payment_methods( attach => {
        customer => "cus_AJ78ZaALpqgiuZ", } ) || die( $stripe->error );

Provided with a L<payment method|Net::API::Stripe::Payment::Method>, or a hash reference, this will issue a attach api call.

Returns a PaymentMethod object.

Possible parameters are:

=over 4

=item C<customer>

B<Required>. The ID of the customer to which to attach the PaymentMethod.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/payment_methods/attach>

=head2 create

    my $obj = $stripe->payment_methods( create => {
        card =>
        {
            cvc       => "314",
            exp_month => "9",
            exp_year  => "2023",
            number    => "4242424242424242",
        }
        type => "card", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Payment::Method> object or a hash reference, this will create a Stripe payment method and return an L<Net::API::Stripe::Payment::Method> object.

Possible parameters are:

=over 4

=item C<acss_debit>

If this is an C<acss_debit> PaymentMethod, this hash contains details about the ACSS Debit payment method.

=item C<affirm>

If this is an C<affirm> PaymentMethod, this hash contains details about the Affirm payment method.

=item C<afterpay_clearpay>

If this is an C<AfterpayClearpay> PaymentMethod, this hash contains details about the AfterpayClearpay payment method.

=item C<alipay>

If this is an C<Alipay> PaymentMethod, this hash contains details about the Alipay payment method.

=item C<au_becs_debit>

If this is an C<au_becs_debit> PaymentMethod, this hash contains details about the bank account.

=item C<bacs_debit>

If this is a C<bacs_debit> PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.

=item C<bancontact>

If this is a C<bancontact> PaymentMethod, this hash contains details about the Bancontact payment method.

=item C<billing_details>

Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.

=item C<blik>

If this is a C<blik> PaymentMethod, this hash contains details about the BLIK payment method.

=item C<boleto>

If this is a C<boleto> PaymentMethod, this hash contains details about the Boleto payment method.

=item C<card>

If this is a C<card> PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format C<card: {token: "tok_visa"}>. When providing a card number, you must meet the requirements for L<PCI compliance|https://stripe.com/docs/security#validating-pci-compliance>. We strongly recommend using Stripe.js instead of interacting with this API directly.

=item C<customer_balance>

If this is a C<customer_balance> PaymentMethod, this hash contains details about the CustomerBalance payment method.

=item C<eps>

If this is an C<eps> PaymentMethod, this hash contains details about the EPS payment method.

=item C<fpx>

If this is an C<fpx> PaymentMethod, this hash contains details about the FPX payment method.

=item C<giropay>

If this is a C<giropay> PaymentMethod, this hash contains details about the Giropay payment method.

=item C<grabpay>

If this is a C<grabpay> PaymentMethod, this hash contains details about the GrabPay payment method.

=item C<ideal>

If this is an C<ideal> PaymentMethod, this hash contains details about the iDEAL payment method.

=item C<interac_present>

If this is an C<interac_present> PaymentMethod, this hash contains details about the Interac Present payment method.

=item C<klarna>

If this is a C<klarna> PaymentMethod, this hash contains details about the Klarna payment method.

=item C<konbini>

If this is a C<konbini> PaymentMethod, this hash contains details about the Konbini payment method.

=item C<link>

If this is an C<Link> PaymentMethod, this hash contains details about the Link payment method.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<oxxo>

If this is an C<oxxo> PaymentMethod, this hash contains details about the OXXO payment method.

=item C<p24>

If this is a C<p24> PaymentMethod, this hash contains details about the P24 payment method.

=item C<paynow>

If this is a C<paynow> PaymentMethod, this hash contains details about the PayNow payment method.

=item C<promptpay>

If this is a C<promptpay> PaymentMethod, this hash contains details about the PromptPay payment method.

=item C<radar_options>

Options to configure Radar. See L<Radar Session|https://stripe.com/docs/radar/radar-session> for more information.

=item C<sepa_debit>

If this is a C<sepa_debit> PaymentMethod, this hash contains details about the SEPA debit bank account.

=item C<sofort>

If this is a C<sofort> PaymentMethod, this hash contains details about the SOFORT payment method.

=item C<type>

B<Required>. The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. Required unless C<payment_method> is specified (see the L<Cloning PaymentMethods|https://stripe.com/docs/payments/payment-methods/connect#cloning-payment-methods> guide).

=item C<us_bank_account>

If this is an C<us_bank_account> PaymentMethod, this hash contains details about the US bank account payment method.

=item C<wechat_pay>

If this is an C<wechat_pay> PaymentMethod, this hash contains details about the wechat_pay payment method.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/payment_methods/create>

=head2 detach

    my $obj = $stripe->payment_methods( detach => $args ) || die( $stripe->error );

Provided with a L<payment method|Net::API::Stripe::Payment::Method>, or a hash reference, this will issue a detach api call.

Returns a PaymentMethod object.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/payment_methods/detach>

=head2 list

    my $obj = $stripe->payment_methods( list => {
        customer => "cus_AJ78ZaALpqgiuZ",
        type     => "card", } ) || die( $stripe->error );

Provided with a L<payment method|Net::API::Stripe::Payment::Method> object, this issue an api call to get the list of all payment method.

Possible parameters are:

=over 4

=item C<customer>

The ID of the customer whose PaymentMethods will be retrieved.

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<type>

B<Required>. A required filter on the list, based on the object C<type> field.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/payment_methods/list>

=head2 list_customer_payment_methods

    my $obj = $stripe->payment_methods( list_customer_payment_methods => {
        type => "card", } ) || die( $stripe->error );

Provided with a L<payment method|Net::API::Stripe::Payment::Method>, or a hash reference, this will issue a list_customer_payment_methods api call.

A dictionary with a C<data> property that contains an array of up to C<limit> PaymentMethods of type C<type>, starting after PaymentMethods C<starting_after>. Each entry in the array is a separate PaymentMethod object. If no more PaymentMethods are available, the resulting array will be empty. This request should never return an error.

Possible parameters are:

=over 4

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<type>

B<Required>. A required filter on the list, based on the object C<type> field.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/payment_methods/customer_list>

=head2 retrieve

    my $obj = $stripe->payment_methods( retrieve => $args ) || die( $stripe->error );

Provided with a L<payment method|Net::API::Stripe::Payment::Method> object or a hash reference, this will retrieve a Stripe payment method and return its corresponding L<object|Net::API::Stripe::Payment::Method>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/payment_methods/retrieve>

=head2 retrieve_customer_payment_method

    my $obj = $stripe->payment_methods( retrieve_customer_payment_method => {
        type => "card", } ) || die( $stripe->error );

Provided with a L<payment method|Net::API::Stripe::Payment::Method>, or a hash reference, this will issue a retrieve_customer_payment_method api call.

Returns a PaymentMethod object.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/payment_methods/customer>

=head2 update

    my $obj = $stripe->payment_methods( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<payment method|Net::API::Stripe::Payment::Method> object or a hash reference, this will update a Stripe payment method and return its corresponding L<object|Net::API::Stripe::Payment::Method>

Possible parameters are:

=over 4

=item C<billing_details>

Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.

=item C<card>

If this is a C<card> PaymentMethod, this hash contains the user's card details.

=item C<link>

If this is an C<Link> PaymentMethod, this hash contains details about the Link payment method.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<us_bank_account>

If this is an C<us_bank_account> PaymentMethod, this hash contains details about the US bank account payment method.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/payment_methods/update>

=head1 PAYOUT

You can cancel, create, list, retrieve, reverse or update payout

=head2 cancel

    my $obj = $stripe->payouts( cancel => $args ) || die( $stripe->error );

Provided with a L<payout|Net::API::Stripe::Payout>, or a hash reference, this will issue a cancel api call.

Returns the payout object if the cancellation succeeded. Returns an error if the payout has already been canceled or cannot be canceled.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/payouts/cancel>

=head2 create

    my $obj = $stripe->payouts( create => {
        amount   => "1100",
        currency => "usd", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Payout> object or a hash reference, this will create a Stripe payout and return an L<Net::API::Stripe::Payout> object.

Possible parameters are:

=over 4

=item C<amount>

B<Required>. A positive integer in cents representing how much to payout.

=item C<currency>

B<Required>. Three-letter L<ISO currency code|https://www.iso.org/iso-4217-currency-codes.html>, in lowercase. Must be a L<supported currency|https://stripe.com/docs/currencies>.

=item C<description>

An arbitrary string attached to the object. Often useful for displaying to users.

=item C<destination>

The ID of a bank account or a card to send the payout to. If no destination is supplied, the default external account for the specified currency will be used.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<method>

The method used to send this payout, which can be C<standard> or C<instant>. C<instant> is only supported for payouts to debit cards. (See L<Instant payouts for marketplaces for more information|https://stripe.com/blog/instant-payouts-for-marketplaces).>

=item C<source_type>

The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the balances API. One of C<bank_account>, C<card>, or C<fpx>.

=item C<statement_descriptor>

A string to be displayed on the recipient's bank or card statement. This may be at most 22 characters. Attempting to use a C<statement_descriptor> longer than 22 characters will return an error. Note: Most banks will truncate this information and/or display it inconsistently. Some may not display it at all.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/payouts/create>

=head2 list

    my $obj = $stripe->payouts( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<payout|Net::API::Stripe::Payout> object, this issue an api call to get the list of all payout.

Possible parameters are:

=over 4

=item C<arrival_date>

A filter on the list based on the object C<arrival_date> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<destination>

The ID of an external account - only return payouts sent to this external account.

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<status>

Only return payouts that have the given status: C<pending>, C<paid>, C<failed>, or C<canceled>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/payouts/list>

=head2 retrieve

    my $obj = $stripe->payouts( retrieve => $args ) || die( $stripe->error );

Provided with a L<payout|Net::API::Stripe::Payout> object or a hash reference, this will retrieve a Stripe payout and return its corresponding L<object|Net::API::Stripe::Payout>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/payouts/retrieve>

=head2 reverse

    my $obj = $stripe->payouts( reverse => $args ) || die( $stripe->error );

Provided with a L<payout|Net::API::Stripe::Payout>, or a hash reference, this will issue a reverse api call.

Returns the reversing payout object if the reversal was successful. Returns an error if the payout has already been reversed or cannot be reversed.

Possible parameters are:

=over 4

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/payouts/reverse>

=head2 update

    my $obj = $stripe->payouts( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<payout|Net::API::Stripe::Payout> object or a hash reference, this will update a Stripe payout and return its corresponding L<object|Net::API::Stripe::Payout>

Possible parameters are:

=over 4

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/payouts/update>

=head1 PERSON

You can create, delete, list, retrieve or update person

=head2 create

    my $obj = $stripe->persons( create => {
        first_name => "Jane",
        last_name  => "Diaz", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Connect::Person> object or a hash reference, this will create a Stripe person and return an L<Net::API::Stripe::Connect::Person> object.

Possible parameters are:

=over 4

=item C<address>

The person's address.

=item C<address_kana>

The Kana variation of the person's address (Japan only).

=item C<address_kanji>

The Kanji variation of the person's address (Japan only).

=item C<dob>

The person's date of birth.

=item C<documents>

Documents that may be submitted to satisfy various informational requests.

=item C<email>

The person's email address.

=item C<first_name>

The person's first name.

=item C<first_name_kana>

The Kana variation of the person's first name (Japan only).

=item C<first_name_kanji>

The Kanji variation of the person's first name (Japan only).

=item C<full_name_aliases>

A list of alternate names or aliases that the person is known by.

=item C<gender>

The person's gender (International regulations require either "male" or "female").

=item C<id_number>

The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a L<PII token provided by Stripe.js|https://stripe.com/docs/js/tokens_sources/create_token?type=pii>.

=item C<id_number_secondary>

The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a L<PII token provided by Stripe.js|https://stripe.com/docs/js/tokens_sources/create_token?type=pii>.

=item C<last_name>

The person's last name.

=item C<last_name_kana>

The Kana variation of the person's last name (Japan only).

=item C<last_name_kanji>

The Kanji variation of the person's last name (Japan only).

=item C<maiden_name>

The person's maiden name.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<nationality>

The country where the person is a national. Two-letter country code (L<ISO 3166-1 alpha-2|https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)>, or "XX" if unavailable.

=item C<person_token>

A L<person token|https://stripe.com/docs/connect/account-tokens>, used to securely provide details to the person.

=item C<phone>

The person's phone number.

=item C<political_exposure>

Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.

=item C<registered_address>

The person's registered address.

=item C<relationship>

The relationship that this person has with the account's legal entity.

=item C<ssn_last_4>

The last four digits of the person's Social Security number (U.S. only).

=item C<verification>

The person's verification status.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/persons/create>

=head2 delete

    my $obj = $stripe->persons( delete => $args ) || die( $stripe->error );

Provided with a L<person|Net::API::Stripe::Connect::Person>, or a hash reference, this will issue an api call to Stripe to remove the person. It returns the person object that was deleted with its property C<deleted> set to true.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/persons/delete>

=head2 list

    my $obj = $stripe->persons( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<person|Net::API::Stripe::Connect::Person> object, this issue an api call to get the list of all person.

Possible parameters are:

=over 4

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<relationship>

Filters on the list of people returned based on the person's relationship to the account's company.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/persons/list>

=head2 retrieve

    my $obj = $stripe->persons( retrieve => $args ) || die( $stripe->error );

Provided with a L<person|Net::API::Stripe::Connect::Person> object or a hash reference, this will retrieve a Stripe person and return its corresponding L<object|Net::API::Stripe::Connect::Person>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/persons/retrieve>

=head2 update

    my $obj = $stripe->persons( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<person|Net::API::Stripe::Connect::Person> object or a hash reference, this will update a Stripe person and return its corresponding L<object|Net::API::Stripe::Connect::Person>

Possible parameters are:

=over 4

=item C<address>

The person's address.

=item C<address_kana>

The Kana variation of the person's address (Japan only).

=item C<address_kanji>

The Kanji variation of the person's address (Japan only).

=item C<dob>

The person's date of birth.

=item C<documents>

Documents that may be submitted to satisfy various informational requests.

=item C<email>

The person's email address.

=item C<first_name>

The person's first name.

=item C<first_name_kana>

The Kana variation of the person's first name (Japan only).

=item C<first_name_kanji>

The Kanji variation of the person's first name (Japan only).

=item C<full_name_aliases>

A list of alternate names or aliases that the person is known by.

=item C<gender>

The person's gender (International regulations require either "male" or "female").

=item C<id_number>

The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a L<PII token provided by Stripe.js|https://stripe.com/docs/js/tokens_sources/create_token?type=pii>.

=item C<id_number_secondary>

The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a L<PII token provided by Stripe.js|https://stripe.com/docs/js/tokens_sources/create_token?type=pii>.

=item C<last_name>

The person's last name.

=item C<last_name_kana>

The Kana variation of the person's last name (Japan only).

=item C<last_name_kanji>

The Kanji variation of the person's last name (Japan only).

=item C<maiden_name>

The person's maiden name.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<nationality>

The country where the person is a national. Two-letter country code (L<ISO 3166-1 alpha-2|https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)>, or "XX" if unavailable.

=item C<person_token>

A L<person token|https://stripe.com/docs/connect/account-tokens>, used to securely provide details to the person.

=item C<phone>

The person's phone number.

=item C<political_exposure>

Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.

=item C<registered_address>

The person's registered address.

=item C<relationship>

The relationship that this person has with the account's legal entity.

=item C<ssn_last_4>

The last four digits of the person's Social Security number (U.S. only).

=item C<verification>

The person's verification status.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/persons/update>

=head1 PLAN

You can create, delete, list, retrieve or update plan

=head2 create

    my $obj = $stripe->plans( create => {
        amount   => "1200",
        currency => "usd",
        interval => "month",
        product  => "prod_MMlLy1NOplKgdo", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Billing::Plan> object or a hash reference, this will create a Stripe plan and return an L<Net::API::Stripe::Billing::Plan> object.

Possible parameters are:

=over 4

=item C<active>

Whether the plan is currently available for new subscriptions. Defaults to C<true>.

=item C<aggregate_usage>

Specifies a usage aggregation strategy for plans of C<usage_type=metered>. Allowed values are C<sum> for summing up all usage during a period, C<last_during_period> for using the last usage record reported within a period, C<last_ever> for using the last usage record ever (across period bounds) or C<max> which uses the usage record with the maximum reported usage during a period. Defaults to C<sum>.

=item C<amount>

B<Required unless billing_scheme=tiered> A positive integer in JPY (or 0 for a free plan) representing how much to charge on a recurring basis.

=item C<amount_decimal>

Same as C<amount>, but accepts a decimal value with at most 12 decimal places. Only one of C<amount> and C<amount_decimal> can be set.

=item C<billing_scheme>

Describes how to compute the price per period. Either C<per_unit> or C<tiered>. C<per_unit> indicates that the fixed amount (specified in C<amount>) will be charged per unit in C<quantity> (for plans with C<usage_type=licensed>), or per unit of total usage (for plans with C<usage_type=metered>). C<tiered> indicates that the unit pricing will be computed using a tiering strategy as defined using the C<tiers> and C<tiers_mode> attributes.

=item C<currency>

B<Required>. Three-letter L<ISO currency code|https://www.iso.org/iso-4217-currency-codes.html>, in lowercase. Must be a L<supported currency|https://stripe.com/docs/currencies>.

=item C<id>

An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes.

=item C<interval>

B<Required>. Specifies billing frequency. Either C<day>, C<week>, C<month> or C<year>.

=item C<interval_count>

The number of intervals between subscription billings. For example, C<interval=month> and C<interval_count=3> bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<nickname>

A brief description of the plan, hidden from customers.

=item C<product>

B<Required>. The product whose pricing the created plan will represent. This can either be the ID of an existing product, or a dictionary containing fields used to create a L<service product|https://stripe.com/docs/api#product_object-type>.

=item C<tiers>

B<Required if billing_scheme=tiered> Each element represents a pricing tier. This parameter requires C<billing_scheme> to be set to C<tiered>. See also the documentation for C<billing_scheme>. 

=item C<tiers_mode>

B<Required if billing_scheme=tiered> Defines if the tiering price should be C<graduated> or C<volume> based. In C<volume>-based tiering, the maximum quantity within a period determines the per unit price, in C<graduated> tiering pricing can successively change as the quantity grows.

=item C<transform_usage>

Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with C<tiers>.

=item C<trial_period_days>

Default number of trial days when subscribing a customer to this plan using L<C<trial_from_plan=true>|https://stripe.com/docs/api#create_subscription-trial_from_plan>.

=item C<usage_type>

Configures how the quantity per period should be determined. Can be either C<metered> or C<licensed>. C<licensed> automatically bills the C<quantity> set when adding it to a subscription. C<metered> aggregates the total usage based on usage records. Defaults to C<licensed>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/plans/create>

=head2 delete

    my $obj = $stripe->plans( delete => $args ) || die( $stripe->error );

Provided with a L<plan|Net::API::Stripe::Billing::Plan>, or a hash reference, this will issue an api call to Stripe to remove the plan. It returns the plan object that was deleted with its property C<deleted> set to true.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/plans/delete>

=head2 list

    my $obj = $stripe->plans( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<plan|Net::API::Stripe::Billing::Plan> object, this issue an api call to get the list of all plan.

Possible parameters are:

=over 4

=item C<active>

Only return plans that are active or inactive (e.g., pass C<false> to list all inactive plans).

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<product>

Only return plans for the given product.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/plans/list>

=head2 retrieve

    my $obj = $stripe->plans( retrieve => $args ) || die( $stripe->error );

Provided with a L<plan|Net::API::Stripe::Billing::Plan> object or a hash reference, this will retrieve a Stripe plan and return its corresponding L<object|Net::API::Stripe::Billing::Plan>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/plans/retrieve>

=head2 update

    my $obj = $stripe->plans( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<plan|Net::API::Stripe::Billing::Plan> object or a hash reference, this will update a Stripe plan and return its corresponding L<object|Net::API::Stripe::Billing::Plan>

Possible parameters are:

=over 4

=item C<active>

Whether the plan is currently available for new subscriptions.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<nickname>

A brief description of the plan, hidden from customers.

=item C<product>

The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule.

=item C<trial_period_days>

Default number of trial days when subscribing a customer to this plan using L<C<trial_from_plan=true>|https://stripe.com/docs/api#create_subscription-trial_from_plan>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/plans/update>

=head1 PRICE

You can create, list, retrieve, search or update price

=head2 create

    my $obj = $stripe->prices( create => {
        currency    => "usd",
        product     => "prod_MMlLy1NOplKgdo",
        recurring   =>
        {
            interval => "month",
        }
        unit_amount => "1200", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Price> object or a hash reference, this will create a Stripe price and return an L<Net::API::Stripe::Price> object.

Possible parameters are:

=over 4

=item C<active>

Whether the price can be used for new purchases. Defaults to C<true>.

=item C<billing_scheme>

Describes how to compute the price per period. Either C<per_unit> or C<tiered>. C<per_unit> indicates that the fixed amount (specified in C<unit_amount> or C<unit_amount_decimal>) will be charged per unit in C<quantity> (for prices with C<usage_type=licensed>), or per unit of total usage (for prices with C<usage_type=metered>). C<tiered> indicates that the unit pricing will be computed using a tiering strategy as defined using the C<tiers> and C<tiers_mode> attributes.

=item C<currency>

B<Required>. Three-letter L<ISO currency code|https://www.iso.org/iso-4217-currency-codes.html>, in lowercase. Must be a L<supported currency|https://stripe.com/docs/currencies>.

=item C<currency_options>

Prices defined in each available currency option. Each key must be a three-letter L<ISO currency code|https://www.iso.org/iso-4217-currency-codes.html> and a L<supported currency|https://stripe.com/docs/currencies>. For example, to define your price in C<eur>, pass the fields below in the C<eur> key of C<currency_options>.

=item C<custom_unit_amount>

B<Required unless unit_amount is provided> When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.

=item C<lookup_key>

A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<nickname>

A brief description of the price, hidden from customers.

=item C<product>

B<required unless product_data is provided> The ID of the product that this price will belong to.

=item C<product_data>

B<required unless product is provided> These fields can be used to create a new product that this price will belong to.

=item C<recurring>

The recurring components of a price such as C<interval> and C<usage_type>.

=item C<tax_behavior>

Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of C<inclusive>, C<exclusive>, or C<unspecified>. Once specified as either C<inclusive> or C<exclusive>, it cannot be changed.

=item C<tiers>

B<Required if billing_scheme=tiered> Each element represents a pricing tier. This parameter requires C<billing_scheme> to be set to C<tiered>. See also the documentation for C<billing_scheme>. 

=item C<tiers_mode>

B<Required if billing_scheme=tiered> Defines if the tiering price should be C<graduated> or C<volume> based. In C<volume>-based tiering, the maximum quantity within a period determines the per unit price, in C<graduated> tiering pricing can successively change as the quantity grows.

=item C<transfer_lookup_key>

If set to true, will atomically remove the lookup key from the existing price, and assign it to this price.

=item C<transform_quantity>

Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with C<tiers>.

=item C<unit_amount>

B<Required conditionally> A positive integer in JPY (or 0 for a free price) representing how much to charge. One of C<unit_amount> or C<custom_unit_amount> is required, unless C<billing_scheme=tiered>.

=item C<unit_amount_decimal>

Same as C<unit_amount>, but accepts a decimal value in JPY with at most 12 decimal places. Only one of C<unit_amount> and C<unit_amount_decimal> can be set.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/prices/create>

=head2 list

    my $obj = $stripe->prices( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<price|Net::API::Stripe::Price> object, this issue an api call to get the list of all price.

Possible parameters are:

=over 4

=item C<active>

Only return prices that are active or inactive (e.g., pass C<false> to list all inactive prices).

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<currency>

Only return prices for the given currency.

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<lookup_keys>

Only return the price with these lookup_keys, if any exist.

=item C<product>

Only return prices for the given product.

=item C<recurring>

Only return prices with these recurring fields.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<type>

Only return prices of type C<recurring> or C<one_time>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/prices/list>

=head2 retrieve

    my $obj = $stripe->prices( retrieve => $args ) || die( $stripe->error );

Provided with a L<price|Net::API::Stripe::Price> object or a hash reference, this will retrieve a Stripe price and return its corresponding L<object|Net::API::Stripe::Price>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/prices/retrieve>

=head2 search

    my $obj = $stripe->prices( search => {
        query => "active:'true' AND metadata['order_id']:'6735'", } ) || die( $stripe->error );

Provided with a L<price|Net::API::Stripe::Price>, or a hash reference, this will issue a search api call.

A dictionary with a C<data> property that contains an array of up to C<limit> prices. If no objects match the query, the resulting array will be empty. See the related guide on L<expanding properties in lists|https://stripe.com/docs/expand#lists>.

Possible parameters are:

=over 4

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<page>

A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

=item C<query>

B<Required>. The search query string. See L<search query language|https://stripe.com/docs/search#search-query-language> and the list of supported L<query fields for prices|https://stripe.com/docs/search#query-fields-for-prices>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/prices/search>

=head2 update

    my $obj = $stripe->prices( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<price|Net::API::Stripe::Price> object or a hash reference, this will update a Stripe price and return its corresponding L<object|Net::API::Stripe::Price>

Possible parameters are:

=over 4

=item C<active>

Whether the price can be used for new purchases. Defaults to C<true>.

=item C<currency_options>

Prices defined in each available currency option. Each key must be a three-letter L<ISO currency code|https://www.iso.org/iso-4217-currency-codes.html> and a L<supported currency|https://stripe.com/docs/currencies>. For example, to define your price in C<eur>, pass the fields below in the C<eur> key of C<currency_options>.

=item C<lookup_key>

A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<nickname>

A brief description of the price, hidden from customers.

=item C<tax_behavior>

Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of C<inclusive>, C<exclusive>, or C<unspecified>. Once specified as either C<inclusive> or C<exclusive>, it cannot be changed.

=item C<transfer_lookup_key>

If set to true, will atomically remove the lookup key from the existing price, and assign it to this price.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/prices/update>

=head1 PRODUCT

You can create, delete, list, retrieve, search or update product

=head2 create

    my $obj = $stripe->products( create => {
        name => "Gold Special", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Product> object or a hash reference, this will create a Stripe product and return an L<Net::API::Stripe::Product> object.

Possible parameters are:

=over 4

=item C<active>

Whether the product is currently available for purchase. Defaults to C<true>.

=item C<default_price_data>

Data used to generate a new L<Price|https://stripe.com/docs/api/prices> object. This Price will be set as the default price for this product.

=item C<description>

The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.

=item C<id>

An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account.

=item C<images>

A list of up to 8 URLs of images for this product, meant to be displayable to the customer.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<name>

B<Required>. The product's name, meant to be displayable to the customer.

=item C<package_dimensions>

The dimensions of this product for shipping purposes.

=item C<shippable>

Whether this product is shipped (i.e., physical goods).

=item C<statement_descriptor>

An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.

This may be up to 22 characters. The statement description may not include C<&lt;>, C<&gt;>, C<\>, C<">, C<'> characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.  It must contain at least one letter.

=item C<tax_code>

A L<tax code|https://stripe.com/docs/tax/tax-categories> ID.

=item C<unit_label>

A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions.

=item C<url>

A URL of a publicly-accessible webpage for this product.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/products/create>

=head2 delete

    my $obj = $stripe->products( delete => $args ) || die( $stripe->error );

Provided with a L<product|Net::API::Stripe::Product>, or a hash reference, this will issue an api call to Stripe to remove the product. It returns the product object that was deleted with its property C<deleted> set to true.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/products/delete>

=head2 list

    my $obj = $stripe->products( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<product|Net::API::Stripe::Product> object, this issue an api call to get the list of all product.

Possible parameters are:

=over 4

=item C<active>

Only return products that are active or inactive (e.g., pass C<false> to list all inactive products).

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<ids>

Only return products with the given IDs. Cannot be used with L<starting_after|https://stripe.com/docs/api/products/list#list_products-starting_after> or L<ending_before|https://stripe.com/docs/api/products/list#list_products-ending_before>.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<shippable>

Only return products that can be shipped (i.e., physical, not digital products).

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<url>

Only return products with the given url.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/products/list>

=head2 retrieve

    my $obj = $stripe->products( retrieve => $args ) || die( $stripe->error );

Provided with a L<product|Net::API::Stripe::Product> object or a hash reference, this will retrieve a Stripe product and return its corresponding L<object|Net::API::Stripe::Product>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/products/retrieve>

=head2 search

    my $obj = $stripe->products( search => {
        query => "active:'true' AND metadata['order_id']:'6735'", } ) || die( $stripe->error );

Provided with a L<product|Net::API::Stripe::Product>, or a hash reference, this will issue a search api call.

A dictionary with a C<data> property that contains an array of up to C<limit> products. If no objects match the query, the resulting array will be empty. See the related guide on L<expanding properties in lists|https://stripe.com/docs/expand#lists>.

Possible parameters are:

=over 4

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<page>

A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

=item C<query>

B<Required>. The search query string. See L<search query language|https://stripe.com/docs/search#search-query-language> and the list of supported L<query fields for products|https://stripe.com/docs/search#query-fields-for-products>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/products/search>

=head2 update

    my $obj = $stripe->products( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<product|Net::API::Stripe::Product> object or a hash reference, this will update a Stripe product and return its corresponding L<object|Net::API::Stripe::Product>

Possible parameters are:

=over 4

=item C<active>

Whether the product is available for purchase.

=item C<default_price>

The ID of the L<Price|https://stripe.com/docs/api/prices> object that is the default price for this product.

=item C<description>

The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.

=item C<images>

A list of up to 8 URLs of images for this product, meant to be displayable to the customer.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<name>

The product's name, meant to be displayable to the customer.

=item C<package_dimensions>

The dimensions of this product for shipping purposes.

=item C<shippable>

Whether this product is shipped (i.e., physical goods).

=item C<statement_descriptor>

An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.

This may be up to 22 characters. The statement description may not include C<&lt;>, C<&gt;>, C<\>, C<">, C<'> characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.  It must contain at least one letter. May only be set if C<type=service>.

=item C<tax_code>

A L<tax code|https://stripe.com/docs/tax/tax-categories> ID.

=item C<unit_label>

A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. May only be set if C<type=service>.

=item C<url>

A URL of a publicly-accessible webpage for this product.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/products/update>

=head1 PROMOTION CODE

You can create, list, retrieve or update promotion code

=head2 create

    my $obj = $stripe->promotion_codes( create => {
        coupon => "Z4OV52SU", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Billing::PromotionCode> object or a hash reference, this will create a Stripe promotion code and return an L<Net::API::Stripe::Billing::PromotionCode> object.

Possible parameters are:

=over 4

=item C<active>

Whether the promotion code is currently active.

=item C<code>

The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. If left blank, we will generate one automatically.

=item C<coupon>

B<Required>. The coupon for this promotion code.

=item C<customer>

The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers.

=item C<expires_at>

The timestamp at which this promotion code will expire. If the coupon has specified a C<redeems_by>, then this value cannot be after the coupon's C<redeems_by>.

=item C<max_redemptions>

A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a C<max_redemptions>, then this value cannot be greater than the coupon's C<max_redemptions>.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<restrictions>

Settings that restrict the redemption of the promotion code.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/promotion_codes/create>

=head2 list

    my $obj = $stripe->promotion_codes( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<promotion code|Net::API::Stripe::Billing::PromotionCode> object, this issue an api call to get the list of all promotion code.

Possible parameters are:

=over 4

=item C<active>

Filter promotion codes by whether they are active.

=item C<code>

Only return promotion codes that have this case-insensitive code.

=item C<coupon>

Only return promotion codes for this coupon.

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<customer>

Only return promotion codes that are restricted to this customer.

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/promotion_codes/list>

=head2 retrieve

    my $obj = $stripe->promotion_codes( retrieve => $args ) || die( $stripe->error );

Provided with a L<promotion code|Net::API::Stripe::Billing::PromotionCode> object or a hash reference, this will retrieve a Stripe promotion code and return its corresponding L<object|Net::API::Stripe::Billing::PromotionCode>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/promotion_codes/retrieve>

=head2 update

    my $obj = $stripe->promotion_codes( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<promotion code|Net::API::Stripe::Billing::PromotionCode> object or a hash reference, this will update a Stripe promotion code and return its corresponding L<object|Net::API::Stripe::Billing::PromotionCode>

Possible parameters are:

=over 4

=item C<active>

Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<restrictions>

Settings that restrict the redemption of the promotion code.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/promotion_codes/update>

=head1 QUOTE

You can accept, cancel, create, download, finalize, line_items, lines, list, retrieve, update, upfront_line_items or upfront_lines quote

=head2 accept

    my $obj = $stripe->quotes( accept => $args ) || die( $stripe->error );

Provided with a L<quote|Net::API::Stripe::Billing::Quote>, or a hash reference, this will issue a accept api call.

Returns an accepted quote and creates an invoice, subscription or subscription schedule. Returns L<an error|https://stripe.com/docs/api/errors> otherwise.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/quotes/accept>

=head2 cancel

    my $obj = $stripe->quotes( cancel => $args ) || die( $stripe->error );

Provided with a L<quote|Net::API::Stripe::Billing::Quote>, or a hash reference, this will issue a cancel api call.

Returns a canceled quote. Returns L<an error|https://stripe.com/docs/api/errors> otherwise.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/quotes/cancel>

=head2 create

    my $obj = $stripe->quotes( create => {
        customer   => "cus_AJ78ZaALpqgiuZ",
        line_items => [,
            price    => "price_1Le1oa2eZvKYlo2CuD7mwpZu",
            quantity => "2",
        ], } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Billing::Quote> object or a hash reference, this will create a Stripe quote and return an L<Net::API::Stripe::Billing::Quote> object.

Possible parameters are:

=over 4

=item C<application_fee_amount>

The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field.

=item C<application_fee_percent>

A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field.

=item C<automatic_tax>

Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.

=item C<collection_method>

Either C<charge_automatically>, or C<send_invoice>. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to C<charge_automatically>.

=item C<customer>

The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.

=item C<default_tax_rates>

The tax rates that will apply to any line item that does not have C<tax_rates> set.

=item C<description>

A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your L<quote template settings|https://dashboard.stripe.com/settings/billing/quote> will be used.

=item C<discounts>

The discounts applied to the quote. You can only set up to one discount.

=item C<expires_at>

A future timestamp on which the quote will be canceled if in C<open> or C<draft> status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your L<quote template settings|https://dashboard.stripe.com/settings/billing/quote> will be used.

=item C<footer>

A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your L<quote template settings|https://dashboard.stripe.com/settings/billing/quote> will be used.

=item C<from_quote>

Clone an existing quote. The new quote will be created in C<status=draft>. When using this parameter, you cannot specify any other parameters except for C<expires_at>.

=item C<header>

A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your L<quote template settings|https://dashboard.stripe.com/settings/billing/quote> will be used.

=item C<invoice_settings>

All invoices will be billed using the specified settings.

=item C<line_items>

A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<on_behalf_of>

The account on behalf of which to charge.

=item C<subscription_data>

When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if C<subscription_data[effective_date]> is present and in the future, otherwise a subscription is created.

=item C<test_clock>

ID of the test clock to attach to the quote.

=item C<transfer_data>

The data with which to automatically create a Transfer for each of the invoices.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/quotes/create>

=head2 download

    my $obj = $stripe->quotes( download => $args ) || die( $stripe->error );

Provided with a L<quote|Net::API::Stripe::Billing::Quote>, or a hash reference, this will issue a download api call.

The PDF file for the quote.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/quotes/pdf>

=head2 finalize

    my $obj = $stripe->quotes( finalize => $args ) || die( $stripe->error );

Provided with a L<quote|Net::API::Stripe::Billing::Quote>, or a hash reference, this will issue a finalize api call.

Returns an open quote. Returns L<an error|https://stripe.com/docs/api/errors> otherwise.

Possible parameters are:

=over 4

=item C<expires_at>

A future timestamp on which the quote will be canceled if in C<open> or C<draft> status. Measured in seconds since the Unix epoch.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/quotes/finalize>

=head2 line_items

    my $obj = $stripe->quotes( line_items => $args ) || die( $stripe->error );

Provided with a L<quote|Net::API::Stripe::Billing::Quote>, or a hash reference, this will issue a line_items api call.

A dictionary with a C<data> property that contains an array of up to C<limit> quote line items, starting after Line Item C<starting_after>. Each entry in the array is a separate Line Item object. If no more line items are available, the resulting array will be empty. 

Possible parameters are:

=over 4

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/quotes/line_items/list>

=head2 list

    my $obj = $stripe->quotes( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<quote|Net::API::Stripe::Billing::Quote> object, this issue an api call to get the list of all quote.

Possible parameters are:

=over 4

=item C<customer>

The ID of the customer whose quotes will be retrieved.

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<status>

The status of the quote.

=item C<test_clock>

Provides a list of quotes that are associated with the specified test clock. The response will not include quotes with test clocks if this and the customer parameter is not set.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/quotes/list>

=head2 retrieve

    my $obj = $stripe->quotes( retrieve => $args ) || die( $stripe->error );

Provided with a L<quote|Net::API::Stripe::Billing::Quote> object or a hash reference, this will retrieve a Stripe quote and return its corresponding L<object|Net::API::Stripe::Billing::Quote>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/quotes/retrieve>

=head2 update

    my $obj = $stripe->quotes( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<quote|Net::API::Stripe::Billing::Quote> object or a hash reference, this will update a Stripe quote and return its corresponding L<object|Net::API::Stripe::Billing::Quote>

Possible parameters are:

=over 4

=item C<application_fee_amount>

The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field.

=item C<application_fee_percent>

A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field.

=item C<automatic_tax>

Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.

=item C<collection_method>

Either C<charge_automatically>, or C<send_invoice>. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to C<charge_automatically>.

=item C<customer>

The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.

=item C<default_tax_rates>

The tax rates that will apply to any line item that does not have C<tax_rates> set.

=item C<description>

A description that will be displayed on the quote PDF.

=item C<discounts>

The discounts applied to the quote. You can only set up to one discount.

=item C<expires_at>

A future timestamp on which the quote will be canceled if in C<open> or C<draft> status. Measured in seconds since the Unix epoch.

=item C<footer>

A footer that will be displayed on the quote PDF.

=item C<header>

A header that will be displayed on the quote PDF.

=item C<invoice_settings>

All invoices will be billed using the specified settings.

=item C<line_items>

A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<on_behalf_of>

The account on behalf of which to charge.

=item C<subscription_data>

When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if C<subscription_data[effective_date]> is present and in the future, otherwise a subscription is created.

=item C<transfer_data>

The data with which to automatically create a Transfer for each of the invoices.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/quotes/update>

=head2 upfront_line_items

    my $obj = $stripe->quotes( upfront_line_items => $args ) || die( $stripe->error );

Provided with a L<quote|Net::API::Stripe::Billing::Quote>, or a hash reference, this will issue a upfront_line_items api call.

A dictionary with a C<data> property that contains an array of up to C<limit> upfront line items, starting after Line Item C<starting_after>. Each entry in the array is a separate Line Item object. If no more upfront line items are available, the resulting array will be empty. 

Possible parameters are:

=over 4

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/quotes/line_items/upfront/list>

=head1 RADAR EARLY FRAUD WARNING

You can list or retrieve radar early fraud warning

=head2 list

    my $obj = $stripe->radar_early_fraud_warnings( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<radar early fraud warning|Net::API::Stripe::Fraud> object, this issue an api call to get the list of all radar early fraud warning.

Possible parameters are:

=over 4

=item C<charge>

Only return early fraud warnings for the charge specified by this charge ID.

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<payment_intent>

Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/radar/early_fraud_warnings/list>

=head2 retrieve

    my $obj = $stripe->radar_early_fraud_warnings( retrieve => $args ) || die( $stripe->error );

Provided with a L<radar early fraud warning|Net::API::Stripe::Fraud> object or a hash reference, this will retrieve a Stripe radar early fraud warning and return its corresponding L<object|Net::API::Stripe::Fraud>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/radar/early_fraud_warnings/retrieve>

=head1 RADAR VALUE LIST

You can create, delete, list, retrieve or update radar value list

=head2 create

    my $obj = $stripe->radar_value_lists( create => {
        alias     => "custom_ip_blocklist",
        item_type => "ip_address",
        name      => "Custom IP Blocklist", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Fraud::ValueList> object or a hash reference, this will create a Stripe radar value list and return an L<Net::API::Stripe::Fraud::ValueList> object.

Possible parameters are:

=over 4

=item C<alias>

B<Required>. The name of the value list for use in rules.

=item C<item_type>

Type of the items in the value list. One of C<card_fingerprint>, C<card_bin>, C<email>, C<ip_address>, C<country>, C<string>, C<case_sensitive_string>, or C<customer_id>. Use C<string> if the item type is unknown or mixed.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<name>

B<Required>. The human-readable name of the value list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/radar/value_lists/create>

=head2 delete

    my $obj = $stripe->radar_value_lists( delete => $args ) || die( $stripe->error );

Provided with a L<radar value list|Net::API::Stripe::Fraud::ValueList>, or a hash reference, this will issue an api call to Stripe to remove the radar value list. It returns the radar value list object that was deleted with its property C<deleted> set to true.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/radar/value_lists/delete>

=head2 list

    my $obj = $stripe->radar_value_lists( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<radar value list|Net::API::Stripe::Fraud::ValueList> object, this issue an api call to get the list of all radar value list.

Possible parameters are:

=over 4

=item C<alias>

The alias used to reference the value list when writing rules.

=item C<contains>

A value contained within a value list - returns all value lists containing this value.

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/radar/value_lists/list>

=head2 retrieve

    my $obj = $stripe->radar_value_lists( retrieve => $args ) || die( $stripe->error );

Provided with a L<radar value list|Net::API::Stripe::Fraud::ValueList> object or a hash reference, this will retrieve a Stripe radar value list and return its corresponding L<object|Net::API::Stripe::Fraud::ValueList>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/radar/value_lists/retrieve>

=head2 update

    my $obj = $stripe->radar_value_lists( update => {
        name => "Updated IP Block List", } ) || die( $stripe->error );

Provided with a L<radar value list|Net::API::Stripe::Fraud::ValueList> object or a hash reference, this will update a Stripe radar value list and return its corresponding L<object|Net::API::Stripe::Fraud::ValueList>

Possible parameters are:

=over 4

=item C<alias>

The name of the value list for use in rules.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<name>

The human-readable name of the value list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/radar/value_lists/update>

=head1 RADAR VALUE LIST ITEM

You can create, delete, list or retrieve radar value list item

=head2 create

    my $obj = $stripe->radar_value_list_items( create => {
        value      => "1.2.3.4",
        value_list => "rsl_1Le9F32eZvKYlo2CWsVfMmYL", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Fraud::ValueList::Item> object or a hash reference, this will create a Stripe radar value list item and return an L<Net::API::Stripe::Fraud::ValueList::Item> object.

Possible parameters are:

=over 4

=item C<value>

B<Required>. The value of the item (whose type must match the type of the parent value list).

=item C<value_list>

B<Required>. The identifier of the value list which the created item will be added to.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/radar/value_list_items/create>

=head2 delete

    my $obj = $stripe->radar_value_list_items( delete => $args ) || die( $stripe->error );

Provided with a L<radar value list item|Net::API::Stripe::Fraud::ValueList::Item>, or a hash reference, this will issue an api call to Stripe to remove the radar value list item. It returns the radar value list item object that was deleted with its property C<deleted> set to true.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/radar/value_list_items/delete>

=head2 list

    my $obj = $stripe->radar_value_list_items( list => {
        limit      => "3",
        value_list => "rsl_1Le9F32eZvKYlo2CWsVfMmYL", } ) || die( $stripe->error );

Provided with a L<radar value list item|Net::API::Stripe::Fraud::ValueList::Item> object, this issue an api call to get the list of all radar value list item.

Possible parameters are:

=over 4

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<value>

Return items belonging to the parent list whose value matches the specified value (using an "is like" match).

=item C<value_list>

B<Required>. Identifier for the parent value list this item belongs to.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/radar/value_list_items/list>

=head2 retrieve

    my $obj = $stripe->radar_value_list_items( retrieve => $args ) || die( $stripe->error );

Provided with a L<radar value list item|Net::API::Stripe::Fraud::ValueList::Item> object or a hash reference, this will retrieve a Stripe radar value list item and return its corresponding L<object|Net::API::Stripe::Fraud::ValueList::Item>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/radar/value_list_items/retrieve>

=head1 REFUND

You can cancel, create, list, retrieve or update refund

=head2 cancel

    my $obj = $stripe->refunds( cancel => $args ) || die( $stripe->error );

Provided with a L<refund|Net::API::Stripe::Refund>, or a hash reference, this will issue a cancel api call.

Returns the refund object if the cancelation succeeded. This call will return L<an error|https://stripe.com/docs/api/errors> if the refund is unable to be canceled.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/refunds/cancel>

=head2 create

    my $obj = $stripe->refunds( create => {
        charge => "ch_3Le9Ez2eZvKYlo2C1rWzICyb", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Refund> object or a hash reference, this will create a Stripe refund and return an L<Net::API::Stripe::Refund> object.

Possible parameters are:

=over 4

=item C<amount>

A positive integer in I<JPY> representing how much of this charge to refund. Can refund only up to the remaining, unrefunded amount of the charge.

=item C<charge>

The identifier of the charge to refund.

=item C<metadata>

A set of key-value pairs that you can attach to a C<Refund> object. This can be useful for storing additional information about the refund in a structured format. You can unset individual keys if you POST an empty value for that key. You can clear all keys if you POST an empty value for C<metadata>

=item C<payment_intent>

ID of the PaymentIntent to refund.

=item C<reason>

String indicating the reason for the refund. If set, possible values are C<duplicate>, C<fraudulent>, and C<requested_by_customer>. If you believe the charge to be fraudulent, specifying C<fraudulent> as the reason will add the associated card and email to your L<block lists|https://stripe.com/docs/radar/lists>, and will also help us improve our fraud detection algorithms.

=item C<refund_application_fee>

Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded.

An application fee can be refunded only by the application that created the charge.

=item C<reverse_transfer>

Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount).

A transfer can be reversed only by the application that created the charge.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/refunds/create>

=head2 list

    my $obj = $stripe->refunds( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<refund|Net::API::Stripe::Refund> object, this issue an api call to get the list of all refund.

Possible parameters are:

=over 4

=item C<charge>

Only return refunds for the charge specified by this charge ID.

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<payment_intent>

Only return refunds for the PaymentIntent specified by this ID.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/refunds/list>

=head2 retrieve

    my $obj = $stripe->refunds( retrieve => $args ) || die( $stripe->error );

Provided with a L<refund|Net::API::Stripe::Refund> object or a hash reference, this will retrieve a Stripe refund and return its corresponding L<object|Net::API::Stripe::Refund>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/refunds/retrieve>

=head2 update

    my $obj = $stripe->refunds( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<refund|Net::API::Stripe::Refund> object or a hash reference, this will update a Stripe refund and return its corresponding L<object|Net::API::Stripe::Refund>

Possible parameters are:

=over 4

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/refunds/update>

=head1 REPORTING REPORT RUN

You can create, list or retrieve reporting report run

=head2 create

    my $obj = $stripe->reporting_report_runs( create => {
        parameters  =>
        {
            interval_end   => "1525132800",
            interval_start => "1522540800",
        }
        report_type => "balance.summary.1", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Reporting::ReportRun> object or a hash reference, this will create a Stripe reporting report run and return an L<Net::API::Stripe::Reporting::ReportRun> object.

Possible parameters are:

=over 4

=item C<parameters>

Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the L<API Access to Reports|https://stripe.com/docs/reporting/statements/api> documentation.

=item C<report_type>

B<Required>. The ID of the L<report type|https://stripe.com/docs/reporting/statements/api#report-types> to run, such as C<"balance.summary.1">.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/reporting/report_run/create>

=head2 list

    my $obj = $stripe->reporting_report_runs( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<reporting report run|Net::API::Stripe::Reporting::ReportRun> object, this issue an api call to get the list of all reporting report run.

Possible parameters are:

=over 4

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/reporting/report_run/list>

=head2 retrieve

    my $obj = $stripe->reporting_report_runs( retrieve => $args ) || die( $stripe->error );

Provided with a L<reporting report run|Net::API::Stripe::Reporting::ReportRun> object or a hash reference, this will retrieve a Stripe reporting report run and return its corresponding L<object|Net::API::Stripe::Reporting::ReportRun>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/reporting/report_run/retrieve>

=head1 REPORTING REPORT TYPE

You can list or retrieve reporting report type

=head2 list

    my $obj = $stripe->reporting_report_types( list => $args ) || die( $stripe->error );

Provided with a L<reporting report type|Net::API::Stripe::Reporting::ReportType> object, this issue an api call to get the list of all reporting report type.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/reporting/report_type/list>

=head2 retrieve

    my $obj = $stripe->reporting_report_types( retrieve => $args ) || die( $stripe->error );

Provided with a L<reporting report type|Net::API::Stripe::Reporting::ReportType> object or a hash reference, this will retrieve a Stripe reporting report type and return its corresponding L<object|Net::API::Stripe::Reporting::ReportType>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/reporting/report_type/retrieve>

=head1 REVIEW

You can approve, list or retrieve review

=head2 approve

    my $obj = $stripe->reviews( approve => $args ) || die( $stripe->error );

Provided with a L<review|Net::API::Stripe::Fraud::Review>, or a hash reference, this will issue a approve api call.

Returns the approved C<Review> object.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/radar/reviews/approve>

=head2 list

    my $obj = $stripe->reviews( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<review|Net::API::Stripe::Fraud::Review> object, this issue an api call to get the list of all review.

Possible parameters are:

=over 4

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/radar/reviews/list>

=head2 retrieve

    my $obj = $stripe->reviews( retrieve => $args ) || die( $stripe->error );

Provided with a L<review|Net::API::Stripe::Fraud::Review> object or a hash reference, this will retrieve a Stripe review and return its corresponding L<object|Net::API::Stripe::Fraud::Review>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/radar/reviews/retrieve>

=head1 SCHEDULED QUERY RUN

You can list or retrieve scheduled query run

=head2 list

    my $obj = $stripe->scheduled_query_runs( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<scheduled query run|Net::API::Stripe::Sigma::ScheduledQueryRun> object, this issue an api call to get the list of all scheduled query run.

Possible parameters are:

=over 4

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/sigma/scheduled_queries/list>

=head2 retrieve

    my $obj = $stripe->scheduled_query_runs( retrieve => $args ) || die( $stripe->error );

Provided with a L<scheduled query run|Net::API::Stripe::Sigma::ScheduledQueryRun> object or a hash reference, this will retrieve a Stripe scheduled query run and return its corresponding L<object|Net::API::Stripe::Sigma::ScheduledQueryRun>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/sigma/scheduled_queries/retrieve>

=head1 SETUP ATTEMPT

You can list setup attempt

=head2 list

    my $obj = $stripe->setup_attempts( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<setup attempt|Net::API::Stripe::SetupAttempt> object, this issue an api call to get the list of all setup attempt.

Possible parameters are:

=over 4

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<setup_intent>

B<Required>. Only return SetupAttempts created by the SetupIntent specified by
this ID.


=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/setup_attempts/list>

=head1 SETUP INTENT

You can cancel, confirm, create, list, retrieve, update, verify or verify_microdeposits setup intent

=head2 cancel

    my $obj = $stripe->setup_intents( cancel => $args ) || die( $stripe->error );

Provided with a L<setup intent|Net::API::Stripe::Payment::Intent::Setup>, or a hash reference, this will issue a cancel api call.

Returns a SetupIntent object if the cancellation succeeded. Returns an error if the SetupIntent has already been canceled or is not in a cancelable state.

Possible parameters are:

=over 4

=item C<cancellation_reason>

Reason for canceling this SetupIntent. Possible values are C<abandoned>, C<requested_by_customer>, or C<duplicate>

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/setup_intents/cancel>

=head2 confirm

    my $obj = $stripe->setup_intents( confirm => {
        payment_method => "pm_card_visa", } ) || die( $stripe->error );

Provided with a L<setup intent|Net::API::Stripe::Payment::Intent::Setup>, or a hash reference, this will issue a confirm api call.

Returns the resulting SetupIntent after all possible transitions are applied.

Possible parameters are:

=over 4

=item C<mandate_data>

This hash contains details about the Mandate to create

=item C<payment_method>

ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.

=item C<payment_method_data>

When included, this hash creates a PaymentMethod that is set as the L<C<payment_method>|https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method> value in the SetupIntent.

=item C<payment_method_options>

Payment-method-specific configuration for this SetupIntent.

=item C<return_url>

The URL to redirect your customer back to after they authenticate on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter is only used for cards and other redirect-based payment methods.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/setup_intents/confirm>

=head2 create

    my $obj = $stripe->setup_intents( create => {
        payment_method_types => [qw( card )], } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Payment::Intent::Setup> object or a hash reference, this will create a Stripe setup intent and return an L<Net::API::Stripe::Payment::Intent::Setup> object.

Possible parameters are:

=over 4

=item C<attach_to_self>

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.

=item C<confirm>

Set to C<true> to attempt to confirm this SetupIntent immediately. This parameter defaults to C<false>. If the payment method attached is a card, a return_url may be provided in case additional authentication is required.

=item C<customer>

ID of the Customer this SetupIntent belongs to, if one exists.

If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.

=item C<description>

An arbitrary string attached to the object. Often useful for displaying to users.

=item C<flow_directions>

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

Include C<inbound> if you intend to use the payment method as the origin to pull funds from. Include C<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.

=item C<mandate_data>

This hash contains details about the Mandate to create. This parameter can only be used with L<C<confirm=true>|https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm>.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<on_behalf_of>

The Stripe account ID for which this SetupIntent is created.

=item C<payment_method>

ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.

=item C<payment_method_data>

When included, this hash creates a PaymentMethod that is set as the L<C<payment_method>|https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method> value in the SetupIntent.

=item C<payment_method_options>

Payment-method-specific configuration for this SetupIntent.

=item C<payment_method_types>

The list of L<payment method types|https://stripe.com/docs/payments/payment-methods/overview> that this SetupIntent is allowed to set up. If this is not provided, defaults to C<[“card”]>. Valid payment method types include: C<acss_debit>, C<au_becs_debit>, C<bacs_debit>, C<bancontact>, C<blik>, C<boleto>, C<card>, C<card_present>, C<ideal>, C<link>, C<sepa_debit>, C<sofort>, and C<us_bank_account>.

=item C<return_url>

The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with L<C<confirm=true>|https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm>.

=item C<single_use>

If this hash is populated, this SetupIntent will generate a single_use Mandate on success.

=item C<usage>

Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to C<off_session>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/setup_intents/create>

=head2 list

    my $obj = $stripe->setup_intents( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<setup intent|Net::API::Stripe::Payment::Intent::Setup> object, this issue an api call to get the list of all setup intent.

Possible parameters are:

=over 4

=item C<attach_to_self>

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.

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<customer>

Only return SetupIntents for the customer specified by this customer ID.

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<payment_method>

Only return SetupIntents associated with the specified payment method.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/setup_intents/list>

=head2 retrieve

    my $obj = $stripe->setup_intents( retrieve => $args ) || die( $stripe->error );

Provided with a L<setup intent|Net::API::Stripe::Payment::Intent::Setup> object or a hash reference, this will retrieve a Stripe setup intent and return its corresponding L<object|Net::API::Stripe::Payment::Intent::Setup>

Possible parameters are:

=over 4

=item C<client_secret>

B<Required>. The client secret of the SetupIntent. Required if a publishable key is used to retrieve the SetupIntent.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/setup_intents/retrieve>

=head2 update

    my $obj = $stripe->setup_intents( update => {
        metadata =>
        {
            user_id => "3435453",
        } } ) || die( $stripe->error );

Provided with a L<setup intent|Net::API::Stripe::Payment::Intent::Setup> object or a hash reference, this will update a Stripe setup intent and return its corresponding L<object|Net::API::Stripe::Payment::Intent::Setup>

Possible parameters are:

=over 4

=item C<attach_to_self>

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.

=item C<customer>

ID of the Customer this SetupIntent belongs to, if one exists.

If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.

=item C<description>

An arbitrary string attached to the object. Often useful for displaying to users.

=item C<flow_directions>

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

Include C<inbound> if you intend to use the payment method as the origin to pull funds from. Include C<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.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<payment_method>

ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.

=item C<payment_method_data>

When included, this hash creates a PaymentMethod that is set as the L<C<payment_method>|https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method> value in the SetupIntent.

=item C<payment_method_options>

Payment-method-specific configuration for this SetupIntent.

=item C<payment_method_types>

The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. If this is not provided, defaults to ["card"].

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/setup_intents/update>

=head2 verify_microdeposits

    my $obj = $stripe->setup_intents( verify_microdeposits => $args ) || die( $stripe->error );

Provided with a L<setup intent|Net::API::Stripe::Payment::Intent::Setup>, or a hash reference, this will issue a verify_microdeposits api call.

Returns a SetupIntent object.

Possible parameters are:

=over 4

=item C<amounts>

Two positive integers, in I<cents>, equal to the values of the microdeposits sent to the bank account.

=item C<client_secret>

B<Required>. The client secret of the SetupIntent.

=item C<descriptor_code>

A six-character code starting with SM present in the microdeposit sent to the bank account.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/setup_intents/verify_microdeposits>

=head1 SHIPPING RATE

You can create, list, retrieve or update shipping rate

=head2 create

    my $obj = $stripe->shipping_rates( create => {
        display_name => "Ground shipping",
        fixed_amount =>
        {
            amount   => "500",
            currency => "usd",
        }
        type         => "fixed_amount", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Shipping::Rate> object or a hash reference, this will create a Stripe shipping rate and return an L<Net::API::Stripe::Shipping::Rate> object.

Possible parameters are:

=over 4

=item C<delivery_estimate>

The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.

=item C<display_name>

B<Required>. The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.

=item C<fixed_amount>

Describes a fixed amount to charge for shipping. Must be present if type is C<fixed_amount>.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<tax_behavior>

Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of C<inclusive>, C<exclusive>, or C<unspecified>. 

=item C<tax_code>

A L<tax code|https://stripe.com/docs/tax/tax-categories> ID. The Shipping tax code is C<txcd_92010001>.

=item C<type>

B<required> The type of calculation to use on the shipping rate. Can only be C<fixed_amount> for now.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/shipping_rates/create>

=head2 list

    my $obj = $stripe->shipping_rates( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<shipping rate|Net::API::Stripe::Shipping::Rate> object, this issue an api call to get the list of all shipping rate.

Possible parameters are:

=over 4

=item C<active>

Only return shipping rates that are active or inactive.

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<currency>

Only return shipping rates for the given currency.

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/shipping_rates/list>

=head2 retrieve

    my $obj = $stripe->shipping_rates( retrieve => $args ) || die( $stripe->error );

Provided with a L<shipping rate|Net::API::Stripe::Shipping::Rate> object or a hash reference, this will retrieve a Stripe shipping rate and return its corresponding L<object|Net::API::Stripe::Shipping::Rate>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/shipping_rates/retrieve>

=head2 update

    my $obj = $stripe->shipping_rates( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<shipping rate|Net::API::Stripe::Shipping::Rate> object or a hash reference, this will update a Stripe shipping rate and return its corresponding L<object|Net::API::Stripe::Shipping::Rate>

Possible parameters are:

=over 4

=item C<active>

Whether the shipping rate can be used for new purchases. Defaults to C<true>.

=item C<fixed_amount>

Describes a fixed amount to charge for shipping. Must be present if type is C<fixed_amount>.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<tax_behavior>

Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of C<inclusive>, C<exclusive>, or C<unspecified>. 

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/shipping_rates/update>

=head1 SOURCE

You can attach, create, detach, retrieve or update source

=head2 attach

    my $obj = $stripe->sources( attach => $args ) || die( $stripe->error );

Provided with a L<source|Net::API::Stripe::Payment::Source>, or a hash reference, this will issue a attach api call.

Returns the attached Source object.

Possible parameters are:

=over 4

=item C<source>

B<Required>. The identifier of the source to be attached.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/sources/attach>

=head2 create

    my $obj = $stripe->sources( create => $args ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Payment::Source> object or a hash reference, this will create a Stripe source and return an L<Net::API::Stripe::Payment::Source> object.

Possible parameters are:

=over 4

=item C<amount>

Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for C<single_use> sources. Not supported for C<receiver> type sources, where charge amount may not be specified until funds land.

=item C<currency>

Three-letter L<ISO code for the currency|https://stripe.com/docs/currencies> associated with the source. This is the currency for which the source will be chargeable once ready.

=item C<flow>

The authentication C<flow> of the source to create. C<flow> is one of C<redirect>, C<receiver>, C<code_verification>, C<none>. It is generally inferred unless a type supports multiple flows.

=item C<mandate>

Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<owner>

Information about the owner of the payment instrument that may be used or required by particular source types.

=item C<receiver>

Optional parameters for the receiver flow. Can be set only if the source is a receiver (C<flow> is C<receiver>).

=item C<redirect>

Parameters required for the redirect flow. Required if the source is authenticated by a redirect (C<flow> is C<redirect>).

=item C<source_order>

Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.

=item C<statement_descriptor>

An arbitrary string to be displayed on your customer's statement. As an example, if your website is C<RunClub> and the item you're charging for is a race ticket, you may want to specify a C<statement_descriptor> of C<RunClub 5K race ticket.> While many payment types will display this information, some may not display it at all.

=item C<token>

An optional token used to create the source. When passed, token properties will override source parameters.

=item C<type>

B<Required>. The C<type> of the source to create. Required unless C<customer> and C<original_source> are specified (see the L<Cloning card Sources|https://stripe.com/docs/sources/connect#cloning-card-sources> guide)

=item C<usage>

Either C<reusable> or C<single_use>. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/sources/create>

=head2 detach

    my $obj = $stripe->sources( detach => $args ) || die( $stripe->error );

Provided with a L<source|Net::API::Stripe::Payment::Source>, or a hash reference, this will issue a detach api call.

Returns the detached Source object.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/sources/detach>

=head2 retrieve

    my $obj = $stripe->sources( retrieve => $args ) || die( $stripe->error );

Provided with a L<source|Net::API::Stripe::Payment::Source> object or a hash reference, this will retrieve a Stripe source and return its corresponding L<object|Net::API::Stripe::Payment::Source>

Possible parameters are:

=over 4

=item C<client_secret>

The client secret of the source. Required if a publishable key is used to retrieve the source.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/sources/retrieve>

=head2 update

    my $obj = $stripe->sources( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<source|Net::API::Stripe::Payment::Source> object or a hash reference, this will update a Stripe source and return its corresponding L<object|Net::API::Stripe::Payment::Source>

Possible parameters are:

=over 4

=item C<amount>

Amount associated with the source.

=item C<mandate>

Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<owner>

Information about the owner of the payment instrument that may be used or required by particular source types.

=item C<source_order>

Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/sources/update>

=head1 SUBSCRIPTION

You can cancel, create, delete, delete_discount, list, retrieve, search or update subscription

=head2 create

    my $obj = $stripe->subscriptions( create => {
        customer => "cus_AJ78ZaALpqgiuZ",
        items    => [,
            price => "price_1Le1oa2eZvKYlo2CuD7mwpZu",
        ], } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Billing::Subscription> object or a hash reference, this will create a Stripe subscription and return an L<Net::API::Stripe::Billing::Subscription> object.

Possible parameters are:

=over 4

=item C<add_invoice_items>

A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.

=item C<application_fee_percent>

A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees L<documentation|https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions>.

=item C<automatic_tax>

Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.

=item C<backdate_start_date>

For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor.

=item C<billing_cycle_anchor>

A future timestamp to anchor the subscription's L<billing cycle|https://stripe.com/docs/subscriptions/billing-cycle>. This is used to determine the date of the first full invoice, and, for plans with C<month> or C<year> intervals, the day of the month for subsequent invoices. The timestamp is in UTC format.

=item C<billing_thresholds>

Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.

=item C<cancel_at>

A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using C<proration_behavior>. If set during a future period, this will always cause a proration for that period.

=item C<cancel_at_period_end>

Boolean indicating whether this subscription should cancel at the end of the current period.

=item C<collection_method>

Either C<charge_automatically>, or C<send_invoice>. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to C<charge_automatically>.

=item C<coupon>

The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription.

=item C<currency>

Three-letter L<ISO currency code|https://www.iso.org/iso-4217-currency-codes.html>, in lowercase. Must be a L<supported currency|https://stripe.com/docs/currencies>.

=item C<customer>

B<Required>. The identifier of the customer to subscribe.

=item C<days_until_due>

Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where C<collection_method> is set to C<send_invoice>.

=item C<default_payment_method>

ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over C<default_source>. If neither are set, invoices will use the customer's L<invoiceI<settings.default>payment_method|https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method> or L<default_source|https://stripe.com/docs/api/customers/object#customer_object-default_source>.

=item C<default_source>

ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If C<default_payment_method> is also set, C<default_payment_method> will take precedence. If neither are set, invoices will use the customer's L<invoiceI<settings.default>payment_method|https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method> or L<default_source|https://stripe.com/docs/api/customers/object#customer_object-default_source>.

=item C<default_tax_rates>

The tax rates that will apply to any subscription item that does not have C<tax_rates> set. Invoices created will have their C<default_tax_rates> populated from the subscription.

=item C<description>

The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces.

=item C<items>

B<required> A list of up to 20 subscription items, each with an attached price.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<off_session>

Indicates if a customer is on or off-session while an invoice payment is attempted.

=item C<payment_behavior>

Use C<allow_incomplete> to create subscriptions with C<status=incomplete> if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the L<SCA Migration Guide|https://stripe.com/docs/billing/migration/strong-customer-authentication> for Billing to learn more. This is the default behavior.

Use C<default_incomplete> to create Subscriptions with C<status=incomplete> when the first invoice requires payment, otherwise start as active. Subscriptions transition to C<status=active> when successfully confirming the payment intent on the first invoice. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, L<SCA regulation|https://stripe.com/docs/billing/migration/strong-customer-authentication>, or collecting a mandate for a bank debit payment method. If the payment intent is not confirmed within 23 hours subscriptions transition to C<status=incomplete_expired>, which is a terminal state.

Use C<error_if_incomplete> if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the L<changelog|https://stripe.com/docs/upgrades#2019-03-14> to learn more.

C<pending_if_incomplete> is only used with updates and cannot be passed when creating a subscription.

=item C<payment_settings>

Payment settings to pass to invoices created by the subscription.

=item C<pending_invoice_item_interval>

Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling L<Create an invoice|https://stripe.com/docs/api#create_invoice> for the given subscription at the specified interval.

=item C<promotion_code>

The API ID of a promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription.

=item C<proration_behavior>

Determines how to handle L<prorations|https://stripe.com/docs/subscriptions/billing-cycle#prorations> resulting from the C<billing_cycle_anchor>. If no value is passed, the default is C<create_prorations>.

=item C<transfer_data>

If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.

=item C<trial_end>

Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value C<now> can be provided to end the customer's trial immediately. Can be at most two years from C<billing_cycle_anchor>. See L<Using trial periods on subscriptions|https://stripe.com/docs/billing/subscriptions/trials> to learn more.

=item C<trial_from_plan>

Indicates if a plan's C<trial_period_days> should be applied to the subscription. Setting C<trial_end> per subscription is preferred, and this defaults to C<false>. Setting this flag to C<true> together with C<trial_end> is not allowed. See L<Using trial periods on subscriptions|https://stripe.com/docs/billing/subscriptions/trials> to learn more.

=item C<trial_period_days>

Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See L<Using trial periods on subscriptions|https://stripe.com/docs/billing/subscriptions/trials> to learn more.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/subscriptions/create>

=head2 delete

    my $obj = $stripe->subscriptions( delete => $args ) || die( $stripe->error );

Provided with a L<subscription|Net::API::Stripe::Billing::Subscription>, or a hash reference, this will issue an api call to Stripe to remove the subscription. It returns the subscription object that was deleted with its property C<deleted> set to true.

Possible parameters are:

=over 4

=item C<invoice_now>

Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items.

=item C<prorate>

Will generate a proration invoice item that credits remaining unused time until the subscription period end.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/subscriptions/cancel>

=head2 delete_discount

Provided with a L<Net::API::Stripe::Billing::Subscription> object or an hash reference of parameters, this will remove its discount and return a L<Net::API::Stripe::Billing::Subscription> object.

Possible parameters are:

=over 4

=item I<id> A Stripe subscription id

=back

For more information, see Stripe documentation here: L<https://stripe.com/docs/api/subscriptions/create>

=head2 list

    my $obj = $stripe->subscriptions( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<subscription|Net::API::Stripe::Billing::Subscription> object, this issue an api call to get the list of all subscription.

Possible parameters are:

=over 4

=item C<collection_method>

The collection method of the subscriptions to retrieve. Either C<charge_automatically> or C<send_invoice>.

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<current_period_end>

A filter on the list based on the object C<current_period_end> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<current_period_start>

A filter on the list based on the object C<current_period_start> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<customer>

The ID of the customer whose subscriptions will be retrieved.

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<price>

Filter for subscriptions that contain this recurring price ID.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<status>

The status of the subscriptions to retrieve. Passing in a value of C<canceled> will return all canceled subscriptions, including those belonging to deleted customers. Pass C<ended> to find subscriptions that are canceled and subscriptions that are expired due to L<incomplete payment|https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses>. Passing in a value of C<all> will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned.

=item C<test_clock>

Filter for subscriptions that are associated with the specified test clock. The response will not include subscriptions with test clocks if this and the customer parameter is not set.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/subscriptions/list>

=head2 retrieve

    my $obj = $stripe->subscriptions( retrieve => $args ) || die( $stripe->error );

Provided with a L<subscription|Net::API::Stripe::Billing::Subscription> object or a hash reference, this will retrieve a Stripe subscription and return its corresponding L<object|Net::API::Stripe::Billing::Subscription>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/subscriptions/retrieve>

=head2 search

    my $obj = $stripe->subscriptions( search => {
        query => "status:'active' AND metadata['order_id']:'6735'", } ) || die( $stripe->error );

Provided with a L<subscription|Net::API::Stripe::Billing::Subscription>, or a hash reference, this will issue a search api call.

A dictionary with a C<data> property that contains an array of up to C<limit> subscriptions. If no objects match the query, the resulting array will be empty. See the related guide on L<expanding properties in lists|https://stripe.com/docs/expand#lists>.

Possible parameters are:

=over 4

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<page>

A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

=item C<query>

B<Required>. The search query string. See L<search query language|https://stripe.com/docs/search#search-query-language> and the list of supported L<query fields for subscriptions|https://stripe.com/docs/search#query-fields-for-subscriptions>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/subscriptions/search>

=head2 update

    my $obj = $stripe->subscriptions( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<subscription|Net::API::Stripe::Billing::Subscription> object or a hash reference, this will update a Stripe subscription and return its corresponding L<object|Net::API::Stripe::Billing::Subscription>

Possible parameters are:

=over 4

=item C<add_invoice_items>

A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.

=item C<application_fee_percent>

A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees L<documentation|https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions>.

=item C<automatic_tax>

Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.

=item C<billing_cycle_anchor>

Either C<now> or C<unchanged>. Setting the value to C<now> resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle L<documentation|https://stripe.com/docs/billing/subscriptions/billing-cycle>.

=item C<billing_thresholds>

Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.

=item C<cancel_at>

A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using C<proration_behavior>. If set during a future period, this will always cause a proration for that period.

=item C<cancel_at_period_end>

Boolean indicating whether this subscription should cancel at the end of the current period.

=item C<collection_method>

Either C<charge_automatically>, or C<send_invoice>. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to C<charge_automatically>.

=item C<coupon>

The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription.

=item C<days_until_due>

Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where C<collection_method> is set to C<send_invoice>.

=item C<default_payment_method>

ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over C<default_source>. If neither are set, invoices will use the customer's L<invoiceI<settings.default>payment_method|https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method> or L<default_source|https://stripe.com/docs/api/customers/object#customer_object-default_source>.

=item C<default_source>

ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If C<default_payment_method> is also set, C<default_payment_method> will take precedence. If neither are set, invoices will use the customer's L<invoiceI<settings.default>payment_method|https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method> or L<default_source|https://stripe.com/docs/api/customers/object#customer_object-default_source>.

=item C<default_tax_rates>

The tax rates that will apply to any subscription item that does not have C<tax_rates> set. Invoices created will have their C<default_tax_rates> populated from the subscription. Pass an empty string to remove previously-defined tax rates.

=item C<description>

The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces.

=item C<items>

A list of up to 20 subscription items, each with an attached price.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<off_session>

Indicates if a customer is on or off-session while an invoice payment is attempted.

=item C<pause_collection>

If specified, payment collection for this subscription will be paused.

=item C<payment_behavior>

Use C<allow_incomplete> to transition the subscription to C<status=past_due> if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the L<SCA Migration Guide|https://stripe.com/docs/billing/migration/strong-customer-authentication> for Billing to learn more. This is the default behavior.

Use C<default_incomplete> to transition the subscription to C<status=past_due> when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, L<SCA regulation|https://stripe.com/docs/billing/migration/strong-customer-authentication>, or collecting a mandate for a bank debit payment method.

Use C<pending_if_incomplete> to update the subscription using L<pending updates|https://stripe.com/docs/billing/subscriptions/pending-updates>. When you use C<pending_if_incomplete> you can only pass the parameters L<supported by pending updates|https://stripe.com/docs/billing/pending-updates-reference#supported-attributes>.

Use C<error_if_incomplete> if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the L<changelog|https://stripe.com/docs/upgrades#2019-03-14> to learn more.

=item C<payment_settings>

Payment settings to pass to invoices created by the subscription.

=item C<pending_invoice_item_interval>

Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling L<Create an invoice|https://stripe.com/docs/api#create_invoice> for the given subscription at the specified interval.

=item C<promotion_code>

The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription.

=item C<proration_behavior>

Determines how to handle L<prorations|https://stripe.com/docs/subscriptions/billing-cycle#prorations> when the billing cycle changes (e.g., when switching plans, resetting C<billing_cycle_anchor=now>, or starting a trial), or if an item's C<quantity> changes.

=item C<proration_date>

If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with L<upcoming invoice|https://stripe.com#retrieve_customer_invoice> endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations.

=item C<transfer_data>

If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value.

=item C<trial_end>

Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value C<now> can be provided to end the customer's trial immediately. Can be at most two years from C<billing_cycle_anchor>.

=item C<trial_from_plan>

Indicates if a plan's C<trial_period_days> should be applied to the subscription. Setting C<trial_end> per subscription is preferred, and this defaults to C<false>. Setting this flag to C<true> together with C<trial_end> is not allowed. See L<Using trial periods on subscriptions|https://stripe.com/docs/billing/subscriptions/trials> to learn more.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/subscriptions/update>

=head1 SUBSCRIPTION ITEM

You can create, delete, list, retrieve or update subscription item

=head2 create

    my $obj = $stripe->subscription_items( create => {
        price        => "price_1Le1oa2eZvKYlo2CuD7mwpZu",
        quantity     => "2",
        subscription => "sub_1LduLW2eZvKYlo2CkXEi23Ew", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Billing::Subscription::Item> object or a hash reference, this will create a Stripe subscription item and return an L<Net::API::Stripe::Billing::Subscription::Item> object.

Possible parameters are:

=over 4

=item C<billing_thresholds>

Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<payment_behavior>

Use C<allow_incomplete> to transition the subscription to C<status=past_due> if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the L<SCA Migration Guide|https://stripe.com/docs/billing/migration/strong-customer-authentication> for Billing to learn more. This is the default behavior.

Use C<default_incomplete> to transition the subscription to C<status=past_due> when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, L<SCA regulation|https://stripe.com/docs/billing/migration/strong-customer-authentication>, or collecting a mandate for a bank debit payment method.

Use C<pending_if_incomplete> to update the subscription using L<pending updates|https://stripe.com/docs/billing/subscriptions/pending-updates>. When you use C<pending_if_incomplete> you can only pass the parameters L<supported by pending updates|https://stripe.com/docs/billing/pending-updates-reference#supported-attributes>.

Use C<error_if_incomplete> if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the L<changelog|https://stripe.com/docs/upgrades#2019-03-14> to learn more.

=item C<price>

The ID of the price object.

=item C<price_data>

Data used to generate a new L<Price|https://stripe.com/docs/api/prices> object inline.

=item C<proration_behavior>

Determines how to handle L<prorations|https://stripe.com/docs/subscriptions/billing-cycle#prorations> when the billing cycle changes (e.g., when switching plans, resetting C<billing_cycle_anchor=now>, or starting a trial), or if an item's C<quantity> changes.

=item C<proration_date>

If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the L<upcoming invoice|https://stripe.com#retrieve_customer_invoice> endpoint.

=item C<quantity>

The quantity you'd like to apply to the subscription item you're creating.

=item C<subscription>

B<Required>. The identifier of the subscription to modify.

=item C<tax_rates>

A list of L<Tax Rate|https://stripe.com/docs/api/tax_rates> ids. These Tax Rates will override the L<C<default_tax_rates>|https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates> on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/subscription_items/create>

=head2 delete

    my $obj = $stripe->subscription_items( delete => $args ) || die( $stripe->error );

Provided with a L<subscription item|Net::API::Stripe::Billing::Subscription::Item>, or a hash reference, this will issue an api call to Stripe to remove the subscription item. It returns the subscription item object that was deleted with its property C<deleted> set to true.

Possible parameters are:

=over 4

=item C<clear_usage>

Delete all usage for the given subscription item. Allowed only when the current plan's C<usage_type> is C<metered>.

=item C<proration_behavior>

Determines how to handle L<prorations|https://stripe.com/docs/subscriptions/billing-cycle#prorations> when the billing cycle changes (e.g., when switching plans, resetting C<billing_cycle_anchor=now>, or starting a trial), or if an item's C<quantity> changes.

=item C<proration_date>

If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the L<upcoming invoice|https://stripe.com#retrieve_customer_invoice> endpoint.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/subscription_items/delete>

=head2 list

    my $obj = $stripe->subscription_items( list => {
        subscription => "sub_1LduLW2eZvKYlo2CkXEi23Ew", } ) || die( $stripe->error );

Provided with a L<subscription item|Net::API::Stripe::Billing::Subscription::Item> object, this issue an api call to get the list of all subscription item.

Possible parameters are:

=over 4

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<subscription>

B<Required>. The ID of the subscription whose items will be retrieved.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/subscription_items/list>

=head2 retrieve

    my $obj = $stripe->subscription_items( retrieve => $args ) || die( $stripe->error );

Provided with a L<subscription item|Net::API::Stripe::Billing::Subscription::Item> object or a hash reference, this will retrieve a Stripe subscription item and return its corresponding L<object|Net::API::Stripe::Billing::Subscription::Item>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/subscription_items/retrieve>

=head2 update

    my $obj = $stripe->subscription_items( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<subscription item|Net::API::Stripe::Billing::Subscription::Item> object or a hash reference, this will update a Stripe subscription item and return its corresponding L<object|Net::API::Stripe::Billing::Subscription::Item>

Possible parameters are:

=over 4

=item C<billing_thresholds>

Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<off_session>

Indicates if a customer is on or off-session while an invoice payment is attempted.

=item C<payment_behavior>

Use C<allow_incomplete> to transition the subscription to C<status=past_due> if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the L<SCA Migration Guide|https://stripe.com/docs/billing/migration/strong-customer-authentication> for Billing to learn more. This is the default behavior.

Use C<default_incomplete> to transition the subscription to C<status=past_due> when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, L<SCA regulation|https://stripe.com/docs/billing/migration/strong-customer-authentication>, or collecting a mandate for a bank debit payment method.

Use C<pending_if_incomplete> to update the subscription using L<pending updates|https://stripe.com/docs/billing/subscriptions/pending-updates>. When you use C<pending_if_incomplete> you can only pass the parameters L<supported by pending updates|https://stripe.com/docs/billing/pending-updates-reference#supported-attributes>.

Use C<error_if_incomplete> if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the L<changelog|https://stripe.com/docs/upgrades#2019-03-14> to learn more.

=item C<price>

The ID of the price object. When changing a subscription item's price, C<quantity> is set to 1 unless a C<quantity> parameter is provided.

=item C<price_data>

Data used to generate a new L<Price|https://stripe.com/docs/api/prices> object inline.

=item C<proration_behavior>

Determines how to handle L<prorations|https://stripe.com/docs/subscriptions/billing-cycle#prorations> when the billing cycle changes (e.g., when switching plans, resetting C<billing_cycle_anchor=now>, or starting a trial), or if an item's C<quantity> changes.

=item C<proration_date>

If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the L<upcoming invoice|https://stripe.com#retrieve_customer_invoice> endpoint.

=item C<quantity>

The quantity you'd like to apply to the subscription item you're creating.

=item C<tax_rates>

A list of L<Tax Rate|https://stripe.com/docs/api/tax_rates> ids. These Tax Rates will override the L<C<default_tax_rates>|https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates> on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/subscription_items/update>

=head1 SUBSCRIPTION SCHEDULE

You can cancel, create, list, release, retrieve or update subscription schedule

=head2 cancel

    my $obj = $stripe->subscription_schedules( cancel => $args ) || die( $stripe->error );

Provided with a L<subscription schedule|Net::API::Stripe::Billing::Subscription::Schedule>, or a hash reference, this will issue a cancel api call.

The canceled C<subscription_schedule> object. Its status will be C<canceled> and C<canceled_at> will be the current time.

Possible parameters are:

=over 4

=item C<invoice_now>

If the subscription schedule is C<active>, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to C<true>.

=item C<prorate>

If the subscription schedule is C<active>, indicates if the cancellation should be prorated. Defaults to C<true>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/subscription_schedules/cancel>

=head2 create

    my $obj = $stripe->subscription_schedules( create => {
        customer     => "cus_AJ78ZaALpqgiuZ",
        end_behavior => "release",
        phases       => [,
            items      => [,
                price    => "plan_JiX4v6L7JY0Vyt",
                quantity => "1",
            ],
            iterations => "12",
        ],
        start_date   => "1662865884", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Billing::Subscription::Schedule> object or a hash reference, this will create a Stripe subscription schedule and return an L<Net::API::Stripe::Billing::Subscription::Schedule> object.

Possible parameters are:

=over 4

=item C<customer>

The identifier of the customer to create the subscription schedule for.

=item C<default_settings>

Object representing the subscription schedule's default settings.

=item C<end_behavior>

Configures how the subscription schedule behaves when it ends. Possible values are C<release> or C<cancel> with the default being C<release>. C<release> will end the subscription schedule and keep the underlying subscription running.C<cancel> will end the subscription schedule and cancel the underlying subscription. 

=item C<from_subscription>

Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<phases>

List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the C<end_date> of one phase will always equal the C<start_date> of the next phase.

=item C<start_date>

When the subscription schedule starts. We recommend using C<now> so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/subscription_schedules/create>

=head2 list

    my $obj = $stripe->subscription_schedules( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<subscription schedule|Net::API::Stripe::Billing::Subscription::Schedule> object, this issue an api call to get the list of all subscription schedule.

Possible parameters are:

=over 4

=item C<canceled_at>

A filter on the list based on the object C<canceled_at> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<completed_at>

A filter on the list based on the object C<completed_at> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<customer>

Only return subscription schedules for the given customer.

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<released_at>

A filter on the list based on the object C<released_at> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<scheduled>

Only return subscription schedules that have not started yet.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/subscription_schedules/list>

=head2 release

    my $obj = $stripe->subscription_schedules( release => $args ) || die( $stripe->error );

Provided with a L<subscription schedule|Net::API::Stripe::Billing::Subscription::Schedule>, or a hash reference, this will issue a release api call.

The released C<subscription_schedule> object. Its status will be C<released>, C<released_at> will be the current time, and C<released_subscription> will be the ID of the subscription the subscription schedule managed prior to being released.

Possible parameters are:

=over 4

=item C<preserve_cancel_date>

Keep any cancellation on the subscription that the schedule has set

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/subscription_schedules/release>

=head2 retrieve

    my $obj = $stripe->subscription_schedules( retrieve => $args ) || die( $stripe->error );

Provided with a L<subscription schedule|Net::API::Stripe::Billing::Subscription::Schedule> object or a hash reference, this will retrieve a Stripe subscription schedule and return its corresponding L<object|Net::API::Stripe::Billing::Subscription::Schedule>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/subscription_schedules/retrieve>

=head2 update

    my $obj = $stripe->subscription_schedules( update => {
        end_behavior => "release", } ) || die( $stripe->error );

Provided with a L<subscription schedule|Net::API::Stripe::Billing::Subscription::Schedule> object or a hash reference, this will update a Stripe subscription schedule and return its corresponding L<object|Net::API::Stripe::Billing::Subscription::Schedule>

Possible parameters are:

=over 4

=item C<default_settings>

Object representing the subscription schedule's default settings.

=item C<end_behavior>

Configures how the subscription schedule behaves when it ends. Possible values are C<release> or C<cancel> with the default being C<release>. C<release> will end the subscription schedule and keep the underlying subscription running.C<cancel> will end the subscription schedule and cancel the underlying subscription. 

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<phases>

List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the C<end_date> of one phase will always equal the C<start_date> of the next phase. Note that past phases can be omitted.

=item C<proration_behavior>

If the update changes the current phase, indicates whether the changes should be prorated. The default value is C<create_prorations>. 

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/subscription_schedules/update>

=head1 TAX CODE

You can list or retrieve tax code

=head2 list

    my $obj = $stripe->tax_codes( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<tax code|Net::API::Stripe::Product::TaxCode> object, this issue an api call to get the list of all tax code.

Possible parameters are:

=over 4

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/tax_codes/list>

=head2 retrieve

    my $obj = $stripe->tax_codes( retrieve => $args ) || die( $stripe->error );

Provided with a L<tax code|Net::API::Stripe::Product::TaxCode> object or a hash reference, this will retrieve a Stripe tax code and return its corresponding L<object|Net::API::Stripe::Product::TaxCode>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/tax_codes/retrieve>

=head1 TAX ID

You can create, delete, list or retrieve tax id

=head2 create

    my $obj = $stripe->tax_ids( create => {
        type  => "eu_vat",
        value => "DE123456789", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Customer::TaxId> object or a hash reference, this will create a Stripe tax id and return an L<Net::API::Stripe::Customer::TaxId> object.

Possible parameters are:

=over 4

=item C<type>

B<Required>. Type of the tax ID, one of C<ae_trn>, C<au_abn>, C<au_arn>, C<bg_uic>, C<br_cnpj>, C<br_cpf>, C<ca_bn>, C<ca_gst_hst>, C<ca_pst_bc>, C<ca_pst_mb>, C<ca_pst_sk>, C<ca_qst>, C<ch_vat>, C<cl_tin>, C<es_cif>, C<eu_oss_vat>, C<eu_vat>, C<gb_vat>, C<ge_vat>, C<hk_br>, C<hu_tin>, C<id_npwp>, C<il_vat>, C<in_gst>, C<is_vat>, C<jp_cn>, C<jp_rn>, C<kr_brn>, C<li_uid>, C<mx_rfc>, C<my_frp>, C<my_itn>, C<my_sst>, C<no_vat>, C<nz_gst>, C<ru_inn>, C<ru_kpp>, C<sa_vat>, C<sg_gst>, C<sg_uen>, C<si_tin>, C<th_vat>, C<tw_vat>, C<ua_vat>, C<us_ein>, or C<za_vat>

=item C<value>

B<Required>. Value of the tax ID.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/customer_tax_ids/create>

=head2 delete

    my $obj = $stripe->tax_ids( delete => $args ) || die( $stripe->error );

Provided with a L<tax id|Net::API::Stripe::Customer::TaxId>, or a hash reference, this will issue an api call to Stripe to remove the tax id. It returns the tax id object that was deleted with its property C<deleted> set to true.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/customer_tax_ids/delete>

=head2 list

    my $obj = $stripe->tax_ids( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<tax id|Net::API::Stripe::Customer::TaxId> object, this issue an api call to get the list of all tax id.

Possible parameters are:

=over 4

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/customer_tax_ids/list>

=head2 retrieve

    my $obj = $stripe->tax_ids( retrieve => $args ) || die( $stripe->error );

Provided with a L<tax id|Net::API::Stripe::Customer::TaxId> object or a hash reference, this will retrieve a Stripe tax id and return its corresponding L<object|Net::API::Stripe::Customer::TaxId>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/customer_tax_ids/retrieve>

=head1 TAX RATE

You can create, list, retrieve or update tax rate

=head2 create

    my $obj = $stripe->tax_rates( create => {
        description  => "VAT Germany",
        display_name => "VAT",
        inclusive    => "0",
        jurisdiction => "DE",
        percentage   => "16", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Tax::Rate> object or a hash reference, this will create a Stripe tax rate and return an L<Net::API::Stripe::Tax::Rate> object.

Possible parameters are:

=over 4

=item C<active>

Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.

=item C<country>

Two-letter country code (L<ISO 3166-1 alpha-2|https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)>.

=item C<description>

An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.

=item C<display_name>

B<Required>. The display name of the tax rate, which will be shown to users.

=item C<inclusive>

B<Required>. This specifies if the tax rate is inclusive or exclusive.

=item C<jurisdiction>

The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<percentage>

B<Required>. This represents the tax rate percent out of 100.

=item C<state>

L<ISO 3166-2 subdivision code|https://en.wikipedia.org/wiki/ISO_3166-2:US>, without country prefix. For example, "NY" for New York, United States.

=item C<tax_type>

The high-level tax type, such as C<vat> or C<sales_tax>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/tax_rates/create>

=head2 list

    my $obj = $stripe->tax_rates( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<tax rate|Net::API::Stripe::Tax::Rate> object, this issue an api call to get the list of all tax rate.

Possible parameters are:

=over 4

=item C<active>

Optional flag to filter by tax rates that are either active or inactive (archived).

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<inclusive>

Optional flag to filter by tax rates that are inclusive (or those that are not inclusive).

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/tax_rates/list>

=head2 retrieve

    my $obj = $stripe->tax_rates( retrieve => $args ) || die( $stripe->error );

Provided with a L<tax rate|Net::API::Stripe::Tax::Rate> object or a hash reference, this will retrieve a Stripe tax rate and return its corresponding L<object|Net::API::Stripe::Tax::Rate>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/tax_rates/retrieve>

=head2 update

    my $obj = $stripe->tax_rates( update => {
        active => "0", } ) || die( $stripe->error );

Provided with a L<tax rate|Net::API::Stripe::Tax::Rate> object or a hash reference, this will update a Stripe tax rate and return its corresponding L<object|Net::API::Stripe::Tax::Rate>

Possible parameters are:

=over 4

=item C<active>

Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.

=item C<country>

Two-letter country code (L<ISO 3166-1 alpha-2|https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)>.

=item C<description>

An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.

=item C<display_name>

The display name of the tax rate, which will be shown to users.

=item C<jurisdiction>

The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<state>

L<ISO 3166-2 subdivision code|https://en.wikipedia.org/wiki/ISO_3166-2:US>, without country prefix. For example, "NY" for New York, United States.

=item C<tax_type>

The high-level tax type, such as C<vat> or C<sales_tax>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/tax_rates/update>

=head1 TERMINAL CONFIGURATION

You can create, delete, list, retrieve or update terminal configuration

=head2 create

    my $obj = $stripe->terminal_configurations( create => {
        bbpos_wisepos_e =>
        {
            splashscreen => "file_1Le9F32eZvKYlo2CupWuSTyz",
        } } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Terminal::Configuration> object or a hash reference, this will create a Stripe terminal configuration and return an L<Net::API::Stripe::Terminal::Configuration> object.

Possible parameters are:

=over 4

=item C<bbpos_wisepos_e>

An object containing device type specific settings for BBPOS WisePOS E readers

=item C<tipping>

Tipping configurations for readers supporting on-reader tips

=item C<verifone_p400>

An object containing device type specific settings for Verifone P400 readers

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/terminal/configuration/create>

=head2 delete

    my $obj = $stripe->terminal_configurations( delete => $args ) || die( $stripe->error );

Provided with a L<terminal configuration|Net::API::Stripe::Terminal::Configuration>, or a hash reference, this will issue an api call to Stripe to remove the terminal configuration. It returns the terminal configuration object that was deleted with its property C<deleted> set to true.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/terminal/configuration/delete>

=head2 list

    my $obj = $stripe->terminal_configurations( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<terminal configuration|Net::API::Stripe::Terminal::Configuration> object, this issue an api call to get the list of all terminal configuration.

Possible parameters are:

=over 4

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<is_account_default>

if present, only return the account default or non-default configurations.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/terminal/configuration/list>

=head2 retrieve

    my $obj = $stripe->terminal_configurations( retrieve => $args ) || die( $stripe->error );

Provided with a L<terminal configuration|Net::API::Stripe::Terminal::Configuration> object or a hash reference, this will retrieve a Stripe terminal configuration and return its corresponding L<object|Net::API::Stripe::Terminal::Configuration>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/terminal/configuration/retrieve>

=head2 update

    my $obj = $stripe->terminal_configurations( update => {
        bbpos_wisepos_e =>
        {
            splashscreen => "file_1Le9F32eZvKYlo2CupWuSTyz",
        } } ) || die( $stripe->error );

Provided with a L<terminal configuration|Net::API::Stripe::Terminal::Configuration> object or a hash reference, this will update a Stripe terminal configuration and return its corresponding L<object|Net::API::Stripe::Terminal::Configuration>

Possible parameters are:

=over 4

=item C<bbpos_wisepos_e>

An object containing device type specific settings for BBPOS WisePOS E readers

=item C<tipping>

Tipping configurations for readers supporting on-reader tips

=item C<verifone_p400>

An object containing device type specific settings for Verifone P400 readers

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/terminal/configuration/update>

=head1 TERMINAL CONNECTION TOKEN

You can create terminal connection token

=head2 create

    my $obj = $stripe->terminal_connection_tokens( create => $args ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Terminal::ConnectionToken> object or a hash reference, this will create a Stripe terminal connection token and return an L<Net::API::Stripe::Terminal::ConnectionToken> object.

Possible parameters are:

=over 4

=item C<location>

The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see L<the docs on scoping connection tokens|https://stripe.com/docs/terminal/fleet/locations#connection-tokens>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/terminal/connection_tokens/create>

=head1 TERMINAL LOCATION

You can create, delete, list, retrieve or update terminal location

=head2 create

    my $obj = $stripe->terminal_locations( create => {
        address      =>
        {
            city        => "San Francisco",
            country     => "US",
            line1       => "1234 Main Street",
            postal_code => "94111",
        }
        display_name => "My First Store", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Terminal::Location> object or a hash reference, this will create a Stripe terminal location and return an L<Net::API::Stripe::Terminal::Location> object.

Possible parameters are:

=over 4

=item C<address>

B<Required>. The full address of the location.

=item C<configuration_overrides>

The ID of a configuration that will be used to customize all readers in this location.

=item C<display_name>

B<Required>. A name for the location.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/terminal/locations/create>

=head2 delete

    my $obj = $stripe->terminal_locations( delete => $args ) || die( $stripe->error );

Provided with a L<terminal location|Net::API::Stripe::Terminal::Location>, or a hash reference, this will issue an api call to Stripe to remove the terminal location. It returns the terminal location object that was deleted with its property C<deleted> set to true.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/terminal/locations/delete>

=head2 list

    my $obj = $stripe->terminal_locations( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<terminal location|Net::API::Stripe::Terminal::Location> object, this issue an api call to get the list of all terminal location.

Possible parameters are:

=over 4

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/terminal/locations/list>

=head2 retrieve

    my $obj = $stripe->terminal_locations( retrieve => $args ) || die( $stripe->error );

Provided with a L<terminal location|Net::API::Stripe::Terminal::Location> object or a hash reference, this will retrieve a Stripe terminal location and return its corresponding L<object|Net::API::Stripe::Terminal::Location>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/terminal/locations/retrieve>

=head2 update

    my $obj = $stripe->terminal_locations( update => {
        display_name => "My First Store", } ) || die( $stripe->error );

Provided with a L<terminal location|Net::API::Stripe::Terminal::Location> object or a hash reference, this will update a Stripe terminal location and return its corresponding L<object|Net::API::Stripe::Terminal::Location>

Possible parameters are:

=over 4

=item C<address>

The full address of the location.

=item C<configuration_overrides>

The ID of a configuration that will be used to customize all readers in this location.

=item C<display_name>

A name for the location.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/terminal/locations/update>

=head1 TERMINAL READER

You can cancel_action, create, delete, list, present_payment_method, process_payment_intent, process_setup_intent, retrieve, set_reader_display or update terminal reader

=head2 cancel_action

    my $obj = $stripe->terminal_readers( cancel_action => $args ) || die( $stripe->error );

Provided with a L<terminal reader|Net::API::Stripe::Terminal::Reader>, or a hash reference, this will issue a cancel_action api call.

Returns an updated C<Reader> resource.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/terminal/readers/cancel_action>

=head2 create

    my $obj = $stripe->terminal_readers( create => {
        label             => "Blue Rabbit",
        location          => "tml_1234",
        registration_code => "puppies-plug-could", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Terminal::Reader> object or a hash reference, this will create a Stripe terminal reader and return an L<Net::API::Stripe::Terminal::Reader> object.

Possible parameters are:

=over 4

=item C<label>

Custom label given to the reader for easier identification. If no label is specified, the registration code will be used.

=item C<location>

B<required> The location to assign the reader to.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<registration_code>

B<Required>. A code generated by the reader used for registering to an account.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/terminal/readers/create>

=head2 delete

    my $obj = $stripe->terminal_readers( delete => $args ) || die( $stripe->error );

Provided with a L<terminal reader|Net::API::Stripe::Terminal::Reader>, or a hash reference, this will issue an api call to Stripe to remove the terminal reader. It returns the terminal reader object that was deleted with its property C<deleted> set to true.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/terminal/readers/delete>

=head2 list

    my $obj = $stripe->terminal_readers( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<terminal reader|Net::API::Stripe::Terminal::Reader> object, this issue an api call to get the list of all terminal reader.

Possible parameters are:

=over 4

=item C<device_type>

Filters readers by device type

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<location>

A location ID to filter the response list to only readers at the specific location

=item C<serial_number>

Filters readers by serial number

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<status>

A status filter to filter readers to only offline or online readers

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/terminal/readers/list>

=head2 present_payment_method

    my $obj = $stripe->terminal_readers( present_payment_method => $args ) || die( $stripe->error );

Provided with a L<terminal reader|Net::API::Stripe::Terminal::Reader>, or a hash reference, this will issue a present_payment_method api call.

Returns an updated C<Reader> resource.

Possible parameters are:

=over 4

=item C<card_present>

Simulated data for the card_present payment method

=item C<type>

Simulated payment type

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/terminal/readers/present_payment_method>

=head2 process_payment_intent

    my $obj = $stripe->terminal_readers( process_payment_intent => {
        payment_intent => "pi_1DsTej2eZvKYlo2C5PX0hXuO", } ) || die( $stripe->error );

Provided with a L<terminal reader|Net::API::Stripe::Terminal::Reader>, or a hash reference, this will issue a process_payment_intent api call.

Returns an updated C<Reader> resource.

Possible parameters are:

=over 4

=item C<payment_intent>

B<Required>. PaymentIntent ID

=item C<process_config>

Configuration overrides

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/terminal/readers/process_payment_intent>

=head2 process_setup_intent

    my $obj = $stripe->terminal_readers( process_setup_intent => {
        customer_consent_collected => "true",
        setup_intent               => "seti_1Le8Ey2eZvKYlo2CVYgmKCc3", } ) || die( $stripe->error );

Provided with a L<terminal reader|Net::API::Stripe::Terminal::Reader>, or a hash reference, this will issue a process_setup_intent api call.

Returns an updated C<Reader> resource.

Possible parameters are:

=over 4

=item C<customer_consent_collected>

B<Required>. Customer Consent Collected

=item C<setup_intent>

B<Required>. SetupIntent ID

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/terminal/readers/process_setup_intent>

=head2 retrieve

    my $obj = $stripe->terminal_readers( retrieve => $args ) || die( $stripe->error );

Provided with a L<terminal reader|Net::API::Stripe::Terminal::Reader> object or a hash reference, this will retrieve a Stripe terminal reader and return its corresponding L<object|Net::API::Stripe::Terminal::Reader>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/terminal/readers/retrieve>

=head2 set_reader_display

    my $obj = $stripe->terminal_readers( set_reader_display => {
        cart =>
        {
            currency   => "usd",
            line_items => [,
                amount      => "5100",
                description => "Red t-shirt",
                quantity    => "1",
            ],
            tax        => "100",
            total      => "5200",
        }
        type => "cart", } ) || die( $stripe->error );

Provided with a L<terminal reader|Net::API::Stripe::Terminal::Reader>, or a hash reference, this will issue a set_reader_display api call.

Returns an updated C<Reader> resource.

Possible parameters are:

=over 4

=item C<cart>

Cart

=item C<type>

B<Required>. Type

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/terminal/readers/set_reader_display>

=head2 update

    my $obj = $stripe->terminal_readers( update => {
        label => "Blue Rabbit", } ) || die( $stripe->error );

Provided with a L<terminal reader|Net::API::Stripe::Terminal::Reader> object or a hash reference, this will update a Stripe terminal reader and return its corresponding L<object|Net::API::Stripe::Terminal::Reader>

Possible parameters are:

=over 4

=item C<label>

The new label of the reader.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/terminal/readers/update>

=head1 TEST HELPERS TEST CLOCK

You can advance, create, delete, list or retrieve test helpers test clock

=head2 advance

    my $obj = $stripe->test_helpers_test_clocks( advance => {
        frozen_time => "1662347484", } ) || die( $stripe->error );

Provided with a L<test helpers test clock|Net::API::Stripe::Billing::TestHelpersTestClock>, or a hash reference, this will issue a advance api call.

A C<TestClock> object with status C<Advancing> is returned upon success. Otherwise, this call returns L<an error|https://stripe.com/docs/api/errors>.

Possible parameters are:

=over 4

=item C<frozen_time>

B<Required>. The time to advance the test clock. Must be after the test clock's current frozen time. Cannot be more than two intervals in the future from the shortest subscription in this test clock. If there are no subscriptions in this test clock, it cannot be more than two years in the future.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/test_clocks/advance>

=head2 create

    my $obj = $stripe->test_helpers_test_clocks( create => {
        frozen_time => "1577836800", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Billing::TestHelpersTestClock> object or a hash reference, this will create a Stripe test helpers test clock and return an L<Net::API::Stripe::Billing::TestHelpersTestClock> object.

Possible parameters are:

=over 4

=item C<frozen_time>

B<Required>. The initial frozen time for this test clock.

=item C<name>

The name for this test clock.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/test_clocks/create>

=head2 delete

    my $obj = $stripe->test_helpers_test_clocks( delete => $args ) || die( $stripe->error );

Provided with a L<test helpers test clock|Net::API::Stripe::Billing::TestHelpersTestClock>, or a hash reference, this will issue an api call to Stripe to remove the test helpers test clock. It returns the test helpers test clock object that was deleted with its property C<deleted> set to true.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/test_clocks/delete>

=head2 list

    my $obj = $stripe->test_helpers_test_clocks( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<test helpers test clock|Net::API::Stripe::Billing::TestHelpersTestClock> object, this issue an api call to get the list of all test helpers test clock.

Possible parameters are:

=over 4

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/test_clocks/list>

=head2 retrieve

    my $obj = $stripe->test_helpers_test_clocks( retrieve => $args ) || die( $stripe->error );

Provided with a L<test helpers test clock|Net::API::Stripe::Billing::TestHelpersTestClock> object or a hash reference, this will retrieve a Stripe test helpers test clock and return its corresponding L<object|Net::API::Stripe::Billing::TestHelpersTestClock>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/test_clocks/retrieve>

=head1 TOKEN

You can create, create_account, create_bank_account, create_card, create_cvc_update, create_person, create_pii or retrieve token

=head2 create_account

    my $obj = $stripe->tokens( create_account => {
        account =>
        {
            individual             =>
            {
                first_name => "Jane",
                last_name  => "Doe",
            }
            tos_shown_and_accepted => "1",
        } } ) || die( $stripe->error );

Provided with a L<token|Net::API::Stripe::Token>, or a hash reference, this will issue a create_account api call.

Returns the created account token if successful. Otherwise, this call returns L<an error|https://stripe.com/docs/api/errors>.

Possible parameters are:

=over 4

=item C<account>

B<Required>. Information for the account this token will represent.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/tokens/create_account>

=head2 create_bank_account

    my $obj = $stripe->tokens( create_bank_account => {
        bank_account =>
        {
            account_holder_name => "Jenny Rosen",
            account_holder_type => "individual",
            account_number      => "000123456789",
            country             => "US",
            currency            => "usd",
            routing_number      => "110000000",
        } } ) || die( $stripe->error );

Provided with a L<token|Net::API::Stripe::Token>, or a hash reference, this will issue a create_bank_account api call.

Returns the created bank account token if successful. Otherwise, this call returns L<an error|https://stripe.com/docs/api/errors>.

Possible parameters are:

=over 4

=item C<bank_account>

The bank account this token will represent.

=item C<customer>

The customer (owned by the application's account) for which to create a token. This can be used only with an L<OAuth access token|https://stripe.com/docs/connect/standard-accounts> or L<Stripe-Account header|https://stripe.com/docs/connect/authentication>. For more details, see L<Cloning Saved Payment Methods|https://stripe.com/docs/connect/cloning-saved-payment-methods>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/tokens/create_bank_account>

=head2 create_card

    my $obj = $stripe->tokens( create_card => {
        card =>
        {
            cvc       => "314",
            exp_month => "9",
            exp_year  => "2023",
            number    => "4242424242424242",
        } } ) || die( $stripe->error );

Provided with a L<token|Net::API::Stripe::Token>, or a hash reference, this will issue a create_card api call.

Returns the created card token if successful. Otherwise, this call raises L<an error|https://stripe.com/docs/api/errors>.

Possible parameters are:

=over 4

=item C<card>

The card this token will represent. If you also pass in a customer, the card must be the ID of a card belonging to the customer. Otherwise, if you do not pass in a customer, this is a dictionary containing a user's credit card details, with the options described below.

=item C<customer>

The customer (owned by the application's account) for which to create a token. Also, this can be used only with an L<OAuth access token|https://stripe.com/docs/connect/standard-accounts> or L<Stripe-Account header|https://stripe.com/docs/connect/authentication>. For more details, see L<Cloning Saved Payment Methods|https://stripe.com/docs/connect/cloning-saved-payment-methods>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/tokens/create_card>

=head2 create_cvc_update

    my $obj = $stripe->tokens( create_cvc_update => {
        cvc_update =>
        {
            cvc => "123",
        } } ) || die( $stripe->error );

Provided with a L<token|Net::API::Stripe::Token>, or a hash reference, this will issue a create_cvc_update api call.

Returns the created CVC update token if successful. Otherwise, this call raises L<an error|https://stripe.com/docs/api/errors>.

Possible parameters are:

=over 4

=item C<cvc_update>

B<Required>. The updated CVC value this token will represent.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/tokens/create_cvc_update>

=head2 create_person

    my $obj = $stripe->tokens( create_person => {
        person =>
        {
            first_name   => "Jane",
            last_name    => "Doe",
            relationship =>
            {
                owner => "1",
            }
        } } ) || die( $stripe->error );

Provided with a L<token|Net::API::Stripe::Token>, or a hash reference, this will issue a create_person api call.

Returns the created person token if successful. Otherwise, this call returns L<an error|https://stripe.com/docs/api/errors>.

Possible parameters are:

=over 4

=item C<person>

B<Required>. Information for the person this token will represent.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/tokens/create_person>

=head2 create_pii

    my $obj = $stripe->tokens( create_pii => {
        pii =>
        {
            id_number => "000000000",
        } } ) || die( $stripe->error );

Provided with a L<token|Net::API::Stripe::Token>, or a hash reference, this will issue a create_pii api call.

Returns the created PII token if successful. Otherwise, this call returns L<an error|https://stripe.com/docs/api/errors>.

Possible parameters are:

=over 4

=item C<pii>

B<Required>. The PII this token will represent.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/tokens/create_pii>

=head2 retrieve

    my $obj = $stripe->tokens( retrieve => $args ) || die( $stripe->error );

Provided with a L<token|Net::API::Stripe::Token> object or a hash reference, this will retrieve a Stripe token and return its corresponding L<object|Net::API::Stripe::Token>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/tokens/retrieve>

=head1 TOPUP

You can cancel, create, list, retrieve or update topup

=head2 cancel

    my $obj = $stripe->topups( cancel => $args ) || die( $stripe->error );

Provided with a L<topup|Net::API::Stripe::Connect::TopUp>, or a hash reference, this will issue a cancel api call.

Returns the canceled top-up. If the top-up is already canceled or can’t be canceled, an error is returned.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/topups/cancel>

=head2 create

    my $obj = $stripe->topups( create => {
        amount               => "2000",
        currency             => "usd",
        description          => "Top-up for Jenny Rosen",
        statement_descriptor => "Top-up", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Connect::TopUp> object or a hash reference, this will create a Stripe topup and return an L<Net::API::Stripe::Connect::TopUp> object.

Possible parameters are:

=over 4

=item C<amount>

B<Required>. A positive integer representing how much to transfer.

=item C<currency>

B<Required>. Three-letter L<ISO currency code|https://www.iso.org/iso-4217-currency-codes.html>, in lowercase. Must be a L<supported currency|https://stripe.com/docs/currencies>.

=item C<description>

An arbitrary string attached to the object. Often useful for displaying to users.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<source>

The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see L<Testing Top-ups|https://stripe.com/docs/connect/testing#testing-top-ups>).

=item C<statement_descriptor>

Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters.

=item C<transfer_group>

A string that identifies this top-up as part of a group.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/topups/create>

=head2 list

    my $obj = $stripe->topups( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<topup|Net::API::Stripe::Connect::TopUp> object, this issue an api call to get the list of all topup.

Possible parameters are:

=over 4

=item C<amount>

A filter on the list based on the object C<amount> field. The value can be a string with an integer amount, or it can be a dictionary with the following options:

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<status>

Only return top-ups that have the given status. One of C<canceled>, C<failed>, C<pending> or C<succeeded>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/topups/list>

=head2 retrieve

    my $obj = $stripe->topups( retrieve => $args ) || die( $stripe->error );

Provided with a L<topup|Net::API::Stripe::Connect::TopUp> object or a hash reference, this will retrieve a Stripe topup and return its corresponding L<object|Net::API::Stripe::Connect::TopUp>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/topups/retrieve>

=head2 update

    my $obj = $stripe->topups( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<topup|Net::API::Stripe::Connect::TopUp> object or a hash reference, this will update a Stripe topup and return its corresponding L<object|Net::API::Stripe::Connect::TopUp>

Possible parameters are:

=over 4

=item C<description>

An arbitrary string attached to the object. Often useful for displaying to users.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/topups/update>

=head1 TRANSFER

You can create, list, retrieve or update transfer

=head2 create

    my $obj = $stripe->transfers( create => {
        amount         => "400",
        currency       => "usd",
        destination    => "acct_1032D82eZvKYlo2C",
        transfer_group => "ORDER_95", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Connect::Transfer> object or a hash reference, this will create a Stripe transfer and return an L<Net::API::Stripe::Connect::Transfer> object.

Possible parameters are:

=over 4

=item C<amount>

B<required> A positive integer in JPY representing how much to transfer.

=item C<currency>

B<Required>. 3-letter L<ISO code for currency|https://stripe.com/docs/payouts>.

=item C<description>

An arbitrary string attached to the object. Often useful for displaying to users.

=item C<destination>

B<Required>. The ID of a connected Stripe account. <a href="/docs/connect/charges-transfers">See the Connect documentation</a> for details.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<source_transaction>

You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. L<See the Connect documentation|https://stripe.com/docs/connect/charges-transfers#transfer-availability> for details.

=item C<source_type>

The source balance to use for this transfer. One of C<bank_account>, C<card>, or C<fpx>. For most users, this will default to C<card>.

=item C<transfer_group>

A string that identifies this transaction as part of a group. See the L<Connect documentation|https://stripe.com/docs/connect/charges-transfers#transfer-options> for details.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/transfers/create>

=head2 list

    my $obj = $stripe->transfers( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<transfer|Net::API::Stripe::Connect::Transfer> object, this issue an api call to get the list of all transfer.

Possible parameters are:

=over 4

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<destination>

Only return transfers for the destination specified by this account ID.

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<transfer_group>

Only return transfers with the specified transfer group.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/transfers/list>

=head2 retrieve

    my $obj = $stripe->transfers( retrieve => $args ) || die( $stripe->error );

Provided with a L<transfer|Net::API::Stripe::Connect::Transfer> object or a hash reference, this will retrieve a Stripe transfer and return its corresponding L<object|Net::API::Stripe::Connect::Transfer>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/transfers/retrieve>

=head2 update

    my $obj = $stripe->transfers( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<transfer|Net::API::Stripe::Connect::Transfer> object or a hash reference, this will update a Stripe transfer and return its corresponding L<object|Net::API::Stripe::Connect::Transfer>

Possible parameters are:

=over 4

=item C<description>

An arbitrary string attached to the object. Often useful for displaying to users.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/transfers/update>

=head1 TRANSFER REVERSAL

You can create, list, retrieve or update transfer reversal

=head2 create

    my $obj = $stripe->transfer_reversals( create => {
        amount => "100", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Connect::Transfer::Reversal> object or a hash reference, this will create a Stripe transfer reversal and return an L<Net::API::Stripe::Connect::Transfer::Reversal> object.

Possible parameters are:

=over 4

=item C<amount>

A positive integer in JPY representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount.

=item C<description>

An arbitrary string which you can attach to a reversal object. It is displayed alongside the reversal in the Dashboard. This will be unset if you POST an empty value.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<refund_application_fee>

Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/transfer_reversals/create>

=head2 list

    my $obj = $stripe->transfer_reversals( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<transfer reversal|Net::API::Stripe::Connect::Transfer::Reversal> object, this issue an api call to get the list of all transfer reversal.

Possible parameters are:

=over 4

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/transfer_reversals/list>

=head2 retrieve

    my $obj = $stripe->transfer_reversals( retrieve => $args ) || die( $stripe->error );

Provided with a L<transfer reversal|Net::API::Stripe::Connect::Transfer::Reversal> object or a hash reference, this will retrieve a Stripe transfer reversal and return its corresponding L<object|Net::API::Stripe::Connect::Transfer::Reversal>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/transfer_reversals/retrieve>

=head2 update

    my $obj = $stripe->transfer_reversals( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<transfer reversal|Net::API::Stripe::Connect::Transfer::Reversal> object or a hash reference, this will update a Stripe transfer reversal and return its corresponding L<object|Net::API::Stripe::Connect::Transfer::Reversal>

Possible parameters are:

=over 4

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/transfer_reversals/update>

=head1 TREASURY CREDIT REVERSAL

You can create, list or retrieve treasury credit reversal

=head2 create

    my $obj = $stripe->treasury_credit_reversals( create => {
        received_credit => "rc_1Le9F42eZvKYlo2CM2wIU5bz", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Treasury::CreditReversal> object or a hash reference, this will create a Stripe treasury credit reversal and return an L<Net::API::Stripe::Treasury::CreditReversal> object.

Possible parameters are:

=over 4

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<received_credit>

B<Required>. The ReceivedCredit to reverse.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/credit_reversals/create>

=head2 list

    my $obj = $stripe->treasury_credit_reversals( list => {
        financial_account => "fa_1Le9F32eZvKYlo2CjbQcDQUE",
        limit             => "3", } ) || die( $stripe->error );

Provided with a L<treasury credit reversal|Net::API::Stripe::Treasury::CreditReversal> object, this issue an api call to get the list of all treasury credit reversal.

Possible parameters are:

=over 4

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<financial_account>

B<Required>. Returns objects associated with this FinancialAccount.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<received_credit>

Only return CreditReversals for the ReceivedCredit ID.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<status>

Only return CreditReversals for a given status.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/credit_reversals/list>

=head2 retrieve

    my $obj = $stripe->treasury_credit_reversals( retrieve => $args ) || die( $stripe->error );

Provided with a L<treasury credit reversal|Net::API::Stripe::Treasury::CreditReversal> object or a hash reference, this will retrieve a Stripe treasury credit reversal and return its corresponding L<object|Net::API::Stripe::Treasury::CreditReversal>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/credit_reversals/retrieve>

=head1 TREASURY DEBIT REVERSAL

You can create, list or retrieve treasury debit reversal

=head2 create

    my $obj = $stripe->treasury_debit_reversals( create => {
        received_debit => "rd_1Le9F42eZvKYlo2C0TIJJqNP", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Treasury::DebitReversal> object or a hash reference, this will create a Stripe treasury debit reversal and return an L<Net::API::Stripe::Treasury::DebitReversal> object.

Possible parameters are:

=over 4

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<received_debit>

B<Required>. The ReceivedDebit to reverse.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/debit_reversals/create>

=head2 list

    my $obj = $stripe->treasury_debit_reversals( list => {
        financial_account => "fa_1Le9F32eZvKYlo2CjbQcDQUE",
        limit             => "3", } ) || die( $stripe->error );

Provided with a L<treasury debit reversal|Net::API::Stripe::Treasury::DebitReversal> object, this issue an api call to get the list of all treasury debit reversal.

Possible parameters are:

=over 4

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<financial_account>

B<Required>. Returns objects associated with this FinancialAccount.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<received_debit>

Only return DebitReversals for the ReceivedDebit ID.

=item C<resolution>

Only return DebitReversals for a given resolution.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<status>

Only return DebitReversals for a given status.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/debit_reversals/list>

=head2 retrieve

    my $obj = $stripe->treasury_debit_reversals( retrieve => $args ) || die( $stripe->error );

Provided with a L<treasury debit reversal|Net::API::Stripe::Treasury::DebitReversal> object or a hash reference, this will retrieve a Stripe treasury debit reversal and return its corresponding L<object|Net::API::Stripe::Treasury::DebitReversal>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/debit_reversals/retrieve>

=head1 TREASURY FINANCIAL ACCOUNT

You can create, list, retrieve or update treasury financial account

=head2 create

    my $obj = $stripe->treasury_financial_accounts( create => {
        features             =>
        {
        }
        supported_currencies => [qw( usd )], } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Treasury::FinancialAccount> object or a hash reference, this will create a Stripe treasury financial account and return an L<Net::API::Stripe::Treasury::FinancialAccount> object.

Possible parameters are:

=over 4

=item C<features>

Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<platform_restrictions>

The set of functionalities that the platform can restrict on the FinancialAccount.

=item C<supported_currencies>

B<Required>. The currencies the FinancialAccount can hold a balance in.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/financial_accounts/create>

=head2 list

    my $obj = $stripe->treasury_financial_accounts( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<treasury financial account|Net::API::Stripe::Treasury::FinancialAccount> object, this issue an api call to get the list of all treasury financial account.

Possible parameters are:

=over 4

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<ending_before>

An object ID cursor for use in pagination.

=item C<limit>

A limit ranging from 1 to 100 (defaults to 10).

=item C<starting_after>

An object ID cursor for use in pagination.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/financial_accounts/list>

=head2 retrieve

    my $obj = $stripe->treasury_financial_accounts( retrieve => $args ) || die( $stripe->error );

Provided with a L<treasury financial account|Net::API::Stripe::Treasury::FinancialAccount> object or a hash reference, this will retrieve a Stripe treasury financial account and return its corresponding L<object|Net::API::Stripe::Treasury::FinancialAccount>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/financial_accounts/retrieve>

=head2 update

    my $obj = $stripe->treasury_financial_accounts( update => {
        metadata =>
        {
            order_id => "6735",
        } } ) || die( $stripe->error );

Provided with a L<treasury financial account|Net::API::Stripe::Treasury::FinancialAccount> object or a hash reference, this will update a Stripe treasury financial account and return its corresponding L<object|Net::API::Stripe::Treasury::FinancialAccount>

Possible parameters are:

=over 4

=item C<features>

Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated C<status_details>. Stripe or the platform may control features via the requested field.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<platform_restrictions>

The set of functionalities that the platform can restrict on the FinancialAccount.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/financial_accounts/update>

=head1 TREASURY FINANCIAL ACCOUNT FEATURES

You can retrieve or update treasury financial account features

=head2 retrieve

    my $obj = $stripe->treasury_financial_account_featuress( retrieve => $args ) || die( $stripe->error );

Provided with a L<treasury financial account features|Net::API::Stripe::Treasury::FinancialAccountFeatures> object or a hash reference, this will retrieve a Stripe treasury financial account features and return its corresponding L<object|Net::API::Stripe::Treasury::FinancialAccountFeatures>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/financial_account_features/retrieve>

=head2 update

    my $obj = $stripe->treasury_financial_account_featuress( update => {
        card_issuing =>
        {
            requested => "0",
        } } ) || die( $stripe->error );

Provided with a L<treasury financial account features|Net::API::Stripe::Treasury::FinancialAccountFeatures> object or a hash reference, this will update a Stripe treasury financial account features and return its corresponding L<object|Net::API::Stripe::Treasury::FinancialAccountFeatures>

Possible parameters are:

=over 4

=item C<card_issuing>

Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.

=item C<deposit_insurance>

Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.

=item C<financial_addresses>

Contains Features that add FinancialAddresses to the FinancialAccount.

=item C<inbound_transfers>

Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.

=item C<intra_stripe_flows>

Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).

=item C<outbound_payments>

Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.

=item C<outbound_transfers>

Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/financial_account_features/update>

=head1 TREASURY INBOUND TRANSFER

You can cancel, create, fail, list, retrieve, return or succeed treasury inbound transfer

=head2 cancel

    my $obj = $stripe->treasury_inbound_transfers( cancel => $args ) || die( $stripe->error );

Provided with a L<treasury inbound transfer|Net::API::Stripe::Treasury::InboundTransfer>, or a hash reference, this will issue a cancel api call.

Returns the InboundTransfer object if the cancellation succeeded. Returns an error if the InboundTransfer has already been canceled or cannot be canceled.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/inbound_transfers/cancel>

=head2 create

    my $obj = $stripe->treasury_inbound_transfers( create => {
        amount                => "10000",
        currency              => "usd",
        description           => "InboundTransfer from my bank account",
        financial_account     => "fa_1Le9F32eZvKYlo2CjbQcDQUE",
        origin_payment_method => "pm_1KMDdkGPnV27VyGeAgGz8bsi", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Treasury::InboundTransfer> object or a hash reference, this will create a Stripe treasury inbound transfer and return an L<Net::API::Stripe::Treasury::InboundTransfer> object.

Possible parameters are:

=over 4

=item C<amount>

B<Required>. Amount (in cents) to be transferred.

=item C<currency>

B<Required>. Three-letter L<ISO currency code|https://www.iso.org/iso-4217-currency-codes.html>, in lowercase. Must be a L<supported currency|https://stripe.com/docs/currencies>.

=item C<description>

An arbitrary string attached to the object. Often useful for displaying to users.

=item C<financial_account>

B<Required>. The FinancialAccount to send funds to.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<origin_payment_method>

B<Required>. The origin payment method to be debited for the InboundTransfer.

=item C<statement_descriptor>

The complete description that appears on your customers' statements. Maximum 10 characters.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/inbound_transfers/create>

=head2 fail

    my $obj = $stripe->treasury_inbound_transfers( fail => {
        failure_details =>
        {
            code => "insufficient_funds",
        } } ) || die( $stripe->error );

Provided with a L<treasury inbound transfer|Net::API::Stripe::Treasury::InboundTransfer>, or a hash reference, this will issue a fail api call.

Returns the InboundTransfer object in the returned state. Returns an error if the InboundTransfer has already failed or cannot be failed.

Possible parameters are:

=over 4

=item C<failure_details>

Details about a failed InboundTransfer.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/inbound_transfers/test_mode_fail>

=head2 list

    my $obj = $stripe->treasury_inbound_transfers( list => {
        financial_account => "fa_1Le9F32eZvKYlo2CjbQcDQUE",
        limit             => "3", } ) || die( $stripe->error );

Provided with a L<treasury inbound transfer|Net::API::Stripe::Treasury::InboundTransfer> object, this issue an api call to get the list of all treasury inbound transfer.

Possible parameters are:

=over 4

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<financial_account>

B<Required>. Returns objects associated with this FinancialAccount.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<status>

Only return InboundTransfers that have the given status: C<processing>, C<succeeded>, C<failed> or C<canceled>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/inbound_transfers/list>

=head2 retrieve

    my $obj = $stripe->treasury_inbound_transfers( retrieve => $args ) || die( $stripe->error );

Provided with a L<treasury inbound transfer|Net::API::Stripe::Treasury::InboundTransfer> object or a hash reference, this will retrieve a Stripe treasury inbound transfer and return its corresponding L<object|Net::API::Stripe::Treasury::InboundTransfer>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/inbound_transfers/retrieve>

=head2 return

    my $obj = $stripe->treasury_inbound_transfers( return => $args ) || die( $stripe->error );

Provided with a L<treasury inbound transfer|Net::API::Stripe::Treasury::InboundTransfer>, or a hash reference, this will issue a return api call.

Returns the InboundTransfer object with C<returned> set to C<true>. Returns an error if the InboundTransfer has already been returned or cannot be returned.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/inbound_transfers/test_mode_return>

=head2 succeed

    my $obj = $stripe->treasury_inbound_transfers( succeed => $args ) || die( $stripe->error );

Provided with a L<treasury inbound transfer|Net::API::Stripe::Treasury::InboundTransfer>, or a hash reference, this will issue a succeed api call.

Returns the InboundTransfer object in the succeeded state. Returns an error if the InboundTransfer has already succeeded or cannot be succeeded.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/inbound_transfers/test_mode_succeed>

=head1 TREASURY OUTBOUND PAYMENT

You can cancel, create, fail, list, post, retrieve or return treasury outbound payment

=head2 cancel

    my $obj = $stripe->treasury_outbound_payments( cancel => $args ) || die( $stripe->error );

Provided with a L<treasury outbound payment|Net::API::Stripe::Treasury::OutboundPayment>, or a hash reference, this will issue a cancel api call.

Returns the OutboundPayment object if the cancellation succeeded. Returns an error if the OutboundPayment has already been canceled or cannot be canceled.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/outbound_payments/cancel>

=head2 create

    my $obj = $stripe->treasury_outbound_payments( create => {
        amount                     => "10000",
        currency                   => "usd",
        customer                   => "cus_AJ78ZaALpqgiuZ",
        description                => "OutboundPayment to a 3rd party",
        destination_payment_method => "pm_1Le9F42eZvKYlo2Cy9Yph0k5",
        financial_account          => "fa_1Le9F32eZvKYlo2CjbQcDQUE", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Treasury::OutboundPayment> object or a hash reference, this will create a Stripe treasury outbound payment and return an L<Net::API::Stripe::Treasury::OutboundPayment> object.

Possible parameters are:

=over 4

=item C<amount>

B<Required>. Amount (in cents) to be transferred.

=item C<currency>

B<Required>. Three-letter L<ISO currency code|https://www.iso.org/iso-4217-currency-codes.html>, in lowercase. Must be a L<supported currency|https://stripe.com/docs/currencies>.

=item C<customer>

ID of the customer to whom the OutboundPayment is sent. Must match the Customer attached to the C<destination_payment_method> passed in.

=item C<description>

An arbitrary string attached to the object. Often useful for displaying to users.

=item C<destination_payment_method>

The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with C<destination_payment_method_data>.

=item C<destination_payment_method_data>

Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with C<destination_payment_method>.

=item C<destination_payment_method_options>

Payment method-specific configuration for this OutboundPayment.

=item C<end_user_details>

End user details.

=item C<financial_account>

B<Required>. The FinancialAccount to pull funds from.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<statement_descriptor>

The description that appears on the receiving end for this OutboundPayment (for example, bank statement for external bank transfer). Maximum 10 characters for C<ach> payments, 140 characters for C<wire> payments, or 500 characters for C<stripe> network transfers. The default value is C<payment>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/outbound_payments/create>

=head2 fail

    my $obj = $stripe->treasury_outbound_payments( fail => $args ) || die( $stripe->error );

Provided with a L<treasury outbound payment|Net::API::Stripe::Treasury::OutboundPayment>, or a hash reference, this will issue a fail api call.

Returns the OutboundPayment object in the failed state. Returns an error if the OutboundPayment has already been failed or cannot be failed.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/outbound_payments/test_mode_fail>

=head2 list

    my $obj = $stripe->treasury_outbound_payments( list => {
        financial_account => "fa_1Le9F32eZvKYlo2CjbQcDQUE",
        limit             => "3", } ) || die( $stripe->error );

Provided with a L<treasury outbound payment|Net::API::Stripe::Treasury::OutboundPayment> object, this issue an api call to get the list of all treasury outbound payment.

Possible parameters are:

=over 4

=item C<customer>

Only return OutboundPayments sent to this customer.

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<financial_account>

B<Required>. Returns objects associated with this FinancialAccount.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<status>

Only return OutboundPayments that have the given status: C<processing>, C<failed>, C<posted>, C<returned>, or C<canceled>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/outbound_payments/list>

=head2 post

    my $obj = $stripe->treasury_outbound_payments( post => $args ) || die( $stripe->error );

Provided with a L<treasury outbound payment|Net::API::Stripe::Treasury::OutboundPayment>, or a hash reference, this will issue a post api call.

Returns the OutboundPayment object in the posted state. Returns an error if the OutboundPayment has already been posted or cannot be posted.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/outbound_payments/test_mode_post>

=head2 retrieve

    my $obj = $stripe->treasury_outbound_payments( retrieve => $args ) || die( $stripe->error );

Provided with a L<treasury outbound payment|Net::API::Stripe::Treasury::OutboundPayment> object or a hash reference, this will retrieve a Stripe treasury outbound payment and return its corresponding L<object|Net::API::Stripe::Treasury::OutboundPayment>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/outbound_payments/retrieve>

=head2 return

    my $obj = $stripe->treasury_outbound_payments( return => {
        return_details =>
        {
            code => "account_closed",
        } } ) || die( $stripe->error );

Provided with a L<treasury outbound payment|Net::API::Stripe::Treasury::OutboundPayment>, or a hash reference, this will issue a return api call.

Returns the OutboundPayment object in the returned state. Returns an error if the OutboundPayment has already been returned or cannot be returned.

Possible parameters are:

=over 4

=item C<returned_details>

Optional hash to set the the return code.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/outbound_payments/test_mode_return>

=head1 TREASURY OUTBOUND TRANSFER

You can cancel, create, fail, list, post, retrieve or return treasury outbound transfer

=head2 cancel

    my $obj = $stripe->treasury_outbound_transfers( cancel => $args ) || die( $stripe->error );

Provided with a L<treasury outbound transfer|Net::API::Stripe::Treasury::OutboundTransfer>, or a hash reference, this will issue a cancel api call.

Returns the OutboundTransfer object if the cancellation succeeded. Returns an error if the object has already been canceled or cannot be canceled.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/outbound_transfers/cancel>

=head2 create

    my $obj = $stripe->treasury_outbound_transfers( create => {
        amount                     => "500",
        currency                   => "usd",
        description                => "OutboundTransfer to my external bank account",
        destination_payment_method => "pm_1234567890",
        financial_account          => "fa_1Le9F32eZvKYlo2CjbQcDQUE", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Treasury::OutboundTransfer> object or a hash reference, this will create a Stripe treasury outbound transfer and return an L<Net::API::Stripe::Treasury::OutboundTransfer> object.

Possible parameters are:

=over 4

=item C<amount>

B<Required>. Amount (in cents) to be transferred.

=item C<currency>

B<Required>. Three-letter L<ISO currency code|https://www.iso.org/iso-4217-currency-codes.html>, in lowercase. Must be a L<supported currency|https://stripe.com/docs/currencies>.

=item C<description>

An arbitrary string attached to the object. Often useful for displaying to users.

=item C<destination_payment_method>

The PaymentMethod to use as the payment instrument for the OutboundTransfer.

=item C<destination_payment_method_options>

Hash describing payment method configuration details.

=item C<financial_account>

B<Required>. The FinancialAccount to pull funds from.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<statement_descriptor>

Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for C<ach> transfers or 140 characters for C<wire> transfers. The default value is C<transfer>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/outbound_transfers/create>

=head2 fail

    my $obj = $stripe->treasury_outbound_transfers( fail => $args ) || die( $stripe->error );

Provided with a L<treasury outbound transfer|Net::API::Stripe::Treasury::OutboundTransfer>, or a hash reference, this will issue a fail api call.

Returns the OutboundTransfer object in the failed state. Returns an error if the OutboundTransfer has already been failed or cannot be failed.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/outbound_transfers/test_mode_fail>

=head2 list

    my $obj = $stripe->treasury_outbound_transfers( list => {
        financial_account => "fa_1Le9F32eZvKYlo2CjbQcDQUE",
        limit             => "3", } ) || die( $stripe->error );

Provided with a L<treasury outbound transfer|Net::API::Stripe::Treasury::OutboundTransfer> object, this issue an api call to get the list of all treasury outbound transfer.

Possible parameters are:

=over 4

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<financial_account>

B<Required>. Returns objects associated with this FinancialAccount.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<status>

Only return OutboundTransfers that have the given status: C<processing>, C<canceled>, C<failed>, C<posted>, or C<returned>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/outbound_transfers/list>

=head2 post

    my $obj = $stripe->treasury_outbound_transfers( post => $args ) || die( $stripe->error );

Provided with a L<treasury outbound transfer|Net::API::Stripe::Treasury::OutboundTransfer>, or a hash reference, this will issue a post api call.

Returns the OutboundTransfer object in the posted state. Returns an error if the OutboundTransfer has already been posted or cannot be posted.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/outbound_transfers/test_mode_post>

=head2 retrieve

    my $obj = $stripe->treasury_outbound_transfers( retrieve => $args ) || die( $stripe->error );

Provided with a L<treasury outbound transfer|Net::API::Stripe::Treasury::OutboundTransfer> object or a hash reference, this will retrieve a Stripe treasury outbound transfer and return its corresponding L<object|Net::API::Stripe::Treasury::OutboundTransfer>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/outbound_transfers/retrieve>

=head2 return

    my $obj = $stripe->treasury_outbound_transfers( return => {
        code => "declined", } ) || die( $stripe->error );

Provided with a L<treasury outbound transfer|Net::API::Stripe::Treasury::OutboundTransfer>, or a hash reference, this will issue a return api call.

Returns the OutboundTransfer object in the returned state. Returns an error if the OutboundTransfer has already been returned or cannot be returned.

Possible parameters are:

=over 4

=item C<returned_details>

Details about a returned OutboundTransfer.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/outbound_transfers/test_mode_return>

=head1 TREASURY RECEIVED CREDIT

You can list, received_credit or retrieve treasury received credit

=head2 list

    my $obj = $stripe->treasury_received_credits( list => {
        financial_account => "fa_1Le9F32eZvKYlo2CjbQcDQUE",
        limit             => "3", } ) || die( $stripe->error );

Provided with a L<treasury received credit|Net::API::Stripe::Treasury::ReceivedCredit> object, this issue an api call to get the list of all treasury received credit.

Possible parameters are:

=over 4

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<financial_account>

B<Required>. The FinancialAccount that received the funds.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<linked_flows>

Only return ReceivedCredits described by the flow.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<status>

Only return ReceivedCredits that have the given status: C<succeeded> or C<failed>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/received_credits/list>

=head2 received_credit

    my $obj = $stripe->treasury_received_credits( received_credit => {
        amount            => "1000",
        currency          => "usd",
        financial_account => "fa_1Le9F32eZvKYlo2CjbQcDQUE",
        network           => "ach", } ) || die( $stripe->error );

Provided with a L<treasury received credit|Net::API::Stripe::Treasury::ReceivedCredit>, or a hash reference, this will issue a received_credit api call.

A test mode ReceivedCredit object.

Possible parameters are:

=over 4

=item C<amount>

B<Required>. Amount (in cents) to be transferred.

=item C<currency>

B<Required>. Three-letter L<ISO currency code|https://www.iso.org/iso-4217-currency-codes.html>, in lowercase. Must be a L<supported currency|https://stripe.com/docs/currencies>.

=item C<description>

An arbitrary string attached to the object. Often useful for displaying to users.

=item C<financial_account>

B<Required>. The FinancialAccount to send funds to.

=item C<initiating_payment_method_details>

Initiating payment method details for the object.

=item C<network>

B<Required>. The rails used for the object.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/received_credits/test_mode_create>

=head2 retrieve

    my $obj = $stripe->treasury_received_credits( retrieve => $args ) || die( $stripe->error );

Provided with a L<treasury received credit|Net::API::Stripe::Treasury::ReceivedCredit> object or a hash reference, this will retrieve a Stripe treasury received credit and return its corresponding L<object|Net::API::Stripe::Treasury::ReceivedCredit>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/received_credits/retrieve>

=head1 TREASURY RECEIVED DEBIT

You can list, received_debit or retrieve treasury received debit

=head2 list

    my $obj = $stripe->treasury_received_debits( list => {
        financial_account => "fa_1Le9F32eZvKYlo2CjbQcDQUE",
        limit             => "3", } ) || die( $stripe->error );

Provided with a L<treasury received debit|Net::API::Stripe::Treasury::ReceivedDebit> object, this issue an api call to get the list of all treasury received debit.

Possible parameters are:

=over 4

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<financial_account>

B<Required>. The FinancialAccount that funds were pulled from.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<status>

Only return ReceivedDebits that have the given status: C<succeeded> or C<failed>.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/received_debits/list>

=head2 received_debit

    my $obj = $stripe->treasury_received_debits( received_debit => {
        amount            => "1000",
        currency          => "usd",
        financial_account => "fa_1Le9F32eZvKYlo2CjbQcDQUE",
        network           => "ach", } ) || die( $stripe->error );

Provided with a L<treasury received debit|Net::API::Stripe::Treasury::ReceivedDebit>, or a hash reference, this will issue a received_debit api call.

A test mode ReceivedDebit object.

Possible parameters are:

=over 4

=item C<amount>

B<Required>. Amount (in cents) to be transferred.

=item C<currency>

B<Required>. Three-letter L<ISO currency code|https://www.iso.org/iso-4217-currency-codes.html>, in lowercase. Must be a L<supported currency|https://stripe.com/docs/currencies>.

=item C<description>

An arbitrary string attached to the object. Often useful for displaying to users.

=item C<financial_account>

B<Required>. The FinancialAccount to pull funds from.

=item C<initiating_payment_method_details>

Initiating payment method details for the object.

=item C<network>

B<Required>. The rails used for the object.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/received_debits/test_mode_create>

=head2 retrieve

    my $obj = $stripe->treasury_received_debits( retrieve => $args ) || die( $stripe->error );

Provided with a L<treasury received debit|Net::API::Stripe::Treasury::ReceivedDebit> object or a hash reference, this will retrieve a Stripe treasury received debit and return its corresponding L<object|Net::API::Stripe::Treasury::ReceivedDebit>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/received_debits/retrieve>

=head1 TREASURY TRANSACTION

You can list or retrieve treasury transaction

=head2 list

    my $obj = $stripe->treasury_transactions( list => {
        financial_account => "fa_1Le9F32eZvKYlo2CjbQcDQUE",
        limit             => "3", } ) || die( $stripe->error );

Provided with a L<treasury transaction|Net::API::Stripe::Treasury::Transaction> object, this issue an api call to get the list of all treasury transaction.

Possible parameters are:

=over 4

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<financial_account>

B<Required>. Returns objects associated with this FinancialAccount.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<order_by>

The results are in reverse chronological order by C<created> or C<posted_at>. The default is C<created>.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<status>

Only return Transactions that have the given status: C<open>, C<posted>, or C<void>.

=item C<status_transitions>

A filter for the C<status_transitions.posted_at> timestamp. When using this filter, C<status=posted> and C<order_by=posted_at> must also be specified.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/transactions/list>

=head2 retrieve

    my $obj = $stripe->treasury_transactions( retrieve => $args ) || die( $stripe->error );

Provided with a L<treasury transaction|Net::API::Stripe::Treasury::Transaction> object or a hash reference, this will retrieve a Stripe treasury transaction and return its corresponding L<object|Net::API::Stripe::Treasury::Transaction>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/transactions/retrieve>

=head1 TREASURY TRANSACTION ENTRY

You can list or retrieve treasury transaction entry

=head2 list

    my $obj = $stripe->treasury_transaction_entrys( list => {
        financial_account => "fa_1Le9F32eZvKYlo2CjbQcDQUE",
        limit             => "3", } ) || die( $stripe->error );

Provided with a L<treasury transaction entry|Net::API::Stripe::Treasury::TransactionEntry> object, this issue an api call to get the list of all treasury transaction entry.

Possible parameters are:

=over 4

=item C<created>

A filter on the list based on the object C<created> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<effective_at>

A filter on the list based on the object C<effective_at> field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<financial_account>

B<Required>. Returns objects associated with this FinancialAccount.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<order_by>

The results are in reverse chronological order by C<created> or C<effective_at>. The default is C<created>.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=item C<transaction>

Only return TransactionEntries associated with this Transaction.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/transaction_entries/list>

=head2 retrieve

    my $obj = $stripe->treasury_transaction_entrys( retrieve => $args ) || die( $stripe->error );

Provided with a L<treasury transaction entry|Net::API::Stripe::Treasury::TransactionEntry> object or a hash reference, this will retrieve a Stripe treasury transaction entry and return its corresponding L<object|Net::API::Stripe::Treasury::TransactionEntry>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/treasury/transaction_entries/retrieve>

=head1 USAGE RECORD

You can create or list usage record

=head2 create

    my $obj = $stripe->usage_records( create => {
        quantity  => "100",
        timestamp => "1571252444", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::Billing::UsageRecord> object or a hash reference, this will create a Stripe usage record and return an L<Net::API::Stripe::Billing::UsageRecord> object.

Possible parameters are:

=over 4

=item C<action>

Valid values are C<increment> (default) or C<set>. When using C<increment> the specified C<quantity> will be added to the usage at the specified timestamp. The C<set> action will overwrite the usage quantity at that timestamp. If the subscription has L<billing thresholds|https://stripe.com/docs/api/subscriptions/object#subscription_object-billing_thresholds>, C<increment> is the only allowed value.

=item C<quantity>

B<Required>. The usage quantity for the specified timestamp.

=item C<timestamp>

The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided C<subscription_item>, and must not be in the future. When passing C<"now">, Stripe records usage for the current time. Default is C<"now"> if a value is not provided.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/usage_records/create>

=head2 list

    my $obj = $stripe->usage_records( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<usage record|Net::API::Stripe::Billing::UsageRecord> object, this issue an api call to get the list of all usage record.

Possible parameters are:

=over 4

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/usage_records/subscription_item_summary_list>

=head1 WEBHOOK ENDPOINT

You can create, delete, list, retrieve or update webhook endpoint

=head2 create

    my $obj = $stripe->webhook_endpoints( create => {
        enabled_events => [qw( charge.failed charge.succeeded )],
        url            => "https://example.com/my/webhook/endpoint", } ) || die( $stripe->error );

Provided with a L<Net::API::Stripe::WebHook::Object> object or a hash reference, this will create a Stripe webhook endpoint and return an L<Net::API::Stripe::WebHook::Object> object.

Possible parameters are:

=over 4

=item C<api_version>

Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version.

=item C<connect>

Whether this endpoint should receive events from connected accounts (C<true>), or from your account (C<false>). Defaults to C<false>.

=item C<description>

An optional description of what the webhook is used for.

=item C<enabled_events>

B<Required>. The list of events to enable for this endpoint. You may specify C<['*']> to enable all events, except those that require explicit selection.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<url>

B<Required>. The URL of the webhook endpoint.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/webhook_endpoints/create>

=head2 delete

    my $obj = $stripe->webhook_endpoints( delete => $args ) || die( $stripe->error );

Provided with a L<webhook endpoint|Net::API::Stripe::WebHook::Object>, or a hash reference, this will issue an api call to Stripe to remove the webhook endpoint. It returns the webhook endpoint object that was deleted with its property C<deleted> set to true.

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/webhook_endpoints/delete>

=head2 list

    my $obj = $stripe->webhook_endpoints( list => {
        limit => "3", } ) || die( $stripe->error );

Provided with a L<webhook endpoint|Net::API::Stripe::WebHook::Object> object, this issue an api call to get the list of all webhook endpoint.

Possible parameters are:

=over 4

=item C<ending_before>

A cursor for use in pagination. C<ending_before> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with C<obj_bar>, your subsequent call can include C<ending_before=obj_bar> in order to fetch the previous page of the list.

=item C<limit>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

=item C<starting_after>

A cursor for use in pagination. C<starting_after> is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with C<obj_foo>, your subsequent call can include C<starting_after=obj_foo> in order to fetch the next page of the list.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/webhook_endpoints/list>

=head2 retrieve

    my $obj = $stripe->webhook_endpoints( retrieve => $args ) || die( $stripe->error );

Provided with a L<webhook endpoint|Net::API::Stripe::WebHook::Object> object or a hash reference, this will retrieve a Stripe webhook endpoint and return its corresponding L<object|Net::API::Stripe::WebHook::Object>

There are no query parameter.

More information from Stripe api documentation at L<https://stripe.com/docs/api/webhook_endpoints/retrieve>

=head2 update

    my $obj = $stripe->webhook_endpoints( update => {
        url => "https://example.com/new_endpoint", } ) || die( $stripe->error );

Provided with a L<webhook endpoint|Net::API::Stripe::WebHook::Object> object or a hash reference, this will update a Stripe webhook endpoint and return its corresponding L<object|Net::API::Stripe::WebHook::Object>

Possible parameters are:

=over 4

=item C<description>

An optional description of what the webhook is used for.

=item C<disabled>

Disable the webhook endpoint if set to true.

=item C<enabled_events>

The list of events to enable for this endpoint. You may specify C<['*']> to enable all events, except those that require explicit selection.

=item C<metadata>

Set of L<key-value pairs|https://stripe.com/docs/api/metadata> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to C<metadata>.

=item C<url>

The URL of the webhook endpoint.

=back

More information from Stripe api documentation at L<https://stripe.com/docs/api/webhook_endpoints/update>

=head1 API SAMPLE

    {
      "object": "balance",
      "available": [
        {
          "amount": 0,
          "currency": "jpy",
          "source_types": {
            "card": 0
          }
        }
      ],
      "connect_reserved": [
        {
          "amount": 0,
          "currency": "jpy"
        }
      ],
      "livemode": false,
      "pending": [
        {
          "amount": 7712,
          "currency": "jpy",
          "source_types": {
            "card": 7712
          }
        }
      ]
    }

=head1 HISTORY

L<https://stripe.com/docs/upgrades> for Stripe API version history.

=head1 AUTHOR

Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>

=head1 SEE ALSO

Stripe API documentation:

L<https://stripe.com/docs/api>

List of server-side libraries: L<https://stripe.com/docs/libraries#server-side-libraries>

L<Net::Stripe>, another Stripe API, but which uses Moose

=head1 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.

=cut
