/api/v2/server-side-api/purchase/profile/refund-saver/settings/ 设置退款保护设置
为用户单独设置退款偏好,并记录用户是否同意共享其数据。该偏好设置为一个统一值,同时适用于 App Store 和 Google Play。同意选项仅适用于 App Store。每个应用商店还具有应用级别的默认偏好设置,您可以在 Adapty 看板中为所有用户更改该设置。如需为特定用户调整偏好设置,请使用看板、Adapty SDK 或服务端 API。
Header parameters
您系统中客户的唯一 ID。adapty-customer-user-id 或 adapty-profile-id 必须提供其中之一。
您系统中用户画像的唯一 ID。如果您正在处理匿名用户画像,此为最佳选择。adapty-customer-user-id 或 adapty-profile-id 必须提供其中之一。
Request body
单独为该用户设置退款偏好。该设置适用于用户在 App Store 和 Google Play 上的退款请求。Google 在退款审核时仅接受拒绝、批准或无偏好,因此当此值为 grant_prorated 时,Adapty 会向 Google Play 发送无偏好。
- grant:批准每一个退款请求
- grant_prorated:按用户尚未使用的购买部分批准退款
- no_preference:不提供任何建议
- decline:拒绝每一个退款请求
One of: "grant", "grant_prorated", "no_preference", "decline"
记录用户是否同意共享其数据。该同意仅适用于 App Store。
- true 表示当您收到应用内退款请求时,您可以向 Apple 提供有关该用户的信息
Responses
设置更新成功
Schema
客户用户画像 ID
用户的退款保护设置
定义用户是否同意与 Apple 共享其数据(仅限 App Store)
退款偏好设置
One of: "grant", "grant_prorated", "no_preference", "decline"
Example
{
"profile_id": "e5aab402-b1bd-4039-b632-57a91ebc0779",
"settings": {
"consent": true,
"custom_preference": "grant"
}
} 请求错误
Schema
错误来源
错误消息数组
简短错误名称
HTTP 状态码
Example
{
"errors": [
"Profile does not exist"
],
"error_code": "profile_does_not_exist",
"status_code": 400
} 未授权
Schema
错误来源
错误消息数组
简短错误名称
HTTP 状态码
Example
{
"errors": [
"Invalid API key"
],
"error_code": "unauthorized",
"status_code": 401
} 服务器内部错误
Schema
错误来源
错误消息数组
简短错误名称
HTTP 状态码