cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieving the Credit Card Type from the CIM api

I need to retrieve the Credit Card Type from a saved Customer Payment Profile. Any ideas on how I can do this?

 

When I retireve a payment profile, there is a field called: "creditcardtype" but it is always null when I look at the value.

 

My assumption was it is null because I did not set the value when I created the profile. I've looked for how to save that data, but when createing a payment profile I have to use either the CreditCardType or SimpleCreditCardType objects to populate the information and neither of these objects contains a field for Credit Card type. So I have 2 questions:

 

1)If I am to set the value myself, where/how do I set it?

 

2)If there is no way to set the value myself, how can retrieve it otherwise?

 

Any help would be greatly appreicated on this matter.

 

Thank you,

Robert Barham

rbarham65
Member
1 REPLY 1

Hi Robert,

 

The credit card type is only returned with a createCustomerProfileTransactionResponse as the delimited <directResponse> value in the 52nd field.

 

I do not receive a credit card type element in response to a getCustomerProfileRequest or a getCustomerPaymentProfileRequest. Here are the results that are returned to me:

 

<getCustomerProfileResponse>
-
<messages>
<resultCode>Ok</resultCode>
-
<message>
<code>I00001</code>
<text>Successful.</text>
</message>
</messages>
-
<profile>
<merchantCustomerId>CIM123</merchantCustomerId>
<description>some description</description>
<email>mark@example.com</email>
<customerProfileId>165224</customerProfileId>
-
<paymentProfiles>
<customerPaymentProfileId>160894</customerPaymentProfileId>
-
<payment>
-
<creditCard>
<cardNumber>XXXX1111</cardNumber>
<expirationDate>XXXX</expirationDate>
</creditCard>
</payment>
</paymentProfiles>
</profile>
</getCustomerProfileResponse>

 

<getCustomerPaymentProfileResponse>
-
<messages>
<resultCode>Ok</resultCode>
-
<message>
<code>I00001</code>
<text>Successful.</text>
</message>
</messages>
-
<paymentProfile>
<customerPaymentProfileId>160894</customerPaymentProfileId>
-
<payment>
-
<creditCard>
<cardNumber>XXXX1111</cardNumber>
<expirationDate>XXXX</expirationDate>
</creditCard>
</payment>
</paymentProfile>
</getCustomerPaymentProfileResponse>

 

 

Thank you,

 

Elaine

Elaine
Trusted Contributor
Trusted Contributor