Custom URI Scheme

From GnuCash
Jump to: navigation, search

This wiki page discusses the possibility to register some custom URL Scheme so that the online banking functions in GnuCash can be called from a browser.

Here's my target use case: Let's say a user looks at the website. The website should then contain a link "Click here to donate from your German bank account". That link contains our custom URI Scheme (the part usually called the "protocol"), e.g. as follows:,2012://de/11111111/22222222?desc=Some%20Description
  • ",2012" is our URL Tag Scheme (following RFC 4151) which is unused so far
  • "de" refers to the fact we're using the German bank account addressing scheme,
  • 1111111 is the bank code of the German bank,
  • 2222222 is the account number,
  • and "Some Description" is the description text that is inserted in the "description" text field of the online banking transfer.

Once clicked, this URL string needs to be passed to GnuCash, most probably as a command line argument similar to the file://path/filename argument. I'll have to tweak the command line parsing so that my custom schemes are redirected into the online banking module, but that shouldn't be a problem.

Once that URL made it into GnuCash's online banking module, it should look up the preferred online banking account which the user regularly uses, then open the dialog for transferring money. The user just has to insert the amount, then press "Send now", then entering his security numbers, and voila, here the money goes to our gnucash donation bank account.

Which URI Scheme to use?


The scheme should be Tag scheme RFC 4151 using and 2012 as a year:,2012://de/11111111/22222222?desc=Some%20Description

How can we register gnucash as a handler for our custom scheme?