---
title: "Reverse a LedgerLinePosting"
method: POST
path: "/shop/ledger-line-postings/{ledgerLinePostingId}/reverse"
tags: ["LedgerLinePostings"]
---

# Reverse a LedgerLinePosting

`POST /shop/ledger-line-postings/{ledgerLinePostingId}/reverse`

Use this endpoint to reverse a `LedgerLinePosting`. This action does not automatically attempt to post the new `LedgerLinePosting` to any integrations.

## Response `200`

The request to reverse a `LedgerLinePosting` was received

- ShowLedgerLinePostingResponse
  - `data` LedgerLinePosting, required
    - `id` string, object-id, required — The ID of this ledger line posting.
    - `site_id` string, uuid, required — The ID of the site this ledger line posting belongs to.
    - `created_at` string, date-time, required — The date and time the ledger posting was created.
    - `integration` string, required — An identifier for the integration the posting was for.
    - `integration_name` string, required — A user-friendly name for the integration.
    - `integration_is_async` boolean — Whether the integration works asynchronously.
    - `status` 'success' | 'resolved' | 'error' | 'in_progress' | 'not_started' | 'nothing_to_post', required — The status of the posting.
    - `payable` PayableSummary, required — A summary of the model that the ledger line or posting relates to, usually a basket.
      - `id` string, object-id, required — The ID of the payable model.
      - `type` 'basket' | 'customer' | 'membership' | 'import', required — The type of the payable model.
      - `reference` string, required — A reference for the payable model.
      - `description` string — Further details about the payable model
    - `causer` CauserSummary, required — A summary of the model that caused the posting or line to be generated.
      - `id` string, object-id, required — The ID of the causer model.
      - `type` 'basket' | 'basket_item' | 'payment' | 'refund' | 'membership_charge' | 'voucher_code', required — The type of the causer model.
      - `reference` string — A reference for the causer.
    - `last_error` string — The last error encountered when attempting to post this record.
    - `last_error_at` string, date-time — The date and time of the last error.
    - `succeeded_at` string, date-time — The date and time the posting succeeded.
    - `lines` LedgerLine[], required
      - `id` string, object-id, required — The ID of the ledger line.
      - `gross_amount` integer, required — The gross amount of the ledger line.
      - `net_amount` integer, required — The net amount of the ledger line.
      - `type` 'charge' | 'revenue', required — The type of the ledger line, i.e. a charge (payment or refund) or revenue.
      - `description` string, required — A description of the ledger line.
      - `revenue_centre` string, nullable, required — Contains the revenue centre ID if this line is for revenue.
      - `revenue_centre_name` string, nullable, required — A friendly name for the revenue centre.
      - `payment_processor` string, nullable, required — A key for the payment processor if this line is for a charge.
      - `payment_processor_friendly` string, nullable, required — A friendly name for the payment processor and type if this line is for a charge.
      - `mapped_value` string, nullable — The value that this line's revenue centre or payment processor was mapped to for the integration.
      - `ledger_date` string, date-time, required — The date and time the ledger event occurred.
      - `currency` string, required — The currency of the ledger line. See [Supported Currencies](/endpoints/Meta#metaSupportedCurrencies) for a list of supported currencies.
      - `payable` PayableSummary, required — A summary of the model that the ledger line or posting relates to, usually a basket.
        - `id` string, object-id, required — The ID of the payable model.
        - `type` 'basket' | 'customer' | 'membership' | 'import', required — The type of the payable model.
        - `reference` string, required — A reference for the payable model.
        - `description` string — Further details about the payable model
      - `causer` CauserSummary, required — A summary of the model that caused the posting or line to be generated.
        - `id` string, object-id, required — The ID of the causer model.
        - `type` 'basket' | 'basket_item' | 'payment' | 'refund' | 'membership_charge' | 'voucher_code', required — The type of the causer model.
        - `reference` string — A reference for the causer.
      - `status` 'pending' | 'final', nullable, required — The status of the ledger line. Lines without a status are assumed to be final.
      - `created_at` string, date-time, required — The date and time the ledger posting was created.

## Other responses

- `401` — The user is unauthenticated
- `403` — The authenticated user does not have permission.
- `404` — The resource couldn't be found

---

[API](https://skmtc.dev/try/apis/trybe-api.md) · [All operations](https://skmtc.dev/try/apis/trybe-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/try/trybe-api/revisions/f37f92702da5/schema)
