cancel
Showing results for 
Search instead for 
Did you mean: 

Difference between Customer Profile ID and Customer Payment Profile ID

Hi,

 

First i'll explain my scenario. I'll be using "Charge a Credit Card"/"Debit a Bank Account" API for a transaction say T1. In Response for this(T1) ., will i get Customer Profile ID? Customer Payment Profile ID?

If i get those id's., Then i'll be creating ARB subscription using that Customer Profile ID.

 

Also after some period (say 2 successful installments)., there will be a need to update subscription. So, I'll update the subscription with it's SubscriptionID using "Update a Subscription" API . In response to that Updation request i'll get below mentioned profile data.,

    <profile>
        <customerProfileId>xxxxxx</customerProfileId>
        <customerPaymentProfileId>yyyyyyy</customerPaymentProfileId>
        <customerAddressId>zzzzzz</customerAddressId>
    </profile>

 

My doubt is .,

---> will the customerPaymentProfileId returned on updation response is same as the customerPaymentProfileId that returned on "Charge a Credit Card/Debit a Bank Account" API Response.

---> will i get Customer Profile ID? Customer Payment Profile ID? in Response of "Charge a Credit Card/Debit a Bank Account" API Req.

--->Can a Customer Profile have more than one Payment Profile?

---> Can we pass Customer Profile ID and Customer Payment Profile ID on Subscription Updation Request ? and maintain Single Customer Payment Profile for Single Customer Profile for a Subscription irrespective of number of updations on the same subscription?

 

Thanks,

Suresh Babu R

 

sureshrb3
Contributor
4 REPLIES 4

Hi,

 

If a new customer and new payment information is provided while calling charge a credit card,

then new customer profile and customer payment profile are created

I have the answers for the following for you.

1) Can the customer have more than 1 payment profile?

 - Yes the customer CAN have more than 1 payment profile

2) Can I pass customerId and customerPaymentProfileId in the update subscription request?

 - Yes, you can pass the customerId and customerPaymentProfileId in the update subscription request

3) Will I get customerId and customerPaymentProfileId in the Charge a creditcard/Debit a bank account response?

 - I tried Charge a credit card on the Sandbox environment and I see the customerId coming back in the response as follows:

 

 

<createTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
  <merchantAuthentication>
    <name>78BZ5Xprry</name>
    <transactionKey>8s2F95Q7brhHd7Tn</transactionKey>
  </merchantAuthentication>
  <refId>123456</refId>
  <transactionRequest>
    <transactionType>authCaptureTransaction</transactionType>
    <amount>5</amount>
    <payment>
      <creditCard>
        <cardNumber>5424000000000015</cardNumber>
        <expirationDate>2020-12</expirationDate>
        <cardCode>999</cardCode>
      </creditCard>
    </payment>
    <order>
     <invoiceNumber>INV-12345</invoiceNumber>
     <description>Product Description</description>
    </order>
    <lineItems>
      <lineItem>
        <itemId>1</itemId>
        <name>vase</name>
        <description>Cannes logo </description>
        <quantity>18</quantity>
        <unitPrice>15.00</unitPrice>
      </lineItem>
    </lineItems>
    <tax>
      <amount>4.26</amount>
      <name>level2 tax name</name>
      <description>level2 tax</description>
    </tax>
    <duty>
      <amount>8.55</amount>
      <name>duty name</name>
      <description>duty description</description>
    </duty>
    <shipping>
      <amount>4.26</amount>
      <name>level2 tax name</name>
      <description>level2 tax</description>
    </shipping>
    <poNumber>456654</poNumber>
    <customer>
      <id>99999456654</id>
    </customer>
    <billTo>
      <firstName>Ellen</firstName>
      <lastName>Johnson</lastName>
      <company>Souveniropolis</company>
      <address>14 Main Street</address>
      <city>Pecan Springs</city>
      <state>TX</state>
      <zip>44628</zip>
      <country>USA</country>
    </billTo>
    <shipTo>
      <firstName>China</firstName>
      <lastName>Bayles</lastName>
      <company>Thyme for Tea</company>
      <address>12 Main Street</address>
      <city>Pecan Springs</city>
      <state>TX</state>
      <zip>44628</zip>
      <country>USA</country>
    </shipTo>
    <customerIP>192.168.1.1</customerIP>
    <userFields>
      <userField>
        <name>MerchantDefinedFieldName1</name>
        <value>MerchantDefinedFieldValue1</value>
      </userField>
      <userField>
        <name>favorite_color</name>
        <value>blue</value>
      </userField>
    </userFields>
  </transactionRequest>
</createTransactionRequest>

<?xml version="1.0" encoding="utf-8"?>
<createTransactionResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
  <refId>
    123456
  </refId>
  <messages>
    <resultCode>
      Ok
    </resultCode>
    <message>
      <code>
        I00001
      </code>
      <text>
        Successful.
      </text>
    </message>
  </messages>
  <transactionResponse>
    <responseCode>
      1
    </responseCode>
    <authCode>
      THD9FS
    </authCode>
    <avsResultCode>
      Y
    </avsResultCode>
    <cvvResultCode>
      P
    </cvvResultCode>
    <cavvResultCode>
      2
    </cavvResultCode>
    <transId>
      60039691297
    </transId>
    <refTransID />
    <transHash>
      65D4B50DEDE15F9B0017EAD105415648
    </transHash>
    <testRequest>
      0
    </testRequest>
    <accountNumber>
      XXXX0015
    </accountNumber>
    <accountType>
      MasterCard
    </accountType>
    <messages>
      <message>
        <code>
          1
        </code>
        <description>
          This transaction has been approved.
        </description>
      </message>
    </messages>
    <userFields>
      <userField>
        <name>
          MerchantDefinedFieldName1
        </name>
        <value>
          MerchantDefinedFieldValue1
        </value>
      </userField>
      <userField>
        <name>
          favorite_color
        </name>
        <value>
          blue
        </value>
      </userField>
    </userFields>
    <transHashSha2 />
  </transactionResponse>
