Saltar al contenido principal
GET
GET /token/{token} te dice si un token que almacenaste todavía se puede cobrar. Llámalo antes de un reintento o de un cobro programado cuando guardas tokens durante mucho tiempo, o después de recibir un webhook token.deleted o token.erased. Un token está en uno de cuatro estados: erasesAt queda vacío mientras una suscripción activa o un beneficiario de pagos todavía usa la tarjeta (heldBySubscription es true). Se mueve más adelante cada vez que el token se vuelve a usar. Después del borrado, brand, last4, expiryMonth y expiryYear se conservan, así que los pagos anteriores siguen mostrando la tarjeta. Consulta el ciclo de vida del token para ver las reglas de retención y los códigos de error que devuelve un cobro.

Autorizaciones

Authorization
string
header
requerido

Your secret API key: Bearer prv_production_xxx (production) or Bearer prv_sandbox_xxx (sandbox).

Parámetros de ruta

token
string
requerido

The token returned when the card was stored (vt_...).

Parámetros de consulta

merchantCode
string

Your merchant account identifier.

Respuesta

Token status

token
string
status
enum<string>

active, deleted (still charges until erasesAt), erased (card data permanently erased; cannot be charged) or expired.

Opciones disponibles:
active,
deleted,
erased,
expired
deletedAt
string<date-time> | null

When the card was deleted or retired.

deletedReason
string | null

deleted when the shopper or a support agent removed the card or a newer save replaced it; expired or unused when Therius retired it; null while the token is active.

erasedAt
string<date-time> | null

When the card data was erased.

erasesAt
string<date-time> | null

When the card data will be erased if the token is not used again. null while a live subscription or payout still uses the card. Using the token again moves this date.

heldBySubscription
boolean

true when a deleted card is kept because an active subscription still renews on it.

brand
string | null

Card brand. Kept after the card data is erased.

last4
string | null

Last four digits. Kept after the card data is erased.

expiryMonth
string | null
expiryYear
string | null