> For the complete documentation index, see [llms.txt](https://docs.terminal.africa/tship/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.terminal.africa/tship/miscallaneous/sample-webhook-event-payloads/reconciliation.md).

# Reconciliation

Sample payloads for reconciliation.flagged, reconciliation.billed and reconciliation.corrected.

These events fire when a carrier reports a weight or charge that differs from what you were billed at booking. See [Reconciliation](/tship/reconciliation.md) for what the records mean and how the notice window works.

{% hint style="info" %}
The payload is a **single entry from the record's `shipment_data` array** — one shipment's discrepancy — not the whole reconciliation record. To read the record itself, including totals and billing state, call [Get Reconciliation by Shipment](/tship/reconciliation/get-reconciliation-by-shipment.md) with the `shipment_id` from the payload.
{% endhint %}

### Parcel measurement snapshots

Delivery and invoice discrepancies can include an optional `parcel_measurements` snapshot:

* `reconciliation.flagged` and `reconciliation.billed`: `data.parcel_measurements`.
* `reconciliation.corrected`: `data.reconciliation.shipment_data[].parcel_measurements` and, when present, `data.replacement.shipment_data[].parcel_measurements`.

The snapshot preserves booked and carrier measurements separately, with dimensions in centimetres and weights in kilograms. Unknown values are `null`; older records can omit the snapshot. Invoice discrepancies can include invoice measurements even when tracking is unavailable. The examples below show a single parcel; both lists can contain multiple parcels and must not be paired by array position.

A billed or corrected record can retain the original tracking observation. Its `observed_at` is the observation time, not the billing or correction time; its per-parcel weights can differ from a later corrected or rounded shipment-level `actual_weight`. See [Parcel measurement fields](/tship/miscallaneous/reconciliation-shipment-data.md#parcel-measurements) for the complete field definitions.

### reconciliation.flagged

A discrepancy has been raised. It has not been billed yet.

```json
{
    "event": "reconciliation.flagged",
    "data": {
        "shipment_id": "SH-40208776515",
        "shipment_number": "7412089553",
        "carrierName": "DHL Express",
        "platform": "dhl",
        "declared_weight": 2,
        "actual_weight": 3.5,
        "old_shipment_cost": 42350,
        "new_shipment_cost": 51720,
        "exception_charge": 9370,
        "tracking_only": false,
        "reconciliation_stage": "delivery",
        "parcel_measurements": {
            "source": "delivery_tracking",
            "observed_at": "2026-09-03T08:00:00.000Z",
            "dimension_unit": "cm",
            "weight_unit": "kg",
            "booked": [
                {
                    "parcel_number": 1,
                    "parcel_id": "PC-EXAMPLE000001",
                    "dimensions": {
                        "length": 20,
                        "width": 20,
                        "height": 20
                    },
                    "physical_weight": 2,
                    "volumetric_weight": 1.6,
                    "chargeable_weight": 2
                }
            ],
            "carrier": [
                {
                    "parcel_number": 1,
                    "tracking_number": "7412089553",
                    "dimensions": {
                        "length": 35,
                        "width": 25,
                        "height": 20
                    },
                    "physical_weight": 3,
                    "volumetric_weight": 3.5,
                    "chargeable_weight": 3.5
                }
            ]
        },
        "currency": "NGN"
    }
}
```

### reconciliation.billed

The discrepancy has been charged to your wallet. A `transaction.success` event fires for the charge itself.

```json
{
    "event": "reconciliation.billed",
    "data": {
        "shipment_id": "SH-40208776515",
        "shipment_number": "7412089553",
        "carrierName": "DHL Express",
        "platform": "dhl",
        "declared_weight": 2,
        "actual_weight": 3.5,
        "old_shipment_cost": 42350,
        "new_shipment_cost": 51720,
        "exception_charge": 9370,
        "tracking_only": false,
        "reconciliation_stage": "invoice",
        "parcel_measurements": {
            "source": "delivery_tracking",
            "observed_at": "2026-09-03T08:00:00.000Z",
            "dimension_unit": "cm",
            "weight_unit": "kg",
            "booked": [
                {
                    "parcel_number": 1,
                    "parcel_id": "PC-EXAMPLE000001",
                    "dimensions": {
                        "length": 20,
                        "width": 20,
                        "height": 20
                    },
                    "physical_weight": 2,
                    "volumetric_weight": 1.6,
                    "chargeable_weight": 2
                }
            ],
            "carrier": [
                {
                    "parcel_number": 1,
                    "tracking_number": "7412089553",
                    "dimensions": {
                        "length": 35,
                        "width": 25,
                        "height": 20
                    },
                    "physical_weight": 3,
                    "volumetric_weight": 3.5,
                    "chargeable_weight": 3.5
                }
            ]
        },
        "currency": "NGN"
    }
}
```

### Invoice weight discrepancy

Invoice discrepancies use the same events and envelope. The example below combines invoice weights with dimensions supplied by DHL tracking. The billed weight remains authoritative for pricing; field-level `sources` identify the evidence behind each carrier measurement.

```json
{
    "event": "reconciliation.flagged",
    "data": {
        "shipment_id": "SH-INVOICE-EXAMPLE",
        "shipment_number": "CARRIER-AWB-EXAMPLE",
        "carrierName": "DHL Express",
        "platform": "dhl-ng",
        "declared_weight": 1.5,
        "actual_weight": 2,
        "old_shipment_cost": 100000,
        "new_shipment_cost": 110000,
        "exception_charge": 10000,
        "tracking_only": false,
        "reconciliation_stage": "invoice",
        "parcel_measurements": {
            "source": "carrier_invoice",
            "observed_at": "2026-11-11T10:39:48.155Z",
            "dimension_unit": "cm",
            "weight_unit": "kg",
            "booked": [
                {
                    "parcel_number": 1,
                    "parcel_id": "PC-EXAMPLE",
                    "dimensions": {
                        "length": 20,
                        "width": 20,
                        "height": 10
                    },
                    "physical_weight": 1.5,
                    "volumetric_weight": 0.8,
                    "chargeable_weight": 1.5
                }
            ],
            "carrier": [
                {
                    "parcel_number": 1,
                    "tracking_number": "CARRIER-PIECE-EXAMPLE",
                    "dimensions": {
                        "length": 19,
                        "width": 28,
                        "height": 13
                    },
                    "physical_weight": 1.62,
                    "volumetric_weight": 1.38,
                    "chargeable_weight": 2,
                    "sources": {
                        "dimensions": "delivery_tracking",
                        "physical_weight": "carrier_invoice",
                        "volumetric_weight": "carrier_invoice",
                        "chargeable_weight": "carrier_invoice"
                    }
                }
            ],
            "invoice": {
                "observed_at": "2026-11-11T07:00:00.000Z",
                "piece_count": 1,
                "dimensions": null,
                "physical_weight": 1.62,
                "volumetric_weight": 1.38,
                "chargeable_weight": 2
            },
            "tracking": {
                "status": "available",
                "observed_at": "2026-11-11T10:39:49.952Z"
            }
        },
        "currency": "NGN"
    }
}
```

If tracking fails or has no usable measurements, `tracking.status` is `unavailable` and missing fields are `null`; reconciliation continues. Other states are `available`, `unsupported`, and `not_needed`. Invoice totals remain separate from individual pieces for multi-parcel shipments, and `carrier` can be empty. The same saved snapshot is included when this discrepancy emits `reconciliation.billed`. See [Invoice measurement fields](/tship/miscallaneous/reconciliation-shipment-data.md#invoice-discrepancies).

### reconciliation.corrected

A correction takes one of two shapes, and `correction_type` tells you which without a second API call:

* `voided` — the charge was reversed in full and **nothing replaced it**. `replacement` is `null`.
* `replaced` — the charge was reversed and a corrected one was billed in its place. `replacement` carries that new record, with its own `reconcilliation_id` and `transaction_id`.

`correction_type` describes what happened to the **record**, not to the money. A discrepancy corrected before it was ever billed is voided without a refund, because nothing was taken — `was_charged` and `amount_refunded` are what tell you about the money.

{% hint style="info" %}
A `replaced` correction also emits a separate [`reconciliation.billed`](/tship/miscallaneous/webhook-events.md) for the replacement record. Use `reconciliation.corrected` as the authoritative signal: it is the only one that reports the reversal.
{% endhint %}

| Attribute                 |           | Description                                                                                |
| ------------------------- | --------- | ------------------------------------------------------------------------------------------ |
| amount\_refunded          | *number*  | What went back to your wallet. ***0*** when the original was never charged.                |
| corrected\_at             | *string*  | ISO 8601 timestamp of the correction.                                                      |
| corrected\_charge         | *number*  | What you owe after the correction. ***0*** on a ***voided*** correction.                   |
| correction\_type          | *string*  | ***voided*** or ***replaced***.                                                            |
| currency                  | *string*  | Currency of the reconciliation amounts, for example ***NGN*** or ***USD***.                |
| original\_charge          | *number*  | What the reconciliation charged before the correction.                                     |
| rebill\_transaction\_id   | *string*  | Wallet transaction for the corrected charge. ***null*** on a ***voided*** correction.      |
| reconciliation            | *object*  | The corrected record, now voided. Same shape as the Reconciliation object.                 |
| reconcilliation\_id       | *string*  | Unique id of the record that was corrected.                                                |
| replacement               | *object*  | The record billed in its place, or ***null*** on a ***voided*** correction.                |
| reversal\_transaction\_id | *string*  | Wallet transaction that returned the original charge. ***null*** when nothing was charged. |
| shipment\_id              | *string*  | Unique shipment id the correction applies to.                                              |
| was\_charged              | *boolean* | Whether the original charge had actually been debited.                                     |

Note the double-l spelling in `reconcilliation_id`. That is the real field name and matches the rest of the docs.

### Sample: `voided` — reversed in full

```json
{
    "event": "reconciliation.corrected",
    "data": {
        "shipment_id": "SH-40208776515",
        "reconcilliation_id": "RC-8TQK2M4XZP71VBDR",
        "correction_type": "voided",
        "currency": "NGN",
        "original_charge": 9370,
        "corrected_charge": 0,
        "amount_refunded": 9370,
        "was_charged": true,
        "reversal_transaction_id": "TRX-R4M8XP02",
        "rebill_transaction_id": null,
        "corrected_at": "2026-09-22T10:31:44.000Z",
        "reconciliation": {
            "reconcilliation_id": "RC-8TQK2M4XZP71VBDR",
            "shipment_id": "SH-40208776515",
            "platform": "dhl",
            "reconciliation_stage": "delivery",
            "total_old_shipment_cost": 42350,
            "total_new_shipment_cost": 51720,
            "total_exception_charge": 9370,
            "charge_type": "weight",
            "charge_after": "2026-09-10T00:00:00.000Z",
            "descripancy_challenged": true,
            "billing_skipped": true,
            "is_charged": true,
            "charged_at": "2026-09-10T09:00:00.000Z",
            "transaction_id": "TRX-9F2K10DQ",
            "reversal_transaction_id": "TRX-R4M8XP02",
            "voided": true,
            "voided_at": "2026-09-22T10:31:44.000Z",
            "created_at": "2026-09-03T08:00:00.000Z",
            "updated_at": "2026-09-22T10:31:44.000Z",
            "shipment_data": [
                {
                    "shipment_id": "SH-40208776515",
                    "shipment_number": "7412089553",
                    "carrierName": "DHL Express",
                    "platform": "dhl",
                    "declared_weight": 2,
                    "actual_weight": 3.5,
                    "old_shipment_cost": 42350,
                    "new_shipment_cost": 51720,
                    "exception_charge": 9370,
                    "tracking_only": false,
                    "reconciliation_stage": "delivery",
                    "parcel_measurements": {
                        "source": "delivery_tracking",
                        "observed_at": "2026-09-03T08:00:00.000Z",
                        "dimension_unit": "cm",
                        "weight_unit": "kg",
                        "booked": [
                            {
                                "parcel_number": 1,
                                "parcel_id": "PC-EXAMPLE000001",
                                "dimensions": {
                                    "length": 20,
                                    "width": 20,
                                    "height": 20
                                },
                                "physical_weight": 2,
                                "volumetric_weight": 1.6,
                                "chargeable_weight": 2
                            }
                        ],
                        "carrier": [
                            {
                                "parcel_number": 1,
                                "tracking_number": "7412089553",
                                "dimensions": {
                                    "length": 35,
                                    "width": 25,
                                    "height": 20
                                },
                                "physical_weight": 3,
                                "volumetric_weight": 3.5,
                                "chargeable_weight": 3.5
                            }
                        ]
                    },
                    "currency": "NGN"
                }
            ],
            "currency": "NGN"
        },
        "replacement": null
    }
}
```

### Sample: `replaced` — reversed, then re-billed at a corrected amount

```json
{
    "event": "reconciliation.corrected",
    "data": {
        "shipment_id": "SH-40208776515",
        "reconcilliation_id": "RC-8TQK2M4XZP71VBDR",
        "correction_type": "replaced",
        "currency": "NGN",
        "original_charge": 9370,
        "corrected_charge": 3120,
        "amount_refunded": 6250,
        "was_charged": true,
        "reversal_transaction_id": "TRX-R4M8XP02",
        "rebill_transaction_id": "TRX-B7QW31LM",
        "corrected_at": "2026-09-22T10:31:44.000Z",
        "reconciliation": {
            "reconcilliation_id": "RC-8TQK2M4XZP71VBDR",
            "shipment_id": "SH-40208776515",
            "platform": "dhl",
            "reconciliation_stage": "delivery",
            "total_old_shipment_cost": 42350,
            "total_new_shipment_cost": 51720,
            "total_exception_charge": 9370,
            "charge_type": "weight",
            "charge_after": "2026-09-10T00:00:00.000Z",
            "descripancy_challenged": true,
            "billing_skipped": true,
            "is_charged": true,
            "charged_at": "2026-09-10T09:00:00.000Z",
            "transaction_id": "TRX-9F2K10DQ",
            "reversal_transaction_id": "TRX-R4M8XP02",
            "voided": true,
            "voided_at": "2026-09-22T10:31:44.000Z",
            "created_at": "2026-09-03T08:00:00.000Z",
            "updated_at": "2026-09-22T10:31:44.000Z",
            "shipment_data": [
                {
                    "shipment_id": "SH-40208776515",
                    "shipment_number": "7412089553",
                    "carrierName": "DHL Express",
                    "platform": "dhl",
                    "declared_weight": 2,
                    "actual_weight": 3.5,
                    "old_shipment_cost": 42350,
                    "new_shipment_cost": 51720,
                    "exception_charge": 9370,
                    "tracking_only": false,
                    "reconciliation_stage": "delivery",
                    "parcel_measurements": {
                        "source": "delivery_tracking",
                        "observed_at": "2026-09-03T08:00:00.000Z",
                        "dimension_unit": "cm",
                        "weight_unit": "kg",
                        "booked": [
                            {
                                "parcel_number": 1,
                                "parcel_id": "PC-EXAMPLE000001",
                                "dimensions": {
                                    "length": 20,
                                    "width": 20,
                                    "height": 20
                                },
                                "physical_weight": 2,
                                "volumetric_weight": 1.6,
                                "chargeable_weight": 2
                            }
                        ],
                        "carrier": [
                            {
                                "parcel_number": 1,
                                "tracking_number": "7412089553",
                                "dimensions": {
                                    "length": 35,
                                    "width": 25,
                                    "height": 20
                                },
                                "physical_weight": 3,
                                "volumetric_weight": 3.5,
                                "chargeable_weight": 3.5
                            }
                        ]
                    },
                    "currency": "NGN"
                }
            ],
            "currency": "NGN"
        },
        "replacement": {
            "reconcilliation_id": "RC-K91MDX2QW7ZA4TVB",
            "shipment_id": "SH-40208776515",
            "platform": "dhl",
            "reconciliation_stage": "delivery",
            "total_old_shipment_cost": 42350,
            "total_new_shipment_cost": 45470,
            "total_exception_charge": 3120,
            "charge_type": "weight",
            "charge_after": "2026-09-10T00:00:00.000Z",
            "descripancy_challenged": false,
            "billing_skipped": false,
            "is_charged": true,
            "charged_at": "2026-09-22T10:31:46.000Z",
            "transaction_id": "TRX-B7QW31LM",
            "reversal_transaction_id": "",
            "voided": false,
            "voided_at": null,
            "created_at": "2026-09-03T08:00:00.000Z",
            "updated_at": "2026-09-22T10:31:46.000Z",
            "shipment_data": [
                {
                    "shipment_id": "SH-40208776515",
                    "shipment_number": "7412089553",
                    "carrierName": "DHL Express",
                    "platform": "dhl",
                    "declared_weight": 2,
                    "actual_weight": 2.4,
                    "old_shipment_cost": 42350,
                    "new_shipment_cost": 45470,
                    "exception_charge": 3120,
                    "tracking_only": false,
                    "reconciliation_stage": "delivery",
                    "parcel_measurements": {
                        "source": "delivery_tracking",
                        "observed_at": "2026-09-03T08:00:00.000Z",
                        "dimension_unit": "cm",
                        "weight_unit": "kg",
                        "booked": [
                            {
                                "parcel_number": 1,
                                "parcel_id": "PC-EXAMPLE000001",
                                "dimensions": {
                                    "length": 20,
                                    "width": 20,
                                    "height": 20
                                },
                                "physical_weight": 2,
                                "volumetric_weight": 1.6,
                                "chargeable_weight": 2
                            }
                        ],
                        "carrier": [
                            {
                                "parcel_number": 1,
                                "tracking_number": "7412089553",
                                "dimensions": {
                                    "length": 35,
                                    "width": 25,
                                    "height": 20
                                },
                                "physical_weight": 3,
                                "volumetric_weight": 3.5,
                                "chargeable_weight": 3.5
                            }
                        ]
                    },
                    "currency": "NGN"
                }
            ],
            "currency": "NGN"
        }
    }
}
```

{% hint style="info" %}
You can trigger any of these events against one of your own shipments in staging with [Simulate Reconciliation Webhook](/tship/reconciliation/simulate-reconciliation-webhook.md).
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.terminal.africa/tship/miscallaneous/sample-webhook-event-payloads/reconciliation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
