# Delete subscriber

Source: <https://docs.gjold.com/v2/subscribers/delete>

Delete a subscriber's saved card, so that it can no longer be charged. The subscriber stays, with its history, and the payer can renew it with a new card.

## Request

**DELETE** `https://api.gjold.com/v2/{shopid}:sub:{subid}`

- `{subid}` is the subscriber's `"id"`, from [seq](https://docs.gjold.com/v2/synchronization/seq).

The request has no body. The key needs the `charge` [permission](https://docs.gjold.com/v2/authentication#permissions).

### Headers

- `Authorization`

  **Required.** Your API key, after `Basic` and base64-encoded. See [Authentication](https://docs.gjold.com/v2/authentication).

## Response

We answer `200 OK` with an empty object, `{}`, once the card is forgotten. What is final is that: we no longer have the card, and can't get it back. The subscriber itself remains:

- [Seq](https://docs.gjold.com/v2/synchronization/seq) returns it with a `"delete"` in its [`"acts"`](https://docs.gjold.com/v2/subscribers#the-subscriber-object), and its `"rev"` one higher.
- [Charge subscriber](https://docs.gjold.com/v2/subscribers/charge) fails with `410 subscriber deleted`.
- [Renew subscriber](https://docs.gjold.com/v2/subscribers/renew) works as before: the payer saves a new card, and the subscriber can be charged again, with its old `"id"`.
- Its charges, which are transactions, are not affected: you can still capture, refund, or void them.

Deleting a subscriber that is deleted already changes nothing, and answers `200 OK` again, so the request is safe to send again.

## Errors

Besides the errors that any request can give, which [Errors](https://docs.gjold.com/v2/errors) lists:

| Status and message | Description |
|---|---|
| `404 subscriber not found` | The shop has no subscriber with that `{subid}`. |

## When to delete

Delete a subscriber when the payer cancels, and you will not charge them again, or when they ask you to forget their card. Until you do, the card can be charged, and a leaked API key could charge it. See [Charging subscribers](https://docs.gjold.com/notes/subscribers#charging-fairly).
