Welcome‎ > ‎Version 3‎ > ‎Publisher Api‎ > ‎Methods‎ > ‎2 - Consumer Related‎ > ‎Credit Card Management‎ > ‎

Edit Credit Card

This method will edit a stored credit card in the system.  Any provided information will overwrite previously stored information.  Any field that you don't supply will be assumed empty, and will overwrite the existing value with an empty value.  So, if necessary, call Get Credit Cards to retrieve info associated with the stored credit card before calling Edit Credit Card.  You can't edit a credit card number, security code, or card type (these situations only occur for new credit cards, so call Add Credit Card instead).

Method: PUT /api/v3/publisher/consumer/{userKey}/creditcard/{storedCreditCardId}

Authentication: oauth

Parameters:
  userKey - The UserKey of the consumer who owns the credit card.
  storedCreditCardId - The id of the stored credit card to edit.
 
Fields
Required Form Name Data Type Explanation
No
EditCreditCardInformation.
    BillingAddress
string The consumer's billing address.
No
EditCreditCardInformation.
    BillingAddress2
string The optional second line of the consumer's billing address.
No EditCreditCardInformation.
    BillingCity
string The consumer's billing city.
No EditCreditCardInformation.
    BillingCountry
string The consumer's billing country.
No EditCreditCardInformation.
    BillingPhone
string The consumer's billing phone number.
No EditCreditCardInformation.
    BillingState
string
The consumer's billing state.
No EditCreditCardInformation.
    BillingZip
string The consumer's billing zip code.
Yes
EditCreditCardInformation.
    ExpirationMonth
string The credit card expiration month.
Yes
EditCreditCardInformation.
    ExpirationYear
 int16 The credit card expiration year.
Yes
EditCreditCardInformation.
    NameOnCard
 int16 The name on the consumer's credit card.


Returns

base response fields


Sample Request:

PUT http://api.groupcommerce.com/api/v3/publisher/consumer/3c651ac9e6054d72b9b938f782790c8c/creditcard/5008200

form: EditCreditCardInformation.NameOnCard=G+Commerce&
EditCreditCardInformation.ExpirationMonth=1&EditCreditCardInformation.ExpirationYear=2015&EditCreditCardInformation.BillingAddress=24138+Hazelmere&EditCreditCardInformation.BillingCity=Mayfield&EditCreditCardInformation.BillingState=NY&EditCreditCardInformation.BillingZip=14853&EditCreditCardInformation.BillingCountry=US

Authorization: OAuth oauth_signature="cP2gt0fmSzxRMFTuqvCXsIfUCf8%3d", oauth_nonce="474818", oauth_timestamp="1322684248", oauth_consumer_key="eeb6b959-b854-4ad1-b563-e801c83cf81d", oauth_signature_method="HMAC-SHA1", oauth_version="1.0"


Sample JSON Response:

{
    "errors": [],
    "lastPublished": "/Date(1322683497944)/",
    "success": true,
    "version": "3",
}

Sample XML Response:

<editCreditCardResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <errors/>
    <lastPublished>2011-11-30T20:07:30.1819056Z</lastPublished>
    <success>true</success>
    <version>3</version>
</editCreditCardResponse>
Comments