> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stash.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# Get payments by subscription ID

> Retrieves payments associated with a subscription with pagination support. Returns a list of payment objects including payment ID, amount, currency, a succeeded indicator, and timestamps. Use the `next_page_token` from the response to fetch the next page.



## OpenAPI

````yaml /ingress-openapi.json get /sdk/subscriptions/{id}/payments
openapi: 3.0.0
info:
  title: Stash API
  description: >-
    Set of APIs for integrating Stash functionality into games. API set includes
    authentication, payment processing, checkout links, user management, and
    various platform-specific integrations. The API supports both client-side
    and server-side implementations with appropriate security measures for each
    context.
  version: '1.0'
servers:
  - url: https://test-api.stash.gg
security: []
tags:
  - name: Catalog
    description: >-
      Server-side catalog endpoints for shops with a real-time catalog
      integration.
  - name: Launcher Payment
    description: Payment processing endpoints for Stash Launcher.
  - name: Subscription Checkout Links
    description: Checkout link generation for subscription purchases
  - name: Webshop Account Linking
    description: >-
      Authentication endpoints for integrating third-party login providers or
      custom login with Stash Webshops.
  - name: Payments
    description: Payment history and transaction management endpoints
  - name: Pricing
    description: Server-side pricing endpoints for fetching uploaded price sheet data
  - name: Stash Pay
    description: Server-side quick payment endpoints for internal use
  - name: Web Shop
    description: Server-side endpoints that control your web shop.
  - name: Subscription Plans
    description: Retrieve subscription plan details and pricing
  - name: Subscriptions
    description: Manage player subscriptions - retrieve, cancel, and reactivate
  - name: Server URLs
    description: Server-side URL generation endpoints for authenticated URLs
  - name: User Preferences
    description: User preferences management endpoints for payment channel preferences
  - name: Loyalty
    description: >-
      Endpoints for reading a shop's loyalty program and, for enabled shops,
      configuring it
  - name: Localization
    description: >-
      Endpoints for refreshing a shop's localizations from its localization
      source
  - name: Reports
    description: >-
      Endpoints for listing a shop's daily transaction files and downloading
      them through signed links
paths:
  /sdk/subscriptions/{id}/payments:
    get:
      tags:
        - Subscriptions
      summary: Get payments by subscription ID
      description: >-
        Retrieves payments associated with a subscription with pagination
        support. Returns a list of payment objects including payment ID, amount,
        currency, a succeeded indicator, and timestamps. Use the
        `next_page_token` from the response to fetch the next page.
      operationId: GetPaymentsBySubscriptionId
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: limit
          description: >-
            Maximum number of results to return per page. Defaults to 50 if not
            provided. Maximum allowed value is 100.
          in: query
          required: false
          schema:
            type: integer
            format: int64
        - name: pageToken
          description: >-
            Opaque page token for pagination. Use the next_page_token from the
            previous response to fetch the next page. Omit for first page.
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/pie.sdk.subscription.GetPaymentsBySubscriptionIdResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/google.rpc.Status'
      security:
        - bearerAuth: []
        - hmac: []
        - deprecatedApiKey: []
