Integration and Testing

Authorize.Net API questions and help with your payment integration.

Reply
Member
Posts: 2
Registered: ‎01-21-2016

Authorize.net CIM Hosted payment form, getting credit card token

Hello All,

 

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? 

 

 

Contributor
Posts: 51
Registered: ‎11-12-2015

Re: Authorize.net CIM Hosted payment form, getting credit card token

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.

 

http://developer.authorize.net/api/reference/#customer-profiles-get-customer-profile

 

 

Member
Posts: 2
Registered: ‎01-21-2016

Re: Authorize.net CIM Hosted payment form, getting the payment profile id for credit card token

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

Contributor
Posts: 51
Registered: ‎11-12-2015

Re: Authorize.net CIM Hosted payment form, getting the payment profile id for credit card token

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.

Member
Posts: 2
Registered: ‎04-29-2017

Re: Authorize.net CIM Hosted payment form, getting the payment profile id for credit card token

Hi

Apologies for dragging up an old post.

It seems to me as though the PHP example is incorrect for GetCustomerProfile in these docs:

 

http://developer.authorize.net/api/reference/#customer-profiles-get-customer-profile-ids

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.

Thanks
Joel

Posts: 2,765
Topics: 57
Kudos: 272
Blog Posts: 67
Registered: ‎12-05-2011

Re: Authorize.net CIM Hosted payment form, getting the payment profile id for credit card token

Hello @JD

 

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.

 

Richard

All Star
Posts: 699
Registered: ‎11-03-2016

Re: Authorize.net CIM Hosted payment form, getting the payment profile id for credit card token

Hi @JD,

 

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.

All Star
Posts: 699
Registered: ‎11-03-2016

Re: Authorize.net CIM Hosted payment form, getting the payment profile id for credit card token

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.