class

Stripe::Card

Inherits OpenApi::Json < OpenApi::Validatable < JSON::Serializable::Unmapped < JSON::Serializable < Reference < Object

You can store multiple cards on a customer in order to charge the customer later. You can also store multiple debit cards on a recipient in order to transfer to those cards later. Related guide: Card payments with Sources

Constants

ERROR_MESSAGE_FOR_AVAILABLE_PAYOUT_METHODS = "invalid value for \"available_payout_methods\", must be one of [instant, standard]."
ERROR_MESSAGE_FOR_OBJECT = "invalid value for \"object\", must be one of [card]."
MAX_LENGTH_FOR_ADDRESS_CITY = 5000
MAX_LENGTH_FOR_ADDRESS_COUNTRY = 5000
MAX_LENGTH_FOR_ADDRESS_LINE1 = 5000
MAX_LENGTH_FOR_ADDRESS_LINE1_CHECK = 5000
MAX_LENGTH_FOR_ADDRESS_LINE2 = 5000
MAX_LENGTH_FOR_ADDRESS_STATE = 5000
MAX_LENGTH_FOR_ADDRESS_ZIP = 5000
MAX_LENGTH_FOR_ADDRESS_ZIP_CHECK = 5000
MAX_LENGTH_FOR_BRAND = 5000
MAX_LENGTH_FOR_COUNTRY = 5000
MAX_LENGTH_FOR_CVC_CHECK = 5000
MAX_LENGTH_FOR_DESCRIPTION = 5000
MAX_LENGTH_FOR_DYNAMIC_LAST4 = 5000
MAX_LENGTH_FOR_FINGERPRINT = 5000
MAX_LENGTH_FOR_FUNDING = 5000
MAX_LENGTH_FOR_ID = 5000
MAX_LENGTH_FOR_IIN = 5000
MAX_LENGTH_FOR_ISSUER = 5000
MAX_LENGTH_FOR_LAST4 = 5000
MAX_LENGTH_FOR_NAME = 5000
MAX_LENGTH_FOR_STATUS = 5000
MAX_LENGTH_FOR_TOKENIZATION_METHOD = 5000
VALID_VALUES_FOR_AVAILABLE_PAYOUT_METHODS = String.static_array("instant", "standard")
VALID_VALUES_FOR_OBJECT = String.static_array("card")

Constructors

new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source
new(*, address_city : String | Nil = nil, address_country : String | Nil = nil, address_line1 : String | Nil = nil, address_line1_check : String | Nil = nil, address_line2 : String | Nil = nil, address_state : String | Nil = nil, address_zip : String | Nil = nil, address_zip_check : String | Nil = nil, brand : String | Nil = nil, country : String | Nil = nil, cvc_check : String | Nil = nil, dynamic_last4 : String | Nil = nil, exp_month : Int64 | Nil = nil, exp_year : Int64 | Nil = nil, funding : String | Nil = nil, id : String | Nil = nil, last4 : String | Nil = nil, metadata : Hash(String, String) | Nil = nil, name : String | Nil = nil, object : String | Nil = nil, tokenization_method : String | Nil = nil, account : Stripe::CardAccount | Nil = nil, available_payout_methods : Array(String) | Nil = nil, currency : String | Nil = nil, customer : Stripe::CardCustomer | Nil = nil, default_for_currency : Bool | Nil = nil, description : String | Nil = nil, fingerprint : String | Nil = nil, iin : String | Nil = nil, issuer : String | Nil = nil, networks : Stripe::TokenCardNetworks | Nil = nil, status : String | Nil = nil)

Initializes the object @param [Hash] attributes Model attributes in the form of hash

Source

Instance methods

==(other : self)

Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code

account
Source
account=(new_value : Stripe::CardAccount | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] account Object to be assigned

Source
account_present=(account_present : Bool)
Source
account_present?
Source
address_city

City/District/Suburb/Town/Village.

Source
address_city=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] address_city Object to be assigned

Source
address_country

Billing address country, if provided when creating card.

Source
address_country=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] address_country Object to be assigned

Source
address_line1

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

Source
address_line1=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] address_line1 Object to be assigned

Source
address_line1_check

If address_line1 was provided, results of the check: pass, fail, unavailable, or unchecked.

