Reply
Member
Posts: 9
Registered: ‎03-30-2017

Create a Customer Profile from a Transaction

Hi 

 

We have implemented Customer Payment Profile, we have stcuked on one point, here is the scenario:

 

Customer completes a payment via credit card (Accept JS is sued to generate a nonce for card no).

With transaction id we create customer and payment profile.

 

Later our customer comes again and submit a payment with same card no used in last transaction.

So this time to create customer payment profile via transaction id, we use the same method but this time we are passing customer profile id in the request.

 

As the customer has submitted the latest payment with same card for which a payment profile id is already created then either it should return same payment profile or some message to says duplicate card. But its seems like its create a new payment profile for the same card for the customer id which already have a payment profile for the card.

 

We can not add validation on our site since the card no is not stored and we do not know if user have used same card again.

 

Please help us, or let me know if I have missed anything?

 

Thanks in advance!

Regards,

Tarun

Member
Posts: 9
Registered: ‎03-30-2017

Re: Create a Customer Profile from a Transaction

Here are the json data we are sending for first and second step:

 

First transaction for card no 4111111111111111

 

{
    "createCustomerProfileFromTransactionRequest": {
        "merchantAuthentication": {
            "name": "API_LOGIN_ID",
            "transactionKey": "API_TRANSACTION_KEY"
        },
        "transId": "122"
    }
}

First transaction for the same card no 4111111111111111 under customer profile id returned in last request:

{
    "createCustomerProfileFromTransactionRequest": {
        "merchantAuthentication": {
            "name": "API_LOGIN_ID",
            "transactionKey": "API_TRANSACTION_KEY"
        },
        "transId": "123",
        "customerProfileId":"5454554545"
    }
}
Posts: 333
Kudos: 68
Solutions: 36
Registered: ‎03-13-2017

Re: Create a Customer Profile from a Transaction

One way you can avoid is when the customer returns on your site you can retrive the payment profiles for that customer ID and display the last 4 of the cards added during checkout flow along with the option of using a new card   . 

 

 





Send feedback at developer_feedback@authorize.net
Member
Posts: 9
Registered: ‎03-30-2017

Re: Create a Customer Profile from a Transaction

@Anurag Thanks for your response.

 

My point is, in real world is it not possible that 2 cards with same last 4 digits? If yes, it can happen that in a family two persons has differnt cards with same last 4 digits.

 

Also I am thinking why its not been handled by authnet API, So if we pass transaction id and customer id to create a payment profile, then it should check if the customer has already added that card's card as payment profile then it should not create another and returns the same which is already generated.

 

Also is there any expiry date of payment profile? how we can extract it? It seems not returning in create payment profile method.

Posts: 333
Kudos: 68
Solutions: 36
Registered: ‎03-13-2017

Re: Create a Customer Profile from a Transaction

[ Edited ]

So we do have duplicate check for payment profiles . 

 

For a payment  profile to be duplicate  below fields needs to be same in the request 

 

cardNumber

billTo.firstName

billTo.lastName

billTo.address

billTo.zip

 

 

you should see below error in case of it 

 

https://developer.authorize.net/api/reference/responseCodes.html?code=E00039

 

We will have the documentation updated for it . 

 

 





Send feedback at developer_feedback@authorize.net
All Star
Posts: 699
Registered: ‎11-03-2016

Re: Create a Customer Profile from a Transaction

Hi Tarun,

 

We already have documentation of the duplicate checking in our Customer Profiles documentation.

 

We check for duplicates in different ways depending on the scenario. For example, we're only checking for duplicates of the card number when you're adding a card to an existing customer profile, and even then, only checking for duplicates within that profile.

 

In your scenario, if you want to take advantage of our duplicate checking upon creation of the profile, you would need to always create the profiles with a merchantCustomerId that's meaningful to you and identifies the customer on your end. Then, whenever a customer returns to your site, you identify the customer. Then either you would determine that you already have a profile on file for the customer, or you would attempt to create a new profile with the same merchantCustomerId, resulting in an error.

 

If you want to prevent the customer from adding the same card twice, our duplicate checking would help with that, but only if your interacting with the same profile on our end each time the customer returns to your site.

 

There is no general process on our end that would prevent the same card number from being used twice in two different profiles, and that's by design. A common scenario might be that a husband registers on one site with their shared credit card, and a wife registers on the same site with the same card. The husband and wife would be separate customers, and the site would create two different customer profiles for them, so if we somehow prevented a card number from being used on a different profile, that would cause big problems.