1. Transport
Have the merchant set up a legal trading company, which deals in something legal* that comes in whatever it is you're storing the gunpowder in. That way, you can ship it without the notice of the crew. However, have some secret marking on the containers with gunpowder in them, so you can tell which they are. As for packaging, barrels will probably work, but you will need to be careful with them.
*preferably also fragile and/or flammable
2. Storage/Hiding
You already have a warehouse or storage area for your legal shipping enterprise. Store your gunpowder in there with the other merchandise. Make sure that you have trusted workers who know not to take the marked barrels to the market.
3. Sale
Don't sell your wares straight from the warehouse. It will attract attention, and even if it doesn't, it will be easy to trace. Sell the gunpowder incognito in a different city from the one your warehouse is in. This will be a bit of a pain, because you'll have to take small loads for sale at a time. Also sell your legitimate product there, in the normal market. Sell gunpowder on the outskirts of the city or in the same district as other questionable enterprises. You'll blend in better and the authorities may have stopped bothering about the criminal activities in that part of town. Send one wagon with gunpowder and one wagon with legal stuff to the market city. If questioned about why you sell there instead of in the city that the warehouse is in, say that you have friends or family ties or creditors there. Choose erratic times and places for when and where you sell, but make sure that your clientele knows when and where to expect you. Send a different salesperson each time. Take indirect routes to the market so that you'll be harder to track. If the authorities begin to catch on, take the remainder of what's in your warehouse back to the place that you make the gunpowder and lie low just selling your legal wares for a few years until everything has calmed down.