NAME

Net::API::Stripe::Mandate - A Stripe Mandate Object

SYNOPSIS

my $mandate = $stripe->mandate({
    customer_acceptance => 
    {
        accepted_at => '2020-04-12T07:30:45',
        offline => {},
        online => {},
        type => 'online',
    },
    payment_method => $payment_method_object,
    single_use =>
    {
        amount => 2000,
        currency => 'jpy',
    },
    status => 'active',
    type => 'mandate',
});

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

VERSION

v0.101.0

DESCRIPTION

A Mandate is a record of the permission a customer has given you to debit their payment method.

CONSTRUCTOR

new( %ARG )

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

METHODS

id string

Unique identifier for the object.

object string, value is "mandate"

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

customer_acceptance hash

Details about the customer's acceptance of the mandate.

It has the following properties:

accepted_at timestamp

The time at which the customer accepted the Mandate.

offline hash

If this is a Mandate accepted offline, this hash contains details about the offline acceptance.

offline

This is an empty hash.

online hash

If this is a Mandate accepted online, this hash contains details about the online acceptance.

ip_address string

The IP address from which the Mandate was accepted by the customer.

user_agent string

The user agent of the browser from which the Mandate was accepted by the customer.

type string

The type of customer acceptance information included with the Mandate. One of online or offline.

head2 livemode boolean

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

multi_use hash

If this is a multi_use mandate, this hash contains details about the mandate.

payment_method string expandable

ID of the payment method associated with this mandate.

payment_method_details object

Additional mandate information specific to the payment method type.

This is a Net::API::Stripe::Payment::Method object.

single_use hash

If this is a single_use mandate, this hash contains details about the mandate.

amount integer

On a single use mandate, the amount of the payment.

currency currency

On a single use mandate, the currency of the payment.

status string

The status of the Mandate, one of active, inactive, or pending. The Mandate can be used to initiate a payment only if status=active.

type string

The type of the mandate, one of multi_use or single_use

API SAMPLE

{
  "id": "mandate_123456789",
  "object": "mandate",
  "customer_acceptance": {
    "accepted_at": 123456789,
    "online": {
      "ip_address": "127.0.0.0",
      "user_agent": "device"
    },
    "type": "online"
  },
  "livemode": false,
  "multi_use": {},
  "payment_method": "pm_123456789",
  "payment_method_details": {
    "sepa_debit": {
      "reference": "123456789",
      "url": ""
    },
    "type": "sepa_debit"
  },
  "status": "active",
  "type": "multi_use"
}

HISTORY

v0.1

Initial version

AUTHOR

Jacques Deguest <jack@deguest.jp>

SEE ALSO

Stripe API documentation:

https://stripe.com/docs/api, https://stripe.com/docs/api/mandates/object

COPYRIGHT & LICENSE

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

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