Mock API Endpoint
A mock endpoint is useful when you want to confirm callback delivery before your local or production callback handler is ready.
What this helps you verify
Testing Steps
- 1
Create a MockAPI Project
Open https://mockapi.io and create a project for callback testing.
- 2
Create a callbacks Resource
Inside the project, create a resource such as callbacks so incoming requests can be stored and inspected.
Add fields like reference, status, amount, currency, provider, and merchantOrderId if you want the records to be easy to read in the dashboard.
- 3
Copy the Resource POST Endpoint
Copy the resource endpoint generated by MockAPI and use it as your callbackUrl in a sandbox transaction request.
- 4
Trigger a Sandbox Payment
Create a test payment from AfroPays using the MockAPI resource URL as the callback destination.
- 5
Inspect the Callback Records
Open the MockAPI resource entries to verify which callbacks were received, what payload was posted, and which statuses were delivered.
What to Verify
- • The callback reached the endpoint without network errors.
- • The reference and merchant order id match the transaction you created.
- • The status sequence makes sense for the transaction lifecycle.
- • Final statuses such as SUCCESS and CANCELED are treated as terminal in your system.