Delete Token
DELETEhttps://api.cleverhub.co/api/v2/cards/:token_id
This endpoint deletes or deactivates a previously created token_id
.
Once deleted, the card token can no longer be used to create new payments.
⚠️ If the token is already used in an in-progress transaction, it will not affect that transaction but will prevent future usage.
Request
Path Parameters
token_id stringrequired
The unique card token ID to delete (e.g., tok_abcd1234
)
Responses
- 200
- 400
- 401
- 404
Card token deleted
- application/json
- Schema
- Example (auto)
Schema
statusstring
Example:
Ok
{
"status": "Ok"
}
Bad Request
Unauthorized
- application/json
- Schema
- Example (auto)
Schema
errors object
{
"errors": {
"code": "REQUIRE_LOGIN",
"message": "Not Authorised"
}
}
Token ID not found.
- application/json
- Schema
- Example (auto)
Schema
errors object
{
"errors": {
"message": "Token ID not found."
}
}
Authorization: app-id
name: app-idtype: apiKeydescription: The app-id is registered and secured inside Hello Clever system and only required when client has initiated or in the middle of the transaction.in: header
name: secret-keytype: apiKeydescription: The secret-key is our client's secret of the source. Required if a publishable key is used to retrieve the source.in: header
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Delete, "https://api.cleverhub.co/api/v2/cards/:token_id");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("app-id", "<app-id>");
request.Headers.Add("secret-key", "<app-id>");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear