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

# Создание намерения

> Создает намерение пополнения баланса



## OpenAPI

````yaml POST /gold
openapi: 3.0.1
info:
  title: OpenAPI SteamGold
  description: Is used for steamgold API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.steamgold.dev/v1
security:
  - bearerAuth: []
paths:
  /gold:
    post:
      description: Создает намерение пополнения баланса
      requestBody:
        description: Описание намерения
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IntentGoldRequest'
        required: true
      responses:
        '200':
          description: intent response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntentGoldResponse'
        '400':
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    IntentGoldRequest:
      required:
        - account
        - email
        - platform
        - amount
        - currency
      type: object
      properties:
        account:
          description: Идентификатор аккаунта геймера
          type: string
        email:
          description: Электронная почта геймера
          type: string
        platform:
          description: Платформа для которой создается намерение
          type: string
        amount:
          description: Сумма пополнения (в копейках)
          type: number
        currency:
          description: Валюта пополнения (RUB, USD, EUR)
          type: string
        code:
          description: Промокод приминяемый к пополнению
          type: string
        fee:
          description: >-
            Если `included` то комиссия включена в сумму, если `excluded` то
            комиссия не включена в сумму, `naive` считает комиссию от суммы
            оплаты.
          type: string
          enum:
            - included
            - excluded
            - naive
          default: excluded
        attribution:
          description: >-
            Атрибуция трафика (если есть). Подробнее в
            [документации](/attribution)
          type: object
          properties:
            utm_source:
              description: Источник трафика
              type: string
            utm_medium:
              description: Тип трафика
              type: string
        successUrl:
          description: URL для перенаправления после успешной оплаты
          type: string
        failureUrl:
          description: URL для перенаправления после неуспешной оплаты
          type: string
        callbackUrl:
          description: URL для оповещения об успешной оплате
          type: string
    IntentGoldResponse:
      required:
        - code
        - intentId
        - verified
      type: object
      properties:
        code:
          description: HTTP-код ответа
          type: integer
          format: int32
        intentId:
          description: Идентификатор намерения
          type: string
          format: uuid
        verified:
          description: Сообщение об успешном выполнении операции
          type: boolean
        intentAmount:
          description: Сумма пополнения
          type: number
        intentCurrency:
          description: Валюта пополнения
          type: string
        paymentAmount:
          description: Сумма оплаты для геймера
          type: number
        paymentCurrency:
          description: Валюта платежа
          type: string
        message:
          description: Сообщение об успешном выполнении операции
          type: string
    Error:
      required:
        - code
        - message
      type: object
      properties:
        code:
          description: HTTP-код ответа
          type: integer
          format: int32
        message:
          description: Сообщение об ошибке
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````