Refund Invoice
magento.refund_invoice
ActionBusiness appsconnection required
Calls the Magento API with the connection's credentials.
Refund an invoice and create the credit memo, either online through the payment gateway or as an offline record.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- Bearer token
- Providers
- Magento
- Secret shape
- the integration access token, or {"access_token": "…"}
- Config it needs
- base_url, store_code
- Resolved by
- config.connection_id, else node.connection_id
Configuration
6 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
invoice_id The invoice's entity id. | string | Yes | — | — | 1 |
is_online Send the refund through the payment gateway; leaving this off records an offline refund only. | boolean | No | false | — | — |
comment Comment text to record against the new document. Leaving it empty records no comment at all. | string | No | — | — | — |
comment_visible_on_front Show the comment to the customer in their account area. | boolean | Conditional | false | only with comment | — |
notify Ask Magento to email the customer about this document. | boolean | No | false | — | — |
items Line items to include, each an object with 'order_item_id' and 'qty'. Leave it empty to cover the whole order. | array | No | — | array of object | — |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"comment_visible_on_front": false,
"invoice_id": "1",
"is_online": false,
"notify": false
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
creditmemo_id The new credit memo's entity id, which is all this route returns. | number | — |
response Magento's raw answer, the bare credit memo id. | any | — |
invoice_id The invoice that was refunded. | string | — |
{
"creditmemo_id": 0,
"invoice_id": "",
"response": null
}See Refund Invoice run in a workflow.
In a technical demo we add the Magento connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.