post-api-auth-user-subscriptions

Fetch Subscription Plans for a User

This API returns the subscriptions attached to a guest's profile. While the response can be filtered based on "status" and "past_subscriptions", the default response will include subscriptions that are either "active" or "soft_cancelled" and have their end time in the future.

Query Parameters
  • filter
    Type: string

    'Filter subscription by status and past_subscriptions.

    If the status is not sent, the API returns subscriptions that are active, soft_cancelled, and have an end_time that is not in the past. Supported "filter” values are ''active'', ''expired'', and ''cancelled''.

    When the API call is made using the past_subscriptions filter, the response returns only such subscriptions that have their end date/time in the past. The status against each subscription can have the following possible values: ‘expired’, ‘renewed’, ‘soft_cancelled’, and ‘hard_cancelled’.'

Headers
  • Accept
    Type: string
    required

    Advertises which content types the client can understand

  • Accept-Language
    Type: string

    Preferred language. Punchh supports multiple languages for the subscription plan name, description, and miscellaneous parameters in the API response as per the locale specified in the Accept-Language request header. Possible values: es for Spanish, fr for French, fr-ca for French-Canada, en-CY for English-Cyprus, ro for Romania, es-US for Spanish United States, etc. The locales for a business are configured in the Punchh platform under Administration > Business Profile > Address > Alternate Languages. Administrators have to configure Name, Description, and Miscellaneous fields in the relevant language(s) on the subscription plan in the Punchh platform under Wallet and Passes > Subscription Plans. If these fields are not configured in Punchh in the language specified in the Accept-Language request header, then the API response will include the subscription plan name, description, and miscellaneous parameters with empty values.

  • x-pch-digest
    Type: string
    required

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

  • Authorization
    Type: string
    required

    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. Note: When authentication is performed using Advanced Authentication, you must include the id_token in the id-token header and the access_token in the Authorization header. See Access Punchh APIs Using Access and ID tokens

  • Content-Type
    Type: string
    required

    Set this header to application/json

  • id-token
    Type: string

    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_token in the id-token header and the access_token in the Authorization header. See Access Punchh APIs Using Access and ID tokens

Body
application/json
  • authentication_token
    Type: string

    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.

  • client
    Type: string
    required

    Oauth client ID provided by the business

Responses
  • 200
    Type: object
    • has_any_subscriptions
      Type: boolean

      Indicates whether or not a user's account currently has an active subscription or has ever had an active subscription. This parameter can be used by developers to customize the app experience as per the needs of the business. Possible values: true, false

    • subscriptions
      Type: array object[] 1… unique!

      Array object containing different subscriptions issued to the guest

  • 401
    Type: object
    • error
      Type: string
  • 412
    Type: array object[]

    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

  • 422
    Type: object
    • errors
      Type: object
get/api/auth/user_subscriptions
{
  "has_any_subscriptions": true,
  "subscriptions": [
    {
      "subscription_id": 1,
      "start_time": "string",
      "end_time": "string",
      "plan_id": 1,
      "image": "string",
      "cancellation_reason": "string",
      "cancelled_at": "2025-12-19T16:30:10.408Z",
      "name": "string",
      "description": "string",
      "miscellaneous": "string",
      "status": "string",
      "benefits": [
        {
          "benefit_id": 1,
          "benefit_type": "sku_discounting",
          "discounts": [
            {
              "discount_id": 1,
              "threshold": 1,
              "discounted_value": 1,
              "discounted_quantity": 1
            }
          ]
        }
      ],
      "external_plan_identifier": "string",
      "plan_image_url": "string",
      "renewed_on": "2025-12-19T16:30:10.408Z",
      "upcoming_renewal": "2023-05-11T05:00:00+05:30",
      "purchase_price": 1,
      "auto_renewal": true,
      "payment_card": {
        "uuid": "string",
        "nickname": "string",
        "preferred": true,
        "card_details": {
          "name_on_card": "string",
          " card_type": "string",
          "cc_4": "string",
          "expiry_month": "string",
          "expiry_year": "string"
        }
      },
      "cancellation_feedback": "string"
    }
  ]
}