updated purchase example to include application Id
parameter as optional