---
title: "Remove wallet"
method: DELETE
path: "/api/wallets"
tags: ["Wallets", "Wallet and web3"]
---

# Remove wallet

`DELETE /api/wallets`

## Request

- Base URL: `https://app.d-sports.org`
- URL: `https://app.d-sports.org/api/wallets`
- Auth: HTTP bearer

Custodial delete requires `{ address, pin }` (6 digits) in the same request. External links need only `{ address }`. Clerk lastActiveAt is not a gate. Last wallet may be deleted. Wrong PIN is 400 INVALID_PIN; missing PIN is 400 VALIDATION_ERROR. Optional `ack: { timestamp, walletAddress, binderCount?, cardCount?, unopenedPackCount?, openedPackCount?, countsUnknown?, copyVersion }` records the delete confirmation (#928): binders keep the removed address (hidden from wallet-scoped lists until the address is linked again) and the ack is stored durably. All four stored counts are server-computed truth; the client numbers (null/omitted when unknown) are stored in the corresponding shown* fields. If any shown numeric count is below current truth, deletion returns 409 WALLET_DELETE_ACK_REQUIRED with the current counts so the fan can review again. `countsUnknown: true` cannot accompany any numeric count. Malformed ack is 400 VALIDATION_ERROR; an ack naming another wallet is rejected.

## Request body

- object
  - `address` string, required: 0x-prefixed 40-hex Ethereum address
  - `pin` string: Required for CUSTODIAL wallets. Omit for EXTERNAL links.
  - `ack` object
    - `timestamp` string, required: Client timestamp of the confirmation (ISO string)
    - `walletAddress` string, required: Wallet the fan confirmed; must match address
    - `binderCount` integer, nullable: Binder count shown in the confirmation copy; null/omitted when unknown (#934). Stored as shownBinderCount; the stored binderCount is server-computed.
    - `cardCount` integer, nullable: Card count shown in the confirmation copy; null/omitted when unknown (#934). Stored as shownCardCount; the stored cardCount is server-computed.
    - `unopenedPackCount` integer, nullable: Unopened-pack count shown in the confirmation copy; null/omitted when unknown. Stored as shownUnopenedPackCount; the stored unopenedPackCount is server-computed.
    - `openedPackCount` integer, nullable: Opened-pack count shown in the confirmation copy; null/omitted when unknown. Stored as shownOpenedPackCount; the stored openedPackCount is server-computed.
    - `copyVersion` string, required: Client copy version the fan acked
    - `countsUnknown` boolean: True when the client could not determine any count. Contradicts any numeric count.

## Response `200`

{ message, wallets } — wallets is the remaining list sorted by sortOrder (compacted 0..n-1)

## Other responses

- `400`: INVALID_PIN (wrong wallet PIN) or VALIDATION_ERROR (invalid address, missing PIN, PIN reset required, or malformed ack)
- `401`: UNAUTHORIZED
- `404`: NOT_FOUND (wallet missing or not owned by the caller)
- `409`: WALLET_DELETE_ACK_REQUIRED with current binderCount, cardCount, unopenedPackCount, and openedPackCount when the ack is omitted but holdings or last-linked-wallet status require confirmation, or when shown counts are stale. A known-empty non-last wallet is exempt.

## Changes

- **2026-11-18** `6de639c52609`: 2 info
  - added the new optional request property `ack`
  - added the non-success response with the status `409`
- **2026-09-12** `a8df6fe04343`: 1 breaking, 4 info
  - the request property `address` became required
  - added the new optional request property `pin`
  - added the non-success response with the status `400`
  - added the non-success response with the status `401`
  - …1 more
- **2026-03-12** `099fcb1a1540`: 1 info
  - api tag `Wallet and web3` added
- **2026-03-08** `120afc4ee72c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/d-sports-ecosystem/apis/d-sports-api/changes/api/wallets/delete.md)

---

[API](https://skmtc.dev/d-sports-ecosystem/apis/d-sports-api.md) - [All operations](https://skmtc.dev/d-sports-ecosystem/apis/d-sports-api/llms.txt) - [OpenAPI document](https://skmtc.dev/d-sports-ecosystem/apis/d-sports-api/revisions/63735cf90a04?raw)
