Introduction
Introduction
The document provides for partners with information on technical connection to the Mobile Topup Service.
Diagram connection

AppotaPay provides 2 flexible integration mechanisms for the topup service, helping to optimize the user experience and ensure the highest success rate.
Synchronous topup flow
When the Partner calls the topup API, the system processes the request directly with the telco and returns the final result (SUCCESS/FAILED/ PENDING) right in the API response

Asynchronous topup flow
When the Partner calls the topup API, the system records the request and immediately returns a successfully-accepted status.
After the topup succeeds or fails with the telco, AppotaPay actively sends a transaction result notification through the IPN/Webhook that the Partner has registered on the AppotaPay system.

Choosing a topup flow
AppotaPay supports 2 topup flows. Partners choose one of the two depending on their system model:
| Criteria | Synchronous (Sync) | Asynchronous (Async) |
|---|---|---|
| Topup API | /api/v2/service/topup/charging | /api/v2/service/topup/charging-async |
| Response time | Waits until the telco returns a result | Responds immediately, does not wait for the telco |
| Where the final result is returned | In the response of the topup API | Through the IPN AppotaPay sends to the partner |
| Partner prerequisite | None | Must have an IPN URL registered with AppotaPay |
| Partner timeout | Needs a long timeout configuration | Not affected by the telco processing time |
| Suitable for | Systems using the traditional request/response model | High volume systems that need to release the processing thread quickly |