I love these types of pockets, because you can basically put them anywhere, and they take up very little space on the sides of the pockets.
First, decide where your pocket is going to go and how long your zipper will be. Once you know the size of the zipper, decide how large the actual pocket is going to be. It can be the same size as the entire side, or you could make it much smaller.
The only two rules that you need to follow for the sizing of the pocket are as follows:
1) To make sure that you have at least an inch on both sides of the zipper, to sew the back and front of the pocket together easily.
2) Make sure that you have enough fabric at the top to be able to attach the pocket to the top seam of the bag/wallet/etc. Any weight in the pocket will then be supported by the top seam, instead of by the zipper seam, which over time could ruin the zipper.
When you cut out the fabric for the pocket, you have to options. One, you can cut out two pieces of fabric that are the same size, on for the front and one for the back of the pocket. The second option is to cut out one piece of fabric that is double the length of the pocket, and then fold up the fabric along the bottom once the zipper is attached to create the front and back of the pocket. I prefer to use option two, because I have one less seam to sew and because I believe that not having a seam in the bottom of the pocket will mean that the pocket will not rip as quickly (just my own opinion, I do not have any proof that this is truly correct).
Line up the pocket fabric with the side of your work, right sides together. Pin the top of the pocket to the top of your work. Using a ruler and a marking implement, measure a rectangle box that is as long as you want your zipper to be and about ¼” wider than the closed zipper for the one you have chosen.
Sew along the rectangle you drew. I always reinforce my corners, but this is not necessary.
Cut a line in the middle of your rectangle, to about ¼” from the sides, and then cut from the end of your line to the corner of your rectangle, being very careful to not cut your seams.
Un-pin the top of your pocket fabric from the top of your work, and push the pocket through the hole that you cut. Work with the fabric until the seam and the pocket fabric is mostly hidden, and then press well.
Note: If you are using contrasting fabric for the pocket, and do not wish for it to show on the front of your work at all, cut a small piece of fabric a bit larger than your rectangle zipper pocket that is the same as your work’s fabric, and attach it between your work and the pocket fabric before sewing your rectangle opening. This way, any fabric that accidently shows around your zipper will match your work.
Attach the zipper to the underside of your work and sew around the outside of your rectangle. I always reinforce the sides of the zipper, as these will get a lot of wear and tear from the pulling on the zipper. You can use topstitching thread for this step if you desire.
Flip your work over once your zipper is attached, and depending on how you cut your pocket fabric, either fold the fabric up and pin to the top of your pocket, or lay your second piece of fabric on top of the first piece of fabric and pin it together. Sew along all the open sides of your pocket. For the top, sew the pocket to the top of your work as well to anchor it and provide additional support to the pocket.