Developers
Developer Hub
Deprecated Integration Methods
integrating ideal the ideal alternative payment method for a web sdk and mobile sdk integration, has been decommissioned integrating ideal for react native to add ideal support to your payments widget set the currency code to eur (euro) set the judoid include ideal as a payment method an example of a valid ideal configuration const configuration judoconfiguration = { judoid 'myjudoid', paymentmethods judopaymentmethod ideal } const response = await judo invokepaymentmethodscreen( mode, configuration, ) once the currency and judoid are set, ideal will be available as a payment method in the payments widget integrating ideal for android to add ideal support to your payments widget, set the currency code to eur (euro) the judoid the judoid parameter can be set by calling setjudoid on the judo builder an example of a valid ideal configuration val judo = judo builder(paymentwidgettype payment methods) setjudoid("my judo id") setcurrency("eur") build() once the currency and judoid are set, ideal will be available as a payment method in the payments widget integrating ideal for ios to add ideal support to your payments widget, set currency code to eur (euro) the judoid parameter in the jpconfiguration instance an example of a valid ideal configuration configuration judoid = @"my judo id"; once the currency and judoid are set, ideal will be available as a payment method in the payments widget integrating ideal via web sdk ideal is an online payment method that enables consumers to pay through their own bank prerequisites make sure you have implemented the following prerequisites from the web sdk integration guide web sdk docid 40dwe6lbub7vdkza1qydc web sdk docid 40dwe6lbub7vdkza1qydc step one add the ideal payment tab the fields referred to in this step are part of the iframe configuration object supplied in step two in the prerequisites createcarddetails() call judo createcarddetails('payment iframe', iframeconfiguration) to add the ideal payment tab ensure the array set for the enabledpaymentmethods field includes ‘ideal’ for example enabledpaymentmethods \['card', 'ideal'] transaction timeout you can alter the timeout for ideal transactions by setting the field idealpollingtimeout set it as the number of ms you want the timeout to be for example idealpollingtimeout 40000 would set the transaction timeout to 40000ms (40 seconds) if the field is not provided, the default value is 60000ms step two making an ideal transaction define the idealconfiguration object for the payment ensure the details used when creating the paymentsession match the values set in the following configuration ideal configuration example const idealconfiguration = { judoid "yourjudoid", merchantpaymentreference "yourpaymentreference", merchantconsumerreference "yourconsumerreference", currency "eur", amount 10, country "nl", accountholdername "account holder name", paymentmethod "ideal" } to successfully process an ideal transaction, the currency must be ‘ eur ’ (euros) ideal configuration parameter descriptions parameter description judoid string required required unique id supplied by judopay specific to a merchant and/or location format 100100100 maximum length 9 characters do not include spaces or dashes amount decimal required required the amount to process format two decimal places for currencies using a different structure please contact judopay for support currency string required required the currency of the transaction the iso 4217 alphabetic currency code for ideal payments this must be eur yourconsumerreference string required required unique reference to anonymously identify your customer advisable to use guids must be below 40 characters yourpaymentreference string required required your unique reference for this payment format maximum length 50 characters this value should be unique in order to protect your customers against duplicate transactions with a server side integration, if a payment reference is not supplied, the transaction will not be processed paymentmethod string required required the payment method being used ensure this is set to ideal accountholdername string required required the name of the account holder related to this transaction country string required required the 2 letter iso country code from which the consumer will be paying this must be set to nl for ideal payments 2\ call getpaymentmethod() in your function that handles the payment button click for card payments (if this is not already set up, add a function to handle this) getpaymentmethod() returns information on which tab is open in the iframe call the appropriate web sdk method to trigger the correct transaction for example if the card form tab is open, getpaymentmethod will return “card” for a payment, call invokepayment() for a preauth, call invokepreauth() if the ideal tab is open, getpaymentmethod will return “ideal” call invokepaymentwithideal() get payment method example function handlepaymentbuttonclick() { const paymentmethod = judo getpaymentmethod() if(paymentmethod === 'card') { judo invokepayment(paymentsession, paymentconfiguration) then(handlesuccess) catch(handleerror) } else if(paymentmethod === 'ideal') { judo invokepaymentwithideal(paymentsession, idealconfiguration) then(handlesuccess) catch(handleerror) } } if you do not already have an event handler on your payment button to invoke the handlepaymentbuttonclick() add the onclick attribute to your payment button \<button id="submit payment button" onclick="handlepaymentbuttonclick()"> pay now \</button> make sure you have set id ="submit payment button" this is required to perform form validation , where the pay button will be greyed out until all the information has been entered step three handle the response all the judopay web sdk transaction methods return a promise once the authorisation is complete, the promise will be either fulfilled or rejected fulfilled you will receive a json object response (a judopay receipt object) for more information and schema on the json object, see transaction api reference docid\ bcxnm5keok nlnrztafut depending on the result the consumer should be redirected to the appropriate outcome page for example, if the result = success redirect the consumer to the success page this page should display the necessary transaction information (found in the judopay receipt object) rejected you will receive an error object for more information on error responses returned, see payment form error messages docid\ qfxawpaql 2evfp8y94d the consumer should be redirected to an error page response example const onfulfillment = (receiptobject) => { const { result } = receiptobject //redirect to appropriate page depending on the result (success/failure/declined page) } const onrejection = (error) => { //redirect to error page and handle error } for more information on the response codes, see codes and descriptions docid zrsihomuew xnrq4pbtj integrating klarna the klarna alternative payment method for a web sdk integration, has been decommissioned integrating klarna via web sdk klarna is a payment method that allows consumers to pay for items in instalments, or at a later date this does not impact the merchant as they will receive all of the funds upfront as klarna pays the merchant in full, taking on the debt themselves prerequisites make sure you are using web sdk version 0 0 18 (or higher) make sure you have implemented the following prerequisites from the web sdk integration guide web sdk docid 40dwe6lbub7vdkza1qydc web sdk docid 40dwe6lbub7vdkza1qydc the payment form iframe must be loaded onto the page in order for payments to work however displaying the form to the consumer is not required for this transaction type to hide the payment form iframe, use \<div id="payment iframe" style="position\ absolute;width 0;height 0;border 0;">\</div> to automatically receive non breaking changes, you can pin to the minor version (0 0) rather than the current patch version ( 0 0 45 ) step one display the klarna button add the klarna button to your web page add klarna button \<body> \<div id="klarna button container" >\</div> \<script> const klarnabutton = judo getklarnabutton({ backgroundcolor '#ffb3c7', borderradius 4, color '#171717', height 36, width 280, label 'pay now' }) const container = document getelementbyid("klarna button container") container append(klarnabutton) \</script> \</body> klarna button style parameter value backgroundcolor #171717 #ffffff #ffb3c7 color #ffffff #171717 label pay now pay later slice it width number height number borderradius number step two handle the klarna button make sure the following parameters are the same values as those entered in web sdk docid 40dwe6lbub7vdkza1qydc , otherwise the transaction will fail merchantpaymentreference merchantconsumerreference judoid currency amount this is used to cross reference the validity of the transaction your backend server should store the paymentsession response reference returned by judopay's api use this reference from the response to populate yourpaymentsession make sure you replace the klarnaconfiguration object values with your own handle the klarna button \<script> klarnabutton onclick = handleklarnabuttonclick function handleklarnabuttonclick() { const klarnaconfiguration = { judoid "yourjudoid", currency "gbp", amount 10, country "gb", accountholdername "account holder name", merchantpaymentreference "yourpaymentreference", merchantconsumerreference "yourconsumerreference", taxamount 0 01, mobilenumber "00441895808221", emailaddress "john\@doe com", apmdata { firstname "john", lastname "doe", mobilenumber "00441895808221", billingaddress { address1 "13 new burlington st", address2 "apt 214", town "london", country "gb", postcode "w13 3bg" } }, paymentmethod "klarna" } judo invokepaymentwithklarna('yourpaymentsession', klarnaconfiguration) then(handlesuccess) catch(handleerror) } \</script> for the specific input parameters of the products variable, refer to the klarna documentation step three handle the response all the judopay web sdk transaction methods return a promise once the authorisation is complete, the promise will be either fulfilled or rejected fulfilled you will receive a json object response (a judopay receipt object) for more information and schema on the json object, see transaction api reference docid\ bcxnm5keok nlnrztafut depending on the result the consumer should be redirected to the appropriate outcome page for example, if the result = success redirect the consumer to the success page this page should display the necessary transaction information (found in the judopay receipt object) rejected you will receive an error object for more information on error responses returned, see payment form error messages docid\ qfxawpaql 2evfp8y94d the consumer should be redirected to an error page response example const onfulfillment = (receiptobject) => { const { result } = receiptobject //redirect to appropriate page depending on the result (success/failure/declined page) } const onrejection = (error) => { //redirect to error page and handle error } for more information on the response codes, see codes and descriptions docid zrsihomuew xnrq4pbtj integrating paybybankapp for react native paybybankapp payment method for react native is no longer supported and will no longer be updated integrating paybybankapp using the payments widget for react native displaying paybybankapp as a payment method to display the paybybankapp as a payment method for reactnative create a judopbbaconfiguration export interface judopbbaconfiguration { mobilenumber? string emailaddress? string appearsonstatement? string deeplinkscheme? string deeplinkurl? string } parameter description mobilenumber string consumer's mobile number sent with the transaction as an additional parameter emailaddress string consumer's email address sent with the transaction as an additional parameter appearsonstatement string sent with the transaction as an additional parameter deeplinkscheme string used in the deeplinking process to identify your app deeplinkurl string specifies the app has opened as result of a redirect from the bank app the deeplink url contains the information needed to start polling the transaction status display pbba //with the judopbbaconfiguration set, pass it to the main judoconfiguration const pbbaconfig judopbbaconfiguration = { mobilenumber "mymobilenumber", emailaddress "myemailaddress", appearsonstatement "mystatement", deeplinkscheme 'my //app' } const config judoconfiguration = { pbbaconfiguration pbbaconfig } //call the invokepaybybankapp method //handle the response try { const judo = new judopay(token, secret) const response = await judo invokepaybybankapp(config) // handle response } catch (exception) { // handle exception } deeplink scheme when the consumer invokes the paybybankapp transaction, in order to complete the transaction, the app redirects to the user's bank app when the interaction is finished, the bank app redirects back to your app via the deeplinkscheme sending a deeplinkurl the deeplink scheme has to be set manually for ios and android, via the info plist (ios) and the androidmanifest xml (android) the deeplinkurl can be used to start polling the transaction status the deeplink events can be captured with the linking package already built in reactnative check the reactnative sample app for the implementation reference once you have captured the deeplinkurl, pass it to the deeplinkurl parameter of the judopbbaconfiguration if this parameter is set once the invokepaybybankapp is called, the polling process should automatically start integrating paybybankapp directly to your app for react native not using the mobile sdk payments widget? to integrate directly to your app instead of calling invokepaybybankapp add the branded paybybankapp button add the method as a button press action expose the paybybankapp button as follows import { judopbbabutton } from 'judokit react native' \<touchableopacity onpress={this invokepaybybankapp}> \<judopbbabutton style={{ flex 1 }} /> \</touchableopacity> although, the judopbbabutton is referred to as a button, it does not handle button related events, such as onpress the judopbbabutton will need to be wrapped in a component that handles touch events, for example the touchableopacity component xamarin integration xamarin sdk has been deprecated and will no longer be updated prerequisites you have set up your judopay account sign up for your sandbox account, to receive access to your judopay dashboard and the sandbox environment your judoids and tokens are configured and enabled as appropriate for more information on permissions, see permissions you have the latest version of the android sdk for more details, see integrating android with judopay you have the latest version of the ios sdk for more details, see integrating ios with judopay for mobile apps, we recommend using payment session authentication integration requirements xamarin studio 6 1 / visual studio 2015 xamarin forms 2 3 2 127 xcode 8 android 7 0 (api 24) sdk and build tools 24 0 3 installed the sdk is compatible with android jelly bean (4 1) and above and ios 8 and above integrate judopay into your project by visiting the xamarin component store search for judopay add the component to your android and ios projects setting up xamarin ensure all integration steps are completed add your app’s sandbox token and secret to your judo instance in your xamarin forms page var judo = new judo { judoid = "\<judo id>", token = "\<api token>", secret = "\<api secret>", environment = judoenvironment sandbox, amount = 1 50m, currency = "gbp", consumerreference = "youruniquereference" }; add additional configuration depending on the project you are integrating, as follows due to a bug in xamarin forms the page does not resize correctly when the keyboard is visible an additional piece of code must be added to your android activity add the code snippet after the xamarin forms forms init method call inside the oncreate method of your activity window\ setsoftinputmode(softinput adjustresize); androidbugfix5497 assistactivity(this); xamarin forms has issues resolving dependencies using dependencyservice unless they have been registered add the following in your appdelegate cs after the loadapplication(new app()) method call in your finishedlaunching method dependencyservice register(); dependencyservice register(); // required if using apple pay dependencyservice register(); going live with xamarin you will need to have tested your app in the sandbox environment before going live point to the live environment within your app’s xamarin forms page change the line specifying the targeted environment from sandbox to live environment = judoenvironment live, replace your sandbox api token and secret for the live api token and secret apitoken = "\<api token>", apisecret = "\<api secret>", find these in judopayportal > your apps > { app name } > live tokens use the live environment for testing before deploying your app paybybankapp paybybankapp payment method is no longer supported and will no longer be updated paybybankapp is a new, easy and secure alternative payment method, that enables your consumers to pay online quickly and securely via their trusted mobile bank app paybybankapp facilitates the enablement of consumers using bank transfers to easily pay for goods and services online without the need to enter card details or additional passwords every time a purchase is made, it is designed to simplify the checkout experience, giving consumers more control and visibility of their finances when making a purchase consumer journey on a merchant's mobile app the consumer's journey on a mobile app, when selecting the paybybankapp button features of paybybankapp features of paybybankapp strong authentication psd2 compliant meeting the strong customer authentication (sca) requirements increased consumer trust existing bank brands are known to the consumer works through the consumer’s existing bank app merchant liability shifted to the issuer all transactions are authenticated via the consumers bank app, so all liability is shifted away from the merchant to the issuing bank everything is tokenised the merchant, judopay and the distributor does not have any bank details of the consumer benefits of paybybankapp to your consumers your consumers can check their balances in real time choose which account to pay from no need to enter card details, or any additional passwords can see money move from their account in seconds stay secure with payment authorisation taking place in their bank app consumers will be auto enrolled when their online bank app is installed if a consumer uses paybybankapp with more than one bank app on their phone, they will get the choice of which bank app to open at the point of purchase, with the choice of setting their default option once the consumer clicks the paybybankapp button, they will be taken to their bank app to complete the payment integrating paybybankapp android paybybankapp payment method is no longer supported and will no longer be updated to add the paybybankapp button add pbba button //insert the button in the layout file \<com judopay judokit android ui common paybybankbutton android\ id="@+id/paybybankbutton" android\ layout width="wrap content" android\ layout height="wrap content" /> //set onclicklistener to the paybybankapp button //the judoactivity will start and pass the result to merchant paybybankbutton setonclicklistener { val intent = intent(this, judoactivity class java) intent putextra(judo options, judo) startactivityforresult(intent, judo payment widget request code) } //enable the paybybankapp in the payment selector screen //build the judo configuration object //set the payment widget type to paymentwidgettype payment methods //set the currency gbp val amount = amount builder() setamount("1") setcurrency(currency gbp) build() judo builder(paymentwidgettype payment methods) setjudoid(judoid) setapitoken(token) setapisecret(secret) setamount(amount) setreference(reference) setissandboxed(issandboxed) setsupportedcardnetworks(networks) setpaymentmethods(paymentmethods) setuiconfiguration(uiconfiguration) setgooglepayconfiguration(googlepayconfiguration) setpbbaconfiguration(pbbaconfiguration) build() //start judoactivity with the judoconfiguration object val intent = intent(this, judoactivity class java) intent putextra(judo options, judo) startactivityforresult(intent, judo payment widget request code) for the paybybankapp button to appear in the payments widget, a banking app must already be installed the paybybankapp button is displayed to display the paybybankapp as a payment method for android display pbba as a payment method //add the intent filter to the androidmanifest xml file //this registers the deep link url \<activity android\ name=" mainactivity" android\ launchmode="singletask"> \<intent filter> \<action android\ name="android intent action view" /> \<category android\ name="android intent category default" /> \<category android\ name="android intent category browsable" /> \<data android\ scheme="your" android\ host="scheme" /> \</intent filter> \</activity> //create the judo object //set paymentwidgettype to //pay by bank app, or //payment methods //if using the payments widget //set currency\ gbp //create the pbbaconfiguration object\ set deeplinkscheme to the defined scheme in the androidmanifest xml file val pbbaconfiguration = pbbaconfiguration builder() setdeeplinkscheme("your //scheme") build() judo builder(paymentwidgettype pay by bank app) setjudoid(judoid) setapitoken(token) setapisecret(secret) setamount(amount) setreference(reference) setissandboxed(issandboxed) setsupportedcardnetworks(networks) setpaymentmethods(paymentmethods) setuiconfiguration(uiconfiguration) setgooglepayconfiguration(googlepayconfiguration) setpbbaconfiguration(pbbaconfiguration) build() //override the onnewintent method to catch the deeplink url //add the deeplinkurl to the pbbaconfiguration object //start judoactivity with the desired payment widget type //add the same logic in oncreate override fun onnewintent(intent intent?) { checkfordeeplink(intent) super onnewintent(intent) } override fun oncreate(savedinstancestate bundle?) { super oncreate(savedinstancestate) checkfordeeplink() } private fun checkfordeeplink(intent intent? = this intent) { val uri = intent? data val newintent = intent(this, judoactivity class java) if (uri contains("your //scheme")) { val newpbbaconfig = pbbaconfiguration newbuilder() setdeeplinkurl(uri) build() val judo = getjudo(paymentwidgettype pay by bank app) newbuilder() setpbbaconfiguration(newpbbaconfig) build() newintent putextra(judo options, judo) startactivityforresult(newintent, judo payment widget request code) } } private fun getjudo(widgettype paymentwidgettype) judo { return judo builder(widgettype) setjudoid(judoid) setapitoken(token) setapisecret(secret) setamount(amount) setreference(reference) setissandboxed(issandboxed) setsupportedcardnetworks(networks) setpaymentmethods(paymentmethods) setuiconfiguration(uiconfiguration) setgooglepayconfiguration(googlepayconfiguration) setpbbaconfiguration(pbbaconfiguration) build() //to catch the first response, create a broadcastreceiver private val broadcastreceiver = object broadcastreceiver() { override fun onreceive(context context?, intent intent?) { val result = intent? getparcelableextra\<judoresult>(pbba result) // handle result } } //register the defined receiver in oncreate localbroadcastmanager getinstance(this) registerreceiver( orderidreceiver, intentfilter(br pbba result) ) //catch the result in the onactivityresult method override fun onactivityresult(requestcode int, resultcode int, data intent?) { super onactivityresult(requestcode, resultcode, data) if (requestcode == judo payment widget request code) { when (resultcode) { payment success > { val result = data? getparcelableextra\<judoresult>(judo result) //process successful payment } payment cancelled > { val result = data? getparcelableextra\<judoresult>(judo result) //process cancelled payment } payment error > { val error = data? getparcelableextra\<judoerror>(judo error) //process unsuccessful payment } } } } integrating paybybankapp directly to your app for android not using the mobile sdk payments widget? to integrate directly to your app integrate pbba directly //insert the button in the layout file \<com judokit android ui common paybybankbutton android\ id="@+id/paybybankbutton" android\ layout width="wrap content" android\ layout height="wrap content" /> //add intent filter to the androidmanifest xml file //this will register the deep link url activity android\ name=" mainactivity" android\ launchmode="singletask"> \<intent filter> \<action android\ name="android intent action view" /> \<category android\ name="android intent category default" /> \<category android\ name="android intent category browsable" /> \<data android\ scheme="your" android\ host="scheme" /> \</intent filter> \</activity> //create the judo object //set the paymentwidgettype to pay by bank app //create the pbbaconfiguration object //set deeplinkscheme to the defined scheme in the androidmanifest xml file val pbbaconfiguration = pbbaconfiguration builder() setdeeplinkscheme("your //scheme") build() judo builder(paymentwidgettype pay by bank app) setjudoid(judoid) setapitoken(token) setapisecret(secret) setamount(amount) setreference(reference) setissandboxed(issandboxed) setsupportedcardnetworks(networks) setpaymentmethods(paymentmethods) setuiconfiguration(uiconfiguration) setgooglepayconfiguration(googlepayconfiguration) setpbbaconfiguration(pbbaconfiguration) build() //override the onnewintent method to catch the deeplink url //add the deeplinkurl to the pbbaconfiguration object //start judoactivity with the desired payment widget type //add the same logic in oncreate override fun onnewintent(intent intent?) { checkfordeeplink(intent) super onnewintent(intent) } override fun oncreate(savedinstancestate bundle?) { super oncreate(savedinstancestate) checkfordeeplink() } private fun checkfordeeplink(intent intent? = this intent) { val uri = intent? data val newintent = intent(this, judoactivity class java) if (uri contains("your //scheme")) { val newpbbaconfig = pbbaconfiguration newbuilder() setdeeplinkurl(uri) build() val judo = getjudo(paymentwidgettype pay by bank app) newbuilder() setpbbaconfiguration(newpbbaconfig) build() newintent putextra(judo options, judo) startactivityforresult(newintent, judo payment widget request code) } } private fun getjudo(widgettype paymentwidgettype) judo { return judo builder(widgettype) setjudoid(judoid) setapitoken(token) setapisecret(secret) setamount(amount) setreference(reference) setissandboxed(issandboxed) setsupportedcardnetworks(networks) setpaymentmethods(paymentmethods) setuiconfiguration(uiconfiguration) setgooglepayconfiguration(googlepayconfiguration) setpbbaconfiguration(pbbaconfiguration) build() //to catch the first response, create a broadcastreceiver private val broadcastreceiver = object broadcastreceiver() { override fun onreceive(context context?, intent intent?) { val result = intent? getparcelableextra\<judoresult>(pbba result) // handle result } } //register the defined receiver in oncreate localbroadcastmanager getinstance(this) registerreceiver( orderidreceiver, intentfilter(br pbba result) ) //set onclicklistener to the previously defined paybybankapp button //judoactivity will start and pass the result to merchant paybybankbutton setonclicklistener { val intent = intent(this, judoactivity class java) intent putextra(judo options, judo) startactivityforresult(intent, judo payment widget request code) } //catch the result in the onactivityresult method override fun onactivityresult(requestcode int, resultcode int, data intent?) { super onactivityresult(requestcode, resultcode, data) if (requestcode == judo payment widget request code) { when (resultcode) { payment success > { val result = data? getparcelableextra\<judoresult>(judo result) //process successful payment } payment cancelled > { val result = data? getparcelableextra\<judoresult>(judo result) //process cancelled payment } payment error > { val error = data? getparcelableextra\<judoerror>(judo error) //process unsuccessful payment } } } } \<com judokit android ui common paybybankbutton android\ id="@+id/paybybankbutton" android\ layout width="wrap content" android\ layout height="wrap content" /> //add intent filter to the androidmanifest xml file //this will register the deep link url activity android\ name=" mainactivity" android\ launchmode="singletask"> \<intent filter> \<action android\ name="android intent action view" /> \<category android\ name="android intent category default" /> \<category android\ name="android intent category browsable" /> \<data android\ scheme="your" android\ host="scheme" /> \</intent filter> \</activity> //create the judo object //set the paymentwidgettype to pay by bank app //create the pbbaconfiguration object //set deeplinkscheme to the defined scheme in the androidmanifest xml file val pbbaconfiguration = pbbaconfiguration builder() setdeeplinkscheme("your //scheme") build() judo builder(paymentwidgettype pay by bank app) setjudoid(judoid) setapitoken(token) setapisecret(secret) setamount(amount) setreference(reference) setissandboxed(issandboxed) setsupportedcardnetworks(networks) setpaymentmethods(paymentmethods) setuiconfiguration(uiconfiguration) setgooglepayconfiguration(googlepayconfiguration) setpbbaconfiguration(pbbaconfiguration) build() //override the onnewintent method to catch the deeplink url //add the deeplinkurl to the pbbaconfiguration object //start judoactivity with the desired payment widget type //add the same logic in oncreate override fun onnewintent(intent intent?) { checkfordeeplink(intent) super onnewintent(intent) } override fun oncreate(savedinstancestate bundle?) { super oncreate(savedinstancestate) checkfordeeplink() } private fun checkfordeeplink(intent intent? = this intent) { val uri = intent? data val newintent = intent(this, judoactivity class java) if (uri contains("your //scheme")) { val newpbbaconfig = pbbaconfiguration newbuilder() setdeeplinkurl(uri) build() val judo = getjudo(paymentwidgettype pay by bank app) newbuilder() setpbbaconfiguration(newpbbaconfig) build() newintent putextra(judo options, judo) startactivityforresult(newintent, judo payment widget request code) } } private fun getjudo(widgettype paymentwidgettype) judo { return judo builder(widgettype) setjudoid(judoid) setapitoken(token) setapisecret(secret) setamount(amount) setreference(reference) setissandboxed(issandboxed) setsupportedcardnetworks(networks) setpaymentmethods(paymentmethods) setuiconfiguration(uiconfiguration) setgooglepayconfiguration(googlepayconfiguration) setpbbaconfiguration(pbbaconfiguration) build() //to catch the first response, create a broadcastreceiver private val broadcastreceiver = object broadcastreceiver() { override fun onreceive(context context?, intent intent?) { val result = intent? getparcelableextra\<judoresult>(pbba result) // handle result } } //register the defined receiver in oncreate localbroadcastmanager getinstance(this) registerreceiver( orderidreceiver, intentfilter(br pbba result) ) //set onclicklistener to the previously defined paybybankapp button //judoactivity will start and pass the result to merchant paybybankbutton setonclicklistener { val intent = intent(this, judoactivity class java) intent putextra(judo options, judo) startactivityforresult(intent, judo payment widget request code) } //catch the result in the onactivityresult method override fun onactivityresult(requestcode int, resultcode int, data intent?) { super onactivityresult(requestcode, resultcode, data) if (requestcode == judo payment widget request code) { when (resultcode) { payment success > { val result = data? getparcelableextra\<judoresult>(judo result) //process successful payment } payment cancelled > { val result = data? getparcelableextra\<judoresult>(judo result) //process cancelled payment } payment error > { val error = data? getparcelableextra\<judoerror>(judo error) //process unsuccessful payment } } } } integrating paybybankapp ios paybybankapp payment method is no longer supported and will no longer be updated integrating paybybankapp using the payments widget for ios displaying paybybankapp as a payment method for ios to display the paybybankapp as a payment method for ios display pbba as a payment method //in the info plist of app and lsapplicationqueriesschemes add the url scheme of the merchant(cfbundleurlschemes) \<key>cfbundleurltypes\</key> \<array> \<dict> \<key>cfbundletyperole\</key> \<string>editor\</string> \<key>cfbundleurlschemes\</key> \<array> \<string>judo\</string> \</array> \</dict> \</array> \<key>lsapplicationqueriesschemes\</key> \<array> \<string>zapp\</string> \</array> //add deeplink to the pbbaconfiguration object self pbbaconfig = \[jppbbaconfiguration new]; self pbbaconfig deeplinkscheme = @"judo //pay"; //to enable the paybybankapp set the following options //add the pbba method to //the paymentmethods array in jpconfiguration //set currency gbp integrating paybybankapp directly to your app for ios not using the mobile sdk payments widget? to integrate directly to your app prerequisites "bank3 test app" contact developersupport\@judopayments com to get access, so you can test the paybybankapp flow you have set your app's url scheme you have added zapp to the applicationqueriesschemes an example of the info plist file step 1 initialising the sdk to integrate with the judopay sdk directly to your ios app, you can use either a basic authorization session authorization you can select the sandbox mode for testing purposes set the value issandboxed = true let authorization jpauthorization = jpbasicauthorization(token judo token, andsecret judo secret) judokit = judokit(authorization authorization) judokit issandboxed = true step 2 check for installed bank apps to ensure a good customer experience, it is recommended to only display the paybybankapp button when the consumer has a compatible mobile banking app before adding the paybybankapp button in step 3, check if any compatible paybybankapp bank apps are installed, using the judokit isbankingappavailable method if (judokit isbankingappavailable()) { // add the pbba button } step 3 adding the paybybankapp button we recommend you use the branded button to invoke a paybybankapp transaction, however it is not mandatory the paybybankapp button uses the delegate property the delegate property points to any class that implements the jppbbabuttondelegate interface let pbbabutton = jppbbabutton(frame container bounds); pbbabutton delegate = self view\ addsubview(pbbabutton) the jpbbabutton is a subclass of uiview , not uibutton take this into consideration when integrating the paybybankapp button via the interface builder the jppbbabuttondelegate interface has only one method pbbabuttondidpress(sender ) , which is responsible for handling the button tap action recommended paybybankapp button size minimum width 160pt | height 40pt maximum width 310pt | height 48pt step 4 adding the delegate method the delegate method is responsible for the button tap action to add the delegate method call the invokepbba method in the judopay sdk and provide the required configuration parameters invoke pbba method func pbbabuttondidpress( sender jppbbabutton) { let amount = jpamount(amount value, currency "gbp") let reference = jpreference(consumerreference consumer ref) configuration = jpconfiguration(judoid judo id, amount amount, reference reference) let pbbaconfiguration = jppbbaconfiguration() pbbaconfiguration mobilenumber = your mobile number pbbaconfiguration emailaddress = your email address pbbaconfiguration appearsonstatement = your appears on statement pbbaconfiguration deeplinkscheme = your deeplink scheme configuration pbbaconfiguration = pbbaconfiguration judokit invokepbba(with configuration) { \[weak self] (response, error) in if let response = response { // handle response } if let error = error { // handle error } } } each judopay transaction takes a jpconfiguration instance as a parameter the configuration object sets up all the required parameters for a successful transaction it also sets any optional parameters which you can configure to personalise the payment flow paybybankapp transactions require some extra parameters to be set up, in addition to the basic transaction configuration these optional parameters are defined in the jppbbaconfiguration class, and used to add additional information to the transaction the following two parameters are recommended deeplinkscheme deeplinkurl call the invokepbba method from the judopay sdk the paybybankapp flow will be triggered, opening the bank app for consumers to make their transactions the deeplinkscheme a deeplinkscheme identifies your app during the redirect process when a consumer has completed their transaction using their bank app, the bank app will attempt to redirect the consumer back to your app the deeplinkscheme name should match the url scheme defined in the info plist file for example myapp > myapp\ / the deeplinkurl the deeplink url enables the app to open the consumer's mobile banking app, so they can complete the transaction when the bank app redirects the consumer back to your app, it also provides you with a url that you can use to poll the transaction status add the deeplinkurl to the main configuration object this will be sent as a parameter to the transaction method it is a good idea to handle the errors within this step the most important information from the response is the orderid , accessed via response orderdetails orderid the orderid is used to manually check the transaction status step 5 handling the deeplinkurl following the completed transaction, the bank flow will be triggered when the invokepbba method is called, even if the deeplinkurl parameter is not provided however, if the deeplinkurl parameter is provided, calling invokepbba will trigger the transaction status polling logic to handle the deeplinkurl listen to this event capture the redirect url to capture the redirect url in your appdelegate file, add the following methods application( open\ options ) application( didfinishlaunchingwithoptions ) pass the url to the jppbbaconfiguration instance for the purpose of this exercise, the deeplinkurl is saved in the app's userdefaults you can save the deeplinkurl in the keychain or any alternative deeplink url example func application( application uiapplication, didfinishlaunchingwithoptions launchoptions \[uiapplication launchoptionskey any]? ) > bool { if let url = launchoptions?\[ url] as? url { userdefaults standard set(url, forkey "deeplinkurl") } } func application( app uiapplication, open url url, options \[uiapplication openurloptionskey any] = \[ ] ) > bool { userdefaults standard set(url, forkey "deeplinkurl") } step 6 polling the transaction status once the bank app has redirected the consumer back to your app, you can start polling the transaction status to start the paybybankapp polling status add the deeplinkurl to the configuration call the invokepbba(configuration ) method call invoke pbba method func handledeeplink() { guard let url = userdefaults standard url(forkey "deeplinkurl") else { return } configuration pbbaconfiguration? deeplinkurl = url judokit invokepbba(with configuration) { \[weak self] (response, error) in if let response = response { // handle response } if let error = error { // handle error } } } in the jpresponse object, you can inspect the orderdetails containing information about the transaction status another option is to put a check in your viewdidappear(animated ) method if a deeplinkurl is set up, add it to the configuration and call the invokepbba(configuration ) method again this will start the polling status manually checking the transaction status there may be cases where the bank app closes before the transaction flow completes this would mean the deeplinkurl is not returned and the polling process to check the transaction status will not begin to manually check the transaction status invoke a manual order status request get the orderid from the initial request when the bank app is invoked during the paybybankapp request, (step 4) the orderid is captured from the callback response response example judokit invokepbba(with configuration) { \[weak self] (response, error) in if let response = response { let orderid = response orderdetails? orderid // persist the orderid for later use } } use the orderid to manually check the transaction status you would do this in the same way as initialising the judopay sdk, see step 1 initialising the sdk call the invokeorderstatus method, with the orderid let apiservice = jpapiservice(authorization authorization, issandboxed true) apiservice invokeorderstatus(withorderid orderid) { (response, error) in // handle response } the response will contain both the transaction status, and the order details of the transaction for a sample app, see judopay's judokit for ios on github