---
title: "Simulate closing a card dispute"
method: POST
path: "/sandbox/cards/{id}/simulate/dispute_close"
tags: ["Sandbox"]
---

# Simulate closing a card dispute

`POST /sandbox/cards/{id}/simulate/dispute_close`

## Request

- Base URL: `https://api.lightspark.com/grid/2025-10-13`
- URL: `https://api.lightspark.com/grid/2025-10-13/sandbox/cards/{id}/simulate/dispute_close`
- Auth: HTTP basic

Close the transaction's open dispute with a disposition, as the card issuer does when the network process ends. A `PARTIALLY_WON` close is the one outcome whose split the caller names, with `recoveredAmount`; every other disposition recovers all of the disputed amount or none of it.

Production returns `404` on this path.

## Path parameters

- `id` string, required

## Request body

- SandboxCardDisputeCloseRequest: Sandbox-only request body for `POST /sandbox/cards/{id}/simulate/dispute_close`. Closes the transaction's open dispute with a disposition, as the card issuer does when the network process ends.
  - `cardTransactionId` string, required: The id of the disputed `CardTransaction`; it must have an open dispute.
  - `disposition` 'WON' | 'PARTIALLY_WON' | 'LOST' | 'WITHDRAWN' | 'DENIED', required: The outcome the dispute closes with.
  - `recoveredAmount` integer: For `PARTIALLY_WON` only, how much of the disputed amount the network gave back, in the smallest unit of the transaction's currency. Must be strictly between 0 and the disputed amount; defaults to half.

## Response `202`

The dispute was closed.

- CardDispute: A cardholder's dispute of a settled card transaction.
  - `id` string, required: System-generated unique dispute identifier.
  - `cardTransactionId` string, required: The id of the disputed `CardTransaction`.
  - `cardId` string: The id of the `Card` the disputed transaction was made on.
  - `status` 'OPEN' | 'CLOSED', required: Whether the dispute is still active.
  - `disposition` 'WON' | 'PARTIALLY_WON' | 'LOST' | 'WITHDRAWN' | 'DENIED': The outcome the dispute closes with.
  - `disputedAmount` CurrencyAmount
    - `amount` integer, required: Amount in the smallest unit of the currency (e.g., cents for USD/EUR, satoshis for BTC)
    - `currency` Currency, required
      - `code` string: Three-letter currency code (ISO 4217) for fiat currencies. Some cryptocurrencies may use their own ticker symbols (e.g. "BTC" for Bitcoin, "USDC" for USDC, etc.)
      - `name` string: Full name of the currency
      - `symbol` string: Symbol of the currency
      - `decimals` integer: Number of decimal places for the currency
  - `provisionalCreditAmount` CurrencyAmount
    - `amount` integer, required: Amount in the smallest unit of the currency (e.g., cents for USD/EUR, satoshis for BTC)
    - `currency` Currency, required
      - `code` string: Three-letter currency code (ISO 4217) for fiat currencies. Some cryptocurrencies may use their own ticker symbols (e.g. "BTC" for Bitcoin, "USDC" for USDC, etc.)
      - `name` string: Full name of the currency
      - `symbol` string: Symbol of the currency
      - `decimals` integer: Number of decimal places for the currency
  - `openedAt` string, date-time: When the card issuer opened the dispute.
  - `issuerUpdatedAt` string, date-time: When the card issuer last changed the dispute.
  - `createdAt` string, date-time, required: When Grid first recorded the dispute.
  - `updatedAt` string, date-time, required: When Grid last updated the dispute.

## Other responses

- `400`: Bad request - Invalid parameters, the transaction has no open dispute, or a `PARTIALLY_WON` close named a `recoveredAmount` that is not strictly between 0 and the disputed amount
- `401`: Unauthorized
- `403`: Forbidden - request was made with a production platform token
- `404`: Card or card transaction not found
- `409`: Conflict. The simulation targets a card in a program where the card issuer makes authorization decisions. These sandbox simulators support only card programs where Grid makes authorization decisions. This is a property of the card's program, so retrying will not help.
- `500`: Internal service error

## Changes

> 115 revisions in range; 2 not diffed.

- **2026-10-28** `d996ddfb9d2b`: 5 info
  - added the optional property `details/missingFields` to the response with the `400` status
  - added the optional property `details/permission` to the response with the `403` status
  - added the optional property `details/policyDenialReason` to the response with the `403` status
  - added the optional property `details/refusalReason` to the response with the `400` status
  - …1 more
- **2026-10-28** `5abf2bb56bcb`: 1 warning
  - added the new `CORRIDOR_UNDER_MAINTENANCE` enum value to the `code` response property for the response status `403`
- **2026-10-26** `f11f1e76bdd7`: 1 warning
  - added the new `PURCHASE_CARD_LIMIT_REACHED` enum value to the `code` response property for the response status `409`
- **2026-10-26** `0a6dad5815c7`: 1 warning
  - added the new `INVOICE_ALREADY_USED` enum value to the `code` response property for the response status `409`
- **2026-10-24** `715332dcb111`: 1 warning
  - added the new `EXACT_AMOUNT_UNAVAILABLE` enum value to the `code` response property for the response status `400`

[Operation history](https://skmtc.dev/lightsparkdev/apis/grid-api/changes/sandbox/cards/:id/simulate/dispute_close/post.md)

---

[API](https://skmtc.dev/lightsparkdev/apis/grid-api.md) - [All operations](https://skmtc.dev/lightsparkdev/apis/grid-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lightsparkdev/apis/grid-api/revisions/7a1db46ec552?raw)
