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

# Get a Payment Transaction

> Retrieves the details of a specific payment transaction by its payment_id. 
This provides more granular information about individual payment attempts.


Retrieve detailed information about a specific payment transaction. This endpoint provides granular details about individual payment attempts, including payment method information and transaction timestamps.

## When to Use This vs. Get Session

* **Get Session**: Use when you want to check the overall status of a payment session (recommended for most cases).
* **Get Payment Transaction**: Use when you need detailed information about a specific payment attempt, such as card details, exact timestamps, or when troubleshooting a specific transaction.

## Getting the payment\_id

The `payment_id` is returned in the session object after a successful payment:

1. Customer completes payment on the hosted checkout page.
2. Session status changes to `completed`.
3. The session's `payment_id` field is populated with the transaction ID.
4. You can then use this ID to retrieve detailed transaction information.

## What You'll Get

This endpoint returns comprehensive transaction details including:

* Payment method information (e.g., card brand and last 4 digits).
* Exact transaction timestamps.
* Associated session ID for cross-referencing.
* Customer information used for the payment.

## Related Resources

* [How to Manually Check Payment Status](/hosted-checkout/guides/manually-check-payment-status): Integration guide covering both session and payment retrieval.
* [Status Reference](/hosted-checkout/reference/status-reference): Understanding all session and transaction status values.
* [Key Identifiers](/hosted-checkout/reference/key-identifiers): Learn about the different IDs used in Hosted Checkout.


## OpenAPI

````yaml GET /checkout/v1/payments/{payment_id}
openapi: 3.0.3
info:
  title: Tonder
  description: Tonder API
  termsOfService: https://www.google.com/policies/terms/
  contact:
    email: hello@tonder.io
  version: v1
servers:
  - url: https://api-stage.tonder.io/api/v1
    description: Staging
  - url: https://api.tonder.io/api/v1
    description: Production
security: []
paths:
  /checkout/v1/payments/{payment_id}:
    get:
      tags:
        - Hosted Checkout
      summary: Get a Payment Transaction
      description: >
        Retrieves the details of a specific payment transaction by its
        payment_id. 

        This provides more granular information about individual payment
        attempts.
      operationId: getPaymentTransaction
      parameters:
        - name: payment_id
          in: path
          required: true
          description: The Payment ID (e.g., pay_x1y2z3a4b5)
          schema:
            type: string
            example: pay_x1y2z3a4b5
      responses:
        '200':
          description: Payment transaction retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentTransaction'
              example:
                payment_id: pay_x1y2z3a4b5
                session_id: sess_a1b2c3d4e5f6
                status: Success
                amount: 35000
                currency: MXN
                payment_method_type: card
                created_at: '2025-10-20T14:30:00Z'
                card_details:
                  brand: visa
                  last4: '4242'
                customer:
                  name: John Doe
                  email: john.doe@example.com
      security:
        - Authorization: []
components:
  schemas:
    PaymentTransaction:
      type: object
      properties:
        payment_id:
          type: string
          description: Unique payment transaction identifier
          example: pay_x1y2z3a4b5
        session_id:
          type: string
          description: Associated session ID
          example: sess_a1b2c3d4e5f6
        status:
          type: string
          description: Transaction status
          example: Success
        amount:
          type: integer
          description: Payment amount in smallest currency unit
          example: 35000
        currency:
          type: string
          description: 3-letter ISO currency code
          example: MXN
        payment_method_type:
          type: string
          description: Type of payment method used
          example: card
        created_at:
          type: string
          format: date-time
          description: Transaction creation timestamp
          example: '2025-10-20T14:30:00Z'
        card_details:
          type: object
          properties:
            brand:
              type: string
              example: visa
            last4:
              type: string
              example: '4242'
        customer:
          type: object
          properties:
            name:
              type: string
              example: John Doe
            email:
              type: string
              example: john.doe@example.com
  securitySchemes:
    Authorization:
      type: apiKey
      name: Authorization
      in: header

````