Terminate a card
curl --request POST \
--url https://sandbox-api.fyatu.com/api/v3.20/cards/{id}/terminate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"confirm": "TERMINATE_CARD"
}
'import requests
url = "https://sandbox-api.fyatu.com/api/v3.20/cards/{id}/terminate"
payload = { "confirm": "TERMINATE_CARD" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({confirm: 'TERMINATE_CARD'})
};
fetch('https://sandbox-api.fyatu.com/api/v3.20/cards/{id}/terminate', 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.fyatu.com/api/v3.20/cards/{id}/terminate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'confirm' => 'TERMINATE_CARD'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.fyatu.com/api/v3.20/cards/{id}/terminate"
payload := strings.NewReader("{\n \"confirm\": \"TERMINATE_CARD\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox-api.fyatu.com/api/v3.20/cards/{id}/terminate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"confirm\": \"TERMINATE_CARD\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.fyatu.com/api/v3.20/cards/{id}/terminate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"confirm\": \"TERMINATE_CARD\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"status": 200,
"message": "Card terminated",
"data": {
"id": "crd_01HXYZ5555ABCDEF1111",
"cardholderId": "chl_01HXYZ1234ABCDEF5678",
"productId": "prd_01HXYZ7777ABCDEF3333",
"status": "TERMINATED",
"cardType": "VIRTUAL",
"cardBrand": "VISA",
"maskedPan": "**** **** **** 4242",
"last4": "4242",
"expirationDate": "05/2029",
"currency": "USD",
"terminatedAt": "2026-05-26T10:00:00Z",
"createdAt": "2026-05-22T09:00:00Z",
"updatedAt": "2026-05-26T10:00:00Z"
},
"meta": {
"requestId": "req_a1b2c3d4e5f6a7b8c9d0e1f2",
"platform": "Fyatu CaaS",
"timestamp": "2026-05-26T10:00:00Z"
}
}Cards
Terminate Card
Permanently terminate a card. This action is irreversible. POST /cards//terminate. Requires cards:write scope.
POST
/
cards
/
{id}
/
terminate
Terminate a card
curl --request POST \
--url https://sandbox-api.fyatu.com/api/v3.20/cards/{id}/terminate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"confirm": "TERMINATE_CARD"
}
'import requests
url = "https://sandbox-api.fyatu.com/api/v3.20/cards/{id}/terminate"
payload = { "confirm": "TERMINATE_CARD" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({confirm: 'TERMINATE_CARD'})
};
fetch('https://sandbox-api.fyatu.com/api/v3.20/cards/{id}/terminate', 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.fyatu.com/api/v3.20/cards/{id}/terminate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'confirm' => 'TERMINATE_CARD'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.fyatu.com/api/v3.20/cards/{id}/terminate"
payload := strings.NewReader("{\n \"confirm\": \"TERMINATE_CARD\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox-api.fyatu.com/api/v3.20/cards/{id}/terminate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"confirm\": \"TERMINATE_CARD\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.fyatu.com/api/v3.20/cards/{id}/terminate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"confirm\": \"TERMINATE_CARD\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"status": 200,
"message": "Card terminated",
"data": {
"id": "crd_01HXYZ5555ABCDEF1111",
"cardholderId": "chl_01HXYZ1234ABCDEF5678",
"productId": "prd_01HXYZ7777ABCDEF3333",
"status": "TERMINATED",
"cardType": "VIRTUAL",
"cardBrand": "VISA",
"maskedPan": "**** **** **** 4242",
"last4": "4242",
"expirationDate": "05/2029",
"currency": "USD",
"terminatedAt": "2026-05-26T10:00:00Z",
"createdAt": "2026-05-22T09:00:00Z",
"updatedAt": "2026-05-26T10:00:00Z"
},
"meta": {
"requestId": "req_a1b2c3d4e5f6a7b8c9d0e1f2",
"platform": "Fyatu CaaS",
"timestamp": "2026-05-26T10:00:00Z"
}
}Overview
Permanently terminates a card. Once terminated:- All future transactions are declined immediately
- Any remaining card balance is returned to the program ledger
- The card cannot be reactivated — issue a new card if needed
Termination is irreversible. To temporarily block a card, use
POST /cards/{id}/freeze instead. Only terminate when you are certain the card should never transact again.Safety Confirmation
To prevent accidental termination, the request body must include:{
"confirm": "TERMINATE_CARD"
}
400 CONFIRMATION_REQUIRED.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The card ID (prefix crd_) |
Request Body
| Field | Type | Required | Value |
|---|---|---|---|
confirm | string | Yes | Must be exactly "TERMINATE_CARD" |
Example
curl -X POST https://api.fyatu.com/api/v3.20/cards/crd_01HXYZ5555ABCDEF1111/terminate \
-H "Authorization: Bearer $FYATU_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "confirm": "TERMINATE_CARD" }'
const resp = await fetch(
'https://api.fyatu.com/api/v3.20/cards/crd_01HXYZ5555ABCDEF1111/terminate',
{
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.FYATU_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ confirm: 'TERMINATE_CARD' })
}
);
const body = await resp.json();
console.log(body.data.status); // "TERMINATED"
console.log(body.data.terminatedAt); // "2026-05-26T10:00:00Z"
import os, requests
resp = requests.post(
'https://api.fyatu.com/api/v3.20/cards/crd_01HXYZ5555ABCDEF1111/terminate',
headers={'Authorization': f'Bearer {os.environ["FYATU_API_KEY"]}'},
json={'confirm': 'TERMINATE_CARD'}
)
card = resp.json()['data']
print(card['status']) # TERMINATED
print(card['terminatedAt'])
Success Response (200)
Returns the terminated card object:{
"success": true,
"status": 200,
"message": "Card terminated",
"data": {
"id": "crd_01HXYZ5555ABCDEF1111",
"cardholderId": "chl_01HXYZ1234ABCDEF5678",
"productId": "prd_01HXYZ7777ABCDEF3333",
"status": "TERMINATED",
"cardType": "VIRTUAL",
"cardBrand": "VISA",
"maskedPan": "**** **** **** 4242",
"last4": "4242",
"expirationDate": "05/2029",
"currency": "USD",
"terminatedAt": "2026-05-26T10:00:00Z",
"createdAt": "2026-05-22T09:00:00Z",
"updatedAt": "2026-05-26T10:00:00Z"
},
"meta": {
"requestId": "req_01HXY123456ABCDEF",
"platform": "Fyatu CaaS",
"timestamp": "2026-05-26T10:00:00Z"
}
}
The card is closed at the issuer before we answer
Termination is confirmed with the card issuer before this endpoint returns, and your card is only recorded asTERMINATED once the issuer has actually closed it. A 200 therefore means the card
is dead at the network, not merely marked closed on our side.
That confirmation takes a moment — expect this call to take noticeably longer than a read, and
allow for it in your client timeout. If the issuer refuses (most often because the card still
holds a balance), the call returns CARD_TERMINATION_REFUSED and the card is left exactly as it
was — still active, still spendable, and still shown with its previous status. Resolve the
reason and retry; nothing about the card has changed in the meantime.
Treat
CARD_TERMINATION_REFUSED as “the card is still live”. It is not a partial success and
there is no background retry: until a call returns 200, the card can still transact.Webhook
ACARD_TERMINATED event fires after successful termination:
{
"event": "CARD_TERMINATED",
"eventId": "evt_01HXY123456ABCDEF",
"businessId": "BUS1A2B3C4D5E6F",
"environment": "LIVE",
"timestamp": "2026-05-26T10:00:00Z",
"data": {
"cardId": "crd_01HXYZ5555ABCDEF1111",
"status": "TERMINATED",
"cardType": "VIRTUAL",
"cardholderId": "chl_01HXYZ1234ABCDEF5678"
}
}
Error Codes
| Code | HTTP | Cause |
|---|---|---|
CONFIRMATION_REQUIRED | 400 | confirm field is missing or not "TERMINATE_CARD" |
CARD_NOT_FOUND | 404 | Card does not exist or belongs to another business/environment |
CARD_ALREADY_TERMINATED | 409 | Card is already terminated |
CARD_TOO_NEW_TO_TERMINATE | 422 | The card was created less than 1 hour ago. Retry after that; the sandbox applies the same rule |
CARD_HAS_PENDING_TRANSACTIONS | 409 | Pending authorizations must clear before termination (typically 24–72 hours) |
CARD_TERMINATION_REFUSED | 422 | The issuer refused to close the card for a stated reason (e.g. it still holds a balance). The card is unchanged and still active |
CARD_TERMINATION_REFUSED | 503 | The issuer could not be reached or refused for a reason we do not surface. The card is unchanged and still active — retry shortly |
INSUFFICIENT_SCOPE | 403 | Key lacks cards:write scope |

