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

# Complete membership activation payment

> After Stripe.js confirms the PaymentIntent, submit the validated billing contact details. The backend retrieves Stripe's canonical state, verifies ownership, amount, currency, and payment method, then records the transaction and activates the membership for succeeded card payments or processing ACH payments.



## OpenAPI

````yaml /api/creditor.openapi.yaml post /account-profile/billing/payment-intents/{platformBillingPaymentSession}/complete
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:
  /account-profile/billing/payment-intents/{platformBillingPaymentSession}/complete:
    post:
      tags:
        - Account Profile
      summary: Complete membership activation payment
      description: >-
        After Stripe.js confirms the PaymentIntent, submit the validated billing
        contact details. The backend retrieves Stripe's canonical state,
        verifies ownership, amount, currency, and payment method, then records
        the transaction and activates the membership for succeeded card payments
        or processing ACH payments.
      operationId: creditorCompleteMembershipActivationPaymentIntent
      parameters:
        - name: platformBillingPaymentSession
          in: path
          required: true
          description: >-
            Local platform billing payment session ID returned by the create
            endpoint.
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompleteMembershipActivationPaymentRequest'
      responses:
        '200':
          description: Membership payment reconciled and membership activated.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CompleteMembershipActivationPaymentResponse
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ValidationError'
        '502':
          $ref: '#/components/responses/PlatformBillingUnavailable'
      security:
        - bearerAuth: []
components:
  schemas:
    CompleteMembershipActivationPaymentRequest:
      type: object
      required:
        - first_name
        - last_name
        - address
        - city
        - state
        - zip
        - accept_terms_and_conditions
      properties:
        first_name:
          type: string
          minLength: 2
          maxLength: 20
          pattern: ^[A-Za-z]+$
        last_name:
          type: string
          minLength: 2
          maxLength: 30
          pattern: ^[A-Za-z]+$
        address:
          type: string
          minLength: 2
          maxLength: 100
        address2:
          type:
            - string
            - 'null'
          minLength: 2
          maxLength: 100
        city:
          type: string
          minLength: 2
          maxLength: 30
          pattern: '^[A-Za-z]+(?: [A-Za-z]+)*$'
        state:
          type: string
          minLength: 2
          maxLength: 2
        zip:
          type: string
          pattern: ^\d{5}(?:-\d{4})?$
        accept_terms_and_conditions:
          type: boolean
    CompleteMembershipActivationPaymentResponse:
      type: object
      required:
        - message
        - data
      properties:
        message:
          type: string
          example: Membership activated successfully!
        data:
          type: object
          required:
            - status
            - company_membership
            - transaction
            - payment_method
          properties:
            status:
              type: string
              enum:
                - processing
                - succeeded
            company_membership:
              $ref: '#/components/schemas/CompanyMembership'
            transaction:
              $ref: '#/components/schemas/MembershipTransaction'
            payment_method:
              $ref: '#/components/schemas/PlatformBillingPaymentMethod'
    CompanyMembership:
      type: object
      additionalProperties: true
      properties:
        id:
          type: integer
        company_id:
          type: integer
        membership_id:
          type: integer
        next_membership_plan_id:
          type: integer
          nullable: true
        status:
          type: string
          nullable: true
        current_plan_start:
          type: string
          format: date-time
          nullable: true
        current_plan_end:
          type: string
          format: date-time
          nullable: true
        cancelled_at:
          type: string
          format: date-time
          nullable: true
        membership:
          anyOf:
            - $ref: '#/components/schemas/CreditorMembership'
            - type: 'null'
        next_membership_plan:
          anyOf:
            - $ref: '#/components/schemas/CreditorMembership'
            - type: 'null'
        created_at:
          type: string
          format: date-time
          nullable: true
        updated_at:
          type: string
          format: date-time
          nullable: true
    MembershipTransaction:
      type: object
      additionalProperties: true
      properties:
        id:
          type: integer
        company_id:
          type: integer
        membership_id:
          type: integer
        payment_purpose:
          type: string
          nullable: true
          enum:
            - renewal
            - reactivation
            - plan_change
        status:
          type: string
        price:
          type: number
          format: float
        provider:
          type: string
          nullable: true
          example: stripe
        provider_transaction_id:
          type: string
          nullable: true
          example: pi_123
        platform_status:
          type: string
          nullable: true
          enum:
            - requires_payment_method
            - requires_confirmation
            - requires_action
            - processing
            - requires_capture
            - succeeded
            - canceled
            - unknown
        failure_code:
          type: string
          nullable: true
        plan_start_date:
          type: string
          format: date-time
          nullable: true
        plan_end_date:
          type: string
          format: date-time
          nullable: true
        partner_revenue_share:
          type: integer
        created_at:
          type: string
          format: date-time
          nullable: true
        updated_at:
          type: string
          format: date-time
          nullable: true
    PlatformBillingPaymentMethod:
      type: object
      required:
        - id
        - payment_method
        - last_four_digit
      properties:
        id:
          type: integer
        payment_method:
          type: string
          enum:
            - cc
            - ach
        account_type:
          type:
            - string
            - 'null'
          enum:
            - checking
            - savings
            - null
        last_four_digit:
          type: string
          minLength: 4
          maxLength: 4
        expiry:
          type:
            - string
            - 'null'
          example: 12/2030
        brand:
          type:
            - string
            - 'null'
          example: visa
        bank_name:
          type:
            - string
            - 'null'
          example: STRIPE TEST BANK
        payment_method_saved_at:
          type:
            - string
            - 'null'
          format: date-time
    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
    CreditorMembership:
      type: object
      additionalProperties: true
      properties:
        id:
          type: integer
        company_id:
          type: integer
          nullable: true
        name:
          type: string
        price:
          type: number
          format: float
        fee:
          type: number
          format: float
        e_letter_fee:
          type: number
          format: float
        upload_accounts_limit:
          type: integer
          nullable: true
        frequency:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        features:
          nullable: true
        status:
          type: boolean
        position:
          type: integer
          nullable: true
        created_at:
          type: string
          format: date-time
          nullable: true
        updated_at:
          type: string
          format: date-time
          nullable: true
  responses:
    Unauthenticated:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
    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'
    PlatformBillingUnavailable:
      description: Stripe platform billing is temporarily unavailable.
      content:
        application/json:
          schema:
            type: object
            required:
              - code
              - message
            properties:
              code:
                type: string
                enum:
                  - platform_billing_unavailable
              message:
                type: string
                example: Platform billing is temporarily unavailable. Please try again.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Sanctum token

````