Remove a cardholder
curl --request DELETE \
--url https://api-sandbox.endl.io/api/v0/customer/{businessId}/card-users/{cardholderId} \
--header 'Api-Key: <api-key>' \
--header 'Api-Version: <api-version>'import requests
url = "https://api-sandbox.endl.io/api/v0/customer/{businessId}/card-users/{cardholderId}"
headers = {
"Api-Version": "<api-version>",
"Api-Key": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'Api-Version': '<api-version>', 'Api-Key': '<api-key>'}
};
fetch('https://api-sandbox.endl.io/api/v0/customer/{businessId}/card-users/{cardholderId}', 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://api-sandbox.endl.io/api/v0/customer/{businessId}/card-users/{cardholderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Api-Key: <api-key>",
"Api-Version: <api-version>"
],
]);
$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://api-sandbox.endl.io/api/v0/customer/{businessId}/card-users/{cardholderId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Api-Version", "<api-version>")
req.Header.Add("Api-Key", "<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://api-sandbox.endl.io/api/v0/customer/{businessId}/card-users/{cardholderId}")
.header("Api-Version", "<api-version>")
.header("Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.endl.io/api/v0/customer/{businessId}/card-users/{cardholderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Api-Version"] = '<api-version>'
request["Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"cardholderId": "cus_8Qw2mZ4pL7nR1tY6vB3x",
"businessId": "cus_1Xb7cV4bN7mQ0wE3rT5y",
"firstName": "Maya",
"lastName": "Okafor",
"email": "maya.okafor@example.com",
"status": "canceled"
}{
"code": 123,
"message": "<string>",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"code": 123,
"message": "<string>",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"code": 123,
"message": "<string>",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"code": 123,
"message": "<string>",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"code": 123,
"message": "<string>",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"code": 123,
"message": "<string>",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}Remove a cardholder
Removes a cardholder, for example when an employee leaves, and cancels all their cards.
- Every card the cardholder holds is canceled. This can’t be undone. You receive
card.canceledfor each card. - Payments already authorised can still settle against the business’s card balance.
- A repeat call returns the same cardholder. If the cards couldn’t all be canceled, it returns
502 ERRCRD_1009: repeat it until it succeeds. - A removed cardholder can’t be added again with the same email.
- The business’s owner can’t be removed.
DELETE
/
api
/
v0
/
customer
/
{businessId}
/
card-users
/
{cardholderId}
Remove a cardholder
curl --request DELETE \
--url https://api-sandbox.endl.io/api/v0/customer/{businessId}/card-users/{cardholderId} \
--header 'Api-Key: <api-key>' \
--header 'Api-Version: <api-version>'import requests
url = "https://api-sandbox.endl.io/api/v0/customer/{businessId}/card-users/{cardholderId}"
headers = {
"Api-Version": "<api-version>",
"Api-Key": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'Api-Version': '<api-version>', 'Api-Key': '<api-key>'}
};
fetch('https://api-sandbox.endl.io/api/v0/customer/{businessId}/card-users/{cardholderId}', 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://api-sandbox.endl.io/api/v0/customer/{businessId}/card-users/{cardholderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Api-Key: <api-key>",
"Api-Version: <api-version>"
],
]);
$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://api-sandbox.endl.io/api/v0/customer/{businessId}/card-users/{cardholderId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Api-Version", "<api-version>")
req.Header.Add("Api-Key", "<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://api-sandbox.endl.io/api/v0/customer/{businessId}/card-users/{cardholderId}")
.header("Api-Version", "<api-version>")
.header("Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.endl.io/api/v0/customer/{businessId}/card-users/{cardholderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Api-Version"] = '<api-version>'
request["Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"cardholderId": "cus_8Qw2mZ4pL7nR1tY6vB3x",
"businessId": "cus_1Xb7cV4bN7mQ0wE3rT5y",
"firstName": "Maya",
"lastName": "Okafor",
"email": "maya.okafor@example.com",
"status": "canceled"
}{
"code": 123,
"message": "<string>",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"code": 123,
"message": "<string>",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"code": 123,
"message": "<string>",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"code": 123,
"message": "<string>",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"code": 123,
"message": "<string>",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"code": 123,
"message": "<string>",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}Headers
The API version this request targets. 2026-09.1. See Versioning.
Pattern:
^\d{4}-\d{2}\.\d+$Path Parameters
Response
The cardholder, now canceled.
Fields without a value are left out.