Method: externaltransactions.refundexternaltransaction
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
HTTP 要求
POST https://androidpublisher.googleapis.com/androidpublisher/v3/{name=applications/*/externalTransactions/*}:refund
這個網址使用 gRPC 轉碼語法。
路徑參數
參數 |
name |
string
必要欄位。要退款的外部交易名稱。格式:applications/{packageName}/externalTransactions/{externalTransaction}
|
要求主體
要求主體的資料會採用以下結構:
JSON 表示法 |
{
"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 .
} |
欄位 |
refundTime |
string (Timestamp format)
必要欄位。交易退款的時間。 RFC3339 世界標準時間「Zulu」格式的時間戳記,精確度達奈秒單位,最多九個小數位數。例如 "2014-10-02T15:01:23Z" 和 "2014-10-02T15:01:23.045123456Z" 。
|
聯集欄位 refund_type 。必要欄位。外部交易退款類型。refund_type 只能是下列其中一項: |
partialRefund |
object (PartialRefund )
部分退款。
|
fullRefund |
object (FullRefund )
全額退款。
|
回應主體
如果成功,回應主體會包含 ExternalTransaction
的執行例項。
授權範圍
需要下列 OAuth 範圍:
https://www.googleapis.com/auth/androidpublisher
PartialRefund
JSON 表示法 |
{
"refundId": string,
"refundPreTaxAmount": {
object (Price )
}
} |
欄位 |
refundId |
string
必要欄位。用於區分這筆部分退款的專屬 ID。如果退款成功,後續使用相同 ID 的退款作業將會失敗。每筆交易的退款 ID 皆不得重複。
|
refundPreTaxAmount |
object (Price )
必要欄位。部分退款的稅前金額。應低於交易的稅前餘額。
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-12-17 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2024-12-17 (世界標準時間)。"],[[["Refunds or partially refunds an existing external transaction using an HTTP POST request."],["Requires providing the external transaction name as a path parameter and refund details in the request body."],["The request body specifies the refund time and either a partial or full refund type."],["Successful requests will receive a response containing the updated external transaction details."],["Authorization requires the `https://www.googleapis.com/auth/androidpublisher` OAuth scope."]]],["This document details how to refund an external transaction via a POST request to the specified URL. The request requires a `name` path parameter, indicating the transaction to be refunded. The request body includes a `refundTime` timestamp and either a `partialRefund` object with a unique `refundId` and `refundPreTaxAmount`, or a `fullRefund` object. Successful requests return an `ExternalTransaction` instance and needs the `androidpublisher` OAuth scope.\n"]]