---
title: "Mark order as paid when webhook received"
description: "A ready-made Shopify Flow workflow. When your bank, invoicing or payment system confirms a payment through your webhook, mark the matching order as paid. Built for bank transfer, invoice and cash on delivery orders that Shopify cannot capture itself."
canonical: "https://docs.workflow-webhooks.app/template-mark-order-paid"
---

# Mark order as paid when webhook received

When your bank, invoicing or payment system confirms a payment through your webhook, mark the matching order as paid. Built for bank transfer, invoice and cash on delivery orders that Shopify cannot capture itself.

One trigger from Workflow Webhooks and Shopify's built-in actions, no other app needed.

![The workflow in Shopify Flow: Mark order as paid when webhook received](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/4bff1ac88df4a110.jpg)
*The complete workflow as it looks in Shopify Flow.*

## What it needs

A webhook in Workflow Webhooks with this payload mapping. See [Payload mapping and Flow variables](https://docs.workflow-webhooks.app/payload-mapping.md).

| Field | What to map to it |
| --- | --- |
| `fieldOne` | The order number, for example `#1001` |

A call to the webhook then looks like this:

```bash
curl -X POST https://<your webhook URL> \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: <your token>" \
  -d '{"orderNumber": "#1001"}'
```

> [!WARNING]
> **More than one webhook?**
> The Webhook Trigger fires for every webhook in your store. If you have more than one, add a condition on `webhookId` **Equal to** this webhook's id right after the trigger.

## Get the workflow

1. Download the `.flow` file attached at the bottom of this page.
2. In your Shopify admin open **Flow**, click **Import** and choose the file.
3. Check the steps, then click **Turn on workflow**.

The file is an export from Shopify Flow itself. Do not edit it by hand; change the workflow in Flow after importing it.

## How it works

1. **Webhook Trigger** starts the workflow each time your webhook URL is called and hands it the mapped fields.
2. **Get order data** looks up the order with the query `name:{{fieldOne}}` and keeps at most one result.
3. **For each** runs once for the order it found, and not at all when no order matches.
4. **Mark order as paid** records the outstanding balance of that order as paid.

## Make it yours

- Add a condition on `requestHeaders` or a mapped amount field and compare it with the order total before marking it paid.
- Add **Add order tags** after the payment step, for example `paid-by-bank-transfer`.

> [!CAUTION]
> **Good to know**
> Anyone who can call this webhook can mark orders as paid. Protect it with a secret token or a signature, never leave it on No authentication.

## Next steps

- [Create your first webhook](https://docs.workflow-webhooks.app/getting-started.md) - create the webhook this workflow listens to.
- [Workflow templates](https://docs.workflow-webhooks.app/workflow-templates.md) - all templates.
- [History and troubleshooting](https://docs.workflow-webhooks.app/history-and-troubleshooting.md) - check that the webhook reached Flow.
