# Tokens

Tokens are used to represent a card in a situation where you don't want to process or store card-sensitive data on your servers. Tokens can be easily created directly in a browser with the use of Components, but you can also create tokens in other environments (for example, in mobile applications).
Tokens can be created with the use of either your API public key or your API secret key. You can safely embed your API public key in JavaScript or in downloadable applications (like iPhone or Android apps), so you can easily create tokens directly from these applications.
Note that tokens are meant to be used as a temporary representation of card data, and each token can be used only once. You should not store tokens for long periods of time — if you want to store a card for later use, you should use the token to either create a new customer or add a new card to an existing customer.

 - [POST /tokens](https://matterhorn-api.redocly.app/docs/api/shift4-gateway/tokens/createtoken.md): Creates a new token object. This method can be called with either your API public key or your API secret key.
 - [GET /tokens/{tokenId}](https://matterhorn-api.redocly.app/docs/api/shift4-gateway/tokens/gettoken.md): Retrieves an existing token object.
 - [POST /3d-secure](https://matterhorn-api.redocly.app/docs/api/shift4-gateway/tokens/initializethreedsecure.md): Initializes a new 3D Secure authentication process. Generally (apart from a few specialized use cases) it is not recommended to initialize 3D Secure from the API. You should use our Components or Chec
