- Retrieve users that needs charging from SQS and corresponding info: subscription ID, charge fees.
- Retrieve user payment method from MySQL.
- Prepare payment request based on obtained info.
- Check whether the request is pending (Such payment request is sent, but not finished due to server failure or third party payment problems), if yes, ignore (avoid paying twice).
- Send request to Third Party Payment, retry or failure process ( send payment failure back to SQS )
- If OK response from Third Party, update pending list, send confirmation back to SQS.