> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.thepennyinc.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.thepennyinc.com/_mcp/server.

# Terminate a card

DELETE https://issuing.sandbox.api.thepennyinc.com/cards/{card_id}

Terminate a card. Terminated cards can't be used or reactivated.

Required permissions: `card:delete`.

Reference: https://docs.thepennyinc.com/issuing/api-reference/cards/terminate

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://issuing.sandbox.api.thepennyinc.com` (Sandbox — safe for testing, no real cards or money movement., default)
- `https://issuing.live.api.thepennyinc.com` (Live — real cards, real money movement.)

## Request

### Path parameters

- `card_id` (string, required)

## Response

### 200

The terminated card.

- `card_id` (string, required) — Penny's unique identifier for this card.
- `version` (integer, required) — A number that increases each time this card's details change. Use it to confirm you are looking at the latest information.
- `version_time` (datetime, required) — The date and time this card's details were last changed.
- `issued_time` (datetime, required) — The date and time this card was issued.
- `expiration_date` (date, required) — The date this card expires and can no longer be used.
- `bin_id` (string, required) — The BIN this card was issued under.
- `bin_range_id` (string, required) — The BIN range this card was issued under.
- `card_product_id` (string, required) — The card product this card was issued under.
- `business_id` (string, required) — The business that owns this card.
- `business_entity_id` (string, required) — The business entity associated with this card.
- `program_id` (string, required) — The program this card was issued under.
- `capital_account_id` (string, required) — The account this card draws funds from.
- `cardholder_id` (string, required) — The cardholder this card is issued to.
- `status` (enum, required) — This card's current lifecycle status.
  - Allowed values: `pending`, `active`, `deactivated`, `suspended`, `terminated`
- `active` (boolean, required) — Whether this card is currently able to authorize transactions.
- `terminated` (boolean, required) — Whether this card has been permanently terminated.
- `currency` (enum, required) — The currency this card transacts in.
  - Allowed values: `USD`
- `country` (string, required) — The country this card was issued in, as an ISO 3166-1 alpha-2 code.
- `usage_type` (enum, required) — The usage type this card was issued for.
  - Allowed values: `single_use`, `single_reload`, `reloadable`
- `scheme_details` (CardSchemeResponse, required) — The card network scheme details for this card.
- `terminated_time` (datetime, optional, nullable) — The date and time this card was terminated, if it has been.
- `bin` (string, optional, nullable) — The first 6-8 digits of the card number, as displayed to end users.
- `last_four` (string, optional, nullable) — The last four digits of the card number, as displayed to end users.
- `control_account_id` (string, optional, nullable) — The control account controlling this card's spend, if one is delegated.
- `usage_limits` (CardUsageLimitsResponse, optional, nullable) — The limits enforcing `usage_type` and how much of them is used. Present on single_use and single_reload cards only.
- `alias` (string, optional, nullable) — A human-readable name for this card, if one has been set.
- `description` (string, optional, nullable) — A description of this card's purpose, if one has been set.
- `spend_control_id` (string, optional, nullable) — The spend control policy applied to this card, if one is set.
- `client_reference` (ReferenceResponse, optional, nullable) — An opaque reference the client attached to this card for their own tracking purposes.
- `form_factor` (enum, optional, default: virtual) — The form of this card.
  - Allowed values: `virtual`

## Errors

### 400 Bad Request Error

The request was malformed: a required field is missing or a value has the wrong type or format.

- `type` (string, required) — The name of the exception that was raised.
- `message` (string, required) — A human-readable description of the error.
- `details` (map from string to any, optional, nullable) — Structured context about the error, if any.
- `trace_id` (string, optional, nullable) — Identifier for correlating this error with server-side logs.
- `errors` (list of map from string to any, optional, nullable) — Sub-errors that contributed to this failure, if any.

### 401 Unauthorized Error

Authentication failed.

- `type` (string, required) — The name of the exception that was raised.
- `message` (string, required) — A human-readable description of the error.
- `details` (map from string to any, optional, nullable) — Structured context about the error, if any.
- `trace_id` (string, optional, nullable) — Identifier for correlating this error with server-side logs.
- `errors` (list of map from string to any, optional, nullable) — Sub-errors that contributed to this failure, if any.

### 403 Forbidden Error

The caller does not have permission to perform this action.

- `type` (string, required) — The name of the exception that was raised.
- `message` (string, required) — A human-readable description of the error.
- `details` (map from string to any, optional, nullable) — Structured context about the error, if any.
- `trace_id` (string, optional, nullable) — Identifier for correlating this error with server-side logs.
- `errors` (list of map from string to any, optional, nullable) — Sub-errors that contributed to this failure, if any.

### 404 Not Found Error

The card was not found.

- `type` (string, required) — The name of the exception that was raised.
- `message` (string, required) — A human-readable description of the error.
- `details` (map from string to any, optional, nullable) — Structured context about the error, if any.
- `trace_id` (string, optional, nullable) — Identifier for correlating this error with server-side logs.
- `errors` (list of map from string to any, optional, nullable) — Sub-errors that contributed to this failure, if any.

### 422 Unprocessable Entity Error

The request was well-formed but could not be processed because it breaks a business rule.

