cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Getting Profile Information from ARBCreateSubscription Response

Hi,

I'm invoking ARBCreateSubscription API from my microservice. I've referred API reference. I need to process the Profile informations(such as "customerProfileId" , "customerPaymentProfileId", "customerAddressId") from ARBCreateSubscription response. Is GetSubscription is the only possible way to do this. Is there any possibilities to process/get Profile informations from ARBCreateSubscription  Response because I've read from Authorize.net API reference that ARBCreateSubscription response will hold profile informations. I cannot find any code snippet (JAVA would be better) to capture profile informations from response. Kindly help me with this.

 

 

Thanks,

Suresh Babu

sureshrb3
Contributor
1 ACCEPTED SOLUTION

Accepted Solutions

You can print these values as:

 

System.out.println(response.profile.customerProfileId);
System.out.println(response.profile.customerPaymentProfileId);
System.out.println(response.profile.customerAddressId);

 

Hope this helps!!

View solution in original post

AforANET
Authorize.Net Expert Authorize.Net Expert
Authorize.Net Expert
7 REPLIES 7

Hi , 

You get the following things as a response of CreateARBSubscription API:

 

customerProfileIdPayment gateway assigned ID associated with the customer profile. 
Up to 13 digits.
customerPaymentProfileIdPayment gateway assigned ID associated with the customer payment profile. 
Up to 13 digits.
customerAddressIdPayment gateway-assigned ID associated with the customer shipping address. Up to 13 digits.

 

 

You can use these IDs in GET Subscription API  to retrieve and process the required information.

AforANET
Authorize.Net Expert Authorize.Net Expert
Authorize.Net Expert

Hi @AforANET,

 

How to print these things "customerProfileId","customerPaymentProfileId","customerAddressId" from response of CreateARBSubscription API. Do provide me with the code snippet if possible.

 

 

 ARBCreateSubscriptionResponse response = controller.getApiResponse();
             if (response!=null) {

                 if (response.getMessages().getResultCode() == MessageTypeEnum.OK) {
                    System.out.println("::::: response :::::");
                    System.out.println(response.getSubscriptionId());
                    System.out.println(response.getProfile());
//how to get "customerProfileId"
//how to get "customerPaymentProfileId"
//how to get "customerAddressId" System.out.println(response.getMessages().getMessage().get(0).getCode()); System.out.println(response.getMessages().getMessage().get(0).getText()); } else { System.out.println("Failed to create Subscription: " + response.getMessages().getResultCode()); System.out.println(response.getMessages().getMessage().get(0).getText()); } }

 

 

 

 

Thanks,

Suresh Babu

You can print these values as:

 

System.out.println(response.profile.customerProfileId);
System.out.println(response.profile.customerPaymentProfileId);
System.out.println(response.profile.customerAddressId);

 

Hope this helps!!

AforANET
Authorize.Net Expert Authorize.Net Expert
Authorize.Net Expert

You can also look at the sample codes for java here:

https://github.com/AuthorizeNet/sample-code-java

AforANET
Authorize.Net Expert Authorize.Net Expert
Authorize.Net Expert

Hi ,

 

Thanks mate for the answer!

 

I have few more doubts.

 

Firstly., my sandbox account is not logging me in (seems it'll expire in a day or two). Everytime i need to create a new sandbox account to work/test with Authorize.net API's. Even if try forget password / forgot username., i cant recover it even if i give correct data. Kindly do help me with this.

(sample login : Authorize2Pay)

 

Secondly., I've heard that a normal payment transaction will take upto 3days max for completion. Until that it'll be in a intermediate state so that on refund we can void that transaction instead of a real refund request. My doubt is whether ARB transactions behaves like this. When will my individual transactions of ARB gets complete and how long it will take. And if i need to refund a transaction what should i do. (NOTE : I'll be invoking Authorize.net api's and no process will be done manually on merchant account).

 

im done with my doubts for now .

 

Thanks in advance,

Suresh Babu R.

Hi ,

 

you're welcome!

 

I will answer your second question first. The transaction from ARB subscriptions are processed around or after 2 am PST. You can refer to the following documentation for further details:

https://developer.authorize.net/api/reference/features/recurring_billing.html

 

Also, you can use recurring billing's get subscription API with includeTransactions flag set to true. This API willl return you details of the ARB subscription as well as the Transactions related to this subscription. Please refer to the below link for more details:

https://developer.authorize.net/api/reference/index.html#recurring-billing-get-subscription

 

Once you get the transaction id, you can refer to our transaction reporting APIs for retrieving more information. Please refer to the below link:

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

 

 

Now, coming to your very first question- You can always recover your account by using forgot password link. After clicking on the link, you will get a mail from Authorize.Net with the link where you can update your password. But, you said that you have tried this thing and is still not working. May I know in detail what's actually happening? Are you getting mail? Do you remember your secret answer?

 

 

 

AforANET
Authorize.Net Expert Authorize.Net Expert
Authorize.Net Expert

Hi ,

 

Thanks once again!

 

The forgot password link worked for me.

But i got some more doubts. I'll be have a scenario where i need to create a subscription with (1 trial + 10 installments = 11occurrences). Inbetween this subscription there are chances for a need to update this subscription and also i need to charge a new payment request using the customerProfileId generated during subscription on that update process. I need this additional payment request to be linked with my subscription. On creating a subscription , im getting "CustomerProfileId", "CustomerPaymentProfileId", "CustomerAddressId". What is the difference between CustomerPaymentProfileId and CustomerProfileId. On ChargeCustomerProfile.,

 

			CustomerProfilePaymentType profileToCharge = new CustomerProfilePaymentType();
	        profileToCharge.setCustomerProfileId(customerProfileId);
	        PaymentProfile paymentProfile = new PaymentProfile();
	        paymentProfile.setPaymentProfileId(customerPaymentProfileId);
	        profileToCharge.setPaymentProfile(paymentProfile);

i was guided by authorize.net API reference to pass "CustomerProfileId" and "CustomerPaymentProfileId" as request parameter. Also there'll be a need to update the subscription multiple times and to have a "ChargeCustomerProfile"hit to have a additional payment. How to keep all these grouped and how to track these transactions.Kindly do help with this.


Is there any possibilities to schedule a call to clarify my doubts.(I'm from india)


Thanks,

Suresh Babu R.