Reply
Highlighted
Member
Posts: 2
Registered: ‎12-06-2017

Accept hosted creating a payment and subscription using IFrame interface

Hi,

 

Hope all is well.

 

I'm trying to use the Accept Hosted API with IFrame to create a payment then create a subscription.

 

The problem is that hostedPaymentIFrameCommunicatorUrl doesn't return the customerProfileId nor customerPaymentProfileId nor customerAddressId in order for me to use the createSubscriptionFromCustomerProfile function, instead I get a response like:

 

response:"{"accountType":"MasterCard","accountNumber":"XXXX0001","transId":"60035677276","responseCode":"1","authorization":"IXQSDB","billTo":{"phoneNumber":"729730141","firstName":"test","lastName":"test","address":"test","city":"city","state":"test","zip":"123","country":"Afghanistan"},"totalAmount":"12.00","dateTime":"12/6/2017 12:04:46 PM"}"

 

I am sending in the request the customer billto details, they get saved as a customer profile, but again no ID received, nor the rest of the required values.

 

How can I get the required values from the transaction ID?

 

Is this even possible? If not what is the workflow for this scenario? Is there any proper documentation somewhere?

 

Best wishes,

Claudiu

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

Re: Accept hosted creating a payment and subscription using IFrame interface

Hi @claudiu

 

You can use the Get Transaction Details using the transaction ID returned to retirve the customer profile ID associated with it . 

 

https://developer.authorize.net/api/reference/index.html#transaction-reporting-get-transaction-detai...

 

 

profile Contains customer profile information used for this transaction.   
customerProfileId The ID of the customer profile used to create this payment transaction. 
Numeric
customerPaymentProfileId The ID of the customer payment profile used to create this payment transaction. E.g. ID of a credit card or bank account held on file with Authorize.Net 




Send feedback at developer_feedback@authorize.net
Highlighted
Member
Posts: 2
Registered: ‎12-06-2017

Re: Accept hosted creating a payment and subscription using IFrame interface

Hi,

 

Hope all is well.

 

Yeah, would have been nice if that would have worked, no customer profile id returned.

 

I used CustomerAddressType and CustomerDataType to submit through GetHostedPaymentPageRequest and have the fields pre populated.

 

On succesful payment I used CustomerProfileBaseType and CreateCustomerProfileFromTransactionRequest which creates the profile id and grabs the data from the prior request for some reason.

 

Then used GetCustomerProfileRequest to grab payment profile id and address id and finally used ARBCreateSubscriptionRequest to create the subscription.

 

Best wishes,
Claudiu