- `type` (string, required) — The name of the exception that was raised.
- `message` (string, required) — A human-readable description of the error.
- `details` (map from string to any, optional, nullable) — Structured context about the error, if any.
- `trace_id` (string, optional, nullable) — Identifier for correlating this error with server-side logs.
- `errors` (list of map from string to any, optional, nullable) — Sub-errors that contributed to this failure, if any.

### 429 Too Many Requests Error

Too many requests; retry after the Retry-After header.

- `type` (string, required) — The name of the exception that was raised.
- `message` (string, required) — A human-readable description of the error.
- `details` (map from string to any, optional, nullable) — Structured context about the error, if any.
- `trace_id` (string, optional, nullable) — Identifier for correlating this error with server-side logs.
- `errors` (list of map from string to any, optional, nullable) — Sub-errors that contributed to this failure, if any.

### 500 Internal Server Error

An unexpected error occurred.

- `type` (string, required) — The name of the exception that was raised.
- `message` (string, required) — A human-readable description of the error.
- `details` (map from string to any, optional, nullable) — Structured context about the error, if any.
- `trace_id` (string, optional, nullable) — Identifier for correlating this error with server-side logs.
- `errors` (list of map from string to any, optional, nullable) — Sub-errors that contributed to this failure, if any.

## Types

### CardSchemeResponse

The card network scheme configuration for this card: the network brand, funding type, and product type used in authorization and clearing.

- `network` (enum, required) — The card network for this card, such as Visa or Mastercard.
  - Allowed values: `visa`, `mastercard`
- `funding_type` (enum, optional, nullable) — This card's funding type, if defined.
  - Allowed values: `debit`, `credit`, `prepaid`
- `product_type` (enum, optional, nullable) — This card's network product category, if defined.
  - Allowed values: `consumer`, `corporate`, `commercial`

### CardUsageLimitsResponse

The limits enforcing this card's usage type, and how much of them is used. Amounts are in the card's currency.

- `authorizations_maximum` (integer, optional, nullable) — How many authorizations the card permits. Set on single_use cards.
- `authorizations_used` (integer, optional, nullable) — How many authorizations are counted against `authorizations_maximum`. An authorization that expires or is cancelled before settling is no longer counted.
- `amount_limit` (string, optional, nullable) — The lifetime spend budget set by `load_amount` at issuance. Set on single_reload cards; it cannot be raised.
- `amount_remaining` (string, optional, nullable) — The budget still available. Pending authorizations and settled spend reduce it; authorizations that expire or are cancelled return it.

### ReferenceResponse

An opaque reference the client attached to this card for their own tracking purposes.

- `id` (string, optional, nullable) — The client's own identifier for this card in their system.
- `data` (map from string to string, optional, nullable) — Additional metadata the client attached to this card.

## Examples

**Response**

```json
{
  "card_id": "card_019375de-a2a0-7f31-884a-a2a0f3184abd",
  "version": 1,
  "version_time": "2024-01-15T10:30:00Z",
  "issued_time": "2024-01-15T10:30:00Z",
  "expiration_date": "2030-06-30",
  "bin_id": "bin_01937000-0592-7190-87e7-05921907e7c5",
  "bin_range_id": "bin_range_01937b28-f048-77de-8ef4-f0487deef42d",
  "card_product_id": "card_product_01937f5d-a015-7a55-818b-a015a5518b97",
  "business_id": "business_01937b95-484e-75af-8c68-484e5afc68d3",
  "business_entity_id": "business_entity_01937c9d-3a1e-72b0-8881-3a1e2b088159",
  "program_id": "program_019377de-7f88-7f02-894f-7f88f0294fcb",
  "capital_account_id": "account_019372e3-b8dc-7de2-80b6-b8dcde20b6c9",
  "cardholder_id": "cardholder_01937e19-4ebb-75bd-8250-4ebb5bd25085",
  "status": "pending",
  "active": true,
  "terminated": false,
  "currency": "USD",
  "country": "US",
  "usage_type": "single_use",
  "scheme_details": {
    "network": "visa",
    "funding_type": "debit",
    "product_type": "consumer"
  },
  "terminated_time": "2024-01-15T10:30:00Z",
  "bin": "424242",
  "last_four": "4242",
  "control_account_id": "account_019372e3-b8dc-7de2-80b6-b8dcde20b6c9",
  "usage_limits": {
    "authorizations_maximum": 1,
    "authorizations_used": 0,
    "amount_limit": "250.00",
    "amount_remaining": "180.00"
  },
  "alias": "Marketing Team Card",
  "description": "Card issued for the marketing team's advertising spend.",
  "spend_control_id": "spend_control_019379d9-a170-796b-867a-a17096b67a21",
  "client_reference": {
    "id": "order-482910",
    "data": {}
  },
  "form_factor": "virtual"
}
```

**SDK Code**

```python
import requests

url = "https://issuing.sandbox.api.thepennyinc.com/cards/card_id"

headers = {"Authorization": "Bearer <token>"}

response = requests.delete(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://issuing.sandbox.api.thepennyinc.com/cards/card_id';
const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://issuing.sandbox.api.thepennyinc.com/cards/card_id"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://issuing.sandbox.api.thepennyinc.com/cards/card_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.delete("https://issuing.sandbox.api.thepennyinc.com/cards/card_id")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://issuing.sandbox.api.thepennyinc.com/cards/card_id', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://issuing.sandbox.api.thepennyinc.com/cards/card_id");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://issuing.sandbox.api.thepennyinc.com/cards/card_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```