Showing results for 
Search instead for 
Did you mean: 

Pass amount

how to pass amount from Android?


Hello @somnath


Could you please specify exactly what you are attempting and the response from the gateway?



Administrator Administrator

I think the question is about MobileInApp transactions and specificaly Accept SDK.
I don't wanna be the captain obvious here, but I searched too much for it and no answer. The same as  this question and others where people are asking about paying "without loggin" is where they want to integrate a payment in the Android/iOS app, no merchant or POS, just a simple Credit Card info form payment. The one you call MobileInApp (Accept SDK).
 The GitHub sample app shows how to get a payment nonce, but doesn't show how to do an actual request for a transaction through Accept. There is the Android Pay, but this is not what people are asking for. That Java sample code you have in here is missing include libraries, I mean where do I get them? I guess it is Java, but not for Android? As in Android integration I included all the Gradle info.  
  All in all it's too much frustration to integrate the payment for somebody who is new in this field and wants just to add this functionality to the app an be done with it. A complete sample will be apreciated. 
 Oh, at first glance on the site I couldn't tell you guys are providing InApp payments, all the info and videos are mentioning the Point of Sales, Merchants and peaple physicaly swiping cards. The client had to tell me to come back to the site that he knows you are providing that kind of service, and I had to digg deeper to find it. It seems it's like an afterthought. 
 Anyway, sorry for the little rant, it's been a long day and I hope the feedback will be for help.

P.S I will still apreciate an example of Payment request on Android using Accept. Thank you.

Hello @FormulaS1


After obtaining the nonce on the mobile device, your application can now send it to your server and follow-up with Create an Accept Transaction using the nonce. 


I do agree our documentation could be improved to suggest specific steps after obtaining the nonce on a mobile device.



Hi RichardH,
thank you for your reply.

What do you mean by "your server"?
I mean I don't have a "server", I have an Android app and I have an account with I expect that I will create a transactionRequest and  you guys will process the credit card payment. Is it the way it works or I am totally wrong here?


By the way, like in my previous post I did find the Create an Accept Transaction example. But the Java code there is using these libraries:

import net.authorize.Environment;
import net.authorize.TransactionType;
import net.authorize.api.contract.v1.*;
import net.authorize.api.controller.CreateTransactionController;
import net.authorize.api.controller.base.ApiOperationBase;

In my Android application it seems I have only access to: 




So I am not able to follow the code in the example you are suggesting.

Also, what is the object that "createTransactionRequest"  should be called from? The AcceptSDKApiClient doesn't have it.

In the Java example it is actually a  CreateTransactionRequest "object" that gets created and then you call methods from there, but like I said I am unable to create that object because it is part of some libraries from you API that is not in my Android project.


Thank you.

OK, I think I missed something when I was reading the information on your web-site.
Apparently I need one more part of the puzzle?



Can play the role of the part I higlighted in red? or I have to have a "server" or some third party service to do that?

Thank you.

Hello @FormulaS1


Yes, you would need your own server or a third-party service which performs the actual transaction using the payment nonce.



Hey @somnath & @FormulaS1,


Thanks a lot for this post, I was stuck with the same issue for quiet a while now and during my R & D came across your post.. Cleared a lot of things for me..


@RichardHTheir should be a better way to informing developers regarding what needs to be done after obtaining Nonce. At the moment its very confusing and missleading. At least a note in the Github example would help in solving this kind of confusion further in the future.



@RichardH wrote:

Hello @FormulaS1


Yes, you would need your own server or a third-party service which performs the actual transaction using the payment nonce.