Invalidate a Card Token
curl --request DELETE \
--url https://cc-api-stg.directa24.com/v3/tokenization/{card_identifier} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: <content-type>' \
--header 'X-Date: <x-date>' \
--header 'X-Login: <x-login>'import requests
url = "https://cc-api-stg.directa24.com/v3/tokenization/{card_identifier}"
headers = {
"Content-Type": "<content-type>",
"X-Date": "<x-date>",
"X-Login": "<x-login>",
"Authorization": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {
'Content-Type': '<content-type>',
'X-Date': '<x-date>',
'X-Login': '<x-login>',
Authorization: '<api-key>'
}
};
fetch('https://cc-api-stg.directa24.com/v3/tokenization/{card_identifier}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cc-api-stg.directa24.com/v3/tokenization/{card_identifier}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: <content-type>",
"X-Date: <x-date>",
"X-Login: <x-login>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://cc-api-stg.directa24.com/v3/tokenization/{card_identifier}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("X-Date", "<x-date>")
req.Header.Add("X-Login", "<x-login>")
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://cc-api-stg.directa24.com/v3/tokenization/{card_identifier}")
.header("Content-Type", "<content-type>")
.header("X-Date", "<x-date>")
.header("X-Login", "<x-login>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://cc-api-stg.directa24.com/v3/tokenization/{card_identifier}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Content-Type"] = '<content-type>'
request["X-Date"] = '<x-date>'
request["X-Login"] = '<x-login>'
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_bodyThis response has no body data.{
"code": 511,
"description": "<string>"
}{
"code": 123,
"description": "<string>"
}Saving cards (card-on-file)
Delete a stored card
Invalidates a previously generated card token, preventing its future use for transactions
DELETE
/
v3
/
tokenization
/
{card_identifier}
Invalidate a Card Token
curl --request DELETE \
--url https://cc-api-stg.directa24.com/v3/tokenization/{card_identifier} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: <content-type>' \
--header 'X-Date: <x-date>' \
--header 'X-Login: <x-login>'import requests
url = "https://cc-api-stg.directa24.com/v3/tokenization/{card_identifier}"
headers = {
"Content-Type": "<content-type>",
"X-Date": "<x-date>",
"X-Login": "<x-login>",
"Authorization": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {
'Content-Type': '<content-type>',
'X-Date': '<x-date>',
'X-Login': '<x-login>',
Authorization: '<api-key>'
}
};
fetch('https://cc-api-stg.directa24.com/v3/tokenization/{card_identifier}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cc-api-stg.directa24.com/v3/tokenization/{card_identifier}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: <content-type>",
"X-Date: <x-date>",
"X-Login: <x-login>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://cc-api-stg.directa24.com/v3/tokenization/{card_identifier}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("X-Date", "<x-date>")
req.Header.Add("X-Login", "<x-login>")
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://cc-api-stg.directa24.com/v3/tokenization/{card_identifier}")
.header("Content-Type", "<content-type>")
.header("X-Date", "<x-date>")
.header("X-Login", "<x-login>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://cc-api-stg.directa24.com/v3/tokenization/{card_identifier}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Content-Type"] = '<content-type>'
request["X-Date"] = '<x-date>'
request["X-Login"] = '<x-login>'
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_bodyThis response has no body data.{
"code": 511,
"description": "<string>"
}{
"code": 123,
"description": "<string>"
}Headers
Response
Card token successfully invalidated