# Reconcile a settlement

> Everything needed to match the money Ozow pays into your bank account against the payments you collected, line item by line item, including the fees that make the two differ.

A settlement is one payment from Ozow into your bank account covering many
customer payments, minus fees. Reconciling it means proving the amount that
arrived is the amount you were owed, and finding the difference when it is not.

List your settlements, fetch each one's line items, match the settlement to your
bank statement and the line items to your own records. What is left over is what
needs investigating.

**Both APIs are here, because a settlement does not move when an integration
does.** Implement against the One API guide on a new integration. The Payments
API guide is the same task on the older contract, and it stays correct for as
long as you are collecting through it. The migration guide has no settlements
step, so there is nothing to port beyond the endpoints themselves.

**Settlements cover payins only.** Float is the opposite direction, money you
pay Ozow to fund refunds and payouts, and a settlement never covers it.

Fees and rounding are where the arithmetic stops matching. Read the guide's
sections on both: a reconciliation written without them reports every settlement
as short.

## What this was built from

- Ozow Hub, commit `e0b2a572`
- `one-api` version 1.0, OpenAPI document: https://hub.ozow.com/api-reference/specs/one-api.yaml
- `payments-api` version 1.0, OpenAPI document: https://hub.ozow.com/api-reference/specs/payments-api.yaml
- Build against `https://one.ozow.com/v1` for `one-api`
- Build against `https://api.ozow.com` for `payments-api`
- 6 pages, 5 operations
- Everything below inlined in one document: https://hub.ozow.com/bundles/reconcile-a-settlement-full.md

## Implement against these

Every field name, order and format on these pages is exact.

- [Reconcile settlements](https://hub.ozow.com/integration-methods/apis/settlements/reconcile-settlements.md): Pull settlement data from One API and tie it back to the deposits in your bank account and the records in your own system, line item by line item.
- [Reconcile settlements](https://hub.ozow.com/integration-methods/apis/deprecated-integrations/reconcile-settlements.md): Pull settlement data from the Payments API, the legacy path, and tie it back to the deposits in your bank account and the orders in your own system.

## Background

Context for the above. Nothing here is implemented against.

- [How Ozow works](https://hub.ozow.com/getting-started.md): How Ozow connects you to South African banks and payment methods, and the two directions money moves: payins from customers, payouts to recipients.
- [Prerequisites and onboarding](https://hub.ozow.com/getting-started/prerequisites-and-onboarding.md): What to have in place before you write any code: a merchant account, Dashboard access, your credentials, and payout eligibility if you need it.
- [Settlements](https://hub.ozow.com/payment-products/settlements-and-float/settlements.md): How Ozow pays what you have collected into your bank account: what a settlement contains, when it arrives, how to track it, and how it meets your float.
- [Transaction and settlement statuses](https://hub.ozow.com/integration-methods/statuses.md): Every payin, payout, refund and settlement status, which are final, and what to do about each.

## The contract

Fetch the OpenAPI document named above to generate a client, or to check a field name or an enum against the schema.

- [one-api#get-/settlements](https://hub.ozow.com/api-reference/one-api/get-settlements.md)
- [one-api#get-/settlements/{id}/lineitems](https://hub.ozow.com/api-reference/one-api/get-settlements-id-lineitems.md)
- [one-api#post-/token](https://hub.ozow.com/api-reference/one-api/post-token.md)
- [payments-api#get-/secure/settlements](https://hub.ozow.com/api-reference/payments-api/get-secure-settlements.md)
- [payments-api#get-/secure/settlements/getsitesettlements](https://hub.ozow.com/api-reference/payments-api/get-secure-settlements-getsitesettlements.md)
