---
title: "Update a Payment Method"
method: PATCH
path: "/payment_methods/{token}"
tags: ["Payment Methods"]
---

# Update a Payment Method

`PATCH /payment_methods/{token}`

## Request

- Base URL: `https://api.justifi.ai/v1`
- URL: `https://api.justifi.ai/v1/payment_methods/{token}`
- Auth: none declared. Required headers: `Idempotency-Key`, `Authorization`
- TypeScript: <https://skmtc.dev/justifi/apis/justifi-api-documentation/docs/payment_methods/:token/patch.ts> (a function with typed inputs; its response is checked against the schema)

Change a payment method's expiration date, address, or metadata.

## Path parameters

- `token` string, required

## Headers

- `Idempotency-Key` string, uuid, required
- `Authorization` string, required

## Request body

- object
  - `card` UpdateCard
    - `month` string: new expiration month
    - `year` string: new expiration year
    - `address_line1` string: new card address street
    - `address_line2` string: new card address apartment, suite, etc.
    - `address_city` string: new card address city
    - `address_state` string: new card address state
    - `address_postal_code` string: new card address ZIP
    - `address_country` string: new card address 2-character country code
    - `metadata` object: any useful information you'd like to store alongside this card; when you update metadata, any previous metadata will be overwritten

## Response `200`

Payment method update was successful

- union
  - CardResponse
    - `id` number: the object id
    - `type` string: the object type, or array of objects
    - `data` object: the attributes for the object
      - `id` string: unique id of the payment method
      - `signature` string, nullable: unique signature associated with the payment_method
      - `customer_id` string, nullable: customer_id is a deprecated field. Please use our payment method groups instead.
      - `account_id` string, nullable: account id associated with payment method
      - `status` string: signals whether the payment method is valid or invalid
      - `invalid_reason` string, nullable: informs reason that the payment method has been marked invalid, if status is invalid
      - `payment_method_import_id` string, nullable: id of the payment method import that created this payment method, if it was imported
      - `created_at` string, date-time
      - `updated_at` string, date-time
      - `card` object: the card associated with the payment_method
        - `id` string, uuid: unique card payment method id
        - `name` string, nullable: card holder name
        - `acct_last_four` string: last 4 digits of the account number
        - `brand` string: card brand or institution
        - `digital_wallet` 'apple_pay' | 'google_pay' | 'null', nullable: which digital wallet provider the card is tied to
        - `token` string: same value as unique bank account id; can be saved and used to process multiple payments with the same bank account
        - `month` string: expiration date month
        - `year` string: expiration date year
        - `metadata` object, nullable: any useful information you'd like to store alongside this card
        - `address_line1_check` 'fail' | 'pass' | 'unavailable' | 'unchecked': Result of the address line 1 verification check. `pass` — matches the cardholder's address on file; `fail` — does not match; `unavailable` — verification could not be performed; `unchecked` — no address was provided for verification.
        - `address_postal_code_check` 'fail' | 'pass' | 'unavailable' | 'unchecked': Result of the postal code verification check. `pass` — matches the cardholder's postal code on file; `fail` — does not match; `unavailable` — verification could not be performed; `unchecked` — no postal code was provided for verification.
        - `bin_details` BinDetails, nullable: BIN (Bank Identification Number) details for a card. bin_details are not guaranteed to be present on every card payment method — availability depends on the card network and issuer. When unavailable, this field will be null.
          - `type` string: Type of card issued, values include Credit, Debit, Prepaid, Unknown
          - `card_brand` string: Brand or network associated with card. Possible values include Visa, Mastercard, American Express, Discover
          - `card_class` string
          - `country` string: Long form country name which issued the card
          - `issuer` string: Issuing bank
          - `funding_source` string: Source of funds defined by BIN for a given card. Values include Charge, Credit, Debit, Deferred Debit (Visa Only), Network Only, Prepaid
    - `page_info` string, nullable: information for cursor style pagination, is null for single records
  - BankAccountResponse
    - `id` number: the object id
    - `type` string: the object type, or array of objects
    - `data` object: the attributes for the object
      - `id` string: unique id of the payment method
      - `signature` string, nullable: unique signature associated with the payment_method
      - `customer_id` string, nullable: customer_id is a deprecated field. Please use our payment method groups instead.
      - `account_id` string: account id associated with payment method
      - `status` string: signals whether the payment method is valid or invalid
      - `invalid_reason` string, nullable: informs reason that the payment method has been marked invalid, if status is invalid
      - `payment_method_import_id` string, nullable: id of the payment method import that created this payment method, if it was imported
      - `created_at` string, date-time
      - `updated_at` string, date-time
      - `bank_account` object: the bank account associated with the payment_method
        - `id` string, uuid: unique bank account payment method id
        - `account_owner_name` string: account owner name
        - `account_type` string: type of account (checking, savings, etc.)
        - `bank_name` string, nullable: bank name
        - `acct_last_four` string: last 4 digits of the account number
        - `token` string: same value as unique bank account id; can be saved and used to process multiple payments with the same bank account
        - `metadata` object, nullable: any useful information you'd like to store alongside this bank account
    - `page_info` string, nullable: information for cursor style pagination, is null for single records
  - CardPresentResponse
    - `id` number: the object id
    - `type` string: the object type, or array of objects
    - `data` object: the attributes for the object
      - `id` string: unique id of the payment method
      - `signature` string, nullable: unique signature associated with the payment_method
      - `customer_id` string, nullable: customer_id is a deprecated field. Please use our payment method groups instead.
      - `account_id` string, nullable: account id associated with payment method
      - `status` string: signals whether the payment method is valid or invalid
      - `invalid_reason` string, nullable: informs reason that the payment method has been marked invalid, if status is invalid
      - `payment_method_import_id` string, nullable: id of the payment method import that created this payment method, if it was imported
      - `created_at` string, date-time
      - `updated_at` string, date-time
      - `card_present` object: the card present payment method
        - `id` string, uuid: unique card present payment method id
        - `brand` string: card brand or institution
        - `cardholder_name` string: name of the cardholder
        - `last4` string: last 4 digits of the card number
        - `expiry` string: card expiration date in MM/YY format
        - `type` string: the payment method type
    - `page_info` string, nullable: information for cursor style pagination, is null for single records

---

[API](https://skmtc.dev/justifi/apis/justifi-api-documentation.md) - [All operations](https://skmtc.dev/justifi/apis/justifi-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/justifi/apis/justifi-api-documentation/revisions/dd9f3fed7e46?raw)
