PUT
/
v2
/
payment-method-session
/
{id}
/
update-saved-payment-method
Payment Method Session - Update a saved payment method
curl --request PUT \
  --url https://sandbox.hyperswitch.io/v2/payment-method-session/{id}/update-saved-payment-method \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --data '{
  "payment_method_data": {
    "card": {
      "card_holder_name": "Narayan Bhat"
    }
  },
  "payment_method_id": "12345_pm_0194b1ecabc172e28aeb71f70a4daba3"
}'
{
  "id": "12345_pm_01926c58bc6e77c09e809964e72af8c8",
  "merchant_id": "merchant_1671528864",
  "customer_id": "12345_cus_01926c58bc6e77c09e809964e72af8c8",
  "payment_method_type": "card",
  "payment_method_subtype": "ach",
  "recurring_enabled": true,
  "created": "2023-01-18T11:04:09.922Z",
  "last_used_at": "2024-02-24T11:04:09.922Z",
  "payment_method_data": {
    "card": {
      "issuer_country": "AF",
      "last4_digits": "<string>",
      "expiry_month": "<string>",
      "expiry_year": "<string>",
      "card_holder_name": "<string>",
      "card_fingerprint": "<string>",
      "nick_name": "<string>",
      "card_network": "Visa",
      "card_isin": "<string>",
      "card_issuer": "<string>",
      "card_type": "<string>",
      "saved_to_locker": true
    }
  },
  "connector_tokens": [
    {
      "token": "pm_9UhMqBMEOooRIvJFFdeW",
      "connector_token_request_reference_id": "<string>"
    }
  ],
  "network_token": {
    "payment_method_data": {
      "last4_digits": "<string>",
      "issuer_country": "AF",
      "network_token_expiry_month": "<string>",
      "network_token_expiry_year": "<string>",
      "nick_name": "<string>",
      "card_holder_name": "<string>",
      "card_isin": "<string>",
      "card_issuer": "<string>",
      "card_network": "Visa",
      "card_type": "<string>",
      "saved_to_locker": true
    }
  }
}

Authorizations

api-key
string
header
required

Ephemeral keys provide temporary access to singular data, such as access to a single customer object for a short period of time.

Path Parameters

id
string
required

The unique identifier for the Payment Method Session

Body

application/json

Response

200
application/json

The payment method has been updated successfully

The response is of type object.