When testing your integration, it can be useful to validate how Subscriptions behave across renewal periods and different payment outcomes.
If you have the Advanced Billing Test Gateway configured in test mode, you can simulate successful or failed credit card payments using supported test card numbers. This helps you confirm how your dunning strategy steps run when a payment failure event occurs.
Keep in mind that dunning outcomes depend on your strategy configuration, payment method, and collection settings, so results may vary between accounts.
Here are a few common approaches you can use when testing dunning behavior in Advanced Billing:
Using test payment information
- If you are working in test mode, you can use the Advanced Billing Test Gateway to simulate payment outcomes such as success, decline, or error. This is primarily supported for credit card testing using specific test card numbers.
- To simulate credit card outcomes, enter one of the supported test card numbers for the Advanced Billing Test Gateway. Bank account testing does not use the same defined set of test numbers, so behavior may vary depending on your gateway and collection setup.
- After adding the test payment method, make sure it is set as the active default payment profile for the Subscription so future renewal attempts use it.
Forcing subscriptions to past due
- A Subscription enters the past due state when a payment attempt fails and dunning is initiated. In most cases, you trigger this during testing by allowing a renewal to run with a failing payment method.
- The Subscription transitions to past due when a payment failure event occurs, for example, a declined renewal payment.
- You can also remove or replace the payment profile on file to prevent automatic collection on the next renewal attempt, depending on whether another valid payment method exists.
- This may cause the next automatic payment attempt to fail or be unable to process, which can trigger dunning if your strategy is configured to do so.
Forcing subscriptions to enter the final step
- To reach the final dunning step more quickly during testing, configure a shorter dunning strategy, for example, fewer retries or shorter intervals.
- Use the Advanced Billing Test Gateway and supported test payment methods to generate failed payment attempts that move the Subscription through your dunning steps.
- Allow the dunning process to fully run through its configured steps. Depending on your strategy settings, the Subscription may transition to a final state such as
unpaidorcanceled.
Comments
Article is closed for comments.