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

Get Credit Cards

This method will return a list of credit cards previously used and stored by the consumer.

Method: GET /api/v3/publisher/consumer/{userKey}/creditcards
Authentication: oauth
 
Parameters
UserKey - the publisher assigned userKey for the consumer.

Returns
base response fields
creditCards - Will return a list of CreditCard.

Sample Request:

GET http://api.groupcommerce.com/api/v3/publisher/consumer/3c651ac9e6054d72b9b938f782790c8c/creditcards

Authorization: OAuth oauth_signature="KisNINC5yhLKVS%2b%2bbg6viZK9wWY%3d", oauth_nonce="711533", oauth_timestamp="1322681014", oauth_consumer_key="eeb6b959-b854-4ad1-b563-e801c83cf81d", oauth_signature_method="HMAC-SHA1", oauth_version="1.0"

Sample JSON Response:

{
    "errors": [],
    "lastPublished": "/Date(1322681189173)/",
    "success": true,
    "version": "3",
    "metaData": {
        "pageCount": 1,
        "pageNumber": 1,
        "pageSize": 2,
        "totalItems": 2
    },
    "creditCards": [
        {
            "billingAddress": "24139 Wimbledon",
            "billingAddress2": null,
            "billingCity": "Shaker Heights",
            "billingCountry": null,
            "billingPhone": null,
            "billingState": "OH",
            "billingZip": "44122",
            "expiration": "2015-01",
            "maskedCardNumber": "XXXX5454",
            "nameOnCard": "G Commerce",
            "storedCreditCardId": "5008200",
            "type": "MasterCard"
        },
        {
            "billingAddress": "123 road street",
            "billingAddress2": null,
            "billingCity": "Mayfield",
            "billingCountry": null,
            "billingPhone": null,
            "billingState": "NY",
            "billingZip": "44121",
            "expiration": "2016-06",
            "maskedCardNumber": "XXXX0005",
            "nameOnCard": "lol name",
            "storedCreditCardId": "5018308",
            "type": "Amex"
        }
    ]
}


Sample XML Response:

<getCreditCardsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance">       <errors/>
    <lastPublished>2011-11-30T19:27:17.5299098Z</lastPublished>            
    
<success>true</success>
    <version>3</version>
    <metaData>
        <pageCount>1</pageCount>
        <pageNumber>1</pageNumber>
        <pageSize>2</pageSize>
        <totalItems>2</totalItems>
    </metaData>
    <creditCards>
        <creditCard>
            <billingAddress>24139 Wimbledon</billingAddress>
            <billingAddress2 i:nil="true"/>
            <billingCity>Shaker Heights</billingCity>
            <billingCountry i:nil="true"/>
            <billingPhon
i:nil="true"e/>
            <billingState>OH</billingState>
            <billingZip>44122</billingZip>
            <expiration>2015-01</expiration>                                                  
            
<maskedCardNumber>XXXX5454</maskedCardNumber>
            <nameOnCard>G Commerce</nameOnCard>
            <storedCreditCardId>5008200</storedCreditCardId>
            <type>MasterCard</type>
        </creditCard>
        <creditCard>
            <billingAddress>123 road street</billingAddress>
            <billingAddress2 i:nil="true"/>
            <billingCity>Mayfield</billingCity>
            <billingCountry i:nil="true"/>
            <billingPhone
i:nil="true"/>
            <billingState>NY</billingState>
            <billingZip>44121</billingZip>
            <expiration>2016-06</expiration>
            <maskedCardNumber>XXXX0005</maskedCardNumber>
            <nameOnCard>lol name</nameOnCard>
            <storedCreditCardId>5018308</storedCreditCardId>
            <type>Amex</type>
        </creditCard>

    </creditCards>
</getCreditCardsResponse>
Comments