Перейти к основному содержимому

Edit Auto-Renew API

POST /editAutoRenew

Description

This API endpoint allows users to toggle the auto-renewal setting for their subscription. The user can enable or disable the auto-renew feature by specifying the desired state.

Request Body

The request utilizes GraphQL to perform the editAutoRenew mutation.

Mutation:

mutation editAutoRenew ($isActive: Boolean!) {
editAutoRenew (isActive: $isActive)
}

Variables:

{
"isActive": true
}
  • isActive (Boolean): A boolean value indicating whether auto-renewal should be enabled (true) or disabled (false).

Response:

  • Success (200 OK):

    • If the mutation is successful, no additional data is returned. The auto-renewal setting will be updated according to the provided isActive value.
  • Error (4XX/5XX):

    • Appropriate error messages and status codes will be returned in cases of invalid data, unauthorized access, or server errors.

Note:

Ensure that the isActive variable is correctly set to either true or false based on the user's preference. This setting controls whether the subscription will automatically renew at the end of the current billing cycle.