> ## 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.

# Upsert group sub-account Pay Terms

> Create or update group Pay Terms scoped to one sub-account and a placement or expiration date rule. These terms override the sub-account default terms only when the consumer matches the sub-account and date rule. Requires at least one imported account and all required setup wizard steps to be complete.



## OpenAPI

````yaml /api/creditor.openapi.yaml put /pay-terms/groups/sub-accounts/{subclient}
openapi: 3.1.0
info:
  title: YouNegotiate Creditor API
  version: '2.0'
  description: >-
    Stateless API endpoints for creditor portal authentication and account
    access.
servers:
  - url: https://api.creditor.younegotiate.com
    description: Production
security: []
tags:
  - name: System
    description: Public creditor domain system and health endpoints.
  - name: Authentication
    description: Creditor registration, login, password, and email verification endpoints.
  - name: Account Settings
    description: >-
      Authenticated creditor profile, contact, operating-hours, and
      profile-image endpoints.
  - name: Account Profile
    description: >-
      Creditor onboarding profile, membership, billing, and setup status
      endpoints.
  - name: Setup Wizard
    description: >-
      Creditor setup wizard status, required-step completion, and optional-step
      completion.
  - name: Dashboard
    description: Creditor dashboard work queues and performance widgets.
  - name: Import / Export
    description: >-
      Creditor consumer import upload sessions, queued imports, history,
      downloads, and failed-row files.
  - name: Membership Settings
    description: >-
      Creditor membership dashboard, plan changes, payment method, cancellation,
      special-plan inquiry, and over-limit retry endpoints.
  - name: Merchant Account
    description: >-
      Existing merchant processor credentials, Tilled onboarding, and merchant
      application endpoints.
  - name: Header Profiles
    description: >-
      CSV header profile upload, mapping, download, and setup wizard completion
      endpoints.
  - name: SFTP Connections
    description: >-
      Creditor-managed SFTP connection profiles for imports, exports, and setup
      wizard completion.
  - name: Sub Accounts
    description: >-
      Creditor-managed sub account list, export, create, update, and delete
      endpoints.
  - name: Pay Terms Offers
    description: >-
      Creditor-managed master, sub-account, group, and group-sub-account Pay
      Terms endpoints.
  - name: Individual Custom Offers
    description: Creditor individual custom offer list endpoints.
  - name: Negotiations
    description: >-
      Creditor negotiation work queues, including notice responses and offer
      review counts.
  - name: Communications / CFPB Validation Letter
    description: >-
      CFPB Validation Letter tables, secure EcoLetter send/resend, CSV export,
      and print/download actions.
  - name: Communications / EcoLetter Template
    description: >-
      Creditor EcoLetter template management for secure eLetter communications
      and campaigns.
  - name: Communications / Groups
    description: >-
      Creditor communication group management for dynamic consumer targeting and
      campaign selection.
  - name: Communications / Schedule Campaign
    description: >-
      Creditor EcoLetter campaign scheduling, quote, immediate send, and
      delivery queue endpoints.
  - name: Communications / Campaign Tracker
    description: >-
      Creditor campaign tracker reporting, refresh, and consumer export
      endpoints.
  - name: Consumer Profiles
    description: Creditor Consumer Profiles list, filter options, and CSV export endpoints.
  - name: Terms & Conditions
    description: Creditor-managed master and sub-account Terms & Conditions templates.
  - name: About Us & Contact
    description: Creditor-managed company About Us content shown to consumers.
  - name: Logo & Links
    description: >-
      Creditor-managed master and sub-account personalized logo colors, size,
      and consumer link metadata.
  - name: Users
    description: >-
      Master creditor user management, invitations, and account deletion
      endpoints.
