---
title: "Reverse a transaction"
method: POST
path: "/v1/customer-credits/transactions/{id}/reverse"
tags: ["Customer Credits - Transactions"]
---

# Reverse a transaction

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

## Request

- Base URL: `https://api.creem.io`
- URL: `https://api.creem.io/v1/customer-credits/transactions/{id}/reverse`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/creem/apis/creem-api/docs/v1/customer-credits/transactions/:id/reverse/post.ts> (a function with typed inputs; its response is checked against the schema)

Reverse a previous transaction. Creates a new transaction that undoes the original, preserving the full history.

## Path parameters

- `id` string, required

## 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
- `409`: Account frozen or closed

## Changes

- **2026-09-15** `4b5d3db71ff5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/creem/apis/creem-api/changes/v1/customer-credits/transactions/:id/reverse/post.md)

---

[API](https://skmtc.dev/creem/apis/creem-api.md) - [All operations](https://skmtc.dev/creem/apis/creem-api/llms.txt) - [OpenAPI document](https://skmtc.dev/creem/apis/creem-api/revisions/3f39a8f266c3?raw)
