# 

## Prerequisites

* A valid API key — see [Obtain API credentials](/docs/how-tos/setup/obtain-credentials)
* An existing `payment_token` value


## How soft-delete works

Reefpay uses **soft-delete** for payment tokens:

* The token status changes from `active` to `inactive`.
* The token record is retained for audit and transaction history.
* Any future transaction that references the token will be rejected.
* Existing completed transactions linked to the token are unaffected.


This action is irreversible
Once deleted, a token cannot be reactivated. To use the same payment method again, create a new token.

## Step 1: Send the delete request

Send `DELETE /v1/payment_tokens/{token}`.

curl
```shell
curl -X DELETE \
  https://api.dev.paradisegateway.net/v1/payment_tokens/PAYMENT_TOKEN-01KFDKXMQ637EKEAY410MSQSXB \
  -H "APIKEY: YOUR-API-KEY"
```

Python
```python
import requests

token = "PAYMENT_TOKEN-01KFDKXMQ637EKEAY410MSQSXB"
resp = requests.delete(
    f"https://api.dev.paradisegateway.net/v1/payment_tokens/{token}",
    headers={"APIKEY": "YOUR-API-KEY"},
)
print(resp.json())
```

JavaScript
```javascript
const token = "PAYMENT_TOKEN-01KFDKXMQ637EKEAY410MSQSXB";
const resp = await fetch(
  `https://api.dev.paradisegateway.net/v1/payment_tokens/${token}`,
  {
    method: "DELETE",
    headers: { "APIKEY": "YOUR-API-KEY" },
  }
);
console.log(await resp.json());
```

C#
```csharp
var token = "PAYMENT_TOKEN-01KFDKXMQ637EKEAY410MSQSXB";
var resp = await client.DeleteAsync(
    $"https://api.dev.paradisegateway.net/v1/payment_tokens/{token}");
Console.WriteLine(await resp.Content.ReadAsStringAsync());
```

Java
```java
String token = "PAYMENT_TOKEN-01KFDKXMQ637EKEAY410MSQSXB";
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create(
        "https://api.dev.paradisegateway.net/v1/payment_tokens/" + token))
    .header("APIKEY", "YOUR-API-KEY")
    .DELETE().build();
HttpResponse<String> resp = client.send(request,
    HttpResponse.BodyHandlers.ofString());
System.out.println(resp.body());
```

Go
```go
token := "PAYMENT_TOKEN-01KFDKXMQ637EKEAY410MSQSXB"
req, _ := http.NewRequest("DELETE",
    "https://api.dev.paradisegateway.net/v1/payment_tokens/"+token, nil)
req.Header.Set("APIKEY", "YOUR-API-KEY")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
```

PHP
```php
$token = "PAYMENT_TOKEN-01KFDKXMQ637EKEAY410MSQSXB";
$ch = curl_init("https://api.dev.paradisegateway.net/v1/payment_tokens/$token");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "DELETE",
    CURLOPT_HTTPHEADER => ["APIKEY: YOUR-API-KEY"],
]);
echo curl_exec($ch); curl_close($ch);
```

Ruby
```ruby
require "net/http"
token = "PAYMENT_TOKEN-01KFDKXMQ637EKEAY410MSQSXB"
uri = URI("https://api.dev.paradisegateway.net/v1/payment_tokens/#{token}")
req = Net::HTTP::Delete.new(uri, { "APIKEY" => "YOUR-API-KEY" })
resp = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
puts resp.body
```

## Step 2: Verify the response

A `200` response confirms the soft-delete. The returned token now has `status: inactive`.

```json
{
  "payment_token": "PAYMENT_TOKEN-01KFDKXMQ637EKEAY410MSQSXB",
  "object": "payment_token",
  "type": "card",
  "status": "inactive",
  "customer_id": "CUSTOMER-01KFDKXMQ637EKEAY410MSQSXB",
  "is_default": false,
  "nickname": "My Business Visa",
  "card": {
    "brand": "visa",
    "last_four": "1111",
    "bin": "411111",
    "funding": "credit"
  },
  "correlation_id": "d4e5f6a7-b8c9-0123-def0-1234567890ab"
}
```

Key observations:

* `status` is now `inactive`
* `is_default` is automatically set to `false`


## When to delete tokens

| Scenario | Action |
|  --- | --- |
| Customer requests removal of payment method | Delete the token |
| Card reported lost or stolen | Delete and create a new token with the replacement card |
| Compliance requirement (data minimization) | Delete tokens no longer needed |
| Card expired and will not be renewed | Delete the token |


## Default payment method behavior

If you delete a token that was the customer's default (`is_default: true`), no other token is automatically promoted to default. You should explicitly set a new default using [Update stored payment method](/docs/how-tos/tokenization-vaulting/update-payment-method) with `is_default: true`.

## Next steps

* [Store a card for future use](/docs/how-tos/tokenization-vaulting/store-card) — create a replacement token
* [About stored payment methods](/docs/concepts/tokenization/stored-payment-methods)