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

# Convert prices

> Fetches pre-converted prices from the price sheet for the given destination country, applies tax based on region, and optionally applies custom rounding. Returns final prices in minor units and locale-formatted display strings.



## OpenAPI

````yaml /ingress-openapi.json post /sdk/server/prices/convert
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/prices/convert:
    post:
      tags:
        - Pricing
      summary: Convert prices
      description: >-
        Fetches pre-converted prices from the price sheet for the given
        destination country, applies tax based on region, and optionally applies
        custom rounding. Returns final prices in minor units and
        locale-formatted display strings.
      operationId: ConvertPrices
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/pie.sdk.pricing.ConvertPricesRequest'
        description: >-
          ConvertPricesRequest fetches pre-converted prices from the uploaded
          price

          sheet for a given destination country, applies tax, and optionally
          applies

          custom rounding.


          The destination_amount and pre_rounding_amount in the response use
          "minor

          units" (the smallest denomination of a currency as defined by ISO
          4217).

          The decimal_places field tells callers how to interpret amounts:
          divide by

          10^decimal_places to get the human-readable value.
        required: true
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pie.sdk.pricing.ConvertPricesResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/google.rpc.Status'
      security:
        - hmac: []
        - deprecatedApiKey: []
components:
  schemas:
    pie.sdk.pricing.ConvertPricesRequest:
      type: object
      properties:
        sourceCurrency:
          type: string
          description: >-
            ISO-4217 source currency code (e.g., 'USD'). Currently only 'USD' is
            supported.
        destinationCountry:
          type: string
          description: >-
            ISO-3166-1 alpha-2 destination country code (e.g., 'DE', 'JP',
            'PL'). Used to resolve the destination currency via CLDR.
        priceIds:
          type: array
          items:
            type: string
          description: >-
            Price IDs (price point identifiers) to look up. Must match the
            priceId values in the uploaded price sheet.
        rounding:
          type: string
          description: >-
            Optional rounding strategy to apply. Use 'hg' for Huuuge Games charm
            pricing rounding. Omit for no rounding.
      description: >-
        ConvertPricesRequest fetches pre-converted prices from the uploaded
        price

        sheet for a given destination country, applies tax, and optionally
        applies

        custom rounding.


        The destination_amount and pre_rounding_amount in the response use
        "minor

        units" (the smallest denomination of a currency as defined by ISO 4217).

        The decimal_places field tells callers how to interpret amounts: divide
        by

        10^decimal_places to get the human-readable value.
      required:
        - sourceCurrency
        - destinationCountry
        - priceIds
    pie.sdk.pricing.ConvertPricesResponse:
      type: object
      properties:
        sourceCurrency:
          type: string
          description: ISO-4217 source currency code (echoed from request)
        destinationCurrency:
          type: string
          description: >-
            ISO-4217 destination currency code resolved from the destination
            country
        destinationCountry:
          type: string
          description: ISO-3166-1 alpha-2 destination country code (echoed from request)
        conversions:
          type: array
          items:
            $ref: '#/components/schemas/pie.sdk.pricing.PriceConversion'
          description: >-
            Converted price points in the same order as the input price_ids
            (excluding missing ones)
        missingPriceIds:
          type: array
          items:
            type: string
          description: >-
            Price IDs from the request that were not found in the price sheet
            for the destination country
        taxRate:
          type: string
          description: Tax rate applied to the destination country (e.g., '19%', '0%')
        taxInclusive:
          type: boolean
          description: >-
            Whether the destination_amount includes tax. True for most regions;
            false for US, Canada, Mexico where tax is added at checkout.
    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.pricing.PriceConversion:
      type: object
      properties:
        priceId:
          type: string
          description: Price ID (price point identifier, echoed from request)
        sourceAmount:
          type: integer
          format: int64
          description: USD base price in minor units from the price sheet
        destinationAmount:
          type: integer
          format: int64
          description: >-
            Final price in destination currency minor units (after tax and
            rounding)
        preRoundingAmount:
          type: integer
          format: int64
          description: >-
            Price in destination currency minor units after tax but before
            rounding. Same as destination_amount when no rounding is applied.
        displayPrice:
          type: string
          description: >-
            Locale-formatted price string with currency symbol (e.g., '€3.09',
            '¥150', '3,60 zł')
        decimalPlaces:
          type: integer
          format: int64
          description: >-
            CLDR fraction-digit count for the destination currency (e.g., 2 for
            EUR, 0 for JPY, 3 for BHD)
    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.