The process generally is to 1) get a request from the user of the app to consider a purchase, 2) the app submits a product request, 3) the app gets back a list of available products, 4) the app presents the products to the user and asks the user to select the product they want, 5) the user makes a selection, 6) the app submits a purchase request for that product 7) the app Store interacts with the user and completes the purchase 8) the app provides the purchased item to the user.
After being requested to start the process at the conclusion of step 6, there is no way to programmatically affect what the app store does with the user in step 7 .  But otherwiese, you can do anything you want in 1-6 and 8.