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.

Headers

  • Advertises which content types the client can understand

  • Set this header to application/json

  • Signature generated using the request path, body, and OAuth secret provided by the business. For details, see signature

  • Language parameter

  • 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.

Body

application/json
  • Reason for cancelling the subscription as provided by the end user

  • ID of the chosen cancellation reason. You can get this value from the subscription_cancellation_reasons object returned in the response of a successful Subscription Meta API call.

  • Type 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.

  • OAuth client ID provided by the business (per the OAuth app in the Punchh platform)

  • System-generated unique ID of the subscription of the guest that needs to be cancelled

  • 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.

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for put/api/auth/subscriptions/cancel
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"
}