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

# Get Payment

> Returns payment details by its id



## OpenAPI

````yaml GET /v1/payments/{id}
openapi: 3.1.0
info:
  title: ToffeePay API
  description: Public API for game partners
  version: 0.1.1
servers:
  - url: https://api.toffeepay.com
    description: Production
  - url: https://api.sandbox.toffeepay.com
    description: Sandbox
security:
  - BearerAuth: []
paths:
  /v1/payments/{id}:
    get:
      summary: GetPayment
      description: Returns payment details by its id
      operationId: PaymentService_GetPayment
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            title: id
        - name: with_extra_data
          in: query
          schema:
            type: boolean
            title: with_extra_data
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pay.v1.Payment'
                title: payment
components:
  schemas:
    pay.v1.Payment:
      type: object
      properties:
        id:
          type: string
          title: id
        session_id:
          type: string
          title: session_id
        status:
          type: string
          title: status
          enum:
            - processing
            - authorized
            - cancelled
            - succeeded
            - failed
            - refunded
        amount:
          exclusiveMinimum: 0
          type: integer
          title: amount
          format: int32
        currency:
          type: string
          title: currency
          enum:
            - USD
            - GBP
            - EUR
        method:
          type: string
          title: method
          enum:
            - card
            - tokenized_card
            - apple_pay
            - google_pay
            - paypal
            - paylater
            - venmo
            - toffee_wallet
        details:
          type: string
          title: details
        created_at:
          $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: created_at
        authorized_at:
          oneOf:
            - $ref: '#/components/schemas/google.protobuf.Timestamp'
            - type: 'null'
          title: authorized_at
        cancelled_at:
          oneOf:
            - $ref: '#/components/schemas/google.protobuf.Timestamp'
            - type: 'null'
          title: cancelled_at
        succeeded_at:
          oneOf:
            - $ref: '#/components/schemas/google.protobuf.Timestamp'
            - type: 'null'
          title: succeeded_at
        failed_at:
          oneOf:
            - $ref: '#/components/schemas/google.protobuf.Timestamp'
            - type: 'null'
          title: failed_at
        refunded_at:
          oneOf:
            - $ref: '#/components/schemas/google.protobuf.Timestamp'
            - type: 'null'
          title: refunded_at
        error:
          oneOf:
            - $ref: '#/components/schemas/pay.v1.Error'
            - type: 'null'
          title: error
        extra_data:
          oneOf:
            - $ref: '#/components/schemas/pay.v1.PaymentExtraData'
            - type: 'null'
          title: extra_data
      title: Payment
      required:
        - id
        - session_id
        - status
        - amount
        - currency
        - method
        - details
        - created_at
      additionalProperties: false
    google.protobuf.Timestamp:
      type: string
      format: date-time
    pay.v1.Error:
      type: object
      properties:
        code:
          type: string
          title: code
        message:
          type: string
          title: message
      title: Error
      additionalProperties: false
      description: Error handling
    pay.v1.PaymentExtraData:
      type: object
      properties:
        real_amount:
          type: integer
          title: real_amount
          minimum: 0
          format: int32
          description: real money amount
        bonus_amount:
          type: integer
          title: bonus_amount
          minimum: 0
          format: int32
          description: bonus money amount
      title: PaymentExtraData
      additionalProperties: false
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````