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

# Process payment

> Process a new (or update an existing) payment towards an invoice



## OpenAPI

````yaml https://dev.hurdlr.com/rest/v1/devUtils/documentation?version=5&Authorization=dexfeE6aRK3zwXP4ku5aWm8w&env=sandbox post /v5/invoicing/payment
openapi: 3.0.1
info:
  title: Tight API
  contact:
    name: Hurdlr, Inc. (dba Tight)
    url: https://www.tight.com
    email: api@tight.com
  version: 6.0.0
servers:
  - url: https://sandbox.hurdlr.com/rest
    description: Staging Environment
  - url: https://prod.hurdlr.com/rest
    description: Production Environment
security:
  - accessTokenSecurity: []
  - basicSecurity: []
tags:
  - name: Authentication
  - name: Banks
  - name: Business & Client Management
  - name: Invoicing
  - name: Revenue
  - name: Investments
  - name: Payouts
  - name: Bills
  - name: Expenses
  - name: Payroll
  - name: Reports
  - name: Accounting
  - name: Mileage
  - name: Taxes
  - name: Time Tracking
  - name: Imports
  - name: Files
  - name: Accountant
  - name: Audit Trail
  - name: Support
  - name: Tax Engine Express
  - name: Interview Endpoint
  - name: Ledgering
  - name: Configuration
  - name: Templates
paths:
  /v5/invoicing/payment:
    post:
      tags:
        - Invoicing
      summary: Process payment
      description: Process a new (or update an existing) payment towards an invoice
      operationId: postPayment
      parameters:
        - name: clientInvoiceKey
          in: header
          description: >-
            Client invoice key obtained from client invoice URL. Used to
            authorize the request in lieu of an access token.
          schema:
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/PostPaymentParamV5'
        required: true
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoicingActionsRetValV5'
      security:
        - accessTokenSecurity: []
