MageSmith
POSTSales · Magento 2.4.9 Admin · Magento_Sales::sales_creditmemo

POST /V1/creditmemo/refund

POST /V1/creditmemo/refund is a Magento 2 REST endpoint in the Sales module. Prepare creditmemo to refund and save it. Requires an admin Bearer token with ACL Magento_Sales::sales_creditmemo.

Last verified: against Magento 2.4.9.

Returns

Magento\Sales\Api\Data\CreditmemoInterface

Service contract

Magento\Sales\Api\CreditmemoManagementInterface::refund

Authorization

Admin Bearer token with ACL:

  • Magento_Sales::sales_creditmemo

Body parameters

creditmemo Magento\Sales\Api\Data\CreditmemoInterface Required
offlineRequested bool default: false

Example request

Auto-generated from the service contract — paste-ready against your store's /rest/default base. Replace the host, store code, ACL token, and any required values before running.

Headers

Accept
application/json
Content-Type
application/json
Authorization
Bearer <ACCESS_TOKEN> admin token with ACL: Magento_Sales::sales_creditmemo

Path

/V1/creditmemo/refund

Body

{
  "creditmemo": {
    "adjustment": 0,
    "adjustment_negative": 0,
    "adjustment_positive": 0,
    "base_adjustment": 0,
    "base_adjustment_negative": 0,
    "base_adjustment_positive": 0,
    "base_currency_code": "",
    "base_discount_amount": 0,
    "base_discount_tax_compensation_amount": 0,
    "base_grand_total": 0,
    "base_shipping_amount": 0,
    "base_shipping_discount_tax_compensation_amnt": 0,
    "base_shipping_incl_tax": 0,
    "base_shipping_tax_amount": 0,
    "base_subtotal": 0,
    "base_subtotal_incl_tax": 0,
    "base_tax_amount": 0,
    "base_to_global_rate": 0,
    "base_to_order_rate": 0,
    "billing_address_id": 0,
    "comments": [
      {
        "comment": "",
        "created_at": "",
        "entity_id": 0,
        "extension_attributes": {},
        "is_customer_notified": 0,
        "is_visible_on_front": 0,
        "parent_id": 0
      }
    ],
    "created_at": "",
    "creditmemo_status": 0,
    "discount_amount": 0,
    "discount_description": "",
    "discount_tax_compensation_amount": 0,
    "email_sent": 0,
    "entity_id": 0,
    "extension_attributes": {},
    "global_currency_code": "",
    "grand_total": 0,
    "increment_id": "",
    "invoice_id": 0,
    "items": [
      {
        "additional_data": "",
        "base_cost": 0,
        "base_discount_amount": 0,
        "base_discount_tax_compensation_amount": 0,
        "base_price": 0,
        "base_price_incl_tax": 0,
        "base_row_total": 0,
        "base_row_total_incl_tax": 0,
        "base_tax_amount": 0,
        "base_weee_tax_applied_amount": 0,
        "base_weee_tax_applied_row_amnt": 0,
        "base_weee_tax_disposition": 0,
        "base_weee_tax_row_disposition": 0,
        "description": "",
        "discount_amount": 0,
        "discount_tax_compensation_amount": 0,
        "entity_id": 0,
        "extension_attributes": {},
        "name": "",
        "order_item_id": 0,
        "parent_id": 0,
        "price": 0,
        "price_incl_tax": 0,
        "product_id": 0,
        "qty": 0,
        "row_total": 0,
        "row_total_incl_tax": 0,
        "sku": "",
        "tax_amount": 0,
        "weee_tax_applied": "",
        "weee_tax_applied_amount": 0,
        "weee_tax_applied_row_amount": 0,
        "weee_tax_disposition": 0,
        "weee_tax_row_disposition": 0
      }
    ],
    "order_currency_code": "",
    "order_id": 0,
    "shipping_address_id": 0,
    "shipping_amount": 0,
    "shipping_discount_tax_compensation_amount": 0,
    "shipping_incl_tax": 0,
    "shipping_tax_amount": 0,
    "state": 0,
    "store_currency_code": "",
    "store_id": 0,
    "store_to_base_rate": 0,
    "store_to_order_rate": 0,
    "subtotal": 0,
    "subtotal_incl_tax": 0,
    "tax_amount": 0,
    "transaction_id": "",
    "updated_at": ""
  },
  "offlineRequested": false
}

Every Magento dev tool, in one hosted workspace.

Free to sign up. Nothing to install. Drafts, audits, and projects saved across every tool.