Reply
Highlighted
Contributor
Posts: 44
Registered: ‎02-12-2018

Accept Customer Hosted Page - how to determine result?

If we use getHostedProfilePageRequest to obtain a token for a customer to enter their payment information on an Accept Customer Hosted Form, and we are using a full page redirect to that hosted page, is there a way for us to determine whether the customer successfully saved a payment method on that form, both in cases where they returned to a page under our control (presumably using the parameter hostedProfileReturnUrl, and we note there is no "cancelURL" variant for this API), and via a Webhook if they close their browser before returning?

Highlighted
Contributor
Posts: 44
Registered: ‎02-12-2018

Re: Accept Customer Hosted Page - how to determine result?

Please, is there any response to this question?

Highlighted
Contributor
Posts: 44
Registered: ‎02-12-2018

Re: Accept Customer Hosted Page - how to determine result?

For the lack of any responses to the above, I'm investigating the possibility of using the API call getCustomerPaymentProfileListRequest to retrieve the customer and check if a default payment profile has been configured.  However, I have been unable to locate any documentation of the options for the searchType element of this API request, so I don't know if it is possible to search by a customer profile ID or not.  Can anyone point me to documentation of the options for searchType on this API, or at a minimum tell me if it is possible to use this API to search for any/all saved payment profiles for a specific customer profile ID?

Highlighted
Contributor
Posts: 44
Registered: ‎02-12-2018

Re: Accept Customer Hosted Page - how to determine result?

Now I am becoming quite concerned.  Judging from the declaration of CustomerPaymentProfileSearchTypeEnum in the C# API sample project, it appears that the ONLY search option with that API is for cards expiring in the current month?  Is that the case?  There's no way to search for a list of payment profiles associated with a particular customer profile ID?

 

Our payment application needs to be able to display a page to indicate whether or not payment profile information for the customer has been updated after control is rerouted back to us from the Accept Customer page.  Since there doesn't seem to be a way to pass back this information from an Accept Customer page via a unique URL (e.g., success vs. cancel, such as in the case of single payments), and also there apparently isn't a way to query to see if a default payment profile has been configured for a customer, it seems that the only way to get the result of a customer profile edit on an Accept Hosted page is via a webhook, and while that would allow us to eventually update our database correctly, it won't work for the UI.

 

Please let me know ASAP if I am wrong about this - otherwise I'll probably need to document this as a shortcoming of Authorize.net for purposes of choosing our payment provider.

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

Re: Accept Customer Hosted Page - how to determine result?

Hi @dsandberg

 

You should be able to use our Customer Webhooks for listening for such events . 

 

https://developer.authorize.net/api/reference/features/webhooks.html#Event_Types_and_Payloads

 

PAYMENT PROFILES EVENTS

Event Description
net.authorize.customer.paymentProfile.created Notifies you that a payment profile has been created.
net.authorize.customer.paymentProfile.updated Notifies you that a payment profile has been updated.
net.authorize.customer.paymentProfile.deleted Notifies you that a payment profile has been deleted.




Send feedback at developer_feedback@authorize.net
Highlighted
Contributor
Posts: 44
Registered: ‎02-12-2018

Re: Accept Customer Hosted Page - how to determine result?

[ Edited ]

Anurag,

 

I'd already said that about the webhook above, if you read my most recent message.  The problem is that we can't block the customer UI while waiting for the webhook response, and the customer UI needs to know whether a payment profile was successfully configured before it can display the next screen.  Is there no way of making an API call to get a list of any/all payment profiles for a specific customer profile ID?  All we need to know is if a default payment profile has been created for that customer profile.  If there is such an API, we could possibly use that for deciding how to display the next UI screen, but as I said above, from the sample code it appears such searches are not supported.

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

Re: Accept Customer Hosted Page - how to determine result?

Hi @dsandberg

 

You can use this API for getting the list of payment profileIDs  for a customer ID 

 

https://developer.authorize.net/api/reference/index.html#customer-profiles-get-customer-payment-prof...

 

Thanks

Anurag





Send feedback at developer_feedback@authorize.net
Highlighted
Contributor
Posts: 44
Registered: ‎02-12-2018

Re: Accept Customer Hosted Page - how to determine result?

How would I use that API?  It doesn't provide a field for specifying what customer profile ID, and according to the sample code, the only supported searchType value is to look up profiles that are about to expire.  If there is a way for it to do what you say, then can you please direct me to some documentation thereof (the API documentation and "Try It" sample that you linked do not support the notion that this API can be used for that purpose).

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

Re: Accept Customer Hosted Page - how to determine result?

I think you need to use the 

 

https://developer.authorize.net/api/reference/index.html#customer-profiles-get-customer-profile

 

and pass the customer ID in it . The payment profiles linked to it comes in the response . 

 

 

Thanks





Send feedback at developer_feedback@authorize.net
Highlighted
Contributor
Posts: 44
Registered: ‎02-12-2018

Re: Accept Customer Hosted Page - how to determine result?

Ok, thanks Anurag.  That one is closer to being what we need, but the response XML for GetCustomerProfile doesn't appear to include anything to identify the default payment profile (or even if a default has been specified).  Is there a way for us to retrieve information about the default payment profile for a customer profile (even just the ID thereof, in order to use it in conjunction with GetCustomerProfile)?