I want to edit specific card details for a customer such as the date of expiry. Is this possible?

Modified on: Fri, 10 Nov, 2017 at 12:34 AM

Yes, partial card update is now possible (only with APIs at the moment). You can edit specific details such as the card name, billing address or expiry details. This can be done using the Update a card payment source API. 

If you’re using Stripe/ Braintree  

- You can pass only the fields that needs to be updated. 

For example: If you’d like to change the last name, you can pass the card[last_name]=“new-last-name” as the input field and the existing last name will be overwritten. Here’s sample API call. 


 https://scribblercompany-test.chargebee.com/api/v2/payment_sources/pm_Izy9T6mQSYoHFd6LT/update_card \

     -u test_RE4fY047cBShRXlEg7Lc5FEDVXOu8WAr: \

     -d card[last_name]=“Trump” \


In case of other Gateways

  • If you pass only one field, the rest of the fields would be overwritten and set to null. 

  • So you’d first need to retrieve the payment details (Retrieve a payment source API) and then pass the entire content along with the modified param.

For example: When you want to change the last name, first retrieve the existing details, and then pass all the values including the new last name. Here’s the sample API call.


https://scribblercompany-test.chargebee.com/api/v2/payment_sources/pm_Izy9T6mQSYoHFd6LT/update_card \

     -u test_RE4fY047cBShRXlEg7Lc5FEDVXOu8WAr: \

     -d card[first_name]="John" \

     -d card[last_name]=“Trump” \

     -d card[expiry_month]="05" \

     -d card[expiry_year]="2022" \

     -d card[billing_addr1]="#678 Mission Street" \

     -d card[billing_city]="New York City" \

     -d card[billing_zip]="10002" \

     -d card[billing_state_code]="NY" \

     -d card[billing_country]="US"

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.