Cancel Subscription (Turn off Auto Renewal)
This API can be used to cancel an active subscripition.
Headers
- Type: stringContent
- Type requiredapplication/json
- Type: stringAcceptrequired
application/json
- Type: stringAuthorization
Bearer token for admin authorization, who is making a call on behalf of the customer
Body
application/json
- Type: stringcancellation
_reason min length:1requiredReason provided by the admin at the time of cancellation
- Type: stringcancellation
_type min length:1enumrequiredType of cancellation -- either "hard_cancelled" or "soft_cancelled". If “soft_cancelled”, end users can enjoy the benefits until the “end_time” of the subscription. If “hard_cancelled”, subscription benefits are terminated immediately.
values- hard
_cancelled - soft
_cancelled
- Type: integerFormat: int64subscription
_id requiredPunchh-generated unique ID of the subscription that needs to be cancelled
Responses
- application/json
- application/json
- application/json
- application/json
Request Example for patch/api2/dashboard/subscriptions/cancel
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/dashboard/subscriptions/cancel \
--request PATCH \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: ' \
--data '{
"subscription_id": "126",
"cancellation_reason": "Do not like your service",
"cancellation_type": "hard_cancelled"
}'
[
"Subscription auto renewal cancelled."
]