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.

FieldTypeRequiredDefaultConstraintsExample
invoice_id
The invoice's entity id.
stringYes——1
is_online
Send the refund through the payment gateway; leaving this off records an offline refund only.
booleanNofalse——
comment
Comment text to record against the new document. Leaving it empty records no comment at all.
stringNo———
comment_visible_on_front
Show the comment to the customer in their account area.
booleanConditionalfalseonly with comment—
notify
Ask Magento to email the customer about this document.
booleanNofalse——
items
Line items to include, each an object with 'order_item_id' and 'qty'. Leave it empty to cover the whole order.
arrayNo—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

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