Method: purchases.subscriptions.refund

เลิกใช้งานแล้ว: ให้ใช้ orders.refund แทน คืนเงินค่าสมัครใช้บริการของผู้ใช้ แต่การสมัครใช้บริการจะยังคงมีผลจนกว่าจะหมดอายุและจะมีการเรียกเก็บเงินซ้ำต่อไป

คำขอ HTTP

POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/purchases/subscriptions/{subscriptionId}/tokens/{token}:refund

URL ใช้ไวยากรณ์การแปลงรหัส gRPC

พารามิเตอร์เส้นทาง

พารามิเตอร์
packageName

string

ชื่อแพ็กเกจของแอปพลิเคชันที่ซื้อการสมัครใช้บริการนี้ (เช่น 'com.some.thing')

subscriptionId

string

"รหัสการสมัครใช้บริการที่ซื้อ (เช่น 'monthly001')

token

string

โทเค็นที่มอบให้แก่อุปกรณ์ของผู้ใช้เมื่อมีการซื้อการสมัครใช้บริการ

เนื้อหาคำขอ

เนื้อหาของคำขอต้องว่างเปล่า

เนื้อหาการตอบกลับ

หากทำสำเร็จ เนื้อหาการตอบกลับจะว่างเปล่า

ตัวอย่าง

ตัวอย่างคำขอมีดังนี้

curl -X POST \
  'https://androidpublisher.googleapis.com/androidpublisher/v3/applications/com.example.myapp/purchases/subscriptions/monthly.premium.plan/tokens/abcdefghijklmnopqrstuvwxyz1234567890:refund' \
  -H 'Accept: application/json'

ขอบเขตการให้สิทธิ์

ต้องใช้ขอบเขต OAuth ต่อไปนี้

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