> For the complete documentation index, see [llms.txt](https://doc.ecomm.api.tietoevry.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.ecomm.api.tietoevry.com/tietoevry-egw-documentation-es/referencias-de-api/api-unificada-para-comercios/tokens.md).

# Tokens

## Get token information

> Retrieve token status and other non-sensitive data.

```json
{"openapi":"3.1.0","info":{"title":"E-commerce Gateway API","version":"1.0.0"},"servers":[{"url":"https://sandbox-api.ecomm.api.tietoevry.com"}],"security":[{"OAuth2ClientAuthentication":[]}],"components":{"securitySchemes":{"OAuth2ClientAuthentication":{"type":"openIdConnect","description":"This API uses OAuth 2 with the client credentials flow. [More info](https://www.rfc-editor.org/rfc/rfc6749#section-4.4)","openIdConnectUrl":"https://ecomm.api.tietoevry.com/auth/realms/participants-tietoevry/protocol/openid-connect/token"}},"schemas":{"TokenInformationResponse":{"type":"object","properties":{"card":{"$ref":"#/components/schemas/TokenInformationResponse.Card"},"gatewayTokenId":{"type":"string","description":"Unique ID of the token","maxLength":64},"paymentMethodType":{"type":"string","description":"Type of payment method stored in the token","enum":["CARD"]},"purposes":{"type":"array","description":"The purpose for which the token can used in subsequent payments:\n* CIT - cardholder-initiated ad-hoc payments with variable amount and undefined frequency\n* UNSCHEDULED - merchant-initiated ad-hoc payments with variable amount and undefined frequency\n* SUBSCRIPTION - merchant-initiated recurring payments with fixed amount and frequency\n* STANDING_ORDER - merchant-initiated recurring payments with variable amount, but fixed frequency\n","items":{"type":"string","enum":["CIT","UNSCHEDULED","SUBSCRIPTION","STANDING_ORDER"]},"uniqueItems":true},"tokenStatus":{"type":"string","enum":["ACTIVE","SUSPENDED"]}}},"TokenInformationResponse.Card":{"type":"object","properties":{"cardholderName":{"type":"string"},"expiry":{"$ref":"#/components/schemas/CardExpiry"},"lastFourDigits":{"type":"string"}}},"CardExpiry":{"type":"object","properties":{"month":{"type":"string","description":"Month of the expiry date (in format MM)","pattern":"^(0[1-9]|1[0-2])$"},"year":{"type":"string","description":"Year of the expiry date (in format YY)","pattern":"^\\d{2}$"}},"required":["month","year"]},"ErrorResponse":{"type":"object","properties":{"apiClientMessages":{"type":"array","items":{"$ref":"#/components/schemas/ApiClientMessage"}}}},"ApiClientMessage":{"type":"object","properties":{"category":{"type":"string","enum":["ERROR"]},"code":{"type":"string"},"text":{"type":"string"}}}}},"paths":{"/egw/{version}/tokens/{gatewayTokenId}":{"get":{"description":"Retrieve token status and other non-sensitive data.","operationId":"getToken","parameters":[{"description":"ID of the request, unique to the call, as determined by the initiating party","in":"header","name":"X-Request-Id","required":true,"schema":{"type":"string","format":"uuid","description":"ID of the request, unique to the call, as determined by the initiating party"}},{"description":"Unique ID of the token","in":"path","name":"gatewayTokenId","required":true,"schema":{"type":"string","description":"Unique ID of the token","maxLength":64}},{"in":"path","name":"version","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenInformationResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Conflict"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Service Unavailable"}},"summary":"Get token information","tags":["Token API"]}}}}
```

## Deactivate an existing token

> Deactivates an existing token, preventing its use in future payments

```json
{"openapi":"3.1.0","info":{"title":"E-commerce Gateway API","version":"1.0.0"},"servers":[{"url":"https://sandbox-api.ecomm.api.tietoevry.com"}],"security":[{"OAuth2ClientAuthentication":[]}],"components":{"securitySchemes":{"OAuth2ClientAuthentication":{"type":"openIdConnect","description":"This API uses OAuth 2 with the client credentials flow. [More info](https://www.rfc-editor.org/rfc/rfc6749#section-4.4)","openIdConnectUrl":"https://ecomm.api.tietoevry.com/auth/realms/participants-tietoevry/protocol/openid-connect/token"}},"schemas":{"DeactivateTokenResponse":{"type":"object","properties":{"gatewayTokenId":{"type":"string","description":"Unique ID of the token","maxLength":64},"tokenStatus":{"type":"string","enum":["ACTIVE","SUSPENDED"]}}},"ErrorResponse":{"type":"object","properties":{"apiClientMessages":{"type":"array","items":{"$ref":"#/components/schemas/ApiClientMessage"}}}},"ApiClientMessage":{"type":"object","properties":{"category":{"type":"string","enum":["ERROR"]},"code":{"type":"string"},"text":{"type":"string"}}}}},"paths":{"/egw/{version}/tokens/{gatewayTokenId}":{"delete":{"description":"Deactivates an existing token, preventing its use in future payments","operationId":"deactivateToken","parameters":[{"description":"ID of the request, unique to the call, as determined by the initiating party","in":"header","name":"X-Request-Id","required":true,"schema":{"type":"string","format":"uuid","description":"ID of the request, unique to the call, as determined by the initiating party"}},{"description":"Unique ID of the token","in":"path","name":"gatewayTokenId","required":true,"schema":{"type":"string","description":"Unique ID of the token","maxLength":64}},{"in":"path","name":"version","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeactivateTokenResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Conflict"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Service Unavailable"}},"summary":"Deactivate an existing token","tags":["Token API"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://doc.ecomm.api.tietoevry.com/tietoevry-egw-documentation-es/referencias-de-api/api-unificada-para-comercios/tokens.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
