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

# Update wallet payment profile

> Replace an existing saved Bill Pay Wallet profile with a new Basis Theory tokenized card or ACH profile. The old Basis Theory token is deleted after the profile is updated.



## OpenAPI

````yaml /api/consumer.openapi.yaml patch /bill-pay-wallet/payment-profiles/{paymentProfile}
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:
  /bill-pay-wallet/payment-profiles/{paymentProfile}:
    patch:
      tags:
        - Bill Pay Wallet
      summary: Update wallet payment profile
      description: >-
        Replace an existing saved Bill Pay Wallet profile with a new Basis
        Theory tokenized card or ACH profile. The old Basis Theory token is
        deleted after the profile is updated.
      operationId: consumerUpdateBillPayWalletPaymentProfile
      parameters:
        - $ref: '#/components/parameters/ConsumerPaymentProfileId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoreBillPayWalletPaymentProfileRequest'
      responses:
        '200':
          description: Wallet payment profile updated.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ConsumerBillPayWalletPaymentProfileMutationResponse
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/ProfileIncomplete'
        '422':
          $ref: '#/components/responses/ValidationError'
      security:
        - bearerAuth: []
components:
  parameters:
    ConsumerPaymentProfileId:
      name: paymentProfile
      in: path
      required: true
      description: Payment profile ID returned by the Bill Pay Wallet.
      schema:
        type: integer
  schemas:
    StoreBillPayWalletPaymentProfileRequest:
      type: object
      required:
        - first_name
        - last_name
        - address
        - city
        - state
        - zip
        - method
        - basis_theory_response
      properties:
        first_name:
          type: string
          maxLength: 255
          example: Jane
        last_name:
          type: string
          maxLength: 255
          example: Consumer
        address:
          type: string
          maxLength: 255
          example: 123 Main St
        city:
          type: string
          maxLength: 255
          example: Austin
        state:
          type: string
          example: TX
        zip:
          type: string
          pattern: ^\d{5}(-\d{4})?$
          example: '73301'
        method:
          $ref: '#/components/schemas/ConsumerPaymentMethod'
        account_type:
          type:
            - string
            - 'null'
          enum:
            - checking
            - savings
            - null
          description: Required when `method` is `ach`.
        basis_theory_response:
          $ref: '#/components/schemas/BasisTheoryTokenIntentResponse'
    ConsumerBillPayWalletPaymentProfileMutationResponse:
      type: object
      required:
        - message
        - data
      properties:
        message:
          type: string
          examples:
            - Payment profile stored.
            - Payment profile updated.
        data:
          type: object
          required:
            - payment_profile
            - saveable_payment_methods
          properties:
            payment_profile:
              $ref: '#/components/schemas/ConsumerPaymentProfile'
            saveable_payment_methods:
              $ref: '#/components/schemas/ConsumerBillPayWalletSaveablePaymentMethods'
    ConsumerPaymentMethod:
      type:
        - string
        - 'null'
      enum:
        - cc
        - ach
        - null
    BasisTheoryTokenIntentResponse:
      type: object
      required:
        - id
      description: >-
        Basis Theory token intent payload generated by the frontend tokenization
        flow. The backend verifies this id and converts it to a token when the
        profile must be reusable.
      properties:
        id:
          type: string
          example: token_intent_card
        type:
          type:
            - string
            - 'null'
          example: card
      additionalProperties: true
    ConsumerPaymentProfile:
      type: object
      properties:
        id:
          type: integer
        method:
          $ref: '#/components/schemas/ConsumerPaymentMethod'
        method_label:
          type:
            - string
            - 'null'
          example: Card
        label:
          type: string
          example: Card ending in 4242
        last_four_digit:
          type:
            - string
            - 'null'
        account_number_last_four:
          type:
            - string
            - 'null'
        expiration_month:
          type:
            - string
            - 'null'
        expiration_year:
          type:
            - string
            - 'null'
        first_name:
          type:
            - string
            - 'null'
        last_name:
          type:
            - string
            - 'null'
        address:
          type:
            - string
            - 'null'
        city:
          type:
            - string
            - 'null'
        state:
          type:
            - string
            - 'null'
        zip:
          type:
            - string
            - 'null'
        is_saved_for_future_use:
          type: boolean
    ConsumerBillPayWalletSaveablePaymentMethods:
      type: object
      required:
        - cc
        - ach
      properties:
        cc:
          type: boolean
          description: True when the profile does not already have a saved card.
        ach:
          type: boolean
          description: True when the profile does not already have a saved ACH method.
    MessageResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    ProfileIncompleteResponse:
      type: object
      required:
        - code
        - message
        - required_steps
      properties:
        code:
          type: string
          example: profile_incomplete
        message:
          type: string
          example: Please complete your communication profile before viewing accounts.
        required_steps:
          type: array
          items:
            type: string
          example:
            - profile_communication
    ValidationErrorResponse:
      type: object
      required:
        - message
        - errors
      properties:
        message:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
  responses:
    Unauthenticated:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
    Forbidden:
      description: Authenticated consumer cannot access the resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
    ProfileIncomplete:
      description: >-
        The authenticated consumer profile must complete communication setup
        before My Account can be shown.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ProfileIncompleteResponse'
    ValidationError:
      description: Request validation failed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Sanctum token

````