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

# List payments

> Returns a paginated list of payments for the portal. When invoiceId is supplied, only
payments for that invoice are returned. Requires internal-user privileges.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/payments
openapi: 3.0.0
info:
  contact: {}
  title: Assembly API
  version: 0.0.1
servers:
  - url: https://api.assembly.com
security: []
paths:
  /v1/payments:
    get:
      tags:
        - Payments
      summary: List payments
      description: >-
        Returns a paginated list of payments for the portal. When invoiceId is
        supplied, only

        payments for that invoice are returned. Requires internal-user
        privileges.
      operationId: list-payments
      parameters:
        - description: Filter payments by invoice ID
          in: query
          name: invoiceId
          schema:
            type: string
        - description: Maximum number of records to return.
          in: query
          name: limit
          schema:
            type: integer
        - description: Pagination cursor returned by a previous request.
          in: query
          name: nextToken
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/payment.GetPaymentsResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dispatcher.Error'
          description: Invalid pagination parameters
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dispatcher.Error'
          description: Missing or invalid API key, or caller lacks internal-user privileges
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dispatcher.Error'
          description: The invoice referenced by invoiceId was not found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dispatcher.Error'
          description: Unexpected server error
      security:
        - APIKeyHeader: []
components:
  schemas:
    payment.GetPaymentsResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/payment.Payment'
          nullable: true
          type: array
        nextToken:
          description: base64 encoded JSON representing a NextToken
          type: string
      type: object
    dispatcher.Error:
      properties:
        code:
          type: string
        data: {}
        message:
          type: string
      type: object
    payment.Payment:
      properties:
        amount:
          description: >-
            Amount is the payment amount in the smallest currency unit (e.g.
            cents).
          example: 10000
          type: integer
        brand:
          description: Brand is the card brand or bank descriptor of the payment method.
          example: Visa
          type: string
        chargedAt:
          description: >-
            ChargedAt is the RFC 3339 timestamp at which the payment was
            charged.
          example: '2024-02-20T14:05:00Z'
          format: date-time
          type: string
        createdAt:
          type: string
        creatorId:
          type: string
        data:
          type: string
        declineCode:
          description: >-
            DeclineCode is the lower-camel-cased decline reason returned when a
            payment fails.
          example: insufficientFunds
          type: string
        entityType:
          description: ObjectType is the internal entity type discriminator for the record.
          example: PAYMENT
          type: string
        fee:
          allOf:
            - $ref: '#/components/schemas/payment.Fee'
          description: Fee is the full transaction-fee breakdown for the payment.
        feeAmount:
          allOf:
            - $ref: '#/components/schemas/payment.FeeAmountExternal'
          description: >-
            FeeAmount is the client-facing split of the transaction fee between
            platform and client.
          nullable: true
        id:
          type: string
        identityId:
          type: string
        intentId:
          description: >-
            IntentId is the Stripe payment intent identifier associated with the
            payment.
          example: pi_3OabcdEFghIJklmn
          type: string
        invoiceId:
          description: InvoiceId is the ID of the invoice this payment was made against.
          example: 550e8400-e29b-41d4-a716-446655440000
          format: uuid
          type: string
        last4Digits:
          description: >-
            Last4Digits is the last four digits of the card or bank account
            used.
          example: '4242'
          type: string
        message:
          description: >-
            Message is a human-readable status or decline message for the
            payment.
          example: The card has insufficient funds to complete the purchase.
          type: string
        object:
          type: string
        paymentMethod:
          description: PaymentMethod is the type of payment method used for the payment.
          enum:
            - bankAccount
            - creditCard
          example: creditCard
          type: string
        portalId:
          description: PortalId is the ID of the portal that owns the payment.
          example: a1b2c3d4
          type: string
        previousAttributes:
          additionalProperties: true
          type: object
        ref:
          type: string
        status:
          description: Status is the current state of the payment.
          enum:
            - pending
            - processing
            - succeeded
            - failed
            - refunded
          example: succeeded
          type: string
        stripeChargeId:
          description: StripeChargeId is the Stripe charge identifier backing this payment.
          example: ch_3OabcdEFghIJklmn
          type: string
        updatedAt:
          type: string
      type: object
    payment.Fee:
      properties:
        absorbedAmount:
          description: >-
            AbsorbedAmount is what the internal user paid, in the smallest
            currency unit; equals TotalAmount when IsFeeAbsorbed is true.
          example: 0
          type: integer
        chargedAmount:
          description: >-
            ChargedAmount is what the client paid, in the smallest currency
            unit; 0 when IsFeeAbsorbed is true.
          example: 150
          type: integer
        isFeeAbsorbed:
          description: >-
            IsFeeAbsorbed reports whether the internal user absorbed the
            transaction fee instead of passing it to the client.
          example: false
          type: boolean
        items:
          description: >-
            Items is the list of individual fee components that make up the
            total.
          items:
            $ref: '#/components/schemas/payment.FeeItem'
          type: array
        totalAmount:
          description: >-
            TotalAmount is the total transaction fee (internal user plus
            client), in the smallest currency unit.
          example: 150
          type: integer
      type: object
    payment.FeeAmountExternal:
      properties:
        paidByClient:
          description: >-
            PaidByClient is the portion of the transaction fee charged to the
            client, in the smallest currency unit (e.g. cents).
          example: 150
          type: integer
        paidByPlatform:
          description: >-
            PaidByPlatform is the portion of the transaction fee absorbed by the
            internal user, in the smallest currency unit (e.g. cents).
          example: 0
          type: integer
      type: object
    payment.FeeItem:
      properties:
        amount:
          description: >-
            Amount is the fee component value in the smallest currency unit
            (e.g. cents).
          example: 150
          type: integer
        type:
          description: Type identifies which fee component this line item represents.
          enum:
            - achFixed
            - achPercentage
            - ccFixed
            - ccPercentage
            - ccInternationalPercentage
            - ccConversionPercentage
            - recurringPercentage
            - storePercentage
            - invoicePercentage
            - achThresholdExceededPercentage
          example: ccPercentage
          type: string
      type: object
  securitySchemes:
    APIKeyHeader:
      in: header
      name: X-API-KEY
      type: apiKey

````