Pergunta de entrevista da empresa Rapyd

You have a processPayment() function. This function has 3 API's for payments. Each API costs money. 1 is 10$, 2 is 20$, and 3 is 100$. Each API is limited by rate: 1 is 10 queries at a time, 2 is 100, etc. You need to implement this function to be scalable, async, fast, and cost-efficient.