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

# Update a Payment Method for a customer

> This endpoint updates a payment method for a customer.  Must pass at least one filter to select
 a specific customer



## OpenAPI

````yaml https://app.dimepayments.com/openapi.yaml patch /api/payment-method/update
openapi: 3.0.3
info:
  title: Dime Payments API Documentation
  description: >-
    A simple, basic API for managing Merchants through Dime Payments. JSON based
    REST API
  version: 1.0.0
servers:
  - url: https://app.dimepayments.com
security:
  - default: []
tags:
  - name: Merchant management
    description: ''
  - name: Transaction management
    description: >-

      APIs for managing transactions.  Depending on API KEY permissions, one
      should be able to

      charge credit cards, ACH, Google/Apple Pay wallets along with other
      functions.
  - name: Addresses
    description: |-

      APIs for managing customer addresses
  - name: Customer management
    description: >-

      APIs for managing customers.  Depending on API KEY permissions, one should
      be able to

      list, create, update, and delete customers along with several other
      customer specific requests.
  - name: Deposit management
    description: ''
  - name: Invoice management
    description: >-

      APIs for managing invoices. Depending on API KEY permissions, one should
      be

      able to list, create, update, delete, and send invoices, manage their line

      items, and manage recurring-invoice schedules. Every request is scoped to
      a

      single Merchant via the required `data.sid`.
  - name: Payment Method management
    description: >-

      APIs for managing payment methods associated with customers.  Depending on
      API KEY permissions, one should be able to

      list, show, create, update, and delete payment methods.
  - name: Recurring Payments management
    description: >-

      APIs for managing recurring payments.  Depending on API KEY permissions,
      one should be able to

      create, edit, pause, cancel along with other functions.
  - name: Zapier
    description: >-

      APIs for use through Zapier.  Depending on API KEY permissions, one should
      be able to

      see customers and transactions data.
