Removes a card from the exception file
curl --request DELETE \
--url https://sandbox-api.marqeta.com/v3/exception-file/{cardToken} \
--header 'Authorization: Basic <encoded-value>' \
--header 'X-Marqeta-Program-Short-Code: <x-marqeta-program-short-code>'import requests
url = "https://sandbox-api.marqeta.com/v3/exception-file/{cardToken}"
headers = {
"X-Marqeta-Program-Short-Code": "<x-marqeta-program-short-code>",
"Authorization": "Basic <encoded-value>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {
'X-Marqeta-Program-Short-Code': '<x-marqeta-program-short-code>',
Authorization: 'Basic <encoded-value>'
}
};
fetch('https://sandbox-api.marqeta.com/v3/exception-file/{cardToken}', 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://sandbox-api.marqeta.com/v3/exception-file/{cardToken}",
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: Basic <encoded-value>",
"X-Marqeta-Program-Short-Code: <x-marqeta-program-short-code>"
],
]);
$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://sandbox-api.marqeta.com/v3/exception-file/{cardToken}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-Marqeta-Program-Short-Code", "<x-marqeta-program-short-code>")
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://sandbox-api.marqeta.com/v3/exception-file/{cardToken}")
.header("X-Marqeta-Program-Short-Code", "<x-marqeta-program-short-code>")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.marqeta.com/v3/exception-file/{cardToken}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-Marqeta-Program-Short-Code"] = '<x-marqeta-program-short-code>'
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"message": "Request accepted for processing"
}{
"message": "Program is not onboarded for the Exception File Management feature"
}{
"message": "Card token is not found"
}{
"message": "No exception file entry exists for the specified card token."
}{
"message": "Unable to process the request. Please retry later"
}Exception File Management
Remove Card from Exception File
Removes the specified card record from the exception file
DELETE
/
exception-file
/
{cardToken}
Removes a card from the exception file
curl --request DELETE \
--url https://sandbox-api.marqeta.com/v3/exception-file/{cardToken} \
--header 'Authorization: Basic <encoded-value>' \
--header 'X-Marqeta-Program-Short-Code: <x-marqeta-program-short-code>'import requests
url = "https://sandbox-api.marqeta.com/v3/exception-file/{cardToken}"
headers = {
"X-Marqeta-Program-Short-Code": "<x-marqeta-program-short-code>",
"Authorization": "Basic <encoded-value>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {
'X-Marqeta-Program-Short-Code': '<x-marqeta-program-short-code>',
Authorization: 'Basic <encoded-value>'
}
};
fetch('https://sandbox-api.marqeta.com/v3/exception-file/{cardToken}', 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://sandbox-api.marqeta.com/v3/exception-file/{cardToken}",
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: Basic <encoded-value>",
"X-Marqeta-Program-Short-Code: <x-marqeta-program-short-code>"
],
]);
$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://sandbox-api.marqeta.com/v3/exception-file/{cardToken}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-Marqeta-Program-Short-Code", "<x-marqeta-program-short-code>")
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://sandbox-api.marqeta.com/v3/exception-file/{cardToken}")
.header("X-Marqeta-Program-Short-Code", "<x-marqeta-program-short-code>")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.marqeta.com/v3/exception-file/{cardToken}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-Marqeta-Program-Short-Code"] = '<x-marqeta-program-short-code>'
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"message": "Request accepted for processing"
}{
"message": "Program is not onboarded for the Exception File Management feature"
}{
"message": "Card token is not found"
}{
"message": "No exception file entry exists for the specified card token."
}{
"message": "Unable to process the request. Please retry later"
}Use this endpoint to remove a card from the exception file.
The Marqeta platform processes this request asynchronously.
Subscribe to the
pan.exception_file.deleted webhook event to confirm when the card network completes the action.Authorizations
zionTokenoauth2
Headers
Query Parameters
Optional reason code recorded with the removal.
CLOS- Card terminated / closed accountLCPU- Lost cardSCPU- Stolen cardINVA- Invalid / not found accountPUWF- Fraud pickup (non-specific)PUNF- Pickup (no fraud)EXPC- Expired card (authorization only; declines with response code 54)DNTH- General block (authorization only; declines with response code 05)
Available options:
CLOS, LCPU, SCPU, INVA, PUWF, PUNF, EXPC, DNTH Was this page helpful?