Method: orders.refundorder

Issues a partial or total refund for an order.

HTTP request

POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/orders/{orderId}/refundorder

Path parameters

Parameters
merchantId

string

The ID of the account that manages the order. This cannot be a multi-client account.

orderId

string

The ID of the order to refund.

Request body

The request body contains an instance of OrdersRefundOrderRequest.

Response body

If successful, the response body contains data with the following structure:

JSON representation
{
  "executionStatus": string,
  "kind": string
}
Fields
executionStatus

string

The status of the execution.

Acceptable values are:

  • "duplicate"
  • "executed"

kind

string

Identifies what kind of resource this is. Value: the fixed string "content#ordersRefundOrderResponse".

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/content

For more information, see the OAuth 2.0 Overview.

OrdersRefundOrderRequest

JSON representation
{
  "operationId": string,
  "reason": string,
  "reasonText": string,
  "fullRefund": boolean,
  "amount": {
    object (MonetaryAmount)
  }
}
Fields
operationId

string

The ID of the operation. Unique across all operations for a given order.

reason

string

The reason for the refund.

Acceptable values are:

  • "courtesyAdjustment"
  • "other"

reasonText

string

The explanation of the reason.

fullRefund

boolean

If true, the full order will be refunded, including shipping. If this is true, amount shouldn't be provided and will be ignored.

amount

object (MonetaryAmount)

The amount that is refunded. If this is not the first refund for the order, this should be the newly refunded amount.