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

# Get Payment Intent

> Retrieves a single payment intent by `provider_payment_intent_id` within your configuration, used to verify that a payment completed successfully.



## OpenAPI

````yaml /openapi.json get /intents/payments/{provider_payment_intent_id}
openapi: 3.1.0
info:
  title: OpenLoop API
  version: 0.1.0
  description: >-
    Unified reference for the OpenLoop Patient (clinical) and Payments & Revenue
    APIs.
servers:
  - url: https://api.openloophealth.com/v0.1
    description: Production partner edge
  - url: https://api-staging.openloophealth.com/v0.1
    description: Staging partner edge (sandbox credentials)
security: []
paths:
  /intents/payments/{provider_payment_intent_id}:
    get:
      tags:
        - Intents
      summary: Get Payment Intent
      description: >-
        Retrieves a single payment intent by `provider_payment_intent_id` within
        your configuration, used to verify that a payment completed
        successfully.
      parameters:
        - in: path
          name: provider_payment_intent_id
          required: true
          schema:
            type: string
          description: Provider payment-intent ID (e.g. `test_payment_intent_id`).
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      config_id:
                        type: string
                        description: Configuration ID.
                      provider_account_id:
                        type:
                          - string
                          - 'null'
                        description: Provider account ID.
                      payment_provider:
                        type: string
                        description: Provider enum (e.g. `"stripe"`).
                      provider_payment_intent_id:
                        type: string
                        description: Provider payment-intent ID.
                      status:
                        type: string
                        description: >-
                          PaymentIntent status (e.g. `"succeeded"`,
                          `"requires_payment_method"`). The verification signal.
                      amount:
                        type: number
                        description: >-
                          Amount intended to be collected, in the currency's
                          smallest unit.
                      currency:
                        type: string
                        description: Three-letter ISO currency code (e.g. `"usd"`).
                      amount_received:
                        type: number
                        description: >-
                          Amount actually collected, in the currency's smallest
                          unit.
                      client_secret:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Client secret used to confirm the payment intent
                          client-side.
                      provider_payment_method_id:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Provider payment-method ID (expanded objects collapsed
                          to ID).
                      payment_method_types:
                        type: array
                        items:
                          type: string
                        description: Allowed payment method types (e.g. `["card"]`).
                      provider_customer_id:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Provider customer ID (expanded/deleted objects
                          collapsed to ID).
                      provider_invoice_id:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Provider invoice ID this payment intent was created
                          for, or `null` when not invoice-related.
                      last_payment_error:
                        type:
                          - object
                          - 'null'
                        properties:
                          type:
                            type:
                              - string
                              - 'null'
                            description: Error type.
                          code:
                            type:
                              - string
                              - 'null'
                            description: Error code.
                          decline_code:
                            type:
                              - string
                              - 'null'
                            description: Decline code, when the error was a card decline.
                          message:
                            type:
                              - string
                              - 'null'
                            description: Human-readable error message.
                        description: >-
                          Curated last payment error, or `null` when the most
                          recent attempt did not error.
                      created:
                        type: number
                        description: Unix timestamp.
                      livemode:
                        type: boolean
                        description: Whether this is a live-mode object.
                required:
                  - data
              example:
                data:
                  config_id: test_config_id
                  provider_account_id: test_account_id
                  payment_provider: stripe
                  provider_payment_intent_id: test_payment_intent_id
                  status: succeeded
                  amount: 4999
                  currency: usd
                  amount_received: 4999
                  client_secret: test_payment_intent_key
                  provider_payment_method_id: test_payment_method_id
                  payment_method_types:
                    - card
                  provider_customer_id: test_customer_id
                  provider_invoice_id: null
                  last_payment_error: null
                  created: 1300
                  livemode: false
        '400':
          description: 'ValidationError: Missing/empty `provider_payment_intent_id`.'
        '401':
          description: Missing or invalid bearer token.
        '403':
          description: >-
            No configuration exists for your account, or provider access has
            been disabled for it.
        '404':
          description: >-
            NotFoundError: Payment intent not found (the payment provider
            `resource_missing`), or config not found.
        '409':
          description: >-
            The payment intent paid more than one invoice, so no single
            `provider_invoice_id` can be returned. Not reachable for payment
            intents created through this API, which pay at most one invoice.
        '500':
          description: An upstream provider error.
      security:
        - serviceToken: []
        - userToken: []
components:
  securitySchemes:
    serviceToken:
      type: oauth2
      description: >-
        Service (M2M) access token issued by POST /auth/token using the
        client_credentials grant. Required scopes, where known, are listed on
        each operation below.
      flows:
        clientCredentials:
          tokenUrl: https://api.openloophealth.com/v0.1/auth/token
          scopes: {}
    userToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        User access token issued by POST /auth/token via the verification-code
        grant (after Verify a one-time code) or the refresh_token grant.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.