components:
  schemas:
    PostPaymentParamV5:
      type: object
      properties:
        sendEmail:
          type: boolean
          description: >-
            Whether the payment receipt will be emailed to the client and user.
            Defaults to true.
        payment:
          $ref: '#/components/schemas/PaymentDTOV5'
    InvoicingActionsRetValV5:
      type: object
      properties:
        emailRetVal:
          $ref: '#/components/schemas/EmailRetVal'
        invoiceId:
          type: string
        success:
          type: boolean
        errorDescription:
          type: string
        errors:
          $ref: '#/components/schemas/ValidationRetVal'
        refundStatus:
          type: string
          enum:
            - PENDING
            - SUCCEEDED
            - FAILED
            - UNKNOWN
    PaymentDTOV5:
      required:
        - bankAccountId
        - invoiceId
      type: object
      properties:
        id:
          type: integer
          description: Id of the payment, required when updating an existing payment
          format: int64
        invoiceId:
          type: integer
          description: Id of the invoice to pay
          format: int64
        bankTransferId:
          type: integer
          description: >-
            Id of the bank transfer (bank deposit) that this payment was
            reconciled against
          format: int64
          readOnly: true
        apiName:
          type: string
          description: Name of the API that this payment originated from
          example: STRIPE
          enum:
            - THIRD_PARTY_PAYMENTS
            - STRIPE
            - USER_ENTRY
            - PARTNER_IMPLEMENTATION
            - ADYEN
            - PAYABLI
        apiPaymentId:
          type: string
          description: Id of the payment in your DB (or from your payment processor)
          example: pi_3KX9F5KkMq1CsF5K00DChQgZ
        apiAccountNo:
          type: string
          description: >-
            Mask of the user's bank account, often the last 4 digits of the
            account number
          readOnly: true
        apiAccountName:
          type: string
          description: Display name for the bank account from which this income originated
          readOnly: true
        apiInstitutionId:
          type: string
          description: Name or id of the institution from which this transaction originated
          readOnly: true
        bankAccountId:
          type: integer
          description: id of the user's bank account
          format: int64
          readOnly: true
        bankDescription:
          type: string
          description: >-
            Transaction description, similar to what will show on the user's
            bank statement
        grossPaymentAmount:
          type: number
          description: >-
            The total amount to apply to the invoice, required for third-party
            payments 
          example: 300
        feePaymentAmount:
          type: number
          description: >-
            The service fee to process the payment (subtracted out of the
            grossPaymentAmount)
          example: 9
        amountApplied:
          type: number
          description: Total amount applied towards the invoice
          readOnly: true
          example: 50.01
        paymentSource:
          type: string
          description: Display name for the payment
          example: Visa *4747 Charge
        date:
          type: string
          description: Date of the payment
          format: date
          example: '2021-01-04'
        status:
          type: string
          description: Status of the payment, required for third-party payments
          enum:
            - PROCESSED
            - CANCELED
            - REFUNDED
            - PENDING
            - FAILED
            - INACTIVE
            - PENDING
            - PROCESSED
            - CANCELED
            - REFUNDED
            - FAILED
            - INACTIVE
        reviewStatus:
          type: string
          description: Review status of the expense
          enum:
            - PARTNER_REVIEW_REQUIRED
            - USER_REVIEW_REQUIRED
            - ACCOUNTANT_REVIEW_REQUIRED
            - RECONCILIATION_STAGED
            - RECONCILED
            - RECONCILIATION_DISCREPANCY
            - ADJUSTMENT_USER_REVIEW_REQUIRED
            - ADJUSTMENT_ACCOUNTANT_REVIEW_REQUIRED
            - ADJUSTMENT_RECONCILIATION_STAGED
            - RECONCILIATION_AWAITING
            - PARTNER_REVIEW_REQUIRED
            - USER_REVIEW_REQUIRED
            - ACCOUNTANT_REVIEW_REQUIRED
            - RECONCILIATION_STAGED
            - RECONCILED
            - RECONCILIATION_DISCREPANCY
            - ADJUSTMENT_USER_REVIEW_REQUIRED
            - ADJUSTMENT_ACCOUNTANT_REVIEW_REQUIRED
            - ADJUSTMENT_RECONCILIATION_STAGED
        receiptUrl:
          type: string
          description: Url at which the receipt can be accessed
        errorMessage:
          type: string
          description: >-
            Further detail or reasoning describing the status of the payment for
            FAILED, CANCELLED, REFUNDED, or INACTIVE invoices
        customData:
          type: object
          description: >-
            Custom JSON in which you can store any data with max length of 2000
            characters
        v6EntityId:
          type: string
          description: Entity id on the v6 API for this payment
      description: >-
        An array of Invoice Payments associated with this invoice. Only
        populated if `includePayments` is set to true.
    EmailRetVal:
      type: object
      properties:
        status:
          type: string
          enum:
            - SUCCESS
            - FAILURE_TOKEN_INVALIDATED
            - FAILURE_TOKEN_POSSIBLY_EXPIRED
            - FAILURE_INVOICE_NOT_FOUND
            - FAILURE_OTHER
            - SENDING
            - NOT_SENT
            - FAILURE_BOUNCED
            - WARNING_AUTO_RESPONSE
        error:
          type: string
        messageId:
          type: string
    ValidationRetVal:
      type: object
      properties:
        fieldErrors:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/ValidationError'
          description: Map of field-level errors, often originating from validation errors
        globalErrors:
          type: array
          description: List of higher-level errors
          items:
            $ref: '#/components/schemas/ValidationError'
      description: Error object containing details errors incurred, if any
    ValidationError:
      type: object
      properties:
        type:
          type: string
          description: A broad categorization of the error
          enum:
            - DUPLICATE
            - REQUIRED
            - DELETE
            - INVALID_VALUE
            - NOT_MODIFIABLE
            - GENERAL
            - INVALID_FORMAT
        errorMessage:
          type: string
          description: Human-friendly message describing this error
        message:
          type: string
          writeOnly: true
          enum:
            - DUPLICATE
            - REQUIRED
            - DELETE
            - INVALID_VALUE
            - NOT_MODIFIABLE
            - GENERAL
            - INVALID_FORMAT
            - INVALID_MAPPING
      description: List of higher-level errors
  securitySchemes:
    accessTokenSecurity:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: /auth/account
          scopes:
            write: ''

````