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

# Create invoice payment settings

> Create payment settings for invoices. Invoices with payment settings contain payment links. If payment details are on file with Stripe or other payment providers, then payments are automatically collected when you finalise and send an invoice. Invoice payment settings override billing schedule payment settings and customer payment settings.



## OpenAPI

````yaml collections.latest.product.live POST /payments/settings/invoices
openapi: 3.0.0
info:
  title: Collections
  description: Manage Payment Collection Settings
  version: '0.1'
servers:
  - url: https://dev.seqhq.io/api
    description: DEV
  - url: https://sandbox.sequencehq.com/api
    description: SANDBOX
  - url: https://eu.sequencehq.com/api
    description: PRODUCTION
security: []
tags:
  - name: Invoices
  - name: Customers
  - name: Billing Schedules
  - name: Stripe Collection Settings
  - name: Account Settings
paths:
  /payments/settings/invoices:
    servers: []
    parameters: []
    post:
      tags:
        - Invoices
      summary: Create invoice payment settings
      description: >-
        Create payment settings for invoices. Invoices with payment settings
        contain payment links. If payment details are on file with Stripe or
        other payment providers, then payments are automatically collected when
        you finalise and send an invoice. Invoice payment settings override
        billing schedule payment settings and customer payment settings.
      operationId: postPaymentsSettingsInvoices
      parameters:
        - name: Authorization
          in: header
          description: >-
            Your [API credentials](/reference/authentication). Eg. `Basic
            {credentials}`.
          required: true
          schema:
            type: string
        - name: sequence-version
          in: header
          description: Use this header to select an API version
          required: false
          schema:
            type: string
            enum:
              - '2024-07-30'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateInvoiceSettingsRequestModel'
              example:
                invoiceId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
                customerId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
                paymentProvider: STRIPE
            examples:
              CreateInvoiceSettingsRequestModel:
                summary: ''
                value:
                  invoiceId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
                  customerId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
                  paymentProvider: STRIPE
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductCreateInvoiceSettingsResponseModel'
                example:
                  id: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
                  sequenceAccountId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
                  invoiceId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
                  customerId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
                  paymentProvider: STRIPE
              examples:
                ProductCreateInvoiceSettingsResponseModel:
                  summary: ''
                  value:
                    id: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
                    sequenceAccountId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
                    invoiceId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
                    customerId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
                    paymentProvider: STRIPE
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
                example:
                  error:
                    type: conflict
                    message: Resource is currently being processed
              examples:
                ApiError:
                  summary: ''
                  value:
                    error:
                      type: conflict
                      message: Resource is currently being processed
        '500':
          description: Internal Server Error
          content: {}
components:
  schemas:
    CreateInvoiceSettingsRequestModel:
      required:
        - invoiceId
        - paymentProvider
      type: object
      example:
        invoiceId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
        customerId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
        paymentProvider: STRIPE
      properties:
        invoiceId:
          type: string
          description: Invoice ID.
          example: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
        customerId:
          type: string
          description: Customer ID.
          nullable: true
          example: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
        paymentProvider:
          $ref: '#/components/schemas/PaymentProvider'
          description: Payment provider for the invoice.
    ProductCreateInvoiceSettingsResponseModel:
      required:
        - customerId
        - id
        - invoiceId
        - paymentProvider
        - sequenceAccountId
      type: object
      example:
        id: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
        sequenceAccountId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
        invoiceId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
        customerId: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
        paymentProvider: STRIPE
      properties:
        id:
          type: string
          description: Unique payment provider id.
          example: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
        sequenceAccountId:
          type: string
          description: Sequence Account ID.
          example: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
        invoiceId:
          type: string
          description: Invoice ID.
          example: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
        customerId:
          type: string
          description: Customer ID.
          example: bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730
        paymentProvider:
          $ref: '#/components/schemas/PaymentProvider'
          description: Payment provider for the invoice.
    ApiError:
      required:
        - error
      type: object
      example:
        error:
          type: validationError
          message: The request was invalid.
          errors:
            - code: invalidField
              message: The request was invalid.
      properties:
        error:
          $ref: '#/components/schemas/ErrorObject'
    PaymentProvider:
      type: string
      example: STRIPE
      enum:
        - STRIPE
        - GOCARDLESS
        - NONE
    ErrorObject:
      required:
        - message
        - type
      type: object
      description: Top level wrapper for all errors
      example:
        type: validationError
        message: The request was invalid.
        errors:
          - code: invalidField
            message: The request was invalid.
      properties:
        type:
          type: string
          description: Type of the error
          example: validationError
        message:
          type: string
          description: Plain text description of the error
          example: The request was invalid.
        errors:
          type: array
          description: A list of detailed errors
          nullable: true
          example:
            - code: invalidField
              message: The request was invalid.
          items:
            $ref: '#/components/schemas/ErrorItem'
    ErrorItem:
      required:
        - code
        - message
      type: object
      example:
        code: invalidField
        message: The request was invalid.
      properties:
        code:
          type: string
          description: Code of the error
          example: invalidField
        message:
          type: string
          description: Plain text description of the error
          example: The request was invalid.

````

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