Simulating Recurring Order Errors


When Subscribe Pro attempts to place an order via the Magento 2 API, if the order attempt fails an error message will be returned. Subscribe Pro classifies error messages based on the failure reason.

Simulating Each Error Class

Error ClassDescriptionSteps to Simulate Error
TechnologyCan be caused by a code error in the Magento 2 codebase, by Subscribe Pro being unable to connect to the Magento 2 API, or by the Magento 2 API not returning a valid response.This can be simulated by causing the connection to Magento 2 to fail. For instance, enable HTTP Authentication on the API server or add a firewall rule preventing Subscribe Pro from connecting.
e-commerce platformCan be caused by issues originating from Magento 2, such as an invalid shipping method, a missing customer, or product SKU not existing in the Magento 2 catalog.
  1. Create a product record in Subscribe Pro with a SKU that does not match a product in the Magento catalog.
  2. Create a subscription with that product with a valid customer record in Subscribe Pro and attempt to process a recurring order
Payment CardThis error class happens when the payment profile being used by a subscription is redacted, or if no payment profile is set on the subscription.
  1. Update a subscription to not have a payment profile set on it.
  2. Set the subscription to Active and a current next order date to get our system to attempt an order.
Soft DeclineThis error class is caused by the customer's credit card being declined by the payment gateway for a temporary or fixable reason (e.g. insufficient funds, incorrect billing address).
  1. Create a payment profile with a "Declined/Failed Card" number from our list of Test Credit Cards
  2. Set this payment profile on a subscription and attempt to process a recurring order.
Hard DeclineThis error class is caused by the customer's credit card card being declined by the payment gateway for a permanent or non-fixable reason (e.g. the card account is closed).There is not currently a way to simulate the Hard Decline error class in a test environment.
This error is very similar to a soft decline. Subscribe Pro looks at error codes and messages returned from your payment processor and gateway and when those indicated the card will be permanently declined, we flag the error with the Hard Decline error class.
Expired CardThis error class occurs if the subscription attempts to use a payment profile record that is beyond its expiration date.Attempt a recurring order for a subscription that has a payment profile that is beyond its expiration date.
Out of StockThis error class is used if the requested product is marked as Out of Stock or lacks enough inventory to cover the requested quantity of an item in the order.Update a product in Magento's catalog to be Out of Stock or have insufficient inventory to cover an order, and then attempt a recurring order for that subscription.

Note: Recent versions of Magento 2 return an error that is instead classified as e-commerce platform in this scenario.