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

# Show account payment history

> Show the compact Payment History payload for one owned deactivated account. Returns account and creditor details, the newest available masked payment profile, agreement download metadata, and all processed transaction rows ordered newest first. Failed transactions are retained to match the 1.0 portal.



## OpenAPI

````yaml /api/consumer.openapi.yaml get /accounts/{consumer}/payments/history
openapi: 3.1.0
info:
  title: YouNegotiate Consumer API
  version: '2.0'
  description: >-
    Stateless API endpoints for consumer portal authentication and account
    access.
servers:
  - url: https://api.consumer.younegotiate.com
    description: Production
security: []
tags:
  - name: System
    description: Public consumer domain system and health endpoints.
  - name: Authentication
    description: >-
      Consumer identity matching, contact capture, OTP verification, token
      creation, and logout endpoints.
  - name: Profile - My ecoAddress
    description: Consumer profile tab for signed-in identity / ecoAddress context.
  - name: Profile - Communication Controls
    description: >-
      Consumer profile tab for communication permissions, email/mobile changes,
      and email/mobile verification.
  - name: Profile - My Billing Details
    description: >-
      Consumer profile tab for billing name and billing address details used for
      payment verification.
  - name: Profile - Personalize My Portal
    description: Consumer profile tab for portal colors and profile image personalization.
  - name: Accounts
    description: Consumer-owned account list and account detail endpoints.
  - name: Bill Pay Wallet
    description: >-
      Consumer Bill Pay Wallet saved payment profiles and scheduled payment
      method update endpoints.
  - name: Upcoming Payments
    description: >-
      Consumer My Bill Pay Calendar upcoming-payment rows and calendar display
      data.
  - name: Calendar Sync
    description: >-
      Consumer Google and Microsoft calendar connection, OAuth callback, and
      live-update endpoints.
  - name: Gift Registry
    description: >-
      Consumer Bill Pay Gift Registry account list, shared registry, and Helping
      Hand link endpoints.
  - name: EcoMailbox
    description: Consumer MyEcoMailBox list endpoints and unread sidebar badge state.
  - name: Notice Responses
    description: >-
      Consumer My Account notice-response wizard endpoints for sender details
      and account details.
paths:
  /accounts/{consumer}/payments/history:
    get:
      tags:
        - Accounts
      summary: Show account payment history
      description: >-
        Show the compact Payment History payload for one owned deactivated
        account. Returns account and creditor details, the newest available
        masked payment profile, agreement download metadata, and all processed
        transaction rows ordered newest first. Failed transactions are retained
        to match the 1.0 portal.
      operationId: consumerShowAccountPaymentHistory
      parameters:
        - $ref: '#/components/parameters/ConsumerAccountId'
      responses:
        '200':
          description: Account payment history returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsumerPaymentHistoryResponse'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/AccountActionConflict'
      security:
        - bearerAuth: []
