Learn Center has been sunset. Visit our new Docs site at: docs.canopyservicing.com
logo

Testing with Controlled Processing

Enterprise Only: To turn on Controlled Processing for your test environment, please contact our team. Each time you generate a new set of API keys, please contact our team to add Controlled Processing permissions to those keys.
💡
All production environments in Canopy have Auto-Processing turned on, which means that all events are processed until the current moment in time. In UAT environments, you may contact Canopy’s team to turn Auto-Processing off. This gives you control to walk through each step in the loan lifecycle. When you’ve turned Auto-Processing back on in your UAT environment, it will again replicate production environments. When Auto-Processing is turned on, we recommend testing with migration mode. This guide gives you the instructions on running controlled tests when Auto-Processing is turned off.
In order to understand how to set up test cases in the system and enforce their behavior, you will need to think about an account lifecycle as a series of events that occur; starting with the moment they’re onboarded. Events can range from human activity — such as making a payment, to automatic activity — such as a due date passing by.
This guide assumes that Auto-Processing is turned off in your environment.
The pattern to follow is to roll time after each API request to manually process it.
  1. Onboard a new borrower with the Create Account API
  1. Make any API Request passing the effective_at parameter
  1. Call POST admin/roll/account?account_id=<account_id>&exclusive_end=<end_time>
    1. end_time may be any time after the effective_at of the previous API request
    2. end_time is in the format: 2022-06-23T09%3A12%3A28%2B00%3A00
  1. If Auto-Processing is turned off for webhooks, include the roll_webhooks=true query parameter to process webhooks
🚨
Make sure to sequence events for an account in order. You should never insert an event with an effective_at earlier than the latest point to which you have rolled time
💡
Enterprise? Our team is very specialized in getting you started with test cases that ensure your loan behaves as expected and cover edge cases you may not have thought of. Reach our to our team about getting set up with test cases and Postman collections that implement your use-case and borrower agreement.
Share