components:
  schemas:
    pie.sdk.subscription.GetPaymentsBySubscriptionIdResponse:
      type: object
      properties:
        payments:
          type: array
          items:
            $ref: '#/components/schemas/pie.subscription.SubscriptionPayment'
        nextPageToken:
          type: string
          description: >-
            Next page token for pagination. If null, there are no more results.
            Use this value as the page_token parameter in the next request to
            fetch the next page.
      title: GetPaymentsBySubscriptionId response
    google.rpc.Status:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/google.protobuf.Any'
    pie.subscription.SubscriptionPayment:
      type: object
      properties:
        paymentId:
          type: string
        amountCents:
          type: string
          format: int64
          description: >-
            The amount of the payment in the smallest currency unit using CLDR
            standard.

            E.g. $10.00 is 1000.
        currency:
          type: string
          description: The 3-letter ISO-4217 currency code.
        totalTaxAmountCents:
          type: string
          format: int64
          description: Tax amount in the smallest currency unit using CLDR standard.
        taxInclusive:
          type: boolean
          description: Whether the tax amount is inclusive of the subtotal or not.
        succeeded:
          type: boolean
          description: Whether the payment succeeded or not.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        status:
          $ref: '#/components/schemas/pie.subscription.SubscriptionPaymentStatus'
        paymentContext:
          $ref: '#/components/schemas/pie.payments.PaymentContext'
        checkoutLinkId:
          type: string
          title: >-
            The checkout link ID associated with the payment. This is only
            supplied for

            subscription creation payments and subscription upgrade payments,
            not

            renewal payments (as they aren't associated with a checkout link ID)
        enrichmentFields:
          $ref: >-
            #/components/schemas/pie.subscription.SubscriptionPayment.EnrichmentFields
      required:
        - paymentId
        - amountCents
        - currency
        - succeeded
        - createdAt
        - updatedAt
    google.protobuf.Any:
      type: object
      properties:
        '@type':
          type: string
      additionalProperties: {}
    pie.subscription.SubscriptionPaymentStatus:
      type: string
      enum:
        - SUBSCRIPTION_PAYMENT_STATUS_UNSPECIFIED
        - SUBSCRIPTION_PAYMENT_STATUS_SUCCEEDED
        - SUBSCRIPTION_PAYMENT_STATUS_FAILED
        - SUBSCRIPTION_PAYMENT_STATUS_REFUNDED
        - SUBSCRIPTION_PAYMENT_STATUS_PARTIAL_REFUND
        - SUBSCRIPTION_PAYMENT_STATUS_REFUND_PENDING
      default: SUBSCRIPTION_PAYMENT_STATUS_UNSPECIFIED
      description: >-
        SubscriptionPaymentStatus represents the display status of a
        subscription payment.
    pie.payments.PaymentContext:
      type: string
      enum:
        - PAYMENT_CONTEXT_UNSPECIFIED
        - PAYMENT_CONTEXT_ONE_TIME_PURCHASE
        - PAYMENT_CONTEXT_SUBSCRIPTION_CREATION
        - PAYMENT_CONTEXT_SUBSCRIPTION_RENEWAL
        - PAYMENT_CONTEXT_SUBSCRIPTION_UPGRADE
      default: PAYMENT_CONTEXT_UNSPECIFIED
    pie.subscription.SubscriptionPayment.EnrichmentFields:
      type: object
      properties:
        subscriptionId:
          type: string
          description: Subscription ID (= series_reference_id from payments enrichment).
        externalAccountId:
          type: string
          description: External account ID for the subscriber.
        normalizedDeclineClass:
          type: string
          description: >-
            Decline class / raw code from the relevant attempt (empty when
            unavailable).
        rawDeclineCode:
          type: string
        paymentMethodSubType:
          type: string
          description: Card network (Payments.PaymentMethodSubType), e.g. VISA, MASTERCARD.
        issuerBank:
          type: string
          description: >-
            Normalized issuing bank from BIN enrichment (empty when
            unavailable).
      description: |-
        Populated by ListSubscriptionPayments; omitted by
        GetPaymentsBySubscriptionId.
  securitySchemes:
    bearerAuth:
      type: apiKey
      description: >-
        Bearer token authentication for client-side SDK operations. Format:
        'Authorization: Bearer <token>'
      name: Authorization
      in: header
    hmac:
      type: apiKey
      description: >-
        Versioned HMAC-SHA256 signature authenticating server-to-server SDK
        requests (your backend calling Stash), as opposed to client-side SDK
        operations. Recommended over the deprecated X-Stash-Api-Key for the best
        security. Header format:
        v1;{appId};{unixMillisTimestamp};{base64Signature}
        (semicolon-delimited). {base64Signature} is the base64-encoded
        HMAC-SHA256 of the string {unixMillisTimestamp}.{requestBody} using your
        app ingress secret (the ingress secret is shown base64-encoded in
        Studio; base64-decode it to the raw bytes used as the HMAC key), where
        {requestBody} is the request body exactly as you send it for POST and
        PUT requests (the compact canonical request JSON is also accepted) and
        empty for GET requests. A signature over the exact bytes verifies for
        bodies of up to 18 KiB (18,432 bytes); a larger body may be refused with
        401 even when correctly signed. The timestamp must be within 5 minutes
        of Stash server time. Your appId is your immutable app identifier, shown
        in Stash Studio under Project Settings > App details; your ingress
        secret is under Project Settings > API Secrets.
      name: x-stash-hmac-signature
      in: header
    deprecatedApiKey:
      type: apiKey
      description: >-
        DEPRECATED: API key authentication (X-Stash-Api-Key) is not supported
        for shops or API keys created on or after 2026-08-15; those must use
        HMAC authentication via the x-stash-hmac-signature header. Shops and
        keys created before the cutoff may continue using their X-Stash-Api-Key
        for server-to-server operations, but are encouraged to migrate to HMAC
        as soon as possible for the best security.
      name: X-Stash-Api-Key
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.