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.200.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.
-
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.
- 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.
- exp_month integer
-
The expiration month of the card.
- exp_year integer
-
The expiration year of the card.
- 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.
- 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:
- 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.
- 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.
-
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.
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.