Cancel Subscription (Turn off Auto Renewal)
This API allows the end user to cancel an active subscription (turn off auto renewal for the subscription). This is a soft cancellation wherein the benefits remain valid until the end time of the subscription.
- Type: stringAcceptrequired
Advertises which content types the client can understand
- Type: stringContent
- Type requiredSet this header to application/json
- Type: stringx
-pch -digest requiredSignature generated using the request path, body, and OAuth secret provided by the business. For details, see signature
- Type: stringAccept
- Language Language parameter
- Type: stringAuthorizationrequired
You may pass the access_token instead of the authentication_token in Online Ordering endpoints to authorize the request. It must be supplied as
Bearer ACCESS_TOKEN_GOES_HERE.
- Type: stringcancellation
_feedback min length:1requiredReason for cancelling the subscription as provided by the end user
- Type: stringcancellation
_reason _id requiredID of the chosen cancellation reason. You can get this value from the
subscription_cancellation_reasonsobject returned in the response of a successful Subscription Meta API call. - 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: stringclientmin length:1required
OAuth client ID provided by the business (per the OAuth app in the Punchh platform)
- Type: integersubscription
_id requiredSystem-generated unique ID of the subscription of the guest that needs to be cancelled
- Type: stringauthentication
_token The authentication token of the user. You can retrieve this from the response of a successful sign-in API call or through the SSO process.
- application/json
- application/json
- application/json
- application/json
- application/json
curl https://SERVER_NAME_GOES_HERE.punchh.com/api/auth/subscriptions/cancel \
--request PUT \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'x-pch-digest: ' \
--header 'Accept-Language: en' \
--header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
--data '{
"client": "CLIENT_GOES_HERE",
"subscription_id": 24,
"cancellation_feedback": "Price too High.",
"cancellation_reason_id": "1",
"cancellation_type": "soft_cancelled"
}'
{
"message": "Subscription auto renewal cancelled"
}