Assign or Update the Reason Code for an Order via API

After a reason code is manually created in Admin > Product Configuration > Payments Fraud > Reason Codes, you can add a reason code to a processed order through the Commerce Orchestrator API. Once the reason code is added to the processed order, it displays in Case Details. You can also update an order that already has an assigned reason code.

You can also set up a webhook event with Reason Code Updated to let you know when a reason code is changed. For more information about creating webhooks, go to Managing Webhooks.

To add a reason code to an order or update an order with a different reason code, edit and send the following curl patch to the Update Order API endpoint:

curl -X PATCH https://api.kount.com/commerce/v2/orders/{orderId}
{
   "orderId": "1234567890",
   "orderPatchBody": {
      "riskyInquiry": {
         reasonCode: "NEW_REASON_CODE"
      }
   }
}
Was this article helpful?
0 out of 0 found this helpful