NAME

Net::API::Stripe::Issuing::Card - A Stripe Issued Card Object

SYNOPSIS

my $card = $stripe->card({
    authorization_controls => $authorization_controls_objet,
    brand => 'visa',
    cardholder => $cardholder_object,
    currency => 'jpy',
    exp_month => 12,
    exp_year => 2030,
    last4 => 123,
    metadata => { transaction_id => 123 },
    name => 'John Doe',
    replacement_for => $card_object,
    replacement_reason => 'loss',
    shipping => $address_object,
    status => 'active',
    type => 'physical',
});

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

VERSION

v0.202.0

DESCRIPTION

You can create physical or virtual cards that are issued to cardholders.

This Module bears some resemblance with Net::API::Stripe::Connect::ExternalAccount::Card, but is quite different, so it stands on its own.

CONSTRUCTOR

new( %ARG )

Creates a new Net::API::Stripe::Issuing::Card 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 "issuing.card"

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

authorization_controls hash

Spending rules that give you some control over how your cards can be used. Refer to Stripe's authorizations documentation for more details.

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

brand string

The brand of the card.

cancellation_reason string

The reason why the card was canceled.

cardholder hash

The Cardholder object to which the card belongs.

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

created timestamp

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

currency currency

Three-letter ISO currency code, in lowercase. Must be a supported currency.

cvc string

The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](/docs/api/expanding_objects). Additionally, it's only available via the "Retrieve a card" endpoint, not via "List all cards" or any other endpoint.

exp_month integer

The expiration month of the card.

exp_year integer

The expiration year of the card.

expires_after_days integer

The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expiresafterdays to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.

last4 string

The last 4 digits of the card number.

livemode boolean

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

metadata hash

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

name string

The name of the cardholder, printed on the card.

number string

The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint.

pin hash

Metadata about the PIN on the card.

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

It contains the following property:

status string

The status of the pin. One of blocked or active.

replaced_by expandable

The latest card that replaces this card, if any.

When expanded this is an Net::API::Stripe::Issuing::Card object.

replacement_for string (expandable)

The card this card replaces, if any. When expanded, this is a Net::API::Stripe::Issuing::Card object.

replacement_reason string

Why the card that this card replaces (if any) needed to be replaced. One of damage, expiration, loss, or theft.

setup_future_usage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will attach the payment method 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 attached to a Customer after the transaction completes.

When processing card payments, Stripe also uses setup_future_usage to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA.

shipping hash

Where and how the card will be shipped.

This is a Net::API::Stripe::Shipping object.

spending_controls hash

This is a hash whose properties are accessible as a dynamic class methods

amount positive integer

Maximum amount allowed to spend per time interval.

categories array

Array of strings containing categories on which to apply the spending limit. Leave this blank to limit all charges.

interval enum

The time interval or event with which to apply this spending limit towards.

per_authorization

A maximum amount for each authorization.

daily

A maximum within a day. A day start at midnight UTC.

weekly

A maximum within a week. The first day of a week is Monday.

monthly

A maximum within a month. Starts on the first of that month.

yearly

A maximum amount within a year. Starts January 1st.

all_time

A maximum amount for all transactions.

spending_limits_currency currency

Currency for the amounts within spending_limits. Locked to the currency of the card.

status string

One of active, inactive, canceled, lost, or stolen.

type string

One of virtual or physical.

wallets hash

Information relating to digital wallets (like Apple Pay and Google Pay).

It has the following properties:

apple_pay hash

Apple Pay Details

eligible boolean

Apple Pay Eligibility

ineligible_reason string

Reason the card is ineligible for Apple Pay

google_pay hash

Google Pay Details

eligible boolean

Google Pay Eligibility

ineligible_reason string

Reason the card is ineligible for Google Pay

primary_account_identifier string

Unique identifier for a card used with digital wallets

API SAMPLE

{
  "id": "ic_fake123456789",
  "object": "issuing.card",
  "authorization_controls": {
    "allowed_categories": null,
    "blocked_categories": null,
    "currency": "usd",
    "max_amount": 10000,
    "max_approvals": 1,
    "spending_limits": [],
    "spending_limits_currency": null
  },
  "brand": "Visa",
  "cardholder": {
    "id": "ich_fake123456789",
    "object": "issuing.cardholder",
    "authorization_controls": {
      "allowed_categories": [],
      "blocked_categories": [],
      "spending_limits": [],
      "spending_limits_currency": null
    },
    "billing": {
      "address": {
        "city": "Beverly Hills",
        "country": "US",
        "line1": "123 Fake St",
        "line2": "Apt 3",
        "postal_code": "90210",
        "state": "CA"
      },
      "name": "Jenny Rosen"
    },
    "company": null,
    "created": 1540111055,
    "email": "jenny@example.com",
    "individual": null,
    "is_default": false,
    "livemode": false,
    "metadata": {},
    "name": "Jenny Rosen",
    "phone_number": "+18008675309",
    "requirements": {
      "disabled_reason": null,
      "past_due": []
    },
    "status": "active",
    "type": "individual"
  },
  "created": 1571480456,
  "currency": "usd",
  "exp_month": 8,
  "exp_year": 2020,
  "last4": "4242",
  "livemode": false,
  "metadata": {},
  "name": "Jenny Rosen",
  "pin": null,
  "replacement_for": null,
  "replacement_reason": null,
  "shipping": null,
  "status": "active",
  "type": "physical"
}

HISTORY

v0.1

Initial version

v0.2

Added method "spending_controls" that was added on Stripe api.

AUTHOR

Jacques Deguest <jack@deguest.jp>

SEE ALSO

Stripe API documentation:

https://stripe.com/docs/api/issuing/cards

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.