</createTransactionResponse>

rajvpate
Administrator Administrator
Administrator

Hi ,

 

I cannot see Customer profile id in your Response.

 

i need to know  .,

 

--> will i get "customer profile ID" and "customer payment profile ID" in the response of "Debit a bank account" API Req.

 

--> will i get "customer profile ID" and "customer payment profile ID" in the response of "Charge a creditcard" API Req.

 

-->If  I pass "customer profile ID" and "customer payment profile ID" in the update subscription request ., then no new "Customer Payment profile" and "customer profile" will be created, Right?

 

Kindly someone help me with this.,

 

Thanks in advance,

Suresh Babu R

Hi,

 

Apologies for the confusion.

Here is the actual request and response for Charge a credit card.

 

You will need to send createProfile as true in the request.

<createTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
  <merchantAuthentication>
    <name>78BZ5Xprry</name>
    <transactionKey>8s2F95Q7brhHd7Tn</transactionKey>
  </merchantAuthentication>
  <refId>123456</refId>
  <transactionRequest>
    <transactionType>authCaptureTransaction</transactionType>
    <amount>5</amount>
    <payment>
      <creditCard>
        <cardNumber>5424000000000015</cardNumber>
        <expirationDate>2020-12</expirationDate>
        <cardCode>999</cardCode>
      </creditCard>
    </payment>
    <profile>
      <createProfile>true</createProfile>
    </profile>
    <order>
     <invoiceNumber>INV-12345</invoiceNumber>
     <description>Product Description</description>
    </order>
    <lineItems>
      <lineItem>
        <itemId>1</itemId>
        <name>vase</name>
        <description>Cannes logo </description>
        <quantity>18</quantity>
        <unitPrice>45.00</unitPrice>
      </lineItem>
    </lineItems>
    <tax>
      <amount>4.26</amount>
      <name>level2 tax name</name>
      <description>level2 tax</description>
    </tax>
    <duty>
      <amount>8.55</amount>
      <name>duty name</name>
      <description>duty description</description>
    </duty>
    <shipping>
      <amount>4.26</amount>
      <name>level2 tax name</name>
      <description>level2 tax</description>
    </shipping>
    <poNumber>456654</poNumber>
    <customer>
      <email>abc@test.bnet</email>
    </customer>
    <billTo>
      <firstName>Ellen</firstName>
      <lastName>Johnson</lastName>
      <company>Souveniropolis</company>
      <address>14 Main Street</address>
      <city>Pecan Springs</city>
      <state>TX</state>
      <zip>44628</zip>
      <country>USA</country>
    </billTo>
    <shipTo>
      <firstName>China</firstName>
      <lastName>Bayles</lastName>
      <company>Thyme for Tea</company>
      <address>12 Main Street</address>
      <city>Pecan Springs</city>
      <state>TX</state>
      <zip>44628</zip>
      <country>USA</country>
    </shipTo>
    <customerIP>192.168.1.1</customerIP>
    <userFields>
      <userField>
        <name>MerchantDefinedFieldName1</name>
        <value>MerchantDefinedFieldValue1</value>
      </userField>
      <userField>
        <name>favorite_color</name>
        <value>blue</value>
      </userField>
    </userFields>
  </transactionRequest>
</createTransactionRequest>

 

<?xml version="1.0" encoding="utf-8"?>
<createTransactionResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
  <refId>
    123456
  </refId>
  <messages>
    <resultCode>
      Ok
    </resultCode>
    <message>
      <code>
        I00001
      </code>
      <text>
        Successful.
      </text>
    </message>
  </messages>
  <transactionResponse>
    <responseCode>
      1
    </responseCode>
    <authCode>
      MCGXT0
    </authCode>
    <avsResultCode>
      Y
    </avsResultCode>
    <cvvResultCode>
      P
    </cvvResultCode>
    <cavvResultCode>
      2
    </cavvResultCode>
    <transId>
      60039968938
    </transId>
    <refTransID />
    <transHash>
      95C3C1C3EF7CEF81CFFE7C93E4ABE889
    </transHash>
    <testRequest>
      0
    </testRequest>
    <accountNumber>
      XXXX0015
    </accountNumber>
    <accountType>
      MasterCard
    </accountType>
    <messages>
      <message>
        <code>
          1
        </code>
        <description>
          This transaction has been approved.
        </description>
      </message>
    </messages>
    <userFields>
      <userField>
        <name>
          MerchantDefinedFieldName1
        </name>
        <value>
          MerchantDefinedFieldValue1
        </value>
      </userField>
      <userField>
        <name>
          favorite_color
        </name>
        <value>
          blue
        </value>
      </userField>
    </userFields>
    <transHashSha2 />
  </transactionResponse>
  <profileResponse>
    <messages>
      <resultCode>
        Ok
      </resultCode>
      <message>
        <code>
          I00001
        </code>
        <text>
          Successful.
        </text>
      </message>
    </messages>
    <customerProfileId>
      1814493896
    </customerProfileId>
    <customerPaymentProfileIdList>
      <numericString>
        1809079678
      </numericString>
    </customerPaymentProfileIdList>
    <customerShippingAddressIdList>
      <numericString>
        1813164135
      </numericString>
    </customerShippingAddressIdList>
  </profileResponse>
</createTransactionResponse>

Let me check for Debit Bank account and get back to you.

For the question regarding subscriptions, if you provide the customerId and customerPaymentId for update subscriptions API, it will use the same one.

 

Does this help answer your question ?