Class Card
- All Implemented Interfaces:
ExternalAccount
,HasId
,MetadataStore<Card>
,PaymentSource
,StripeActiveObject
,StripeObjectInterface
Related guide: Card payments with Sources
-
Nested Class Summary
Nested classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod
-
Field Summary
Fields inherited from class com.stripe.net.ApiResource
CHARSET, GSON, INTERNAL_GSON
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
delete()
Delete a specified external account for a given account.delete
(RequestOptions options) Delete a specified external account for a given account.Delete a specified external account for a given account.delete
(Map<String, Object> params, RequestOptions options) Delete a specified external account for a given account.boolean
Get ID of expandableaccount
object.Get expandedaccount
.City/District/Suburb/Town/Village.Billing address country, if provided when creating card.Address line 1 (Street address/PO Box/Company name).Ifaddress_line1
was provided, results of the check:pass
,fail
,unavailable
, orunchecked
.Address line 2 (Apartment/Suite/Unit/Building).State/County/Province/Region.ZIP or postal code.Ifaddress_zip
was provided, results of the check:pass
,fail
,unavailable
, orunchecked
.A set of available payout methods for this card.getBrand()
Card brand.Two-letter ISO code representing the country of the card.Three-letter ISO code for currency in lowercase.Get ID of expandablecustomer
object.Get expandedcustomer
.If a CVC was provided, results of the check:pass
,fail
,unavailable
, orunchecked
.Whether this card is the default external account for its currency.Always true for a deleted object.A high-level description of the type of cards issued in this range.(For tokenized numbers only.) The last four digits of the device account number.Two-digit number representing the card's expiration month.Four-digit number representing the card's expiration year.Uniquely identifies this particular card number.Card funding type.getId()
Unique identifier for the object.getIin()
Issuer identification number of the card.The name of the card's issuing bank.getLast4()
The last four digits of the card.Set of key-value pairs that you can attach to an object.getName()
Cardholder name.String representing the object's type.For external accounts that are cards, possible values arenew
anderrored
.If the card number is tokenized, this is the method that was used.int
hashCode()
void
setAccount
(String id) void
setAccountObject
(Account expandableObject) void
setAddressCity
(String addressCity) City/District/Suburb/Town/Village.void
setAddressCountry
(String addressCountry) Billing address country, if provided when creating card.void
setAddressLine1
(String addressLine1) Address line 1 (Street address/PO Box/Company name).void
setAddressLine1Check
(String addressLine1Check) Ifaddress_line1
was provided, results of the check:pass
,fail
,unavailable
, orunchecked
.void
setAddressLine2
(String addressLine2) Address line 2 (Apartment/Suite/Unit/Building).void
setAddressState
(String addressState) State/County/Province/Region.void
setAddressZip
(String addressZip) ZIP or postal code.void
setAddressZipCheck
(String addressZipCheck) Ifaddress_zip
was provided, results of the check:pass
,fail
,unavailable
, orunchecked
.void
setAvailablePayoutMethods
(List<String> availablePayoutMethods) A set of available payout methods for this card.void
Card brand.void
setCountry
(String country) Two-letter ISO code representing the country of the card.void
setCurrency
(String currency) Three-letter ISO code for currency in lowercase.void
setCustomer
(String id) void
setCustomerObject
(Customer expandableObject) void
setCvcCheck
(String cvcCheck) If a CVC was provided, results of the check:pass
,fail
,unavailable
, orunchecked
.void
setDefaultForCurrency
(Boolean defaultForCurrency) Whether this card is the default external account for its currency.void
setDeleted
(Boolean deleted) Always true for a deleted object.void
setDescription
(String description) A high-level description of the type of cards issued in this range.void
setDynamicLast4
(String dynamicLast4) (For tokenized numbers only.) The last four digits of the device account number.void
setExpMonth
(Long expMonth) Two-digit number representing the card's expiration month.void
setExpYear
(Long expYear) Four-digit number representing the card's expiration year.void
setFingerprint
(String fingerprint) Uniquely identifies this particular card number.void
setFunding
(String funding) Card funding type.void
Unique identifier for the object.void
Issuer identification number of the card.void
The name of the card's issuing bank.void
The last four digits of the card.void
setMetadata
(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.void
Cardholder name.void
setNetworks
(Card.Networks networks) void
String representing the object's type.void
For external accounts that are cards, possible values arenew
anderrored
.void
setTokenizationMethod
(String tokenizationMethod) If the card number is tokenized, this is the method that was used.update
(CardUpdateOnAccountParams params) If you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the full card details.update
(CardUpdateOnAccountParams params, RequestOptions options) If you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the full card details.update
(CardUpdateOnCustomerParams params) If you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the full card details.update
(CardUpdateOnCustomerParams params, RequestOptions options) If you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the full card details.If you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the full card details.update
(Map<String, Object> params, RequestOptions options) If you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the full card details.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, getGlobalResponseGetter, getResponseGetter, setExpandableFieldId, setResponseGetter, setStripeResponseGetter, urlEncode, urlEncodeId
Methods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.stripe.model.StripeActiveObject
trySetResponseGetter
Methods inherited from interface com.stripe.model.StripeObjectInterface
getLastResponse, setLastResponse
-
Constructor Details
-
Card
public Card()
-
-
Method Details
-
getAccount
Get ID of expandableaccount
object. -
setAccount
-
getAccountObject
Get expandedaccount
. -
setAccountObject
-
getCustomer
Get ID of expandablecustomer
object. -
setCustomer
-
getCustomerObject
Get expandedcustomer
. -
setCustomerObject
-
update
If you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the full card details. Stripe also works directly with card networks so that your customers can continue using your service without interruption.Updates a specified card for a given customer.
- Specified by:
update
in interfaceExternalAccount
- Specified by:
update
in interfaceMetadataStore<Card>
- Throws:
StripeException
-
update
If you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the full card details. Stripe also works directly with card networks so that your customers can continue using your service without interruption.Updates a specified card for a given customer.
- Specified by:
update
in interfaceExternalAccount
- Specified by:
update
in interfaceMetadataStore<Card>
- Throws:
StripeException
-
update
If you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the full card details. Stripe also works directly with card networks so that your customers can continue using your service without interruption.Updates a specified card for a given customer.
- Throws:
StripeException
-
update
If you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the full card details. Stripe also works directly with card networks so that your customers can continue using your service without interruption.Updates a specified card for a given customer.
- Throws:
StripeException
-
update
If you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the full card details. Stripe also works directly with card networks so that your customers can continue using your service without interruption.Updates a specified card for a given customer.
- Throws:
StripeException
-
update
public Card update(CardUpdateOnCustomerParams params, RequestOptions options) throws StripeException If you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the full card details. Stripe also works directly with card networks so that your customers can continue using your service without interruption.Updates a specified card for a given customer.
- Throws:
StripeException
-
delete
Delete a specified external account for a given account.Delete a specified source for a given customer.
- Specified by:
delete
in interfaceExternalAccount
- Throws:
StripeException
-
delete
Delete a specified external account for a given account.Delete a specified source for a given customer.
- Specified by:
delete
in interfaceExternalAccount
- Throws:
StripeException
-
delete
Delete a specified external account for a given account.Delete a specified source for a given customer.
- Specified by:
delete
in interfaceExternalAccount
- Throws:
StripeException
-
delete
Delete a specified external account for a given account.Delete a specified source for a given customer.
- Specified by:
delete
in interfaceExternalAccount
- Throws:
StripeException
-
getAddressCity
City/District/Suburb/Town/Village. -
getAddressCountry
Billing address country, if provided when creating card. -
getAddressLine1
Address line 1 (Street address/PO Box/Company name). -
getAddressLine1Check
Ifaddress_line1
was provided, results of the check:pass
,fail
,unavailable
, orunchecked
. -
getAddressLine2
Address line 2 (Apartment/Suite/Unit/Building). -
getAddressState
State/County/Province/Region. -
getAddressZip
ZIP or postal code. -
getAddressZipCheck
Ifaddress_zip
was provided, results of the check:pass
,fail
,unavailable
, orunchecked
. -
getAvailablePayoutMethods
A set of available payout methods for this card. Only values from this set should be passed as themethod
when creating a payout. -
getBrand
Card brand. Can beAmerican Express
,Diners Club
,Discover
,Eftpos Australia
,Girocard
,JCB
,MasterCard
,UnionPay
,Visa
, orUnknown
. -
getCountry
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. -
getCurrency
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 isapplication
, which includes Custom accounts. -
getCvcCheck
If a CVC was provided, results of the check:pass
,fail
,unavailable
, orunchecked
. 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. -
getDefaultForCurrency
Whether this card is the default external account for its currency. This property is only available for accounts where controller.requirement_collection isapplication
, which includes Custom accounts. -
getDeleted
Always true for a deleted object. -
getDescription
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.) -
getDynamicLast4
(For tokenized numbers only.) The last four digits of the device account number. -
getExpMonth
Two-digit number representing the card's expiration month. -
getExpYear
Four-digit number representing the card's expiration year. -
getFingerprint
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.
-
getFunding
Card funding type. Can becredit
,debit
,prepaid
, orunknown
. -
getIin
Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) -
getIssuer
The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) -
getLast4
The last four digits of the card. -
getName
Cardholder name. -
getNetworks
-
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
card
. -
getStatus
For external accounts that are cards, possible values arenew
anderrored
. If a payout fails, the status is set toerrored
and scheduled payouts are stopped until account details are updated. -
getTokenizationMethod
If the card number is tokenized, this is the method that was used. Can beandroid_pay
(includes Google Pay),apple_pay
,masterpass
,visa_checkout
, or null. -
setAddressCity
City/District/Suburb/Town/Village. -
setAddressCountry
Billing address country, if provided when creating card. -
setAddressLine1
Address line 1 (Street address/PO Box/Company name). -
setAddressLine1Check
Ifaddress_line1
was provided, results of the check:pass
,fail
,unavailable
, orunchecked
. -
setAddressLine2
Address line 2 (Apartment/Suite/Unit/Building). -
setAddressState
State/County/Province/Region. -
setAddressZip
ZIP or postal code. -
setAddressZipCheck
Ifaddress_zip
was provided, results of the check:pass
,fail
,unavailable
, orunchecked
. -
setAvailablePayoutMethods
A set of available payout methods for this card. Only values from this set should be passed as themethod
when creating a payout. -
setBrand
Card brand. Can beAmerican Express
,Diners Club
,Discover
,Eftpos Australia
,Girocard
,JCB
,MasterCard
,UnionPay
,Visa
, orUnknown
. -
setCountry
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. -
setCurrency
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 isapplication
, which includes Custom accounts. -
setCvcCheck
If a CVC was provided, results of the check:pass
,fail
,unavailable
, orunchecked
. 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. -
setDefaultForCurrency
Whether this card is the default external account for its currency. This property is only available for accounts where controller.requirement_collection isapplication
, which includes Custom accounts. -
setDeleted
Always true for a deleted object. -
setDescription
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.) -
setDynamicLast4
(For tokenized numbers only.) The last four digits of the device account number. -
setExpMonth
Two-digit number representing the card's expiration month. -
setExpYear
Four-digit number representing the card's expiration year. -
setFingerprint
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.
-
setFunding
Card funding type. Can becredit
,debit
,prepaid
, orunknown
. -
setId
Unique identifier for the object. -
setIin
Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) -
setIssuer
The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) -
setLast4
The last four digits of the card. -
setMetadata
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. -
setName
Cardholder name. -
setNetworks
-
setObject
String representing the object's type. Objects of the same type share the same value.Equal to
card
. -
setStatus
For external accounts that are cards, possible values arenew
anderrored
. If a payout fails, the status is set toerrored
and scheduled payouts are stopped until account details are updated. -
setTokenizationMethod
If the card number is tokenized, this is the method that was used. Can beandroid_pay
(includes Google Pay),apple_pay
,masterpass
,visa_checkout
, or null. -
equals
-
canEqual
-
hashCode
public int hashCode() -
getId
Unique identifier for the object. -
getMetadata
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.- Specified by:
getMetadata
in interfaceMetadataStore<Card>
-