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

# Process Helping Hand payment

> Process a public Helping Hand contribution using a Basis Theory token intent. Send a unique `Idempotency-Key` for each payer submission and reuse the same key only when retrying the identical request. Fixed settlement and full-plan links ignore the submitted amount and charge the current server-calculated amount; active payment-plan links accept an amount between the returned minimum and maximum.



## OpenAPI

````yaml /api/consumer.openapi.yaml post /payment
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:
  /payment:
    post:
      tags:
        - Gift Registry
      summary: Process Helping Hand payment
      description: >-
        Process a public Helping Hand contribution using a Basis Theory token
        intent. Send a unique `Idempotency-Key` for each payer submission and
        reuse the same key only when retrying the identical request. Fixed
        settlement and full-plan links ignore the submitted amount and charge
        the current server-calculated amount; active payment-plan links accept
        an amount between the returned minimum and maximum.
      operationId: consumerStoreExternalPayment
      parameters:
        - name: c
          in: query
          required: true
          description: Hex-encoded consumer account ID embedded in the generated link.
          schema:
            type: string
          example: '313233'
        - name: allocation
          in: query
          required: false
          description: Payment-plan allocation strategy embedded in the generated link.
          schema:
            $ref: '#/components/schemas/ConsumerPaymentAllocationStrategy'
        - name: signature
          in: query
          required: true
          description: Laravel URL signature generated by the backend.
          schema:
            type: string
          example: signed
        - name: Idempotency-Key
          in: header
          required: true
          description: Unique payer submission key, up to 100 characters.
          schema:
            type: string
            maxLength: 100
          example: 7ce33980-f077-4f39-8191-8eab729bd618
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoreExternalPaymentRequest'
      responses:
        '200':
          description: >-
            Payment processed, or the result of an identical idempotent retry
            returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalPaymentProcessedResponse'
        '202':
          description: >-
            The gateway accepted the payment but has not confirmed a terminal
            result. Poll `data.status_url`; do not submit another payment while
            `data.status` is `processing`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalPaymentProcessedResponse'
        '403':
          description: Invalid or expired link.
          content:
            application/json:
              schema:
                $ref: d7f83941-731e-4dcf-87d4-d5fe33ae6d95
        '409':
          description: >-
            Payment is no longer available or another contribution is currently
            processing for this account.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ExternalPaymentSettledResponse'
                  - $ref: '#/components/schemas/ExternalPaymentUnavailableResponse'
        '422':
          description: Validation or gateway processing failed.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ValidationErrorResponse'
                  - $ref: '#/components/schemas/ExternalPaymentFailedResponse'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  schemas:
    ConsumerPaymentAllocationStrategy:
      type: string
      enum:
        - due_date
        - plan_level
      example: due_date
    StoreExternalPaymentRequest:
      type: object
      required:
        - first_name
        - last_name
        - email
        - phone
        - address
        - city
        - state
        - zip
        - method
        - basis_theory_response
        - is_terms_accepted
      properties:
        amount:
          type:
            - number
            - string
            - 'null'
          minimum: 1
          description: >-
            Required by the UI only when `data.payment.amount_editable` is true.
            The backend recalculates fixed-link amounts.
          example: '40.00'
        first_name:
          type: string
        last_name:
          type: string
        email:
          type: string
          format: email
        phone:
          type: string
        address:
          type: string
        city:
          type: string
        state:
          type: string
          example: NV
        zip:
          type: string
          pattern: ^\d{5}(?:-\d{4})?$
          example: '89501'
        method:
          type: string
          enum:
            - cc
            - ach
        account_type:
          type:
            - string
            - 'null'
          enum:
            - checking
            - savings
            - null
          description: Required when `method` is `ach`.
        basis_theory_response:
          type: object
          required:
            - id
          description: >-
            Basis Theory token-intent result. The backend verifies and converts
            the intent; never send raw card or bank numbers to this API.
          properties:
            id:
              type: string
            card:
              type: object
              additionalProperties: true
            bank:
              type: object
              additionalProperties: true
          additionalProperties: true
        is_terms_accepted:
          type: boolean
          const: true
          description: >-
            Confirms that the payer accepted the static DFA donation terms
            displayed by the frontend.
    ExternalPaymentProcessedResponse:
      type: object
      required:
        - message
        - data
      properties:
        message:
          type: string
          example: Donation processed.
        data:
          $ref: '#/components/schemas/ExternalPaymentAttemptData'
    ExternalPaymentSettledResponse:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          const: account_settled
        message:
          type: string
          const: This account has been settled.
    ExternalPaymentUnavailableResponse:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          const: payment_unavailable
        message:
          type: string
          example: This Helping Hand payment is no longer available.
    ValidationErrorResponse:
      type: object
      required:
        - message
        - errors
      properties:
        message:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
    ExternalPaymentFailedResponse:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          const: payment_failed
        message:
          type: string
          example: >-
            The payment could not be processed. Please verify the payment
            details and try again.
    ExternalPaymentAttemptData:
      type: object
      required:
        - attempt_id
        - status
        - retry_allowed
        - amount
        - remaining_balance
        - account_status
        - status_url
        - receipt
      properties:
        attempt_id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - processing
            - requires_review
            - successful
            - failed
        retry_allowed:
          type: boolean
          description: >-
            True only after an explicit failed terminal result. Never resubmit
            while processing or requires_review.
        amount:
          type: string
          example: '40.00'
        remaining_balance:
          type:
            - string
            - 'null'
          example: '60.00'
        account_status:
          type:
            - string
            - 'null'
          example: payment_accepted
        status_url:
          type: string
          format: uri
        receipt:
          type: object
          required:
            - available
            - download_url
            - filename
          properties:
            available:
              type: boolean
            download_url:
              type:
                - string
                - 'null'
              format: uri
            filename:
              type: string
              example: debt_free_americans_receipt.pdf
    MessageResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
  responses:
    TooManyRequests:
      description: Request was rate limited.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'

````