# Testing Billing API Issue

**URL:** <https://discourse.sst.dev/t/testing-billing-api-issue/1865>\
**Category:** Chapter Comments\
**Created:** [May 29, 2020, 3:50pm UTC](https://discourse.sst.dev/t/testing-billing-api-issue/1865 "2020-05-29T15:50:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tbadmus](https://avatars.discourse-cdn.com/v4/letter/t/d2c977/32.png) [@tbadmus](https://discourse.sst.dev/u/tbadmus)\
**Post date:** [May 29, 2020, 3:50pm UTC](https://discourse.sst.dev/t/testing-billing-api-issue/1865/1 "2020-05-29T15:50:35Z")

</div>

Hi,  
when i run the mock test to validate the billing-event,  
#serverless invoke local --function billing --path mocks/billing-event.json

i get this:

```auto
Serverless: DOTENV: Loading environment variables from .env:
Serverless: - STRIPE_SECRET_KEY

  Type Error ---------------------------------------------

  TypeError [ERR_INVALID_ARG_TYPE]: The "to" argument must be of type string. Received type undefined
      at validateString (internal/validators.js:107:11)
      at Object.relative (path.js:1052:5)
      at /training-dir/notes-app-api/node_modules/serverless-webpack/lib/validate.js:186:36
      at arrayMap (/training-dir/notes-app-api/node_modules/lodash/lodash.js:639:23)
      at Function.map (/training-dir/notes-app-api/node_modules/lodash/lodash.js:9554:14)
      at processConfig (/training-dir/notes-app-api/node_modules/serverless-webpack/lib/validate.js:183:37)
      at ServerlessPlugin.validate (/training-dir/notes-app-api/node_modules/serverless-webpack/lib/validate.js:232:14)
      at ServerlessPlugin.tryCatcher (/training-dir/notes-app-api/node_modules/bluebird/js/release/util.js:16:23)
      at Promise._settlePromiseFromHandler (/training-dir/notes-app-api/node_modules/bluebird/js/release/promise.js:547:31)
      at Promise._settlePromise (/training-dir/notes-app-api/node_modules/bluebird/js/release/promise.js:604:18)
      at Promise._settlePromiseCtx (/training-dir/notes-app-api/node_modules/bluebird/js/release/promise.js:641:10)
      at _drainQueueStep (/training-dir/notes-app-api/node_modules/bluebird/js/release/async.js:97:12)
      at _drainQueue (/training-dir/notes-app-api/node_modules/bluebird/js/release/async.js:86:9)
      at Async._drainQueues (/training-dir/notes-app-api/node_modules/bluebird/js/release/async.js:102:5)
      at Immediate.Async.drainQueues [as _onImmediate] (/training-dir/notes-app-api/node_modules/bluebird/js/release/async.js:15:14)
      at processImmediate (internal/timers.js:439:21)
      at process.topLevelDomainCallback (domain.js:126:23)

     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

  Get Support --------------------------------------------
     Docs: docs.serverless.com
     Bugs: github.com/serverless/serverless/issues
     Issues: forum.serverless.com

  Your Environment Information ---------------------------
     Operating System: darwin
     Node Version: 14.2.0
     Framework Version: 1.70.0
     Plugin Version: 3.6.11
     SDK Version: 2.3.0
     Components Version: 2.30.10

```

I am stuck at this point and any help will be appreciated to get the expected output per the Text

---

<div class="post-metadata">

**Author:** ![jayair](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayair/32/9_2.png) [@jayair](https://discourse.sst.dev/u/jayair)\
**Post date:** [May 31, 2020, 8:28pm UTC](https://discourse.sst.dev/t/testing-billing-api-issue/1865/2 "2020-05-31T20:28:24Z")

</div>

It’s really hard to know whats going on based on that. It seems like it might be a config related issue. You can try prefixing your command with `SLS_DEBUG=*` to get more debug info.
