For years I've struggled testing APIs until I snapped that you can't use the native APIs as provided by the vendor. You have to use Laravel's native HTTP client before easy mocking and testing becomes a reality.
I've made a quick video to show how this is done, using the WHMCS PHP API where I've removed CURL in favour of the native Laravel HTTP client.