Method: externaltransactions.refundexternaltransaction

Refunds or partially refunds an existing external transaction.

HTTP request

POST https://androidpublisher.googleapis.com/androidpublisher/v3/{name=applications/*/externalTransactions/*}:refund

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. The name of the external transaction that will be refunded. Format: applications/{packageName}/externalTransactions/{externalTransaction}

Request body

The request body contains data with the following structure:

JSON representation
{
  "refundTime": string,

  // Union field refund_type can be only one of the following:
  "partialRefund": {
    object (PartialRefund)
  },
  "fullRefund": {
    object (FullRefund)
  }
  // End of list of possible types for union field refund_type.
}
Fields
refundTime

string (Timestamp format)

Required. The time that the transaction was refunded.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

Union field refund_type. Required. Type of external transaction refund. refund_type can be only one of the following:
partialRefund

object (PartialRefund)

A partial refund.

fullRefund

object (FullRefund)

A full-amount refund.

Response body

If successful, the response body contains an instance of ExternalTransaction.

Authorization scopes

Requires the following OAuth scope:

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

PartialRefund

A partial refund of a transaction.

JSON representation
{
  "refundId": string,
  "refundPreTaxAmount": {
    object (Price)
  }
}
Fields
refundId

string

Required. A unique id distinguishing this partial refund. If the refund is successful, subsequent refunds with the same id will fail. Must be unique across refunds for one individual transaction.

refundPreTaxAmount

object (Price)

Required. The pre-tax amount of the partial refund. Should be less than the remaining pre-tax amount of the transaction.

FullRefund

This type has no fields.

A full refund of the remaining amount of a transaction.