Don't do this. You're being set up. You should be getting paid in milestones, and not waiting till the end. Or, get a retainer up front, just like attorneys would do. Here's why.
Payment At End Scenario
They can give you requirements A, B, C up front. You agree to them, and start developing. When you finish B, they request D, E, and F. Time has passed, but you still haven't been paid. They can do this indefinitely. I guarantee, by "E" they'll want to put it in the app store They're earning money, but you're not done with F, so you get nothing.
Payment as Percentage Scenario
This is simple. How will you know how much they've sold? People can lie. "We're waiting on reports, but it's taking a long time, and we can't calculate what we owe you until we get them." What if they don't market the product? What if it's taken down from the app store?
Also Important!!
The other part that stands out in this scenario is the fact that they're in another country. If they don't pay after you've done the work, THEN what? It's ridiculously impossible to sue someone in a foreign country (Look at all the other posts here. Seriously.)
If you propose milestones or a retainer and you encounter a lot of resistance, they probably never intended to pay you in the first place.