/api/v2/server-side-api/purchase/profile/refund-saver/settings/ Set Refund Saver settings
Set the refund preference individually for the user and record if the user gave their consent to share their data. The preference is one value that applies to both the App Store and Google Play. Consent applies to the App Store only. Each store also has an app-level default preference that you can change for all users in the Adapty Dashboard. To adjust the preference for a specific user, use the Dashboard, the Adapty SDK, or the server-side API.
Header parameters
The unique ID of the customer in your system. Either adapty-customer-user-id or adapty-profile-id is required.
The unique ID of the profile in your system. Your best option if you are working with anonymous profiles. Either adapty-customer-user-id or adapty-profile-id is required.
Request body
Set the refund preference individually for the user. It applies to the user's refund requests on both the App Store and Google Play. Google accepts only decline, approve, or no preference on a refund review, so Adapty sends no preference on Google Play when this value is grant_prorated.
- grant: approve each refund request
- grant_prorated: approve a refund for the part of the purchase the user hasn't consumed yet
- no_preference: do not provide any recommendations
- decline: decline each refund request
One of: "grant", "grant_prorated", "no_preference", "decline"
Record if the user gave their consent to share their data. Consent applies to the App Store only.
- true means that if you receive an in-app refund request, you may provide Apple with information about the user
Responses
Settings updated successfully
Schema
Customer profile ID
Refund saver settings for the user
Defines whether the user consented to share their data with Apple (App Store only)
The refund preference
One of: "grant", "grant_prorated", "no_preference", "decline"
Example
{
"profile_id": "e5aab402-b1bd-4039-b632-57a91ebc0779",
"settings": {
"consent": true,
"custom_preference": "grant"
}
} Bad request
Schema
Source of the error
Array of error messages
Short error name
HTTP status code
Example
{
"errors": [
"Profile does not exist"
],
"error_code": "profile_does_not_exist",
"status_code": 400
} Unauthorized
Schema
Source of the error
Array of error messages
Short error name
HTTP status code
Example
{
"errors": [
"Invalid API key"
],
"error_code": "unauthorized",
"status_code": 401
} Internal server error
Schema
Source of the error
Array of error messages
Short error name
HTTP status code