post-api2-mobile-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 these values: ‘expired’, ‘renewed’, ‘soft_cancelled’, and ‘hard_cancelled’.'

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

    Used to authorize the request with access_token. It should 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

  • User-Agent
    Type: string
    required

    Used to identify the software, device, and application initiating the request, providing information about the client to the server. For details, see User Agent.

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

  • Accept
    Type: string
    required

    Advertises which content types the client can understand

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

  • 400
    Type: object
    • errors
      Type: object
  • 401
    Type: object
    • errors
      Type: object
  • 412
    Type: object
    • errors
      Type: object
  • 422
    Type: object
    • errors
      Type: object
get/api2/mobile/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:02.130Z",
      "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:02.130Z",
      "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"
    }
  ]
}