Sandbox
The sandbox provides you a testing environment to simulate payments and ensure seamless integration of their applications with Antom products. This topic will guide you through the process of using the sandbox effectively.
Before you begin
Complete the following steps before testing in the sandbox:
- Log in to Antom Dashboard, switch to Test mode, go to Developer > Quick start > Integration resources and tools, and select Integration resources to get the sandbox client ID, domain, and public key.
- Download the test wallet app. Refer to the Test wallet for guidance.
Test in sandbox
In the sandbox, multiple ways are provided to make an API call simulation, and you can call each API multiple times. API calls are correlated with each other if you provide the corresponding information. For example, you first call the pay API to initiate a payment. Then you can call the refund API to initiate a refund against the payment by specifying the paymentId. Information about both the payment and related refund is provided in the sandbox environment.
In addition, when you call the pay or consult API in the sandbox, the sandbox also simulates the redirection process between the merchant side and the payment method side for different terminal types such as WEB, WAP, and APP.
For Checkout Payment/Auto Debit
To test Checkout Payment and Auto Debit, you can use the provided testing guides to simulate the payment and vaulting process across various payment methods. The sandbox can also simulate all error codes, even rare production environment scenarios via the tool Error scenario simulation. This enables developers to work with consistent system logic processing during testing.
Test for payment methods
Simulate error scenarios
Error scenario simulation provides simulations of different API results and returns the specified response for integration testing. Refer to Error scenario simulation for detailed information.
For Subscription Payment
In the sandbox, you can create, update, and cancel a subscription plan. The sandbox automatically speeds up the subscription deduction cycle to facilitate your verification process. The table below illustrates how it works.
periodRule.periodType | periodRule.periodCount | Sandbox acceleration interval (min) | Acceleration frequency |
|
| 3 | 12 |
| 3 | 12 | |
| 3 | 12 | |
|
| 3 | 12 |
|
| 3 | 12 |
| 15 | 12 | |
| 30 | 12 | |
|
| 60 | 12 |
For example, create a subscription plan with a subscription period of 31 days.
{
"subscriptionRequestId": "REQUEST_20240409141836419",
"subscriptionDescription": "Subscription test",
"paymentMethodType": "GCASH",
"env": {
"osType": "ANDROID",
"terminalType": "APP"
},
"orderInfo": {
"orderAmount": {
"currency": "PHP",
"value": "100"
}
},
"paymentAmount": {
"currency": "PHP",
"value": "100"
},
"periodRule": {
"periodCount": 31,
"periodType": "DAY"
},
"settlementStrategy": {
"settlementCurrency": "USD"
},
"subscriptionStartTime": "2024-04-09T14:18:36+08:00",
"subscriptionEndTime": "2074-04-09T14:18:36+08:00",
"subscriptionExpiryTime": "2024-04-09T14:48:36+08:00",
"subscriptionNotificationUrl": "https://www.baidu.com",
"subscriptionRedirectUrl": "https://alipay.com/subscriptionNotify",
"paymentNotificationUrl": "https://alipay.com/subscriptionPayNotify"
}
Follow the instructions of How to test Alipay+ payment methods to complete the vaulting process in the sandbox, then you will start receiving deduction notifications every 3 minutes. The deduction cycle stops accelerating after the thirteenth deduction. The final deduction notification during the acceleration cycle is detailed below:
{
"paymentAmount": {
"currency": "PHP",
"value": "100"
},
"paymentCreateTime": "2024-04-08T23:59:00-07:00",
"paymentId": "202404091940108001001886J0299059200",
"paymentTime": "2024-04-08T23:59:03-07:00",
"periodEndTime": "2025-05-16T23:18:36-07:00",
"periodStartTime": "2025-04-15T23:18:36-07:00",
"phaseNo": "13",
"result": {
"resultCode": "SUCCESS",
"resultMessage": "success",
"resultStatus": "S"
},
"subscriptionId": "202404091900000000000009D0000004046",
"subscriptionRequestId": "REQUEST_20240409141836419",
"subscriptionNo": "13"
}