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

# Get payment intent

> Get a payment intent by ID, including its charge attempts, refunds, and line items.



## OpenAPI

````yaml /api-reference/bundled_openapi.json get /payment-intents/{paymentIntentId}
openapi: 3.1.0
info:
  title: Telness Tech Connect
  version: 2.0.0-alpha
  description: >
    Telness Tech Connect API provides all you need to own your user's
    connectivity experience.


    Go back to [Telnesstech.com](https://telnesstech.com)
servers:
  - url: https://apiv2.example.com
    description: Connect API URL for your domain
security:
  - apiKey: []
  - bearerAuth: []
    apiKey: []
tags:
  - name: Auth
    description: Authenticate users and obtain access tokens.
  - name: Users
    description: Manage users.
  - name: Customers
    description: Manage customers.
  - name: Subscriptions
    description: Manage subscriptions and subscription.
  - name: Subscription Addons
    description: Manage subscription addons.
  - name: Subscription Usage
    description: Get subscription usage.
  - name: Subscribers
    description: Manage subscribers.
  - name: Licenses
    description: Manage licenses.
  - name: Product Offerings
    description: Browse product offerings.
  - name: Product Catalogs
    description: Browse product catalogs.
  - name: Product Discounts
    description: Discounts and promotions.
  - name: Orders
    description: Manage orders and line items.
  - name: Payment Intents
    description: >-
      Inspect payment intents, the money collected over card rails for orders
      and renewals.
  - name: Payment Links
    description: Create and manage payment links for orders and invoices.
  - name: Payment Sessions
    description: Create and manage payment sessions for orders.
  - name: Payment Profiles
    description: Manage customer payment profiles and methods.
  - name: Payment Profile Sessions
    description: Create sessions for setting up payment profiles.
  - name: Signing sessions
    description: Handle contract signing sessions for postpaid orders.
  - name: Porting
    description: Manage number porting for subscriptions.
  - name: Taxes
    description: Calculate taxes for products and line items.
  - name: Invoices
    description: Manage invoices and invoice items.
  - name: Tools
    description: >-
      Tools for address validation, number porting, device info, and network
      coverage.
  - name: Inventory
    description: Manage phone number inventory, SIM cards, and reservations.
  - name: Workflows
    description: Dynamic processing of customer journeys and events.
paths:
  /payment-intents/{paymentIntentId}:
    get:
      tags:
        - Payment Intents
      summary: Get payment intent
      description: >-
        Get a payment intent by ID, including its charge attempts, refunds, and
        line items.
      operationId: getPaymentIntent
      parameters:
        - name: paymentIntentId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the payment intent to retrieve.
          example: 64870b5c-fb61-4c9a-955a-e148e0826c20
      responses:
        '200':
          description: Payment intent retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentIntent'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    PaymentIntent:
      type: object
      description: >-
        A collection of money driven over card rails for a customer, with its
        charge attempts, refunds, and billed line items.
      required:
        - paymentIntentId
        - customerId
        - status
        - amount
        - currency
        - lineItems
        - attempts
        - refunds
        - createdAt
        - updatedAt
      additionalProperties: false
      properties:
        paymentIntentId:
          type: string
          description: The unique identifier for this payment intent.
          example: 64870b5c-fb61-4c9a-955a-e148e0826c20
        customerId:
          type: string
          description: The customer this payment intent collects from.
          example: a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d
        status:
          $ref: '#/components/schemas/PaymentIntentStatus'
        amount:
          type: number
          format: decimal
          description: The total amount to collect.
          example: 29
        currency:
          type: string
          description: The currency of the amount.
          example: USD
        description:
          type: string
          description: A human-readable description of what is being collected.
          example: Mobile subscription renewal
        dueAt:
          type: string
          format: date-time
          description: When the amount is due.
          example: '2024-01-15T10:00:00Z'
        lineItems:
          type: array
          description: The items that make up the collected amount.
          items:
            $ref: '#/components/schemas/PaymentIntentLineItem'
        attempts:
          type: array
          description: Charge attempts made against this payment intent, most recent first.
          items:
            $ref: '#/components/schemas/PaymentAttempt'
        refunds:
          type: array
          description: Refunds issued against this payment intent.
          items:
            $ref: '#/components/schemas/PaymentRefund'
        createdAt:
          type: string
          format: date-time
          description: When the payment intent was created.
          example: '2024-01-15T10:00:00Z'
        updatedAt:
          type: string
          format: date-time
          description: When the payment intent was last updated.
          example: '2024-01-15T10:00:00Z'
    PaymentIntentStatus:
      type: string
      description: Current stage of a payment intent as it is collected over card rails.
      enum:
        - PENDING
        - REQUIRES_ACTION
        - PROCESSING
        - SUCCEEDED
        - REQUIRES_PAYMENT_METHOD
        - CANCELLED
      example: SUCCEEDED
    PaymentIntentLineItem:
      type: object
      description: A single billed item contributing to a payment intent's amount.
      required:
        - description
        - amount
      additionalProperties: false
      properties:
        description:
          type: string
          description: What this line item represents.
          example: Mobile subscription - Premium Plan
        amount:
          type: number
          format: decimal
          description: The base cost of the line item before discounts and taxes.
          example: 29
        subscriptionId:
          type: string
          description: The subscription this line item is associated with, if any.
          example: a8174435-6378-4be5-a9f5-8b4aaadae5d4
        licenseId:
          type: string
          description: The license this line item is associated with, if any.
          example: ffb19d4f-b3b6-4f2b-9365-dd80bdcf0a77
        discounts:
          type: array
          description: Discounts applied to this line item.
          items:
            type: object
            required:
              - description
              - amount
            additionalProperties: false
            properties:
              description:
                type: string
                example: Loyalty discount
              amount:
                type: number
                format: decimal
                example: 5
        taxes:
          type: array
          description: Taxes applied to this line item.
          items:
            type: object
            required:
              - description
              - amount
            additionalProperties: false
            properties:
              description:
                type: string
                example: VAT 25%
              amount:
                type: number
                format: decimal
                example: 7.25
    PaymentAttempt:
      type: object
      description: A single charge attempt against a payment intent.
      required:
        - paymentAttemptId
        - amount
        - currency
        - result
        - createdAt
      additionalProperties: false
      properties:
        paymentAttemptId:
          type: string
          description: The unique identifier for this charge attempt.
          example: a4da2b04-aa79-4b40-8987-048d6caf118f
        amount:
          type: number
          format: decimal
          description: The amount charged in this attempt.
          example: 29
        currency:
          type: string
          description: The currency of the attempt.
          example: USD
        result:
          type: string
          description: Whether the charge attempt succeeded or failed.
          enum:
            - SUCCEEDED
            - FAILED
          example: SUCCEEDED
        reason:
          type: string
          description: Failure reason when the attempt did not succeed.
          example: card_declined
        chargedAt:
          type: string
          format: date-time
          description: When the charge was made.
          example: '2024-01-15T10:00:00Z'
        createdAt:
          type: string
          format: date-time
          description: When the attempt was created.
          example: '2024-01-15T10:00:00Z'
    PaymentRefund:
      type: object
      description: A refund issued against a payment intent.
      required:
        - refundId
        - amount
        - currency
        - status
        - createdAt
      additionalProperties: false
      properties:
        refundId:
          type: string
          description: The unique identifier for this refund.
          example: c014b666-22e4-430e-bb18-9257a383dfe2
        amount:
          type: number
          format: decimal
          description: The refunded amount.
          example: 29
        currency:
          type: string
          description: The currency of the refund.
          example: USD
        reason:
          type: string
          description: Why the refund was issued.
          enum:
            - UNKNOWN
            - DUPLICATE
            - FRAUDULENT
            - REQUESTED_BY_CUSTOMER
          example: REQUESTED_BY_CUSTOMER
        status:
          type: string
          description: Current stage of the refund.
          enum:
            - PENDING
            - SUCCEEDED
            - FAILED
            - CANCELED
            - REQUIRES_ACTION
          example: SUCCEEDED
        createdAt:
          type: string
          format: date-time
          description: When the refund was created.
          example: '2024-01-15T10:00:00Z'
    Error:
      type: object
      required:
        - message
        - code
      properties:
        message:
          type: string
          description: A human-readable message providing more details about the error.
        code:
          type: string
          description: A machine-readable code for the error.
        details:
          type: array
          description: Additional details about the error.
          items:
            type: object
            required:
              - message
              - code
            properties:
              message:
                type: string
                description: >-
                  A human-readable message providing more details about the
                  error.
              code:
                type: string
                description: A machine-readable code for the specific detail.
              property:
                type: string
                description: The property or field related to the error.
              suggestion:
                $ref: '#/components/schemas/Any'
                description: >
                  A suggested value for the particular property.


                  For example, this may be set when validating an address with
                  an alias, suggesting the expected value by the operator.
        hint:
          type: string
          description: A hint to help resolve the error.
    Any:
      oneOf:
        - type: string
        - type: number
        - type: boolean
        - type: object
          additionalProperties: true
        - type: array
  responses:
    BadRequest:
      description: The request was malformed or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Authentication is required to access this resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Access to this resource is forbidden.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: An unexpected error occurred on the server.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >
        An API key that grants access to the Connect API. You can create and
        manage API keys in the portal.
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        Bearer authentication with JWT tokens is used to authenticate users.


        Do note that a valid API keys is also required to access the Connect API
        to prove that requests are made by a trusted party.


        Requests with a JWT token is scoped to the permissions of the user the
        token belongs to, regardless of the API key used.

````