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

# Create a payment

> Create a payment

```jsonc Body raw (json) wrap expandable theme={null}
{
  "invoice_id": 1,// required | integer | existing invoice id
  "payment_date": 1234567890,// required | timestamp
  "amount": "1.1",// required | string | numeric
  "method ": "cash",// required | string | acceptable_values: cash,check,card,square,bank_transfer,other
  "payment_method_id": 1,// nullable | integer | existing payment method id
  "notes": "some string",// optional | string | max:4000
  "square_transaction_id": "some string"// optional | string | max:255
}
```


## OpenAPI

````yaml post /payments
openapi: 3.0.0
info:
  title: FieldPulse API
  description: >-
    REST API for the FieldPulse field service management platform.


    **Authentication:** All requests require an `x-api-key` header. Contact
    support@fieldpulse.com to obtain your API key.


    **Important:** The API Playground below makes live requests against your
    production data. Use caution when testing write operations (POST, PUT,
    DELETE).
  version: 1.0.0
servers:
  - url: https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage
    description: Production
security:
  - apiKeyAuth: []
tags:
  - name: Assets
    description: Endpoints related to assets
  - name: Assets Category
    description: Endpoints related to assets category
  - name: Comments
    description: Endpoints related to comments
  - name: Company Profile
    description: Endpoints related to contracts
  - name: Contracts
    description: Endpoints related to contracts
  - name: Customers
    description: Endpoints related to customers
  - name: Custom Fields
    description: Endpoints related to custom fields
  - name: Estimates
    description: Endpoints related to estimates
  - name: Invoices
  - name: Items
  - name: Jobs
  - name: Lead Source
  - name: Locations
  - name: Material Lists
  - name: Payments
  - name: Pipeline Status
  - name: Projects
  - name: Purchase Orders
  - name: Subtasks
  - name: Tags
  - name: Teams
  - name: Timesheets
  - name: Users
  - name: Vendors
  - name: Version
paths:
  /payments:
    post:
      tags:
        - Payments
      summary: Create a payment
      description: Create a payment
      operationId: postPayments
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                invoice_id:
                  type: integer
                  description: Existing invoice id.
                payment_date:
                  type: integer
                  description: Unix timestamp.
                amount:
                  type: string
                  description: A number, sent as a string.
                'method ':
                  type: string
                  enum:
                    - cash
                    - check
                    - card
                    - square
                    - bank_transfer
                    - other
                payment_method_id:
                  type: integer
                  nullable: true
                  description: Existing payment method id.
                notes:
                  type: string
                  maxLength: 4000
                square_transaction_id:
                  type: string
                  maxLength: 255
              required:
                - invoice_id
                - payment_date
                - amount
                - 'method '
            example:
              invoice_id: 1
              payment_date: 1234567890
              amount: '1.1'
              'method ': cash
              payment_method_id: 1
              notes: some string
              square_transaction_id: some string
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: boolean
                    description: false when the request succeeds.
                    example: false
                  response:
                    type: object
                    description: The created record.
        '400':
          description: Bad Request
          content:
            application/json:
              example:
                error: true
                errors:
                  - error message
                  - error message
        '401':
          description: Unauthorized
          content:
            application/json:
              example:
                message: Unauthorized
        '404':
          description: Not Found
          content:
            application/json:
              example:
                message: Request URL not found
        '500':
          description: Internal Server Error
          content:
            application/json:
              example:
                message: Internal Server Error
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

## Related topics

- [How to Create Payment Reports](/reporting/raw-data/payment-reports.md)
- [How to Create Invoice Reports](/reporting/raw-data/invoice-reports.md)
- [How to Create Commission Reports](/reporting/raw-data/commission-reports.md)
- [How to Use Raw Data Reporting](/reporting/raw-data/using-raw-data-reporting.md)
- [FieldPulse Payments Overview](/payments/getting-started/fieldpulse-payments.md)


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