> ## 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.

# Power Automate

> Connect paywise to your Power Automate flows

# paywise Power Automate Connector

The paywise connector for Microsoft Power Automate connects the [Case Management API](https://docs.paywise.de/api-docs/case-management-api/introduction.md) to your flows. You can create orders and claims, read cases, report payments, download statements and start a flow as soon as something changes in paywise, without writing code. The same connector works in Azure Logic Apps and Copilot Studio.

## Availability

The paywise connector is in Microsoft's connector certification. Once Microsoft has published it, search for **paywise** in the flow designer when you add a trigger or an action. Until then it is not available in Power Automate yet; this page describes how it will work.

Certified connectors are Premium connectors, so your flows will need a Power Automate Premium license (or a Logic Apps plan).

## Connect paywise to Power Automate

1. In paywise, open **Für Entwickler** and create an API key. Select only the [permission scopes](https://docs.paywise.de/api-docs/essentials/authentication-and-environments.md#permission-scopes) that your flows need.
2. In your flow, add a paywise trigger or action. Power Automate asks you to create a connection.
3. Paste the API key as **API key** and save. The `Bearer` prefix is optional.

**Sandbox.** Sandbox keys start with `pw_sbx_`. A connection made with a sandbox key talks to the sandbox automatically; you do not enter a URL. Build and test your flows with a sandbox key first, then create a second connection with a production key to go live. See [Sandbox](https://docs.paywise.de/api-docs/case-management-api/concepts/sandbox.md).

**Scopes.** Each action needs the scope of its group, for example order scopes for the Orders and Claims actions and payment scopes for the Payments actions. An action whose scope is missing fails with a `403` error. Triggers additionally need `case:webhooks:write`, because they register a webhook endpoint in paywise. **Get API key info** shows the name, environment and scopes of the connected key.

## Actions and triggers

| Group | Actions |
| - | - |
| Debtors | Create a debtor, Update a debtor, Get a debtor, Search debtors |
| Orders | Create a draft order, Update a draft order, Delete a draft order, Submit an order, Withdraw an order, Get an order, Search orders |
| Claims | Create a claim, Update a claim, Delete a claim, Get a claim, Search claims, Upload a claim document, Delete a claim document, Get a claim document, List claim documents, Download a claim document |
| Cases | Get a case, Search cases, List case history entries, List case documents, Download a case document, Send a message on a case, Answer a request to client |
| Payments | Report a payment on a claim, Report a payment on a case, Delete a payment, Get a payment, Search payments |
| Statements | Get a statement, Search statements, Download a statement, Get a single case statement, Search single case statements, Download a single case statement |
| Triggers | When an event occurs, When an order is decided, When a case status is updated, When a payment is reported, When a statement is published, When a single case statement is published, When a request to client is created |
| Other | Send an HTTP request, Get API key info |

**Send an HTTP request** sends any authorized request to a `/v2/` path of the paywise API with the connection's credentials. Use it for operations that have no dedicated action.

The search actions page through results automatically. To get more than the first page, turn on **Pagination** in the action's settings and set a threshold.

## Triggers

All triggers are instant: paywise calls Power Automate as soon as the event happens, so there is no polling interval.

* **When an event occurs** lets you pick one or more of the case events.
* The six dedicated triggers (order decisions, case status updates, payments, statements, single case statements, requests to client) have fixed events and need no setup beyond the connection.

A trigger outputs the event (`id`, `type`, `created_at`, `data`). It does not load the current state of the resource: add the matching **Get …** action right after the trigger and pass it the ID from `data`, for example **Get an order** after **When an order is decided**. For the events themselves, see [Webhook events](https://docs.paywise.de/api-docs/case-management-api/concepts/webhook-events.md).

### Webhook endpoints in paywise

Saving a flow with a paywise trigger registers a webhook endpoint in paywise whose description starts with `Power Automate:`. Every flow has its own endpoint. Turning the flow off, deleting it or changing its trigger removes the endpoint again.

A company can have up to 20 webhook endpoints. Endpoints that paywise disabled automatically do not count toward this limit. If saving a flow fails with `webhook_limit_reached`, delete unused endpoints under **Für Entwickler → Webhooks**.

## Safe retries with an idempotency key

Every action that creates something has an optional **Idempotency key** field. If Power Automate repeats a request, for example after a timeout, paywise returns the original result instead of creating a second record, as long as the key and the request are the same.

If you leave the field empty, a retry can create a duplicate. Map a value that is unique and stable per record instead, for example your invoice number, or the flow run ID combined with your own reference. See [Errors and safe retries](https://docs.paywise.de/api-docs/essentials/errors-and-safe-retries.md).

## Troubleshooting

Every paywise error message ends with the paywise request ID (`request id: <id>`). Include it when you contact support.

| Error | Meaning | What to do |
| - | - | - |
| `400` `validation_error` | The request contains invalid data. The message lists the affected fields. | Fix the values for the listed fields. |
| `401` | The API key is invalid or was revoked. | Create a new key and update the connection under **Connections**. |
| `403` | The key lacks the required scope. | Add the scope to the key under **Für Entwickler**, or create a new key. |
| `404` | The resource does not exist or is not visible to this key. | Check the ID and that sandbox and production connections are not mixed up. |
| `409` | Conflict, for example the resource is in a state that does not allow the action, or `webhook_limit_reached` for triggers. | Read the message; for webhooks, delete unused endpoints (see above). |
| `429` | Rate limit reached. | Power Automate retries according to the action's retry policy. Reduce parallel runs if it keeps happening. See [Limits](https://docs.paywise.de/api-docs/essentials/limits.md). |

## Limitations

* paywise signs webhook deliveries, but a Power Automate trigger cannot verify the signature. Treat the trigger as a signal and read the authoritative state with the matching **Get …** action.
* The Mahnservice API and the Partner API are not part of this connector.

## Support

If you encounter any issues or have questions about the paywise Power Automate connector, please contact our support team at [support@paywise.de](mailto:support@paywise.de).

For more information about our APIs, please refer to:

* [Case Management API Documentation](https://docs.paywise.de/api-docs/case-management-api/introduction.md)
* [Webhooks](https://docs.paywise.de/api-docs/essentials/webhooks.md)


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