01-21-2016 04:05 PM
I'm currently integrating CIM alongside our website form, I tested the code that the developers provided in the sandbox and it seems I can create a customer profile id without a payment profile id and still be able to access the hosted form, now here lies my problem in order for me to get the credit card token from authorize I would need both the customer id and payment id, my company wants to get rid of the credit card form that we have and use the Authorize CIM Hosted one instead for the credit card portion, I was able to store the customer id using our forms but I'm having trouble getting the payment id, I looked at the sample code and it seems that it needs the payment profile id and the customer id to get the payment profile id, is there any way for me to get the customer payment profile after the customer uses the form to fill in the payment information? or is there another option I should consider?
01-22-2016 07:18 AM
Once an end-user submits the form, you will need to send a GetCustomerProfileRequest to get the list of payment profiles now available, which will include the payment profile which was just created.
01-22-2016 11:42 AM
Thanks for the help, I was able to get the number of payment profiles that the end-user has but what I really need is the payment profile id of the end-user, so that I can use it along with the customer id for the credit card token. I really appreciate the help and I should update the question, is there any way for me to get the payment profile id after the user finishes using the authorize.net CIM Hosted Form
01-22-2016 01:05 PM
As far as I know, there is currently no way to receive that information. And depending on what hosted form you are showing, the end-user may have added one-or-more payment profiles, deleted one-or-more payment profiles, or edited one-or-more payment profiles, or have done nothing.
Perhaps there will eventually be a way for this information to be passed into the return url. Might be a good idea to suggest in the Ideas forum -- I'd vote for it.
What I am doing right at this very minute is writing code to compare what payment profiles were there before the redirect to the hosted page to those that are there when my return url is used.
It's going to be pretty slow compared to reading payment methods locally.
09-19-2017 05:44 AM
Apologies for dragging up an old post.
It seems to me as though the PHP example is incorrect for GetCustomerProfile in these docs:
Compared to the c#, java and node examples it is passing in credit card and billTo information when all I want is to get the profile that has already been created back.
What I am trying to do:
I have already sucessfully posted a hosted payments transaction - I am now trying to get the payment token to return to our API so that we can charge the card again in future. I am told that getting the CustomerProfile is the place to start.
09-19-2017 06:28 AM
To clarify, you stated that you used a hosted form to successfully process a single transaction. If that is correct, if you did not specify to create a customer profile at the same time, none was created. Instead, you'll need to use createCustomerProfileFromTransaction using the transaction id of the original transaction.
09-20-2017 12:44 PM
With regards to the PHP sample, that file's actually creating a profile first and is then getting the details for the profile, so it's a more complete example than the other languages.
I'll see about adding some more comments, though, to make it clear what it's doing.
09-21-2017 09:59 AM
Actually, now that I look at it, I realize I was looking at the wrong source file. Your link goes to the "Get Customer Profile" section of the API Reference, so that's a sample for a different kind of request. If you're looking at the "Get Customer Profile IDs" section, the sample there doesn't have any card information.