AdobeDocs / AdobeDocs/commerce-webapi

/V1/order/:orderid/refund API keeps returning Creditmemo Document Validation Error(s):\nThe credit memo's total must be positive. error

Open
#380 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
13
Forks
120
Avg merge
2d 3h
Merged PRs (30d)
8

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### What's missing?

I've scoured the API documentation and web for a solution to this error but no matter what I do I am unable to clear the Creditmemo Document Validation Error(s):\nThe credit memo's total must be positive. error for Credit Memo creation via the order API. My payload (included below) is simple and follows the documentation examples but I cannot resolve the error. Why is the credit memo not creating?

{
"items" : [
{
"order_item_id" : 607034,
"qty" : 1
}
],
"notify": true,
"comment": {
"extension_attributes": { },
"is_visible_on_front": 0
},
"arguments": {
"shipping_amount": 0,
"adjustment_positive": 0,
"adjustment_negative": 0,
"extension_attributes": {
"return_to_stock_items": [
607034
]
}
}
}

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the /V1/order/:orderid/refund endpoint and the submitted credit-memo payload, then compare it with the referenced API documentation examples. A useful outcome would require a confirmed cause for the positive-total validation error and a documented correction or reproducible fix; no source file or test is identified in the issue.

Written by the indexing model from the issue text.

Assessment

Domain
api
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.