Source
address_line1_check=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] address_line1_check Object to be assigned

Source
address_line2

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

Source
address_line2=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] address_line2 Object to be assigned

Source
address_state

State/County/Province/Region.

Source
address_state=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] address_state Object to be assigned

Source
address_zip

ZIP or postal code.

Source
address_zip=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] address_zip Object to be assigned

Source
address_zip_check

If address_zip was provided, results of the check: pass, fail, unavailable, or unchecked.

Source
address_zip_check=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] address_zip_check Object to be assigned

Source
available_payout_methods

A set of available payout methods for this card. Only values from this set should be passed as the method when creating a payout.

Source
available_payout_methods=(new_value : Array(String) | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] available_payout_methods Object to be assigned

Source
available_payout_methods_present=(available_payout_methods_present : Bool)
Source
available_payout_methods_present?
Source
brand

Card brand. Can be American Express, Diners Club, Discover, Eftpos Australia, Girocard, JCB, MasterCard, UnionPay, Visa, or Unknown.

Source
brand=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] brand Object to be assigned

Source
country

Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.

Source
country=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] country Object to be assigned

Source
currency

Three-letter ISO code for currency in lowercase. Must be a supported currency. Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. This property is only available for accounts where controller.requirement_collection is application, which includes Custom accounts.

Source
currency=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] currency Object to be assigned

Source
currency_present=(currency_present : Bool)
Source
currency_present?
Source
customer
Source
customer=(new_value : Stripe::CardCustomer | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] customer Object to be assigned

Source
customer_present=(customer_present : Bool)
Source
customer_present?
Source
cvc_check

If a CVC was provided, results of the check: pass, fail, unavailable, or unchecked. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see Check if a card is valid without a charge.

Source
cvc_check=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] cvc_check Object to be assigned

Source
default_for_currency

Whether this card is the default external account for its currency. This property is only available for accounts where controller.requirement_collection is application, which includes Custom accounts.

Source
default_for_currency=(new_value : Bool | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] default_for_currency Object to be assigned

Source
default_for_currency_present=(default_for_currency_present : Bool)
Source
default_for_currency_present?
Source
description

A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)

Source
description=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] description Object to be assigned

Source
dynamic_last4

(For tokenized numbers only.) The last four digits of the device account number.

Source
dynamic_last4=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] dynamic_last4 Object to be assigned

Source
exp_month

Two-digit number representing the card's expiration month.

Source
exp_month=(new_value : Int64 | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] exp_month Object to be assigned

Source
exp_year

Four-digit number representing the card's expiration year.

Source
exp_year=(new_value : Int64 | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] exp_year Object to be assigned

Source
fingerprint

Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.

Source
fingerprint=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] fingerprint Object to be assigned

Source
fingerprint_present=(fingerprint_present : Bool)
Source
fingerprint_present?
Source
funding

Card funding type. Can be credit, debit, prepaid, or unknown.

Source
funding=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] funding Object to be assigned

Source
hash(hasher)

Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code

id

Unique identifier for the object.

Source
id=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] id Object to be assigned

Source
iin

Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)

Source
iin=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] iin Object to be assigned

Source
issuer

The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)

Source
issuer=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] issuer Object to be assigned

Source
last4

The last four digits of the card.

Source
last4=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] last4 Object to be assigned

Source
list_invalid_properties

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons

Source
metadata
Source
metadata=(new_value : Hash(String, String) | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] metadata Object to be assigned

Source
name

Cardholder name.

Source
name=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] name Object to be assigned

Source
networks
Source
networks=(new_value : Stripe::TokenCardNetworks | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] networks Object to be assigned

Source
object

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

Source
object=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] object Object to be assigned

Source
status

For external accounts that are cards, possible values are new and errored. If a payout fails, the status is set to errored and scheduled payouts are stopped until account details are updated.

Source
status=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] status Object to be assigned

Source
status_present=(status_present : Bool)
Source
status_present?
Source
tokenization_method

If the card number is tokenized, this is the method that was used. Can be android_pay (includes Google Pay), apple_pay, masterpass, visa_checkout, or null.

Source
tokenization_method=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] tokenization_method Object to be assigned

Source
valid?

Check to see if the all the properties in the model are valid @return true if the model is valid

Source