Orders: refund

Initiates a full or partial reversal on the payment instrument. Try it now.

Please note that the refund amount will be capped to the order net amount (the original amount in the order, net of refunds). Refunds done by means other than reversing the credit card transaction (e.g. issuing a cash refund, in states where this is mandatory) should not be communicated to Google via this API call, as otherwise the credit card transaction will be reversed resulting in a double refund.

Request

HTTP request

POST https://www.googleapis.com/content/v2/merchantId/orders/orderId/refund

Parameters

Parameter name Value Description
Path parameters
merchantId unsigned long 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.

Authorization

This request requires authorization with the following scope:

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

For more information, see the authentication and authorization page.

Request body

In the request body, supply data with the following structure:

{
  "operationId": string,
  "amount": {
    "value": string,
    "currency": string
  },
  "amountPretax": {
    "value": string,
    "currency": string
  },
  "amountTax": {
    "value": string,
    "currency": string
  },
  "reason": string,
  "reasonText": string
}
Property name Value Description Notes
operationId string The ID of the operation. Unique across all operations for a given order.
amount nested object Deprecated. Please use amountPretax and amountTax instead.
amount.value string The price represented as a number. writable
amount.currency string The currency of the price. writable
reason string The reason for the refund.

Acceptable values are:
  • "adjustment"
  • "courtesyAdjustment"
  • "customerCanceled"
  • "customerDiscretionaryReturn"
  • "deliveredLateByCarrier"
  • "feeAdjustment"
  • "lateShipmentCredit"
  • "noInventory"
  • "other"
  • "priceError"
  • "productArrivedDamaged"
  • "productNotAsDescribed"
  • "shippingCostAdjustment"
  • "taxAdjustment"
  • "undeliverableShippingAddress"
  • "wrongProductShipped"
reasonText string The explanation of the reason.
amountPretax nested object The amount that is refunded. Either amount or amountPretax should be filled.
amountPretax.value string The price represented as a number. writable
amountPretax.currency string The currency of the price. writable
amountTax nested object Tax amount that corresponds to refund amount in amountPretax. Optional, but if filled, amountPretax must be set. Calculated automatically if not provided.
amountTax.value string The price represented as a number. writable
amountTax.currency string The currency of the price. writable

Response

If successful, this method returns a response body with the following structure:

{
  "kind": "content#ordersRefundResponse",
  "executionStatus": string
}
Property name Value Description Notes
kind string Identifies what kind of resource this is. Value: the fixed string "content#ordersRefundResponse".
executionStatus string The status of the execution.

Acceptable values are:
  • "duplicate"
  • "executed"