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

# Confirm payment completion

> Step 2A: Confirms and completes a pending purchase that was previously registered. IMPORTANT: Expects HTTP error status (3xx, 4xx, 5xx) codes for failed purchases. A declined purchase should also carry a decline in the response body. Where the checkout supports it, Stash uses the decline's status to pick the message shown to the player; otherwise the player sees a generic failure.



## OpenAPI

````yaml /egress-openapi.json post /api/v1/purchase/confirm
openapi: 3.0.0
info:
  title: Stash Web Shop API
  description: >-
    Server-side APIs for Stash web shop integration. This API set includes
    catalog management, purchase processing, and user management endpoints
    designed for server-to-server communication between game backends and Stash
    services.
  version: '1.0'
  contact:
    name: API Support
    url: https://docs.stash.gg/
    email: help@stash.gg
servers: []
security: []
tags:
  - name: Catalog
    description: Product catalog endpoints
  - name: Purchase
    description: Purchase processing endpoints
  - name: Players
    description: Player management endpoints
paths:
  /api/v1/purchase/confirm:
    post:
      tags:
        - Purchase
      summary: Confirm payment completion
      description: >-
        Step 2A: Confirms and completes a pending purchase that was previously
        registered. IMPORTANT: Expects HTTP error status (3xx, 4xx, 5xx) codes
        for failed purchases. A declined purchase should also carry a decline in
        the response body. Where the checkout supports it, Stash uses the
        decline's status to pick the message shown to the player; otherwise the
        player sees a generic failure.
      operationId: ConfirmPayment
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/server.egress.shop.purchase.v1.ConfirmPaymentRequest
        description: >-
          Request to confirm and complete a pending purchase that was previously
          registered.
        required: true
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/server.egress.shop.purchase.v1.ConfirmPaymentResponse
        '400':
          description: >-
            The purchase was declined and nothing was granted. The body is a
            Confirm Payment Response whose decline names the reason. A decline
            is read on any 4xx, and its status field is the only thing that
            carries the reason, so this status is the one to return when no more
            specific code applies.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/server.egress.shop.purchase.v1.ConfirmPaymentResponse
        '404':
          description: >-
            The offer or item no longer exists. Same body as 400; send a decline
            with it whenever one can be named.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/server.egress.shop.purchase.v1.ConfirmPaymentResponse
        '409':
          description: >-
            The purchase conflicts with the current state, such as an exhausted
            allowance or an already fulfilled transaction. Same body as 400;
            send a decline with it whenever one can be named.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/server.egress.shop.purchase.v1.ConfirmPaymentResponse
        '410':
          description: >-
            The offer or item is permanently gone. Same body as 400; send a
            decline with it whenever one can be named.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/server.egress.shop.purchase.v1.ConfirmPaymentResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/google.rpc.Status'
      security:
        - hmac: []
