how to add dynamic in-app-purchase products to itunes connect programatically ?

Iam facing issue with IAP. My application is a type of packages. based on city, state the prices may varying. so how can i implement IAP in this scenerio. If at all i want to create in-app-purchase products there are thousands. So Kindly help me in this. How to create products programatically based on price which i receive from my app API.

Replies

You can use a consumable IAP that lets the user purchase packages of 'credits' and then lets the user select what city they want to apply their credits. Some cities might cost 10 credits and other cities cost 4 credits.

I have same kind of requirement I have lots of books for each classes and each courses.
I can I implement this using In-App-Purchase