Report a Refund
POST /event/refund records a refund of all or part of a previously reported sale, found by external ID.
Requires Siren Pro
Last updated: October 28, 2026
POST /siren/v1/event/refund
Records a refund of all or part of a previously reported sale. A whole refund creates a RefundTriggered event, and a partial refund creates PartialRefundReceived. The original transaction is located through Siren’s mapping table using the external ID and source, so you don’t need the Siren transaction ID. Used alongside POST /event/sale for headless commerce integrations that need to adjust conversions and obligations when an order is refunded.
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
source | string | Yes | Same identifier used when the sale was reported (e.g., "shopify"). Combined with externalId to find the original transaction via the mapping table. |
externalId | string | Yes | The order or transaction ID that was refunded — must match the value passed when the sale was originally reported. |
refundId | string or number | No | Your id for this refund, 1 to 191 characters. A refund sent again with the same id is recorded once. One without an id is recorded each time it’s sent. |
amount | number | No | The money refunded, as a decimal like the sale’s total (12.50 for $12.50). 0 to 999,999,999.99. |
currency | string | No | The currency of amount and each line’s amount, a code your organization uses. Without it, the amounts read in the sale’s currency. |
lines | array | No | The order lines refunded: [{ lineId, sku, quantity, amount }], up to 500. Each line needs lineId or sku, up to 191 characters. lineId is the lineId the sale’s item carried. quantity is the units returned, a whole number from 0 to 1,000,000, where 0 means money back for a unit the customer kept. amount is the money for the line, and without it the line gives back its units at the price the sale recorded. |
whole | boolean | No | true refunds the whole order, whatever else the request sends. |
A request that sends whole: true, or neither amount nor lines, refunds the whole order. Anything else refunds part of it. A partial refund that leaves the order worth nothing counts as a whole refund. Money in amount beyond the named lines comes off the order’s shipping, fee, and tax lines first, then the rest of the order. A sale whose items carried no lineId can still be refunded in part by amount, which is spread over its lines in proportion to their value.
Example Request, a whole refund:
POST /wp-json/siren/v1/event/refund
Authorization: Basic c2lyZW4tdHJhY2tpbmc6YWJjZCBlZmdoIGlqa2wgbW5vcA==
Content-Type: application/json
{
"source": "shopify",
"externalId": "ORD-1004"
}
Example Request, part of an order:
{
"source": "shopify",
"externalId": "ORD-1004",
"refundId": "refund-2201",
"amount": 59.00,
"currency": "USD",
"lines": [
{ "lineId": "line-1", "quantity": 1, "amount": 49.00 }
]
}
Example Response:
HTTP/1.1 200 OK
Empty body on success.
If no transaction can be found for the given external ID and source, returns 404 with the request fields echoed in the error body. This typically means either the sale was never reported through /event/sale, the IDs don’t match, or the original sale belonged to a different source value.
Siren writes each refund on the sale’s transaction as refund lines with negative values, so the transaction’s lines add up to what the customer kept. See Refund lines.
A whole refund fires RefundTriggered, which traverses the conversion pipeline in reverse: linked conversions are rejected, and their obligations are rejected and taken out of any payout that hasn’t been sent. A partial refund works each unpaid reward out again from what the customer kept. Each one is rejected and replaced by a new obligation for the new amount, in the same status, and a reward that comes to nothing gets no replacement. In both cases, a reward in a payout that is processing or paid is left as it is. See How Refunds Work for the full lifecycle.