> ## Documentation Index
> Fetch the complete documentation index at: https://razorpay-881012b3.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Token Lifecycle

> Know about the different states attained by tokens.

<div style={{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"0.35rem 0.9rem",border:"1px solid rgba(128,128,128,0.28)",borderRadius:"0.5rem",padding:"0.45rem 0.75rem",margin:"0 0 1.25rem",fontSize:"0.875rem"}}>
  <span style={{fontWeight:600}}>Available in</span>
  <span>🇮🇳 India</span>
</div>

There are two types of tokens - service provider token and overall token.

<Info>
  **Handy Tips**

  * Status will be available for the service provider token and the overall token entity.
  * The status of overall token entity is derived from the individual service provider tokens.
  * You may choose to consume one of them based upon your integration.
</Info>

Given below is a diagram representing the token lifecycle:

<img src="https://razorpay.com/docs/build/browser/assets/images/cards-token-hq-token-lifecycle.jpg" width="600" alt="Token Lifecycle" />

## Token States for Service Provider Token

A service provider token will not have the `initiated` state. This is because the service provider token is created only when a token is successfully created.

| Status          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **active**      | The service\_provider\_token will have active status when the token is successfully created with token\_service\_providers (card networks). A service\_provider\_token in `active` status can be used for payment processing.                                                                                                                                                                                                                                                                                                             |
| **suspended**   | The service\_provider\_token status changes to `suspended` when the token is suspended temporarily by the card issuing bank or network. A suspended token may be activated again by the token provider. A suspended token cannot be used for payment processing.                                                                                                                                                                                                                                                                          |
| **failed**      | Razorpay failed to create the token with token service provider due to: <br />• The card not being eligible. <br />• The issue not being supported. <br />• An invalid card number.                                                                                                                                                                                                                                                                                                                                                       |
| **deactivated** | The service provider token status will change to `deactivated` due to following reasons: <br />• service\_provider\_token has been deleted <br />• service\_provider\_token has expired <br />• service\_provider\_token is deactivated by bank. <br /> <br /> The exact reason for deactivation will be provided in the `status_reason` parameter. Possible values for status\_reason are: <br />• expired <br />• deactivated\_by\_bank <br />A deactivated token cannot become active again and cannot be used for payment processing. |

## Overall Token States

A token can have following statuses:

| Status          | Description                                                                                                                                                                                                                                                                     |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **initiated**   | This is the token's primary state. This status indicates that Razorpay is working with token service providers to create the token. It may take a few seconds for the token to move to the `active` state.                                                                      |
| **active**      | The token reaches the `active` state if the status of the service\_provider\_token is active for at least one of the token service providers.                                                                                                                                   |
| **suspended**   | The token status changes to `suspended`: <br />• If status is not `active` for all the token service providers. <br />• If the token is in `suspended` state for at least one of the token service providers. <br />A `suspended` token cannot be used for payment processing.  |
| **failed**      | The token status will be `failed` when the status is failed for all service providers.                                                                                                                                                                                          |
| **deactivated** | Status will be `deactivated` when: <br />• Status is not active or suspended for all the token service providers. <br />• Status of the token is deactivated for at least one of the token service providers. <br /> A deactivated token cannot be used for payment processing. |
