Testing and development with Xendit Subscriptions does not require an activated account. Once you register for a free Xendit account, you can begin testing via API immediately.
To being testing Subscriptions with Xendit, first create a secret API key in test mode using Xendit dashboard. Make sure to assign permission for Money-In as WRITE
Set up your preferrred Subscriptions callback URL in the Callbacks section of the Settings tab
Follow and refer to our API Reference for details on request requirements
Simulating Statuses
In test mode, we recommend testing creation of Subscriptions plans using eWallets as the test scenarios are easily set up. The same result/ simulated flow should apply to all other payment methods. In test mode, Xendit uses magic numbers to help merchants complete their tests without complicated setups. Details on other payment methods are documented after the examples.
POST https://api.xendit.co/recurring/plans/:plan_id/cycles/:id/simulate
{
"amount": 21110}
Webhook notifications and end user notifications will be sent by Xendit
List of Simulation Numbers
eWallets
Positive Scenario
Scenario
Criteria
Expected result
Successful payment
Amount = 13579
1. Linking process will be successful and related plan will become ACTIVE
2. Charge process on the scheduled date for the related cycle will be successful
Negative Scenario
Scenario
Simulation Amount
Expected Result
Customer's account has been restricted by eWallet provider
Amount = 21103
ACCOUNT_ACCESS_BLOCKED failure code via callback
Customer's account detail is invalid
Amount = 21106
INVALID_ACCOUNT_DETAILS failure code via callback
Customer's account has reached maximum transaction limit
Amount =21107
MAXIMUM_LIMIT_REACHED failure code via callback
Insufficient balance on customer's wallet
Amount = 21110
INSUFFICIENT_BALANCE failure code via callback
Cards
Cards - refer to (cards testing) for card numbers that work in test mode. Expiry dates and CVV can be random inputs.
Positive Scenario
Scenario
Simulation amount
Expected result
Successful payment
Any number except magic numbers for the negative scenario
1. Linking process will be successful and related plan will become ACTIVE
2. Charge process on the scheduled date for the related cycle will be successful
Negative Scenario
Scenario
Simulation Amount
Expected Result
The card you are trying to capture has expired
Amount = 10051
EXPIRED_CARD failure code via callback
The card you are trying to capture has been declined by the issuing bank
Amount = 10052
CARD_DECLINED failure code via callback
The card you are trying to capture does not have enough balance to complete the capture
Amount = 10054
INSUFFICIENT_BALANCE failure code via callback
The card you are trying to capture has been marked as stolen
Amount = 10055
STOLEN_CARD failure code via callback
The card you are trying to capture is inactive
Amount = 10056
INACTIVE_CARD failure code via callback
The card you are trying to capture is declined due to cvn not matched
Amount = 10059
INVALID_CVN failure code via callback
Direct Debit
Direct debit - refer to (direct debit testing) for account linking details in test mode.
Positive Scenario
Scenario
Criteria
Expected result
Sucessful payment
Any number except magic numbers for the negative scenario
1. Linking process will be successful and related plan will become ACTIVE
2. Charge process on the scheduled date for the related cycle will be successful
Negative Scenario
Scenario
Simulation Amount
Expected Result
Transaction exceeds the channel’s allowed daily limit
Amount = 11001
MAX_AMOUNT_LIMIT_ERROR failure code via callback
End-customer’s balance is insufficient for the transaction