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: string
Accept requiredAdvertises which content types the client can understand
- Type: string
Content - Type requiredSet this header to application/json
- Type: string
x -pch -digest requiredSignature generated using the request path, body, and OAuth secret provided by the business. For details, see signature
- Type: string
Accept - Language Language parameter
- Type: string
Authorization requiredYou 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. Note: When authentication is performed using Advanced Authentication, you must include theid_tokenin theid-tokenheader and theaccess_tokenin theAuthorizationheader. See Access Punchh APIs Using Access and ID tokens - Type: string
id -token A token that contains identity information about the authenticated user. It is used to verify the user’s identity and is required only when authentication is performed using Advanced Authentication. This token alone does not grant access to Punchh APIs. To access the APIs, you must include the
id_tokenin theid-tokenheader and theaccess_tokenin theAuthorizationheader. See Access Punchh APIs Using Access and ID tokens
- Type: string
authentication _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.
- Type: string
cancellation _feedback min length:1requiredReason for cancelling the subscription as provided by the end user
- Type: string
cancellation _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: string
cancellation _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.
hard _cancelled soft _cancelled
- Type: string
client min length:1requiredOAuth client ID provided by the business (per the OAuth app in the Punchh platform)
- Type: integer
subscription _id requiredSystem-generated unique ID of the subscription of the guest that needs to be cancelled
- Type: object
200 - Type: string
message min length:1default:"Subscription auto renewal cancelled"required
- Type: object
400 - Type: string
error
- Type: object
401 - Type: string
error
- Type: array object[]
412 Precondition Failed: Sending an invalid/empty client
Invalid Signature means the signature generated at the Punchh Server for the API call does not match the signature generated by the client. See Generating x-pch-digest Header for Online Ordering APIs
- Type: object
422 - Type: object
error
{
"message": "Subscription auto renewal cancelled"
}