> ## 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 payment event by ID

> Retrieves payment details by ID. Returns information about items, pricing, and payment status. This is a server-side endpoint and should not be called from the client.



## OpenAPI

````yaml /ingress-openapi.json get /sdk/server/payment/{id}
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/server/payment/{id}:
    get:
      tags:
        - Payments
      summary: Get payment event by ID
      description: >-
        Retrieves payment details by ID. Returns information about items,
        pricing, and payment status. This is a server-side endpoint and should
        not be called from the client.
      operationId: GetPaymentEvent
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pie.sdk.payment.GetPaymentEventResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/google.rpc.Status'
      security:
        - hmac: []
        - deprecatedApiKey: []
components:
  schemas:
    pie.sdk.payment.GetPaymentEventResponse:
      type: object
      properties:
        status:
          $ref: >-
            #/components/schemas/pie.sdk.payment.GetPaymentEventResponse.PaymentStatus
        items:
          type: array
          items:
            $ref: '#/components/schemas/pie.sdk.payment.GetPaymentEventResponse.Item'
          description: List of items in the payment
        timeMillis:
          type: string
          format: int64
          description: Payment timestamp in milliseconds since epoch
        currency:
          type: string
          description: ISO-4217 currency code (e.g., USD, EUR)
        region:
          type: string
          description: >-
            ISO 3166-1 alpha-2 country code of the payer. Absent when not
            available.
        total:
          type: string
          description: Total payment amount as string
        tax:
          type: string
          description: Tax amount as string
        taxInclusive:
          type: boolean
          description: >-
            Whether `tax` is already included in the item prices. Returned only
            for shops that Stash has opted in to this field; for every other
            shop it is always omitted, whatever the payment's tax mode. Even for
            an opted-in shop it can occasionally be missing, so treat a missing
            value as unknown, never as false. When true, `total` equals the sum
            of `pricePerItem` × `quantity` and `tax` is the share inside it.
            When false, `tax` is added on top. For an opted-in shop, this field
            is not set when Stash cannot tell how the payment was taxed, or when
            this response's `total` does not include tax added on top, whatever
            `tax` says; otherwise it is false when `tax` is 0 or not set. To
            check: `total`, minus `tax` when `taxInclusive` is false, equals the
            sum of `pricePerItem` × `quantity`. `total` and `tax` are whole
            amounts in the currency's minor units in CLDR version 32 (for a few
            currencies, such as COP with 0 decimals there, fewer decimals than
            ISO 4217 or later CLDR versions list), while `pricePerItem` is the
            exact item price, so when item prices are finer than those units,
            `total` (minus `tax` when `taxInclusive` is false) can differ from
            the sum by less than one such unit per item purchased, plus one when
            `tax` is added on top; allow that difference. Purchases with a cash
            coupon also need the discount, which this response does not carry.
            Some payments return no `items`; their total cannot be checked from
            this response.
        bonusItems:
          type: array
          items:
            $ref: >-
              #/components/schemas/pie.sdk.payment.GetPaymentEventResponse.BonusItem
          description: List of bonus items included with the purchase
      required:
        - status
        - timeMillis
        - currency
    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.sdk.payment.GetPaymentEventResponse.PaymentStatus:
      type: string
      enum:
        - PAYMENT_STATUS_UNSPECIFIED
        - PAYMENT_STATUS_PAYMENT_PENDING
        - PAYMENT_STATUS_PAYMENT_SUCCESS
        - PAYMENT_STATUS_PAYMENT_FAILURE
        - PAYMENT_STATUS_REFUND_SUCCESS
        - PAYMENT_STATUS_REFUND_FAILURE
        - PAYMENT_STATUS_UNKNOWN
        - PAYMENT_STATUS_PAYMENT_CANCELLED
        - PAYMENT_STATUS_PAYMENT_ABANDONED
      default: PAYMENT_STATUS_UNSPECIFIED
      description: ' - PAYMENT_STATUS_PAYMENT_ABANDONED: Terminal: buyer never completed; swept by the abandonment job.'
    pie.sdk.payment.GetPaymentEventResponse.Item:
      type: object
      properties:
        id:
          type: string
          description: Item ID
        pricePerItem:
          type: string
          description: Price per item as string
        quantity:
          type: integer
          format: int64
          description: Quantity of items
        name:
          type: string
          description: Item name. Used to display the item name in the checkout page.
        description:
          type: string
          description: >-
            Optional item description. Used to display the item description in
            the checkout page.
      required:
        - id
        - pricePerItem
        - quantity
        - name
    pie.sdk.payment.GetPaymentEventResponse.BonusItem:
      type: object
      properties:
        id:
          type: string
          description: Bonus item ID
        name:
          type: string
          description: Bonus item name
        quantity:
          type: integer
          format: int64
          description: Quantity of the bonus item
        description:
          type: string
          description: Optional description of the bonus item
      required:
        - id
        - name
        - quantity
    google.protobuf.Any:
      type: object
      properties:
        '@type':
          type: string
      additionalProperties: {}
  securitySchemes:
    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.