---
title: "Reverse a transaction"
method: POST
path: "/v1/customer-credits/accounts/{id}/reverse"
tags: ["Customer Credits - Accounts (Experimental)"]
---

# Reverse a transaction

`POST /v1/customer-credits/accounts/{id}/reverse`

Reverse a previous credit or debit on this account. Creates a new transaction that undoes the original, preserving the full history.

## Path parameters

- `id` string, required

## Request body

- ReverseTransactionRequestDto
  - `transaction_id` string, required — ID of the transaction to reverse

## Response `201`

Reversal transaction created

- TransactionResponseDto
  - `id` string, required — Transaction ID
  - `store_id` string, required — Store ID
  - `reference` string, required — Reference string
  - `idempotency_key` string, required — Idempotency key
  - `reversal_of` string, nullable — ID of the transaction this reverses, if applicable
  - `entries` EntryResponseDto[], required — Transaction entries
    - `id` string, required — Entry ID
    - `transaction_id` string, required — Transaction ID
    - `account_id` string, required — Account ID
    - `side` 'debit' | 'credit', required — Debit or credit side
    - `amount` string, required — Amount as string for bigint safety
    - `created_at` string, required — Creation timestamp
  - `created_at` string, required — Creation timestamp

## Other responses

- `400` — Bad Request - Invalid input parameters
- `401` — Unauthorized - Invalid or missing API key
- `404` — Not Found - Resource does not exist

---

[API](https://skmtc.net/creem/apis/creem-api.md) · [All operations](https://skmtc.net/creem/apis/creem-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/creem/creem-api/versions/aa593160d96c/schema)