components:
  schemas:
    server.egress.shop.purchase.v1.ConfirmPaymentRequest:
      type: object
      properties:
        playerId:
          type: string
          description: The user confirming the purchase
        transactionId:
          type: string
          description: Transaction identifier to confirm
        checkoutLinkId:
          type: string
          description: >-
            Optional checkout link identifier if purchase was made through a
            checkout link
        orderId:
          type: string
          description: >-
            Stash's order ID for this purchase: the same value as `orderId` in
            the `PURCHASE_SUCCEEDED` webhook for it, so you can record it at
            confirmation without waiting for the webhook. Each payment attempt
            can have its own order ID: if the player pays again after a failed
            attempt, the new confirmation can carry the same `transaction_id`
            with a different `order_id`, and the webhook carries the `order_id`
            of the attempt that was paid. On a web shop cart purchase it equals
            `transaction_id`. Sent only for a shop Stash has turned it on for:
            ask Stash to turn it on for yours. A confirmation without it is
            still valid; take the order ID from the webhook then.
        shopId:
          type: string
          description: >-
            The originating Stash shop identifier (mirrors the shopId sent in
            webhooks)
        environment:
          $ref: '#/components/schemas/server.egress.shop.v1.PaymentEnvironment'
        currency:
          type: string
          description: Currency code (ISO-4217 code, e.g., 'USD', 'EUR')
        decimalPlaces:
          type: integer
          format: int64
          description: >-
            Number of decimal places in this request's `tax`, `total` and
            line-item `cents` values for this ISO 4217 currency, under the
            minor-unit standard configured for your shop: Unicode CLDR release
            32 by default. See `cents` in GetCatalog for the standards a shop
            can use and their sources. Always sent, including the literal 0 for
            zero-decimal currencies (e.g. JPY, KRW).
        tax:
          type: integer
          format: int64
          description: >-
            Tax as integer minor units for this ISO 4217 currency (e.g. 99 for
            $0.99 in USD; can be 0), scaled by this request's `decimalPlaces`
            under the minor-unit standard configured for your shop, the same
            standard Stash reads your catalog prices with (see `cents` in
            GetCatalog). Always sent, including the literal 0 when the purchase
            has no tax.
        taxInclusive:
          type: boolean
          description: >-
            Whether `tax` is already included in the item prices. When true,
            `tax` is the share of `total` that is tax. When false, `tax` is
            added on top. False when `tax` is 0. For a purchase without a cash
            coupon, you can check before granting that `total`, minus `tax` when
            `taxInclusive` is false, equals the sum of `cents` × `quantity`.
            Each of `cents`, `tax` and `total` is rounded down on its own to the
            currency's minor units in CLDR version 32 (the CLDR_32 standard)
            before it is scaled to `decimalPlaces`, and for a few currencies
            (such as COP, which has 0 decimals there) those have fewer decimals
            than ISO 4217 or later CLDR versions list. So when item prices are
            finer than those units, `total` (minus `tax` when `taxInclusive` is
            false) can exceed the sum by less than one such unit per item
            purchased, plus one more when `tax` is added on top; allow that
            difference. A cash coupon lowers `total` by its discount, and this
            request does not carry the discount yet, so these fields alone
            cannot validate a purchase with a cash coupon. Always sent,
            including `false`.
        total:
          type: integer
          format: int64
          description: >-
            Amount charged, as integer minor units for this ISO 4217 currency
            (e.g. 1098 for $10.98 in USD), scaled by this request's
            `decimalPlaces` under the minor-unit standard configured for your
            shop, the same standard Stash reads your catalog prices with (see
            `cents` in GetCatalog). Includes `tax`: added on top of the item
            prices when `taxInclusive` is false, already inside them when true.
        timeMillis:
          type: string
          format: int64
          description: >-
            Timestamp when the purchase was completed (milliseconds since Unix
            epoch)
        paymentMethodType:
          $ref: >-
            #/components/schemas/server.egress.shop.purchase.v1.PaymentMethodType
        items:
          type: array
          items:
            $ref: >-
              #/components/schemas/server.egress.shop.purchase.v1.ConfirmPaymentRequest.PurchasedItem
          description: List of items in this purchase
        platform:
          $ref: '#/components/schemas/server.egress.shop.purchase.v1.PurchasePlatform'
        browser:
          type: string
          description: >-
            Browser information for web purchases (e.g., 'Chrome/91.0',
            'Firefox/89.0', 'Safari/14.1', 'any')
        deviceId:
          type: string
          description: >-
            Device identifier for tracking and fraud prevention (can be
            generated client-side)
        source:
          $ref: '#/components/schemas/server.egress.shop.purchase.v1.PurchaseSource'
        ipAddress:
          type: string
          description: Customer IP address for fraud prevention and compliance
        region:
          type: string
          description: >-
            Region/country code using ISO-3166-1 alpha-2 code (e.g., 'US', 'CA',
            'GB')
        userEmail:
          type: string
          description: Customer email for the purchase
        emailMarketingOptIn:
          type: boolean
          description: Optional flag indicating if customer opted in to email marketing
        bonusItems:
          type: array
          items:
            $ref: >-
              #/components/schemas/server.egress.shop.purchase.v1.ConfirmPaymentRequest.BonusItem
          description: Optional list of bonus items to be granted with the purchase
        loyalty:
          $ref: '#/components/schemas/server.egress.shop.v1.PlayerLoyaltyState'
        valueCode:
          $ref: >-
            #/components/schemas/server.egress.shop.purchase.v1.ConfirmPaymentRequest.ValueCode
      description: >-
        Request to confirm and complete a pending purchase that was previously
        registered.
      title: Confirm Payment Request
      required:
        - decimalPlaces
        - playerId
        - transactionId
        - currency
        - tax
        - taxInclusive
        - total
        - timeMillis
        - items
    server.egress.shop.purchase.v1.ConfirmPaymentResponse:
      type: object
      properties:
        results:
          type: array
          items:
            $ref: >-
              #/components/schemas/server.egress.shop.purchase.v1.ConfirmPaymentResponse.ConfirmPaymentResult
          description: >-
            Results of the confirmed purchases. Present with at least one entry
            on success; omit when declining
        decline:
          $ref: >-
            #/components/schemas/server.egress.shop.purchase.v1.ConfirmPaymentResponse.ConfirmPaymentDecline
      description: >-
        Expected response format for the ConfirmPayment endpoint from the game
        backend. Return exactly one of results or decline: results present and
        decline absent indicates success; decline present indicates the purchase
        was not fulfilled and takes precedence over anything in results. Return
        a decline together with an HTTP 4xx status.
      title: Confirm Payment 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'
    server.egress.shop.v1.PaymentEnvironment:
      type: string
      enum:
        - PAYMENT_ENVIRONMENT_UNSPECIFIED
        - PAYMENT_ENVIRONMENT_TEST
        - PAYMENT_ENVIRONMENT_PRODUCTION
      default: PAYMENT_ENVIRONMENT_UNSPECIFIED
      description: Represents the payment environment for the request
    server.egress.shop.purchase.v1.PaymentMethodType:
      type: string
      enum:
        - PAYMENT_METHOD_TYPE_UNSPECIFIED
        - PAYMENT_METHOD_TYPE_CARD
        - PAYMENT_METHOD_TYPE_APPLE_PAY
        - PAYMENT_METHOD_TYPE_GOOGLE_PAY
        - PAYMENT_METHOD_TYPE_PAYPAL
        - PAYMENT_METHOD_TYPE_KLARNA
        - PAYMENT_METHOD_TYPE_CASH_APP
        - PAYMENT_METHOD_TYPE_AMAZON_PAY
      default: PAYMENT_METHOD_TYPE_UNSPECIFIED
      description: Represents the payment method used for the purchase
      title: |-
        - PAYMENT_METHOD_TYPE_UNSPECIFIED: Default unknown payment method
         - PAYMENT_METHOD_TYPE_CARD: Standard credit/debit card payment
         - PAYMENT_METHOD_TYPE_APPLE_PAY: Apple Pay wallet payment
         - PAYMENT_METHOD_TYPE_GOOGLE_PAY: Google Pay wallet payment
         - PAYMENT_METHOD_TYPE_PAYPAL: PayPal payment
         - PAYMENT_METHOD_TYPE_KLARNA: Klarna buy-now-pay-later payment
         - PAYMENT_METHOD_TYPE_CASH_APP: Cash App Pay payment
         - PAYMENT_METHOD_TYPE_AMAZON_PAY: Amazon Pay wallet payment
    server.egress.shop.purchase.v1.ConfirmPaymentRequest.PurchasedItem:
      type: object
      properties:
        guid:
          type: string
          description: >-
            The offer/product GUID being purchased (can be auto-generated UUID
            v5 if not provided in catalog response)
        productId:
          type: string
          description: The offer/product SKU being purchased
        quantity:
          type: integer
          format: int64
          description: Quantity purchased (must be positive)
        cents:
          type: integer
          format: int64
          description: >-
            Unit price before any cash coupon, as integer minor units per item
            for this ISO 4217 currency (e.g. 999 per item in USD), scaled by
            this request's `decimalPlaces` under the minor-unit standard
            configured for your shop, the same standard Stash reads your catalog
            prices with (see `cents` in GetCatalog).
        purchasePackId:
          type: string
          description: >-
            Identifier of the purchase pack the item was selected from: the
            pack's id in the catalog response the purchase was made from, echoed
            so the purchase can be attributed to the offer as it was displayed
            without a reverse lookup. Required when the selected item came from
            a purchase pack, omitted otherwise; a present but empty value is
            rejected. product_id still identifies which price point was bought.
        metadata:
          type: object
          additionalProperties:
            type: string
          description: Optional key-value pairs for additional item metadata
      description: Represents a single item in the completed purchase
      title: Purchased Item
      required:
        - guid
        - productId
        - quantity
        - cents
    server.egress.shop.purchase.v1.PurchasePlatform:
      type: string
      enum:
        - PURCHASE_PLATFORM_UNSPECIFIED
        - PURCHASE_PLATFORM_IOS
        - PURCHASE_PLATFORM_ANDROID
        - PURCHASE_PLATFORM_WEBSTORE
      default: PURCHASE_PLATFORM_UNSPECIFIED
      description: Represents the platform of the user making the purchase
      title: '- PURCHASE_PLATFORM_UNSPECIFIED: Default unknown platform'
    server.egress.shop.purchase.v1.PurchaseSource:
      type: string
      enum:
        - PURCHASE_SOURCE_UNSPECIFIED
        - PURCHASE_SOURCE_CART
        - PURCHASE_SOURCE_DIRECT
        - PURCHASE_SOURCE_BUY_NOW
      default: PURCHASE_SOURCE_UNSPECIFIED
      description: Represents the source of the purchase for analytics
      title: |-
        - PURCHASE_SOURCE_UNSPECIFIED: Default unknown source
         - PURCHASE_SOURCE_CART: Purchase initiated from cart in webstore
         - PURCHASE_SOURCE_DIRECT: Purchase initiated from direct StashPay checkout link
         - PURCHASE_SOURCE_BUY_NOW: Purchase initiated from webshop, skipping the Cart and going directly to Checkout
    server.egress.shop.purchase.v1.ConfirmPaymentRequest.BonusItem:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the bonus item
        quantity:
          type: integer
          format: int64
          description: Quantity of the bonus item to grant (must be positive)
      description: Represents a bonus item to be granted with the purchase
      title: Bonus Item
      required:
        - id
        - quantity
    server.egress.shop.v1.PlayerLoyaltyState:
      type: object
      properties:
        campaignId:
          type: string
          description: >-
            Identifier of the live loyalty campaign (season) this snapshot is
            scoped to.
        totalPoints:
          type: integer
          format: int64
          description: The player's loyalty points balance for this campaign.
        pointsDelta:
          type: integer
          format: int32
          description: >-
            Signed change in the loyalty points balance caused by the associated
            event (for example, a purchase); negative on a refund reversal, zero
            when the balance did not change.
        currentTierId:
          type: string
          description: >-
            The player's current tier, as the partner-facing tier identifier.
            Omitted when no tier matches the balance.
        previousTierId:
          type: string
          description: >-
            The player's prior tier, set only when the associated event changed
            the tier. Omitted when the tier did not change.
        pointsToNextTier:
          type: integer
          format: int64
          description: >-
            Loyalty points still needed to reach the next tier. Omitted when the
            player is already at the top tier.
        pointsToNextMilestone:
          type: integer
          format: int64
          description: >-
            Loyalty points still needed to reach the next unreached milestone.
            Omitted when there is no further milestone.
        nextMilestone:
          $ref: >-
            #/components/schemas/server.egress.shop.v1.PlayerLoyaltyState.Milestone
        pointsMultiplierPermille:
          type: integer
          format: int64
          description: >-
            The effective (applied) points-earning multiplier for the player's
            current loyalty tier, relative to the base (lowest) tier, expressed
            in permille; divide by 1000 (1500 = 1.5x; base tier = 1000). Exact
            per-tier rates are available in the tier configuration.
        unlockedMilestones:
          type: array
          items:
            $ref: >-
              #/components/schemas/server.egress.shop.v1.PlayerLoyaltyState.Milestone
          description: >-
            The loyalty milestones this event's points gain crossed, each
            including every reward it grants, ordered by ascending threshold.
            Omitted when the event crossed no threshold; never present when the
            balance did not increase. May contain more than one entry, and never
            overlaps next_milestone.
      description: >-
        A player's standing in a shop's active loyalty campaign at a point in
        time.
      title: Player Loyalty State
    server.egress.shop.purchase.v1.ConfirmPaymentRequest.ValueCode:
      type: object
      properties:
        code:
          type: string
          description: >-
            The code as it is configured for the shop (e.g., 'WELCOME20'), not
            as the player typed it
        rewards:
          type: array
          items:
            $ref: >-
              #/components/schemas/server.egress.shop.purchase.v1.ConfirmPaymentRequest.ValueCode.Reward
          description: 1 entry per bonus that the code adds to
      description: >-
        A value code that the player applied to this purchase: a code that
        grants more of a bonus at the full price. It never changes the price.
      title: Value Code
      required:
        - code
        - rewards
    server.egress.shop.purchase.v1.ConfirmPaymentResponse.ConfirmPaymentResult:
      type: object
      properties:
        guid:
          type: string
          description: >-
            The offer/product GUID that was registered (providing this OR
            product_id is required)
        productId:
          type: string
          description: >-
            The offer/product SKU that was registered (providing this OR guid is
            required)
      description: Represents the result of a confirmed purchase
      title: Confirm Payment Result
    server.egress.shop.purchase.v1.ConfirmPaymentResponse.ConfirmPaymentDecline:
      type: object
      properties:
        guid:
          type: string
          description: >-
            Optional offer/product GUID the decline applies to, when a single
            item caused it
        productId:
          type: string
          description: >-
            Optional offer/product SKU the decline applies to, when a single
            item caused it
        status:
          $ref: >-
            #/components/schemas/server.egress.shop.purchase.v1.PurchaseConfirmationStatus
        message:
          type: string
          description: Optional human-readable status message for debugging
      description: >-
        Structured reason a purchase confirmation was declined. When present, no
        item of the purchase may have been granted and the payment is not
        completed.
      title: Confirm Payment Decline
      required:
        - status
    google.protobuf.Any:
      type: object
      properties:
        '@type':
          type: string
      additionalProperties: {}
    server.egress.shop.v1.PlayerLoyaltyState.Milestone:
      type: object
      properties:
        milestoneId:
          type: string
          description: >-
            Identifier of the milestone; the same identifier reported as
            milestoneId on the loyalty milestone claimed event and by the
            loyalty read API.
        rewards:
          type: array
          items:
            $ref: >-
              #/components/schemas/server.egress.shop.v1.PlayerLoyaltyState.MilestoneRewardItem
          description: All rewards granted when this milestone is reached.
      description: A loyalty milestone and the rewards it grants.
      title: Milestone
    server.egress.shop.purchase.v1.ConfirmPaymentRequest.ValueCode.Reward:
      type: object
      properties:
        bonusId:
          type: string
          description: >-
            The bonus this reward adds to: the id of the bonus in your catalog's
            bonus items. For a percent reward, it is also an `id` in
            `bonus_items`, unless the purchase has none of this bonus; then
            `extra_quantity` is 0. A flat-amount reward can name a bonus that
            the purchase does not hold, so its id is not always in `bonus_items`
        kind:
          $ref: >-
            #/components/schemas/server.egress.shop.purchase.v1.ValueCodeRewardKind
        multiplierPermille:
          type: integer
          format: int64
          description: >-
            Sent for a percent reward only. The multiplier for the full quantity
            of this bonus in the purchase, the offer's own bonus included, in
            thousandths: 1200 means 1.2 times, so +20%. The unrounded extra is
            that quantity times (multiplier_permille - 1000) / 1000. The extra
            to grant is `extra_quantity`. Grant the bonus in `bonus_items` and
            `extra_quantity`; the extra is not in `bonus_items`, so nothing
            counts twice.
        extraQuantity:
          type: integer
          format: int64
          description: >-
            Sent for a percent reward only. The extra units to grant, computed
            by Stash from `multiplier_permille` and rounded to a whole number
            under the rounding rule agreed for your shop (by default up, to 2
            significant digits and never finer than 1 unit: 20% of 333 is 67,
            20% of 33 is 7). You can also compute your own from
            `multiplier_permille` to cross-check. Always sent for a percent
            reward, including the literal 0 when the purchase has none of this
            bonus; absent only when the extra does not fit in 32 bits, and then
            grant from `multiplier_permille`.
        amount:
          type: integer
          format: int64
          description: >-
            Sent for a flat-amount reward only. The extra units of this bonus to
            grant, also when the purchase has none of this bonus. Always more
            than 0: a reward of 0 is not sent. Not a money amount.
      description: The extra that the code grants on 1 bonus.
      title: Value Code Reward
      required:
        - bonusId
        - kind
    server.egress.shop.purchase.v1.PurchaseConfirmationStatus:
      type: string
      enum:
        - PURCHASE_CONFIRMATION_STATUS_UNSPECIFIED
        - PURCHASE_CONFIRMATION_STATUS_FAILED_INVALID_OFFER
        - PURCHASE_CONFIRMATION_STATUS_FAILED_INSUFFICIENT_INVENTORY
        - PURCHASE_CONFIRMATION_STATUS_FAILED_PURCHASE_LIMIT_EXCEEDED
        - PURCHASE_CONFIRMATION_STATUS_FAILED_INVALID_PRICE
        - PURCHASE_CONFIRMATION_STATUS_FAILED_PURCHASE_LOCKED
        - PURCHASE_CONFIRMATION_STATUS_FAILED_PACK_LIMIT_EXCEEDED
      default: PURCHASE_CONFIRMATION_STATUS_UNSPECIFIED
      description: Represents why a purchase confirmation was declined
      title: >-
        - PURCHASE_CONFIRMATION_STATUS_UNSPECIFIED: Default unknown confirmation
        decline status
         - PURCHASE_CONFIRMATION_STATUS_FAILED_INVALID_OFFER: Confirmation was declined because the offer is invalid or no longer exists
         - PURCHASE_CONFIRMATION_STATUS_FAILED_INSUFFICIENT_INVENTORY: Confirmation was declined because a stock shared across players is lower
        than the quantity purchased, for example 0. When only this player's own

        remaining count is too low, use

        PURCHASE_CONFIRMATION_STATUS_FAILED_PURCHASE_LIMIT_EXCEEDED
         - PURCHASE_CONFIRMATION_STATUS_FAILED_PURCHASE_LIMIT_EXCEEDED: Confirmation was declined because this player cannot buy this many more of
        the item: the item's own remaining count, which the catalog sends as

        max_purchasable, is lower than the quantity purchased, for example 0
         - PURCHASE_CONFIRMATION_STATUS_FAILED_INVALID_PRICE: Confirmation was declined due to invalid pricing
         - PURCHASE_CONFIRMATION_STATUS_FAILED_PURCHASE_LOCKED: Confirmation was declined because the purchase is locked, e.g. in-app only
         - PURCHASE_CONFIRMATION_STATUS_FAILED_PACK_LIMIT_EXCEEDED: Confirmation was declined because this player cannot buy this many more
        from the purchase pack this item belongs to: the pack's remaining count,

        max_purchasable on the pack, is lower than the quantity purchased, for

        example 0, which applies to every item of the pack. The pack is the

        purchase pack catalog item whose id was echoed as purchase_pack_id on
        the

        purchased item. Use

        PURCHASE_CONFIRMATION_STATUS_FAILED_PURCHASE_LIMIT_EXCEEDED when only
        the

        item's own count is too low
    server.egress.shop.v1.PlayerLoyaltyState.MilestoneRewardItem:
      type: object
      properties:
        itemId:
          type: string
          description: >-
            Identifier of the reward: a shop bonus identifier for
            currency/points rewards, or the product's external identifier (SKU)
            for product rewards.
        quantity:
          type: integer
          format: int64
          description: Amount of the reward granted.
        type:
          $ref: '#/components/schemas/server.egress.shop.v1.LoyaltyRewardType'
      description: A single reward granted when a loyalty milestone is reached.
      title: Milestone Reward Item
    server.egress.shop.purchase.v1.ValueCodeRewardKind:
      type: string
      enum:
        - VALUE_CODE_REWARD_KIND_UNSPECIFIED
        - VALUE_CODE_REWARD_KIND_PERCENT
        - VALUE_CODE_REWARD_KIND_AMOUNT
      default: VALUE_CODE_REWARD_KIND_UNSPECIFIED
      description: How a value code reward computes its extra
      title: >-
        - VALUE_CODE_REWARD_KIND_UNSPECIFIED: Never sent: every reward names its
        kind. Treat a reward with this kind as invalid: skip it and grant the
        rest of the purchase
         - VALUE_CODE_REWARD_KIND_PERCENT: The extra is a percentage of the bonus's full quantity in the purchase, sent as `multiplier_permille`
         - VALUE_CODE_REWARD_KIND_AMOUNT: The extra is a flat number of units of the bonus, sent as `amount`
    server.egress.shop.v1.LoyaltyRewardType:
      type: string
      enum:
        - LOYALTY_REWARD_TYPE_UNSPECIFIED
        - LOYALTY_REWARD_TYPE_IN_GAME_CURRENCY
        - LOYALTY_REWARD_TYPE_LOYALTY_CURRENCY
        - LOYALTY_REWARD_TYPE_LOYALTY_POINTS
        - LOYALTY_REWARD_TYPE_SKU_ITEM
      default: LOYALTY_REWARD_TYPE_UNSPECIFIED
      description: The kind of reward granted at a loyalty milestone.
  securitySchemes:
    hmac:
      type: apiKey
      description: >-
        Versioned HMAC-SHA256 signature for server-to-server communication
        between game backends and Stash services. Recommended over the
        deprecated legacyHmac scheme for the best security. Header format:
        v1;{shopId};{unixMillisTimestamp};{base64Signature}
        (semicolon-delimited). {base64Signature} is the base64-encoded
        HMAC-SHA256 of the string {unixMillisTimestamp}.{requestBody} signed
        with your Egress API key, where {requestBody} is the compact request
        JSON. The timestamp must be within 5 minutes of Stash server time. Your
        shopId is your immutable shop identifier; it and your Egress API key are
        available in Stash Studio under Project Settings > API Secrets.
      name: x-stash-hmac-signature
      in: header

````

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