An order injection error is defined as an order with a charge that has been successfully processed in Recharge, but the accompanying order is not successfully created in the order management system (OMS). Order injection errors occur due to a gap in the architecture between Recharge and your OMS platform.
For example, your OMS may have different address validation requirements than Recharge, or there may be a lag in deprecating inventory in Recharge versus in your OMS.
The following table defines terms used throughout this article.
|The process of receiving an order/created webhook from Recharge and creating that order in your order management system. This is commonly done with recurring orders that process in Recharge, or orders that initially go through the Recharge checkout.
|Order injection error
|An order with a charge that has been successfully processed in Recharge, but the accompanying order is not successfully created in the order management system
|Any Recharge order that does not have an external_order_id
Log and categorize errors returned from your OMS API. During order injection, your order management system may return an error when trying to create an order. You’ll want to catch and categorize the errors based on error type so that you can accurately report those errors in the charge error.
These errors usually can be categorized into specific reason types:
- Out of stock inventory errors
- Exceeds quantity requirements errors
- Invalid billing or shipping zipcode: Customers might have their billing or shipping address set to a really long string, something that is invalid and is rejected by BigCommerce.
Not all errors may need to end up as charge errors. For example, if you encounter errors from rate limits, you may need to build retry logic instead of raising a charge error.
Implement the charge refund endpoint for order injection error process. This process will pull order injection errors, then refund and change the charge status to error in one API call.
Example request payload:
"error": "test error message",
The response will be Recharge's existing charge API response schema. The
error_type will be populated with what was passed in the request, and the charge status will be ERROR.
This process will refund the order in Recharge and create a charge error that you can see and manage from the Recharge merchant portal. Access this page by going to the Orders section and clicking the Charge errors tab.
Updated 3 days ago