components:
  parameters:
    ConsumerAccountId:
      name: consumer
      in: path
      required: true
      description: Consumer account ID.
      schema:
        type: integer
  schemas:
    ConsumerPaymentHistoryResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/ConsumerPaymentHistory'
    ConsumerPaymentHistory:
      type: object
      required:
        - account
        - payment_profile
        - agreement
        - transactions
      properties:
        account:
          $ref: '#/components/schemas/ConsumerPaymentHistoryAccount'
        payment_profile:
          anyOf:
            - $ref: '#/components/schemas/ConsumerPaymentProfile'
            - type: 'null'
          description: >-
            Newest available transaction payment profile. Soft-deleted saved
            profiles remain readable for historical display.
        agreement:
          $ref: '#/components/schemas/ConsumerPaymentHistoryAgreement'
        transactions:
          type: array
          description: >-
            All processed transaction rows ordered by processed date and ID,
            newest first. Includes successful and failed records.
          items:
            $ref: '#/components/schemas/ConsumerTransactionPayment'
    MessageResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    ProfileIncompleteResponse:
      type: object
      required:
        - code
        - message
        - required_steps
      properties:
        code:
          type: string
          example: profile_incomplete
        message:
          type: string
          example: Please complete your communication profile before viewing accounts.
        required_steps:
          type: array
          items:
            type: string
          example:
            - profile_communication
    AccountActionUnavailableResponse:
      type: object
      required:
        - code
        - message
        - current_state
      properties:
        code:
          type: string
          example: account_action_unavailable
        message:
          type: string
          example: This account action is not available for the current account state.
        current_state:
          type:
            - string
            - 'null'
          example: payment_declined
    ConsumerPaymentHistoryAccount:
      type: object
      required:
        - id
        - number
        - creditor
        - balances
        - status
      properties:
        id:
          type: integer
          example: 109
        number:
          type:
            - string
            - 'null'
          example: '6678222240045226'
        creditor:
          $ref: '#/components/schemas/ConsumerPaymentHistoryCreditor'
        balances:
          $ref: '#/components/schemas/ConsumerPaymentHistoryBalances'
        status:
          $ref: '#/components/schemas/ConsumerPaymentHistoryStatus'
    ConsumerPaymentProfile:
      type: object
      properties:
        id:
          type: integer
        method:
          $ref: '#/components/schemas/ConsumerPaymentMethod'
        method_label:
          type:
            - string
            - 'null'
          example: Card
        label:
          type: string
          example: Card ending in 4242
        last_four_digit:
          type:
            - string
            - 'null'
        account_number_last_four:
          type:
            - string
            - 'null'
        expiration_month:
          type:
            - string
            - 'null'
        expiration_year:
          type:
            - string
            - 'null'
        first_name:
          type:
            - string
            - 'null'
        last_name:
          type:
            - string
            - 'null'
        address:
          type:
            - string
            - 'null'
        city:
          type:
            - string
            - 'null'
        state:
          type:
            - string
            - 'null'
        zip:
          type:
            - string
            - 'null'
        is_saved_for_future_use:
          type: boolean
    ConsumerPaymentHistoryAgreement:
      type: object
      required:
        - available
        - filename
      properties:
        available:
          type: boolean
          description: >-
            Always true for a successful Payment History response. Download
            through `GET /accounts/{consumer}/payments/agreement`.
          example: true
        filename:
          type: string
          example: 6678222240045226_you_negotiate_agreement.pdf
    ConsumerTransactionPayment:
      type: object
      required:
        - id
        - transaction_id
        - record_type
        - record_key
        - amount
        - status
      properties:
        id:
          type: integer
        transaction_id:
          type:
            - string
            - 'null'
          description: Gateway transaction identifier.
          example: gateway-payment-100
        record_type:
          type: string
          enum:
            - transaction_history
        record_key:
          type: string
          example: transaction:44
        schedule_transaction_id:
          type:
            - integer
            - 'null'
        schedule_date:
          type:
            - string
            - 'null'
          format: date
        transaction_type:
          type:
            - string
            - 'null'
          enum:
            - pif
            - installment
            - partial_pif
            - null
        transaction_type_label:
          type:
            - string
            - 'null'
          example: Settlement
        amount:
          type: string
          example: '250.00'
        status:
          $ref: '#/components/schemas/ConsumerPaymentStatus'
        payment_profile:
          anyOf:
            - $ref: '#/components/schemas/ConsumerPaymentProfile'
            - type: 'null'
        processed_at:
          type:
            - string
            - 'null'
          format: date-time
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
    ConsumerPaymentHistoryCreditor:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type:
            - integer
            - 'null'
          example: 12
        name:
          type:
            - string
            - 'null'
          example: Acme Agency
    ConsumerPaymentHistoryBalances:
      type: object
      required:
        - original
        - current
      properties:
        original:
          type:
            - string
            - 'null'
          example: '1000.00'
        current:
          type:
            - string
            - 'null'
          example: '775.00'
    ConsumerPaymentHistoryStatus:
      type: object
      required:
        - value
        - label
      properties:
        value:
          type: string
          enum:
            - deactivated
        label:
          type: string
          example: Creditor Removed
    ConsumerPaymentMethod:
      type:
        - string
        - 'null'
      enum:
        - cc
        - ach
        - null
    ConsumerPaymentStatus:
      type: object
      properties:
        value:
          type: string
          enum:
            - successful
            - failed
            - processing
            - scheduled
            - rescheduled
            - consumer_change_date
            - creditor_change_date
            - cancelled
        label:
          type: string
          example: Scheduled
  responses:
    Unauthenticated:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
    Forbidden:
      description: Authenticated consumer cannot access the resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
    AccountActionConflict:
      description: >-
        The authenticated profile is incomplete, or the requested account action
        is not available for the account's current state.
      content:
        application/json:
          schema:
            oneOf:
              - $ref: '#/components/schemas/ProfileIncompleteResponse'
              - $ref: '#/components/schemas/AccountActionUnavailableResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Sanctum token

````