paths:
  /pay-terms/groups/sub-accounts/{subclient}:
    put:
      tags:
        - Pay Terms Offers
      summary: Upsert group sub-account Pay Terms
      description: >-
        Create or update group Pay Terms scoped to one sub-account and a
        placement or expiration date rule. These terms override the sub-account
        default terms only when the consumer matches the sub-account and date
        rule. Requires at least one imported account and all required setup
        wizard steps to be complete.
      operationId: creditorUpsertGroupSubAccountPayTerms
      parameters:
        - $ref: '#/components/parameters/SubclientId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GroupPayTermRequest'
      responses:
        '200':
          description: Group sub-account Pay Terms saved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayTermMutationResponse'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '403':
          $ref: '#/components/responses/ActiveMembershipRequired'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ValidationError'
      security:
        - bearerAuth: []
components:
  parameters:
    SubclientId:
      name: subclient
      in: path
      required: true
      description: Sub account ID.
      schema:
        type: integer
  schemas:
    GroupPayTermRequest:
      type: object
      required:
        - pif_balance_discount_percent
        - ppa_balance_discount_percent
        - min_monthly_pay_percent
        - max_days_first_pay
      properties:
        pif_balance_discount_percent:
          type: number
          format: float
          minimum: 0
          maximum: 99
        ppa_balance_discount_percent:
          type: number
          format: float
          minimum: 0
          maximum: 99
        min_monthly_pay_percent:
          type: number
          format: float
          minimum: 1
          maximum: 99
        max_days_first_pay:
          type: integer
          minimum: 1
          maximum: 1000
        placement_date:
          $ref: '#/components/schemas/PayTermDateRange'
        expiry_date:
          $ref: '#/components/schemas/PayTermDateRange'
      description: >-
        At least one complete placement or expiration date range is required.
        Group terms do not accept auto approve or auto decline rule fields.
    PayTermMutationResponse:
      type: object
      required:
        - message
        - data
      properties:
        message:
          type: string
          example: Master pay terms saved successfully.
        data:
          $ref: '#/components/schemas/PayTerm'
    PayTermDateRange:
      type: object
      properties:
        start:
          type: string
          format: date
          nullable: true
        end:
          type: string
          format: date
          nullable: true
    PayTerm:
      type: object
      additionalProperties: true
      properties:
        id:
          type: integer
        type:
          type: string
          enum:
            - master
            - group
            - group_subclient
            - sub_account
        type_label:
          type: string
        terms_name:
          type: string
        subclient:
          oneOf:
            - $ref: '#/components/schemas/PayTermSubclient'
            - type: 'null'
        has_pay_terms:
          type: boolean
        pif_balance_discount_percent:
          type: number
          format: float
          nullable: true
        ppa_balance_discount_percent:
          type: number
          format: float
          nullable: true
        min_monthly_pay_percent:
          type: number
          format: float
          nullable: true
        max_days_first_pay:
          type: integer
          nullable: true
        settlement_auto_approve_enabled:
          type: boolean
        payment_plan_auto_approve_enabled:
          type: boolean
        settlement_auto_decline_enabled:
          type: boolean
        payment_plan_auto_decline_enabled:
          type: boolean
        pif_auto_approve_percent:
          type: number
          format: float
          nullable: true
        pif_integrity_percent:
          type: number
          format: float
          nullable: true
        min_monthly_pay_auto_approve_percent:
          type: number
          format: float
          nullable: true
        min_monthly_pay_integrity_percent:
          type: number
          format: float
          nullable: true
        max_days_first_pay_auto_approve:
          type: integer
          nullable: true
        custom_rules:
          type: object
          nullable: true
          description: >-
            Group/group-sub-account placement and expiration date rules keyed by
            consumer field name.
        created_at:
          type: string
          format: date-time
          nullable: true
        updated_at:
          type: string
          format: date-time
          nullable: true
    MessageResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    ValidationErrorResponse:
      type: object
      required:
        - message
        - errors
      properties:
        message:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
    PayTermSubclient:
      type: object
      properties:
        id:
          type: integer
        subclient_name:
          type: string
        unique_identification_number:
          type: string
  responses:
    Unauthenticated:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
    ActiveMembershipRequired:
      description: Authenticated creditor does not have an active membership.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
          example:
            message: An active membership is required.
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
    ValidationError:
      description: Request validation failed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Sanctum token

````