paths:
  /api/payment-method/update:
    patch:
      tags:
        - Payment Method management
      summary: Update a Payment Method for a customer
      description: >-
        This endpoint updates a payment method for a customer.  Must pass at
        least one filter to select
         a specific customer
      operationId: updateAPaymentMethodForACustomer
      parameters: []
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  description: ''
                  example: []
                  properties:
                    uuid:
                      type: string
                      description: >-
                        Must be a valid UUID. The <code>uuid</code> of an
                        existing record in the customers table.
                      example: 6ff8f7f6-1eb3-3525-be4a-3932c805afed
                    sid:
                      type: integer
                      description: The SID of the Merchant.
                      example: 12345
                    payment_method_id:
                      type: number
                      description: >-
                        The <code>id</code> of an existing record in the
                        payment_methods table.
                      example: 4326.41688
                    type:
                      type: string
                      description: >-
                        Type of payment method 'cc' for credit card or 'ach' for
                        bank accounts.
                      example: cc
                    cc_name_on_card:
                      type: string
                      description: 'The name on the card. Required IF type is ''cc'' Max: 255.'
                      example: John Doe
                    cc_number:
                      type: string
                      description: 'The card number. Required IF type is ''cc'' Max: 255.'
                      example: '7890'
                    cc_expiration_date:
                      type: string
                      description: >-
                        The expiration date of card. Required IF type is 'cc'
                        Max: 7.
                      example: 01/2025
                    cc_cvv:
                      type: string
                      description: 'The CVV of card. Required IF type is ''cc'' Max: 4.'
                      example: '1234'
                    cc_brand:
                      type: string
                      description: >-
                        The brand of the card. Must be Visa, MasterCard, or
                        Amex. Required IF type is 'cc' Max: 10.
                      example: Visa
                    ach_bank_account_name:
                      type: string
                      description: >-
                        The name on the bank account. Required IF type is 'ach'
                        Max: 50.
                      example: Acme Inc.
                    ach_routing_number:
                      type: string
                      description: >-
                        Routing number for ach type. Required IF type is 'ach'
                        Digits: 9.
                      example: '123456789'
                    ach_account_number:
                      type: string
                      description: >-
                        Account number for ach type. Required IF type is 'ach'
                        Max: 35.
                      example: '123456789'
                    ach_ownership_type:
                      type: string
                      description: >-
                        Ownership type of the account. Must be Personal or
                        Business. Required IF type is 'ach' Max: 35.
                      example: Personal
                    ach_account_type:
                      type: string
                      description: >-
                        Type of the account. Must be Checking or Savings.
                        Required IF type is 'ach' Max: 35.
                      example: Checking
                    ach_bank_name:
                      type: string
                      description: 'The name of the bank. Required IF type is ''ach'' Max: 50.'
                      example: Wells Fargo
                    default:
                      type: boolean
                      description: Should this be default payment method.
                      example: true
                    addr1:
                      type: string
                      description: 'Address Line One. Max: 75.'
                      example: 123 First St.
                    addr2:
                      type: string
                      description: 'Address Line Two. Max: 50.'
                      example: Suite 111
                      nullable: true
                    city:
                      type: string
                      description: 'City name. Max: 75.'
                      example: Alpharetta
                    state:
                      type: string
                      description: 'Two character State. Max: 2.'
                      example: GA
                    zip:
                      type: string
                      description: 'Zip code. Digits: 5.'
                      example: '30009'
                  required:
                    - uuid
                    - sid
                    - payment_method_id
                    - type
                    - cc_name_on_card
                    - cc_number
                    - cc_expiration_date
                    - cc_cvv
                    - cc_brand
                    - ach_bank_account_name
                    - ach_routing_number
                    - ach_account_number
                    - ach_ownership_type
                    - ach_account_type
                    - ach_bank_name
                    - addr1
                    - city
                    - state
                    - zip
                filters:
                  type: object
                  description: ''
                  example:
                    phone: '+15551237890'
                  properties:
                    phone:
                      type: string
                      description: Phone number of the customer. Must be in e.164 format.
                      example: '+15551237890'
                    email:
                      type: string
                      description: Email of the customer. Must be in rfc compliant.
                      example: an-email@domain.com
                    uuid:
                      type: string
                      description: UUID of the customer. Must be in uuid format.
                      example: 3c37db03-dc71-4e8b-90e7-6668290b7c3d
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: 1
                    type: cc
                    token: B6EXEPCIC8WGK63Y19RE5222
                    first_name: Lisa
                    last_name: 'Wallow '
                    cc_name_on_card: Lisa Wallow
                    cc_last_four: '5222'
                    cc_expiration_date: 08/2028
                    cc_brand: Visa
                    status: New
                    status_date: '2026-04-20 08:32:30'
                    enabled: true
                    default: false
                    addr1: 1504 Minnesota Ave
                    addr2: ''
                    addr3: null
                    city: Kenner
                    state: LA
                    zip: '30534'
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                        description: 'The ID of the Payment Method. Example: 12345'
                      type:
                        type: string
                        example: cc
                        description: 'The type of the Payment Method. Example: cc'
                      token:
                        type: string
                        example: B6EXEPCIC8WGK63Y19RE5222
                        description: 'The token of the Payment Method. Example: xxxxxxxx'
                      first_name:
                        type: string
                        example: Lisa
                        description: 'The first name of the customer. Example: John'
                      last_name:
                        type: string
                        example: 'Wallow '
                        description: 'The last name of the customer. Example: Doe'
                      cc_name_on_card:
                        type: string
                        example: Lisa Wallow
                        description: 'The name on the card. Example: John Doe'
                      cc_last_four:
                        type: string
                        example: '5222'
                        description: 'The last four digits of the card. Example: 1234'
                      cc_expiration_date:
                        type: string
                        example: 08/2028
                        description: 'The expiration date of the card. Example: 01/2025'
                      cc_brand:
                        type: string
                        example: Visa
                        description: 'The brand of the card. Example: Visa'
                      status:
                        type: string
                        example: New
                        description: 'The status of the Payment Method. Example: New'
                      status_date:
                        type: string
                        example: '2026-04-20 08:32:30'
                        description: >-
                          The date the Payment Method was created. Example:
                          2024-12-08 05:00:04
                      enabled:
                        type: boolean
                        example: true
                        description: >-
                          Whether the Payment Method is enabled or not. Example:
                          true
                      default:
                        type: boolean
                        example: false
                        description: >-
                          Whether the Payment Method is default or not. Example:
                          true
                      addr1:
                        type: string
                        example: 1504 Minnesota Ave
                        description: 'Address Line One. Example: 123 First St.'
                      addr2:
                        type: string
                        example: ''
                        description: 'Address Line Two. Example: Suite 111'
                      addr3:
                        type: string
                        example: null
                        description: 'Address Line Three. Example: Suite 111'
                      city:
                        type: string
                        example: Kenner
                        description: 'City name. Example: Alpharetta'
                      state:
                        type: string
                        example: LA
                        description: 'Two character State. Example: GA'
                      zip:
                        type: string
                        example: '30534'
                        description: 'Zip code. Example: 30009'
        '401':
          description: Token permission error
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    message: Permission denied
                properties:
                  data:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Permission denied
        '404':
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  - description: Customer not found
                    type: object
                    example:
                      data:
                        message: Customer not found.
                    properties:
                      data:
                        type: object
                        properties:
                          message:
                            type: string
                            example: Customer not found.
                  - description: Merchant not found
                    type: object
                    example:
                      data:
                        message: No such Merchant
                    properties:
                      data:
                        type: object
                        properties:
                          message:
                            type: string
                            example: No such Merchant
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: >-
        You can retrieve your token by visiting your dashboard and clicking
        <b>Generate API token under your profile in top right</b>.

````