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

# Generate Checkout

> Generates a quick payment URL for server-side operations. This endpoint is used internally for creating payment links with user information.



## OpenAPI

````yaml /ingress-openapi.json post /sdk/server/checkout_links/generate_quick_pay_url
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/checkout_links/generate_quick_pay_url:
    post:
      tags:
        - Stash Pay
      summary: Generate Checkout
      description: >-
        Generates a quick payment URL for server-side operations. This endpoint
        is used internally for creating payment links with user information.
      operationId: GenerateQuickPayUrl
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/pie.sdk.quickpay.GenerateQuickPayUrlRequest'
        required: true
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/pie.sdk.quickpay.GenerateQuickPayUrlResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/google.rpc.Status'
      security:
        - hmac: []
        - deprecatedApiKey: []
components:
  schemas:
    pie.sdk.quickpay.GenerateQuickPayUrlRequest:
      type: object
      properties:
        item:
          $ref: >-
            #/components/schemas/pie.sdk.quickpay.GenerateQuickPayUrlRequest.Item
        bonusItems:
          type: array
          items:
            $ref: >-
              #/components/schemas/pie.sdk.quickpay.GenerateQuickPayUrlRequest.BonusItem
          description: >-
            Optional bonus items to include with the purchase. These are free
            items granted alongside the main item. Works with either item or
            catalog_items. A bonus whose id matches a bonus set up in Stash for
            the purchased product replaces that bonus, so only the amount sent
            here is granted for that id; a bonus with any other id is granted in
            addition. Each quantity is granted exactly as sent and is not
            multiplied by the item quantity. Each id may appear only once: a
            request that repeats an id is rejected, and no checkout link is
            created.
        user:
          $ref: >-
            #/components/schemas/pie.sdk.quickpay.GenerateQuickPayUrlRequest.User
        transactionId:
          type: string
          description: Optional transaction ID for tracking
        regionCode:
          type: string
          description: Region code (2-3 letter country code, defaults to US if not set)
        currency:
          type: string
          description: ISO-4217 Currency code (currently only USD supported)
        catalogItems:
          type: array
          items:
            $ref: >-
              #/components/schemas/pie.sdk.quickpay.GenerateQuickPayUrlRequest.CatalogItem
          description: >-
            Managed Catalog SKUs (id + quantity) to resolve server-side.
            Requires the shop to have managed catalog enabled. Mutually
            exclusive with item; provide exactly one of the two.
        checkoutSessionId:
          type: string
          description: >-
            Optional checkout-session id (the per-tab analytics session for this
            checkout, shared with telemetry and the funnel webhooks); persisted
            on the order. Distinct from the multi-PSP payment session_id used
            during authorization.
        successUrl:
          type: string
          description: >-
            Optional absolute URL the player is sent to once the payment
            succeeds, instead of the Stash Pay success screen. Any host is
            accepted; javascript, data, vbscript, blob and file URLs are
            rejected. Maximum 2048 characters. When checkout runs in an iframe,
            the iframe itself navigates here: the page must allow being framed,
            and browsers can block an app deeplink scheme opened from a
            cross-origin iframe.
        failureUrl:
          type: string
          description: >-
            Optional absolute URL the player is sent to instead of the Stash Pay
            payment-failed screen. Same rules as success_url. Checkout keeps the
            player instead of redirecting when they can retry there (a decline
            shown inline, or a network error while finishing the payment) and
            when the payment went through but could not be finished. The iframe
            and app deeplink limits of success_url apply.
    pie.sdk.quickpay.GenerateQuickPayUrlResponse:
      type: object
      properties:
        url:
          type: string
          description: Generated quick payment URL
        id:
          type: string
          description: Unique payment link ID
        regionCode:
          type: string
          description: Region code used for the payment
    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.quickpay.GenerateQuickPayUrlRequest.Item:
      type: object
      properties:
        id:
          type: string
          description: Item ID
        pricePerItem:
          type: string
          description: >-
            Major-unit decimal price:


            - `"4.99"` + `"USD"` = 4.99 USD


            Setting both `pricePerItem` and `pricePerItemCldrMinorUnits` will
            result in a `400 Bad Request` error. Omit both for server-side price
            resolution.
        pricePerItemCldrMinorUnits:
          type: string
          description: >-
            Price as an integer in the currency's minor units:


            - `"499"` + `"USD"` = 4.99 USD

            - `"500"` + `"JPY"` = 500 JPY


            Setting both `pricePerItem` and `pricePerItemCldrMinorUnits` will
            result in a `400 Bad Request` error. Omit both for server-side price
            resolution.


            **Important:** the number of decimal places per currency follows the
            minor-unit standard configured for your shop. The default is Unicode
            CLDR release 32: the `digits` values under `fractions` in
            https://github.com/unicode-org/cldr/blob/release-32/common/supplemental/supplementalData.xml
            (2 for a currency not listed there). A shop can instead be
            configured for Unicode CLDR release 47
            (https://github.com/unicode-org/cldr/blob/release-47/common/supplemental/supplementalData.xml)
            or ISO 4217
            (https://www.six-group.com/dam/download/financial-information/data-center/iso-currrency/lists/list-one.xml).
            The standards disagree for some currencies: COP, IDR, PKR and TZS
            have 0 decimal places under CLDR release 32 and 2 under CLDR release
            47 and ISO 4217, so `"390000"` + `"COP"` is 390,000 COP under the
            default and 3,900 COP under the other two. To use a standard other
            than the default, contact your Stash engineering partner.


            A price with more decimal places than CLDR release 32 gives the
            currency is rejected with a `400 Bad Request` error, whichever
            standard your shop uses. For example, on a shop configured for CLDR
            release 47, `"390050"` + `"COP"` (3,900.50 COP) is rejected.
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Optional key-value metadata to associate with this item. Passed
            through to the PURCHASE_SUCCEEDED webhook under this item's
            additional_metadata field. Values must be strings.
        quantity:
          type: integer
          format: int64
          description: Quantity of items
        imageUrl:
          type: string
          description: Item image URL. Used to display the item image in the checkout page.
        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.
        contentItems:
          type: array
          items:
            $ref: >-
              #/components/schemas/pie.sdk.quickpay.GenerateQuickPayUrlRequest.Item.ContentItem
          description: >-
            Optional display-only content breakdown shown in the checkout order
            summary (e.g. "Rubies x500"). Purely presentational: it carries no
            pricing or entitlement semantics and does not affect the amount
            charged or what the purchase grants. Each entry's displayName is
            shown on hover. When set, it takes precedence over server-side
            catalog enrichment for the content breakdown only; bonus items
            resolve independently. Not supported on Galleon-rendered shops: the
            field is ignored there.
        guid:
          type: string
          description: >-
            Optional catalog GUID of the exact item being bought, for a shop
            whose catalog Stash reads. Several catalog items can share one `id`,
            for example the same product offered in two sections with different
            bonuses. Set this to the `guid` your catalog returned for the item
            the player chose (only possible when your catalog sends a `guid` for
            each item), and the bonuses your catalog gives that item are granted
            with the purchase, as the cart grants them. When set, it must name
            an item available to this user whose product id equals `id` and that
            has at least `quantity` units left for this user, otherwise the
            request is rejected. When unset, catalog bonuses are not granted:
            the purchase grants the `bonus_items` you send and any bonuses
            configured in Stash for `id`, as before.
    pie.sdk.quickpay.GenerateQuickPayUrlRequest.BonusItem:
      type: object
      properties:
        id:
          type: string
          description: >-
            Identifier of the bonus item. Each id may appear only once in
            `bonus_items`; a request that repeats an id is rejected.
        name:
          type: string
          description: Display name of the bonus item
        imageUrl:
          type: string
          description: Image URL for the bonus item
        quantity:
          type: integer
          format: int64
          description: Quantity of bonus items to grant
        description:
          type: string
          description: Optional description of the bonus item
        bonusClassification:
          $ref: >-
            #/components/schemas/pie.sdk.quickpay.GenerateQuickPayUrlRequest.BonusItem.BonusClassification
      title: >-
        Bonus items to include with the purchase (free items granted alongside
        the main item)
    pie.sdk.quickpay.GenerateQuickPayUrlRequest.User:
      type: object
      properties:
        id:
          type: string
          description: User ID from the game/application
        validatedEmail:
          type: string
          description: Optional validated email address
        profileImageUrl:
          type: string
          description: Optional profile image URL
        displayName:
          type: string
          description: Optional display name
        regionCode:
          type: string
          description: Optional region code (2-3 letter country code)
        platform:
          $ref: '#/components/schemas/pie.sdk.quickpay.Platform'
        payerIp:
          type: string
          description: Optional payer IP address, this is player IP address in most cases
        paymentUserReference:
          type: string
          description: >-
            This is currently a no-op but will soon be available for use.
            Optional payment user reference. This is used for saving and
            retrieving saved payment methods. If saved payment methods should
            only be scoped to a device, use a device identifier. If saved
            payment methods should be scoped to a account, use an account
            identifier. If not provided, defaults to using the `user.id` field
            (account scoped behavior).
    pie.sdk.quickpay.GenerateQuickPayUrlRequest.CatalogItem:
      type: object
      properties:
        id:
          type: string
          description: >-
            Managed Catalog SKU (the product's external ID) to resolve price and
            details from.
        quantity:
          type: integer
          format: int64
          description: Quantity of this SKU to purchase
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Optional key-value metadata to associate with this catalog item.
            Passed through to the PURCHASE_SUCCEEDED webhook under this item's
            additional_metadata field. Values must be strings.
    google.protobuf.Any:
      type: object
      properties:
        '@type':
          type: string
      additionalProperties: {}
    pie.sdk.quickpay.GenerateQuickPayUrlRequest.Item.ContentItem:
      type: object
      properties:
        imageUrl:
          type: string
          description: Icon URL for this content entry.
        quantity:
          type: integer
          format: int64
          description: Amount of this content entry included in the item.
        displayName:
          type: string
          description: Optional name for this content entry, shown on hover.
        type:
          $ref: >-
            #/components/schemas/pie.sdk.quickpay.GenerateQuickPayUrlRequest.Item.ContentItem.ContentItemType
      description: |-
        ContentItem is one entry in the item's content breakdown (what the pack
        contains, e.g. "Rubies x500").
    pie.sdk.quickpay.GenerateQuickPayUrlRequest.BonusItem.BonusClassification:
      type: string
      enum:
        - BONUS_CLASSIFICATION_UNSPECIFIED
        - BONUS_CLASSIFICATION_ORDINARY
        - BONUS_CLASSIFICATION_ONE_TIME_BONUS
      default: BONUS_CLASSIFICATION_UNSPECIFIED
      description: |-
        How checkout presents a bonus.

         - BONUS_CLASSIFICATION_UNSPECIFIED: Unset; behaves as BONUS_CLASSIFICATION_ORDINARY.
         - BONUS_CLASSIFICATION_ORDINARY: An ordinary bonus granted with every qualifying purchase.
         - BONUS_CLASSIFICATION_ONE_TIME_BONUS: A bonus the partner grants only once, such as an activation reward. Presentation only: Stash never enforces it.
    pie.sdk.quickpay.Platform:
      type: string
      enum:
        - UNDEFINED
        - IOS
        - ANDROID
      default: UNDEFINED
    pie.sdk.quickpay.GenerateQuickPayUrlRequest.Item.ContentItem.ContentItemType:
      type: string
      enum:
        - CONTENT_ITEM_TYPE_UNSPECIFIED
        - CONTENT_ITEM_TYPE_FREE_ITEM
      default: CONTENT_ITEM_TYPE_UNSPECIFIED
      description: |-
        How checkout presents a content entry.

         - CONTENT_ITEM_TYPE_UNSPECIFIED: Unset; an ordinary content entry.
         - CONTENT_ITEM_TYPE_FREE_ITEM: Included free with the item: checkout shows it as free after its quantity. Presentation only.
  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.