Workflow Webhooks

Workflow Run Failed

Primer notifies you with a WORKFLOW_RUN.FAILED webhook when a workflow run does not complete successfully.

This webhook is recommended if you use Capture or Cancel via Workflows. A workflow failure does not necessarily fail the payment or update the payment status, so this webhook is the signal you need to keep your own systems in sync when an automated capture or cancel does not succeed.

For payment workflows, the payload does not contain payment data — only the Payment ID in the triggerEventId field. Use the Payments API to retrieve the latest status and payment data for the payment linked to this ID.

Learn more about Workflow Run failed webhooks and how Primer handles webhooks.

post/workflow-run-failed

Headers

X-Signature-Primarystring

An HMAC signature generated using the webhook payload and a shared signing secret. This is then converted to a base64 encoded string. Only present when webhook signing is enabled in the dashboard.

X-Signature-Secondarystring

A secondary signature that is added when you have rotated your secret within the past 24 hours.

Request body

eventType'WORKFLOW_RUN.FAILED' required

The type of the webhook raised. WORKFLOW_RUN.FAILED for failed workflow runs. Additional types may be supported in the future.

versionstring required

The payload version for this eventType.

datestring required

The date and time when the webhook event was sent.

primerAccountIdstring uuid required

The Primer Account ID of the account that owns the failed workflow run.

triggerEventIdstring nullable

An optional ID passed with the trigger to identify the origin of the event that started the workflow. For payment workflows this is the payment ID; other triggers may not set an event ID, in which case this value will be null.

Example request

{
  "version": "1.0",
  "date": "2024-02-21 15:36:16.167687"
}

Response

Return a 200 status to indicate that the data was received successfully

Changes