รับธุรกรรมภายนอกที่มีอยู่
คำขอ HTTP
GET https://androidpublisher.googleapis.com/androidpublisher/v3/{name=applications/*/externalTransactions/*}
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ | |
---|---|
name |
ต้องระบุ ชื่อธุรกรรมภายนอกที่จะดึงข้อมูล รูปแบบ: applications/{packageName}/externalTransactions/{externalTransaction} |
เนื้อความของคำขอ
เนื้อหาของคำขอต้องว่างเปล่า
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีอินสแตนซ์ ExternalTransaction
ตัวอย่าง
ตัวอย่างคําขอมีดังนี้
``` curl \ -X GET \ 'https://androidpublisher.googleapis.com/androidpublisher/v3/applications/com.example.app/externalTransactions/1234567890' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' ```
ตัวอย่างคำตอบมีดังนี้
{ "createTime": "2023-04-06T13:48:11.694Z", "currentPreTaxAmount": { "currency": "USD", "priceMicros": "12000000" }, "currentTaxAmount": { "currency": "USD", "priceMicros": "1200000" }, "externalTransactionId": "ext-trans-id-123", "oneTimeTransaction": { "externalTransactionToken": "one-time-token-456" }, "originalPreTaxAmount": { "currency": "USD", "priceMicros": "15000000" }, "originalTaxAmount": { "currency": "USD", "priceMicros": "1500000" }, "packageName": "com.example.app", "recurringTransaction": { "externalSubscription": { "subscriptionType": "RECURRING" }, "externalTransactionToken": "recurring-token-789", "initialExternalTransactionId": "ext-trans-id-001", "otherRecurringProduct": {} }, "testPurchase": {}, "transactionProgramCode": 11, "transactionState": "TRANSACTION_REPORTED", "transactionTime": "2023-04-06T14:00:00.000Z", "userTaxAddress": { "regionCode": "US" } }
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/androidpublisher