Change autocharge status

POST
/api/v2/buyers/{buyerId}/subscriptions/{subscriptionId}/change_autocharge_status
lts

This API endpoint is required when a buyer or a support agent wants to enable/disable autocharge for a specific subscription.

Header parameters
Attribute
Requirement
Description
x-public-key
mandatory
a public key that identifies the merchant account (there can be several for one merchant)
x-buyer-ip
mandatory
is responsible for information about the buyer's IP address
x-date
mandatory
is responsible for the date and time of sending the request
x-token
mandatory
generated on the merchant side
x-source
mandatory
identifier of the type of service that is the initiator of the request
x-id
mandatory
service identifier from which the current request is made
Request parameters
If autochargeStatus = true, then comment and reason are not provided (or are provided as null).

If autochargeStatus = false, then you may:
• provide nothing
• provide only reason
• provide both comment and reason
Attribute
Type
Requirement
Description
Standard
buyerId
string
mandatory
Unique identifier of buyer in the system
uuid
subscriptionId
string
mandatory
Unique subscription identifier associated with the buyer
uuid
autochargeStatus
bool
mandatory
Enables or disables autocharge.
-
reason
string
optional
Reason for enabling/disabling autocharge.
Default value if reason is not provided - Changed autocharge status by api — autocharge was changed manually.
max length 255
comment
string
OPTional
Comment about the autocharge status change
max length 255
Response parameters
Attribute
Type
Description
data
object
Contains the main subscription information
meta
array
Provides metadata about the response
{
    "data": {
        "id": "00004d62-c4c4-4876-b9c2-c74f32d32af3",
        "buyerId": "9cd310ef-664f-406f-88cc-315889beb270",
        "startDate": "2024-08-22T05:10:23+00:00",
        "endDate": "2024-12-19T05:10:23+00:00",
        "status": "active",
        "autoChargeStatus": false,
        "isManual": false,
        "createdAt": "2024-08-22T05:10:23+00:00",
        "statusInfo": [],
        "freezeDetails": null
    },
    "meta": []
}
{
    "uuid": null,
    "message": "Validation failed",
    "code": 0,
    "traceId": "c7bf277b9be94f5e713e9551a7af4fb5",
    "errors": [
        {
            "field": "autochargeStatus",
            "title": "Autocharge status should have \"disabled\" value when Reason/Comment provided.",
            "values": {
                "autochargeStatus": true,
                "reason": "Just unfreeze",
                "comment": null
            }
        }
    ]
}
Errors and interpretation

The list of possible errors for this endpoint, along with their types and interpretation, is provided in the general reference: Endpoint response errors.