Class Card
- All Implemented Interfaces:
ExternalAccount,HasId,MetadataStore<Card>,PaymentSource,StripeActiveObject,StripeObjectInterface
Related guide: Card payments with Sources
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFor more details about Benefits, please refer to the API Reference.static classFor more details about Networks, please refer to the API Reference.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_GSONFields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleandelete()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.booleanGet ID of expandableaccountobject.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_line1was 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_zipwas provided, results of the check:pass,fail,unavailable, orunchecked.This field indicates whether this payment method can be shown again to its customer in a checkout flow.A set of available payout methods for this card.getBrand()Card brand.The product code that identifies the specific program or product associated with a card.Two-letter ISO code representing the country of the card.Three-letter ISO code for currency in lowercase.Get ID of expandablecustomerobject.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.Status of a card based on the card issuer.For external accounts that are cards, possible values arenewanderrored.If the card number is tokenized, this is the method that was used.inthashCode()voidsetAccount(String id) voidsetAccountObject(Account expandableObject) voidsetAddressCity(String addressCity) City/District/Suburb/Town/Village.voidsetAddressCountry(String addressCountry) Billing address country, if provided when creating card.voidsetAddressLine1(String addressLine1) Address line 1 (Street address/PO Box/Company name).voidsetAddressLine1Check(String addressLine1Check) Ifaddress_line1was provided, results of the check:pass,fail,unavailable, orunchecked.voidsetAddressLine2(String addressLine2) Address line 2 (Apartment/Suite/Unit/Building).voidsetAddressState(String addressState) State/County/Province/Region.voidsetAddressZip(String addressZip) ZIP or postal code.voidsetAddressZipCheck(String addressZipCheck) Ifaddress_zipwas provided, results of the check:pass,fail,unavailable, orunchecked.voidsetAllowRedisplay(String allowRedisplay) This field indicates whether this payment method can be shown again to its customer in a checkout flow.voidsetAvailablePayoutMethods(List<String> availablePayoutMethods) A set of available payout methods for this card.voidsetBenefits(Card.Benefits benefits) voidCard brand.voidsetBrandProduct(String brandProduct) The product code that identifies the specific program or product associated with a card.voidsetCountry(String country) Two-letter ISO code representing the country of the card.voidsetCurrency(String currency) Three-letter ISO code for currency in lowercase.voidsetCustomer(String id) voidsetCustomerObject(Customer expandableObject) voidsetCvcCheck(String cvcCheck) If a CVC was provided, results of the check:pass,fail,unavailable, orunchecked.voidsetDefaultForCurrency(Boolean defaultForCurrency) Whether this card is the default external account for its currency.voidsetDeleted(Boolean deleted) Always true for a deleted object.voidsetDescription(String description) A high-level description of the type of cards issued in this range.voidsetDynamicLast4(String dynamicLast4) (For tokenized numbers only.) The last four digits of the device account number.voidsetExpMonth(Long expMonth) Two-digit number representing the card's expiration month.voidsetExpYear(Long expYear) Four-digit number representing the card's expiration year.voidsetFingerprint(String fingerprint) Uniquely identifies this particular card number.voidsetFunding(String funding) Card funding type.voidUnique identifier for the object.voidIssuer identification number of the card.voidThe name of the card's issuing bank.voidThe last four digits of the card.voidsetMetadata(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.voidCardholder name.voidsetNetworks(Card.Networks networks) voidString representing the object's type.voidsetRegulatedStatus(String regulatedStatus) Status of a card based on the card issuer.voidFor external accounts that are cards, possible values arenewanderrored.voidsetTokenizationMethod(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, setGlobalResponseGetter, setResponseGetter, urlEncode, urlEncodeIdMethods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.stripe.model.StripeActiveObject
trySetResponseGetterMethods inherited from interface com.stripe.model.StripeObjectInterface
getLastResponse, setLastResponse
-
Constructor Details
-
Card
public Card()
-
-
Method Details
-
getAccount
Get ID of expandableaccountobject. -
setAccount
-
getAccountObject
Get expandedaccount. -
setAccountObject
-
getCustomer
Get ID of expandablecustomerobject. -
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:
updatein interfaceExternalAccount- Specified by:
updatein 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:
updatein interfaceExternalAccount- Specified by:
updatein 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:
deletein interfaceExternalAccount- Throws:
StripeException
-
delete
Delete a specified external account for a given account.Delete a specified source for a given customer.
- Specified by:
deletein interfaceExternalAccount- Throws:
StripeException
-
delete
Delete a specified external account for a given account.Delete a specified source for a given customer.
- Specified by:
deletein interfaceExternalAccount- Throws:
StripeException
-
delete
Delete a specified external account for a given account.Delete a specified source for a given customer.
- Specified by:
deletein 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_line1was 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_zipwas provided, results of the check:pass,fail,unavailable, orunchecked. -
getAllowRedisplay
This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”.One of
always,limited, orunspecified. -
getAvailablePayoutMethods
A set of available payout methods for this card. Only values from this set should be passed as themethodwhen creating a payout. -
getBenefits
-
getBrand
Card brand. Can beAmerican Express,Cartes Bancaires,Diners Club,Discover,Eftpos Australia,Girocard,JCB,MasterCard,UnionPay,Visa, orUnknown. -
getBrandProduct
The product code that identifies the specific program or product associated with a card. (For internal use only and not typically available in standard API requests.) -
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 when returned as an External Account where controller.is_controller istrue. -
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. -
getRegulatedStatus
Status of a card based on the card issuer.One of
regulated, orunregulated. -
getStatus
For external accounts that are cards, possible values arenewanderrored. If a payout fails, the status is set toerroredand 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_line1was 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_zipwas provided, results of the check:pass,fail,unavailable, orunchecked. -
setAllowRedisplay
This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”.One of
always,limited, orunspecified. -
setAvailablePayoutMethods
A set of available payout methods for this card. Only values from this set should be passed as themethodwhen creating a payout. -
setBenefits
-
setBrand
Card brand. Can beAmerican Express,Cartes Bancaires,Diners Club,Discover,Eftpos Australia,Girocard,JCB,MasterCard,UnionPay,Visa, orUnknown. -
setBrandProduct
The product code that identifies the specific program or product associated with a card. (For internal use only and not typically available in standard API requests.) -
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 when returned as an External Account where controller.is_controller istrue. -
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. -
setRegulatedStatus
Status of a card based on the card issuer.One of
regulated, orunregulated. -
setStatus
For external accounts that are cards, possible values arenewanderrored. If a payout fails, the status is set toerroredand 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:
getMetadatain interfaceMetadataStore<Card>
-