> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paywise.de/llms.txt
> Use this file to discover all available pages before exploring further.

# API overview

> Choose the paywise API that matches your integration and make your first sandbox request.

paywise exposes three complementary APIs with one set of HTTP conventions.
Start with the API that owns the first resource your integration needs, then
add another API only when your workflow crosses that boundary.

## Choose an API

<CardGroup cols={3}>
  <Card title="Case Management API" icon={<svg data-pw-icon xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="m14 12-2 2-2-2 2-2zm-2-6 2.12 2.12 2.5-2.5L12 1 7.38 5.62l2.5 2.5zm-6 6 2.12-2.12-2.5-2.5L1 12l4.62 4.62 2.5-2.5zm12 0-2.12 2.12 2.5 2.5L23 12l-4.62-4.62-2.5 2.5zm-6 6-2.12-2.12-2.5 2.5L12 23l4.62-4.62-2.5-2.5z"/></svg>} href="/api-docs/case-management-api/quickstart">
    Submit collection orders for one company, attach claims and documents, and
    follow mandates, messages, payments, and statements.
  </Card>

  <Card title="Partner API" icon={<svg data-pw-icon xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M21 6.5c-1.66 0-3 1.34-3 3 0 .07 0 .14.01.21l-2.03.68c-.64-1.21-1.82-2.09-3.22-2.32V5.91C14.04 5.57 15 4.4 15 3c0-1.66-1.34-3-3-3S9 1.34 9 3c0 1.4.96 2.57 2.25 2.91v2.16c-1.4.23-2.58 1.11-3.22 2.32l-2.04-.68C6 9.64 6 9.57 6 9.5c0-1.66-1.34-3-3-3s-3 1.34-3 3 1.34 3 3 3c1.06 0 1.98-.55 2.52-1.37l2.03.68c-.2 1.29.17 2.66 1.09 3.69l-1.41 1.77Q6.66 17 6 17c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3c0-.68-.22-1.3-.6-1.8l1.41-1.77c1.36.76 3.02.75 4.37 0l1.41 1.77c-.37.5-.59 1.12-.59 1.8 0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3c-.44 0-.85.09-1.23.26l-1.41-1.77c.93-1.04 1.29-2.4 1.09-3.69l2.03-.68c.53.82 1.46 1.37 2.52 1.37 1.66 0 3-1.34 3-3S22.66 6.5 21 6.5m-18 4c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1M6 21c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m5-18c0-.55.45-1 1-1s1 .45 1 1-.45 1-1 1-1-.45-1-1m1 12c-1.38 0-2.5-1.12-2.5-2.5S10.62 10 12 10s2.5 1.12 2.5 2.5S13.38 15 12 15m6 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m3-8.5c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1"/></svg>} href="/api-docs/partner-api/quickstart">
    Onboard and manage multiple companies and their memberships before acting
    for those companies through the Case Management API.
  </Card>

  <Card title="Mahnservice API" icon={<svg data-pw-icon xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M11 9.83V14h2V9.83l1.59 1.58L16 10l-4-4-4 4 1.41 1.41z"/><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5v-3h3.02c.91 1.21 2.35 2 3.98 2s3.06-.79 3.98-2H19zm0-5h-4.18c-.41 1.16-1.51 2-2.82 2s-2.4-.84-2.82-2H5V5h14z"/></svg>} href="/api-docs/mahnservice-api/quickstart">
    Submit invoices into pre-collection dunning (Mahnwesen), release them,
    report payments, and follow the dunning ladder and sent notices.
  </Card>
</CardGroup>

## What to do with which API

| You want to… | Use |
| - | - |
| Send friendly payment reminders and dunning notices in your own name, before involving paywise | **Mahnservice API** — submit an invoice, release it, and paywise runs the dunning ladder for you |
| Hand overdue claims to paywise for professional debt collection (Inkasso), including the legal path | **Case Management API** — submit a collection order and follow the resulting mandate, payments, and statements |
| Connect many client companies to paywise from one platform — as a software vendor, tax advisor, or agency | **Partner API** — onboard and manage the companies, then act for each of them through the Case Management API |

The products chain naturally: an invoice that stays unpaid through the
Mahnservice dunning ladder ends in the handover to collection, where the Case
Management API takes over. A Partner integration wraps either product for many
companies at once.

One credential model covers all three: keys are bound to a company and work
for both the Case Management and Mahnservice APIs. A Partner key manages its
companies through `/partner/v2/` and selects one of them per Case request with
the `X-On-Behalf-Of-Company` header — that header is only for Partner keys
calling `/v2/`, nowhere else.

## First request in five minutes

Sign in to the production portal, enter the sandbox (*Für Entwickler* → *Zur
Sandbox*), and issue a sandbox key under *Für Entwickler*. No separate sandbox
admission or setup by paywise is required. Then read back what that key is:

```bash theme={null}
curl --fail-with-body --silent --show-error \
  "https://api-sandbox.paywise.de/v2/info/" \
  --header "Authorization: Bearer pw_sbx_<your-sandbox-key>"
```

* **`200`** with a JSON body naming your `company` and
  `"environment": "sandbox"` — the response also carries
  `X-Paywise-Environment: sandbox`. Host and key agree; continue with a
  quickstart.
* **`401`** — host and key do not belong together: a `pw_sbx_` key was sent
  to `api.paywise.de`, a production key to the sandbox host, or the key was
  mistyped or revoked. Fix the pairing; nothing else recovers a `401`.

If you get an HTML page instead of JSON, you called the portal host
(`sandbox.paywise.de`) rather than the API host. The
[sandbox troubleshooting table](/api-docs/case-management-api/concepts/sandbox#troubleshooting)
covers the other usual mix-ups.

## Build your first integration

1. Obtain separate credentials for sandbox and production — both are issued
   by your own developers under *Für Entwickler*, sandbox keys in the sandbox
   portal and production keys in the production portal. Case Management and
   Mahnservice are fully self-serve. For the Partner API, choose *Partner
   werden*, submit the *Partner-API anfragen* form, and wait for paywise
   sign-off once; Partner key issuance is self-serve after that.
2. Call the applicable credential-info operation to verify the environment,
   principal, and company context.
3. Follow the [Case Management quickstart](/api-docs/case-management-api/quickstart),
   the [Partner quickstart](/api-docs/partner-api/quickstart), or the
   [Mahnservice quickstart](/api-docs/mahnservice-api/quickstart).
4. Add idempotent writes, synchronization, and webhooks before moving traffic
   to production.

For example, inspect a direct Case credential before creating resources:

```http theme={null}
GET /v2/info/ HTTP/1.1
Host: api.paywise.de
Authorization: Bearer <api-key>

HTTP/1.1 200 OK
Content-Type: application/json
X-Paywise-Environment: production

{
  "id": "c0000000-0000-4000-8000-000000000001",
  "token_name": "Accounting integration",
  "environment": "production",
  "company": "10000000-0000-4000-8000-000000000001"
}
```

If this call returns `401`, confirm that the credential belongs to the host you
called; sandbox and production credentials are not interchangeable. These
credential-info operations require authentication. When a Partner credential
calls Case credential info, it must also select an entitled company with
`X-On-Behalf-Of-Company`. If a correctly authenticated call still returns
`403`, record `X-Paywise-Request-Id` and contact paywise support. See the
[Case credential-info reference](/api-docs/case-management-api/reference/info/get-case-credential-context)
and [Partner credential-info reference](/api-docs/partner-api/reference/meta/get-partner-token-info).

## Shared behavior

* [Authentication and environments](/api-docs/essentials/authentication-and-environments)
* [Requests and responses](/api-docs/essentials/requests-and-responses)
* [Errors and safe retries](/api-docs/essentials/errors-and-safe-retries)
* [Pagination and synchronization](/api-docs/essentials/pagination-and-synchronization)
* [Public limits](/api-docs/essentials/limits)
* [Versioning and deprecation](/api-docs/essentials/versioning)
* [Webhooks](/api-docs/essentials/webhooks)

## Migrating an existing integration

The current contracts are breaking migrations from v1. Review the complete
checklist for the API you use before changing base paths or credentials:

* [Migrate the Case Management API from v1](/api-docs/case-management-api/migrate-from-v1)
* [Migrate the Partner API from v1](/api-docs/partner-api/migrate-from-v1)

## Legacy APIs

Existing legacy integrations remain documented separately. Use the
[legacy API landing page](/api-docs/legacy/overview) to maintain them; build new
integrations against the current contracts described here.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.