Class Token

All Implemented Interfaces:
HasId, StripeActiveObject, StripeObjectInterface

public class Token extends ApiResource implements HasId
An issuing token object is created when an issued card is added to a digital wallet. As a card issuer, you can view and manage these tokens through Stripe.
  • Constructor Details

    • Token

      public Token()
  • Method Details

    • getCard

      public String getCard()
      Get ID of expandable card object.
    • setCard

      public void setCard(String id)
    • getCardObject

      public Card getCardObject()
      Get expanded card.
    • setCardObject

      public void setCardObject(Card expandableObject)
    • list

      public static TokenCollection list(Map<String,Object> params) throws StripeException
      Lists all Issuing Token objects for a given card.
      Throws:
      StripeException
    • list

      public static TokenCollection list(Map<String,Object> params, RequestOptions options) throws StripeException
      Lists all Issuing Token objects for a given card.
      Throws:
      StripeException
    • list

      public static TokenCollection list(TokenListParams params) throws StripeException
      Lists all Issuing Token objects for a given card.
      Throws:
      StripeException
    • list

      public static TokenCollection list(TokenListParams params, RequestOptions options) throws StripeException
      Lists all Issuing Token objects for a given card.
      Throws:
      StripeException
    • retrieve

      public static Token retrieve(String token) throws StripeException
      Retrieves an Issuing Token object.
      Throws:
      StripeException
    • retrieve

      public static Token retrieve(String token, RequestOptions options) throws StripeException
      Retrieves an Issuing Token object.
      Throws:
      StripeException
    • retrieve

      public static Token retrieve(String token, Map<String,Object> params, RequestOptions options) throws StripeException
      Retrieves an Issuing Token object.
      Throws:
      StripeException
    • retrieve

      public static Token retrieve(String token, TokenRetrieveParams params, RequestOptions options) throws StripeException
      Retrieves an Issuing Token object.
      Throws:
      StripeException
    • update

      public Token update(Map<String,Object> params) throws StripeException
      Attempts to update the specified Issuing Token object to the status specified.
      Throws:
      StripeException
    • update

      public Token update(Map<String,Object> params, RequestOptions options) throws StripeException
      Attempts to update the specified Issuing Token object to the status specified.
      Throws:
      StripeException
    • update

      public Token update(TokenUpdateParams params) throws StripeException
      Attempts to update the specified Issuing Token object to the status specified.
      Throws:
      StripeException
    • update

      public Token update(TokenUpdateParams params, RequestOptions options) throws StripeException
      Attempts to update the specified Issuing Token object to the status specified.
      Throws:
      StripeException
    • setResponseGetter

      public void setResponseGetter(StripeResponseGetter responseGetter)
      The postal code of the cardholder tokenizing the card.
      Specified by:
      setResponseGetter in interface StripeActiveObject
      Overrides:
      setResponseGetter in class ApiResource
      Parameters:
      responseGetter - the StripeResponseGetter instance to use for making further requests.
    • getCreated

      public Long getCreated()
      Time at which the object was created. Measured in seconds since the Unix epoch.
    • getDeviceFingerprint

      public String getDeviceFingerprint()
      The hashed ID derived from the device ID from the card network associated with the token.
    • getLast4

      public String getLast4()
      The last four digits of the token.
    • getLivemode

      public Boolean getLivemode()
      Has the value true if the object exists in live mode or the value false if the object exists in test mode.
    • getNetwork

      public String getNetwork()
      The token service provider / card network associated with the token.

      One of mastercard, or visa.

    • getNetworkData

      public Token.NetworkData getNetworkData()
    • getNetworkUpdatedAt

      public Long getNetworkUpdatedAt()
      Time at which the token was last updated by the card network. Measured in seconds since the Unix epoch.
    • getObject

      public String getObject()
      String representing the object's type. Objects of the same type share the same value.

      Equal to issuing.token.

    • getStatus

      public String getStatus()
      The usage state of the token.

      One of active, deleted, requested, or suspended.

    • getWalletProvider

      public String getWalletProvider()
      The digital wallet for this token, if one was used.

      One of apple_pay, google_pay, or samsung_pay.

    • setCreated

      public void setCreated(Long created)
      Time at which the object was created. Measured in seconds since the Unix epoch.
    • setDeviceFingerprint

      public void setDeviceFingerprint(String deviceFingerprint)
      The hashed ID derived from the device ID from the card network associated with the token.
    • setId

      public void setId(String id)
      Unique identifier for the object.
    • setLast4

      public void setLast4(String last4)
      The last four digits of the token.
    • setLivemode

      public void setLivemode(Boolean livemode)
      Has the value true if the object exists in live mode or the value false if the object exists in test mode.
    • setNetwork

      public void setNetwork(String network)
      The token service provider / card network associated with the token.

      One of mastercard, or visa.

    • setNetworkData

      public void setNetworkData(Token.NetworkData networkData)
    • setNetworkUpdatedAt

      public void setNetworkUpdatedAt(Long networkUpdatedAt)
      Time at which the token was last updated by the card network. Measured in seconds since the Unix epoch.
    • setObject

      public void setObject(String object)
      String representing the object's type. Objects of the same type share the same value.

      Equal to issuing.token.

    • setStatus

      public void setStatus(String status)
      The usage state of the token.

      One of active, deleted, requested, or suspended.

    • setWalletProvider

      public void setWalletProvider(String walletProvider)
      The digital wallet for this token, if one was used.

      One of apple_pay, google_pay, or samsung_pay.

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getId

      public String getId()
      Unique identifier for the object.
      Specified by:
      getId in interface HasId