Initiating payments from your app

App-to-App integration allows your custom app to initiate payments on Rabo Tap to Pay without user intervention.

App to app flow

  1. Your app sends a payment request to Rabo Tap to Pay (amount, transaction ID, callback URL)
  2. Rabo Tap to Pay processes the payment securely
  3. The user taps their card to complete the transaction
  4. Rabo Tap to Pay returns the result to your app via the callback URL
  5. Your app displays the payment result to the user

This approach keeps payment handling secure within Rabo Tap to Pay while allowing seamless integration with your POS or billing system.

Request data:

You can initiate a payment from a third-party app using a special URL. The following data can be included:

VarFormatDescription
idstringMandatory, unique value that can be used by the merchant to identify the transaction
amountintMandatory, amount in cents
callbackUrlstringMandatory when integrating using URL. The URL is used to provide status feedback
showResultbooleanOptional, displays the payment result screen in the Rabo Tap to Pay app (default: true). When set to false, the Rabo Tap to Pay app will not show the payment result screen and will instead return the payment result directly to the calling app.

Response data:

After the payment is complete, you receive feedback with the status of the payment with the following fields:

VarFormatDescription
idstringAs provided by the third-party app
amountintAs provided by the third-party app
statestringPayment status (see below)
transactionIdstringTransaction ID
terminalIdstringTerminal ID
AIDstringAID
truncatedPanstringCard number
authCodestringAuthorisation code
errorCodestringError code

The following statuses are used:

StatusMessage
APPROVEDpayment is successful
DECLINEDpayment failed
CANCELLEDthe retailer cancelled payment
INVALIDa mandatory field is missing
IN_PROGRESSanother payment is already in progress
INCORRECT_PINthe entered PIN code is incorrect
INSUFFICIENT_FUNDSthe balance is insufficient
UNKNOWN_ERRORan unknown error occurred
INIT_FAILEDtap to pay is not configured, open the Rabo Tap to Pay app

*Please note that this list may be expanded at a later time.

iOS

Initiate a payment by opening the Rabo Tap to Pay app via a custom URL scheme and receive the result through a registered callback URL.

Initiating a payment

let url = URL(string: "rabotaptopay://payment") 

if let url = url, let urlComponents = NSURLComponents(url: url, resolvingAgainstBaseURL: false) { 

var parameters : [URLQueryItem] = [] 

parameters.append(URLQueryItem(name: "id", value: "abcdefg")) 

parameters.append(URLQueryItem(name: "amount", value: "1234")) 

parameters.append(URLQueryItem(name: "callbackUrl", value: "thisappscheme://finished")) 

urlComponents.queryItems = parameters 

if let compiledCallbackUrl = urlComponents.url { 

if UIApplication.shared.canOpenURL(compiledCallbackUrl) { 

// Perform the operation on Rabo Tap to Pay by calling the Rabo Tap to Pay URL scheme + parameters 

UIApplication.shared.openURL(compiledCallbackUrl) 

 

} else { 

// If application is not installed: display an error message 

let alertController = UIAlertController(title: "Not installed", message: “Rabo Tap to Pay 

application not installed, please install and try again.", preferredStyle: .alert) 

alertController.addAction(UIAlertAction(title: "Okay", style: .default, handler: nil)) 

self.present(alertController, animated: true, completion: nil) 

} 

} 

} 
🚧

The scheme thisappscheme:// must also be registered in the app’s Info.plist.

After the payment is received

func application(_ app: UIApplication, open url: URL, options: 

[UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool { 

if let urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false), 

urlComponents.host == "finished" { 

// Move the URL query paramets to a String dictionary 

var parameters : [String:String] = [:] 

if let queryItems = urlComponents.queryItems { 

for item in queryItems { 

if let value = item.value { 

parameters[item.name] = value; 

} 

} 

} 

let id = parameters["id"] 

let amount = parameters["amount"] 

let state = parameters["state"] 

let transactionId = parameters["transactionId"] 

let terminalId = parameters["terminalId"] 

let AID = parameters["AID"] 

let truncatedPan = parameters["truncatedPan"] 

let authCode = parameters["authCode"] 

let errorCode = parameters["errorCode"] 

// Handle transaction with above parameters 

return true 

} 

} 


Android

Initiate a payment by sending an intent or deeplink to the Rabo Tap to Pay app and receive the result via an activity result callback.

Initiating a payment

final Intent intent = new Intent(); 

val id: String = [your id] 

val amount: Int = [your amount in cents] 

intent.setAction("nl.rabobank.taptopay.PAY") 

intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP) 

intent.putExtra("id", id) 

intent.putExtra("amount", amount) 

intent.putExtra("showResult", true) 

 

if (deeplink){ 

val uri = Uri.parse("rabotaptopay://payment?id=" + id +"&amount="+ amount + 

"&showResult=true" + “&callbackUrl =[your result url]“) 

val mapIntent = Intent(Intent.ACTION_VIEW, uri) 

startActivity(mapIntent) 

}else { 

startActivityForResult(intent, [your request code]) 

} 

After the payment is received

override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { 

if (requestCode == [your result code]) { 

when (resultCode) { 

Activity.RESULT_OK -> { 

val paymentFinishedFragment = PaymentFinishedFragment() 

val id = data.getStringExtra("id") 

val amount = data.getIntExtra("amount", 0) 

val state = data.getStringExtra("state") 

val transactionId = data.getStringExtra("transactionId") 

val AID = data.getStringExtra("AID") 

val truncatedPan = data.getStringExtra("truncatedPan") 

val authCode = data.getStringExtra("authCode") 

val errorCode = data.getStringExtra("errorCode 

} 

} 

} 

super.onActivityResult(requestCode, resultCode, data) 

}