Terminate card
curl --request PUT \
--url https://api.platnova.com/v1/cards/{card_id}/terminate \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.platnova.com/v1/cards/{card_id}/terminate"
headers = {"X-API-KEY": "<api-key>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.platnova.com/v1/cards/{card_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://api.platnova.com/v1/cards/{card_id}/terminate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$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.platnova.com/v1/cards/{card_id}/terminate"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("X-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.put("https://api.platnova.com/v1/cards/{card_id}/terminate")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.platnova.com/v1/cards/{card_id}/terminate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": true,
"data": {
"card_id": "8c69ef84-891e-4a50-b03d-8e42d0733e8d",
"status": "cancelled",
"already_terminated": false,
"currency": "usd",
"balance": 0.58,
"balance_refund": "pending"
},
"error": [],
"message": "operation was successful"
}Cards
Terminate Card
Close a card permanently. The card stops working at once and cannot be reactivated. Any balance on it is returned by the card issuer and credited back automatically, usually within a minute; balance_refund in the response says whether that is still to come. Terminating a card that is already terminated returns 200 with already_terminated: true, so the call is safe to retry.
PUT
/
v1
/
cards
/
{card_id}
/
terminate
Terminate card
curl --request PUT \
--url https://api.platnova.com/v1/cards/{card_id}/terminate \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.platnova.com/v1/cards/{card_id}/terminate"
headers = {"X-API-KEY": "<api-key>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.platnova.com/v1/cards/{card_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://api.platnova.com/v1/cards/{card_id}/terminate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$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.platnova.com/v1/cards/{card_id}/terminate"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("X-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.put("https://api.platnova.com/v1/cards/{card_id}/terminate")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.platnova.com/v1/cards/{card_id}/terminate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": true,
"data": {
"card_id": "8c69ef84-891e-4a50-b03d-8e42d0733e8d",
"status": "cancelled",
"already_terminated": false,
"currency": "usd",
"balance": 0.58,
"balance_refund": "pending"
},
"error": [],
"message": "operation was successful"
}Overview
Close a card permanently. Use this when a customer no longer needs a card, or when you want to close it and return its balance. Unlike freezing, termination cannot be undone.What happens to the balance
You do not need to withdraw first. A card cannot be withdrawn below USD 1.00, but termination returns everything left on the card.- The card issuer returns the balance and it is credited back automatically, the same way a withdrawal is credited. This usually takes less than a minute.
balance_refundin the response tells you where it stands:none: there was nothing on the card.pending: the balance is on its way back. You receive thecard.termination_refundwebhook when it lands.refunded: it was credited during this request.
- You also receive
card.terminatedwhen the card is closed.
When a card cannot be terminated
data.code | Status | Meaning |
|---|---|---|
card_not_found | 404 | No card with this id belongs to your business. |
card_not_issued | 409 | The card was never issued (still being created, or its KYC failed), so there is nothing to terminate. A card that fails KYC is cancelled and refunded automatically. |
card_movement_pending | 409 | A funding or withdrawal on the card is still processing. Try again once it has settled. |
card_frozen_by_platnova | 403 | Platnova froze this card. Contact support. |
card_cannot_be_terminated | 409 | This card can’t be terminated through the API. Contact support. |
200 with already_terminated: true, so the call is safe to retry.
