Watsy
Useful articlesHow test keys work

Useful articles

How test keys work

Build and test your integration without real messages or any charge.

A test key (wsy_test_…) behaves exactly like a live key in requests and responses, but never calls a provider and never charges. It is meant for local development and CI.

Setting up

  1. Under Test numbers, register the numbers you will use.
  2. Under API keys, create a key of type test.
  3. Use it instead of your live key in development.

Behaviour

  • Only works with registered test numbers. Any other number returns 403 test_number_required.
  • The code is always zeros at the code length: 000000 by default, 0000 with code_length: 4.
  • Responses have the same shape with "mode": "test", provider test and a price of 0.
  • Webhooks fire as usual, so you can test your receiver too.
  • Rate limits and the spend cap do not apply. The IP allowlist does.
  • Test and live verifications are separate: each key only sees its own mode (404 otherwise).

Remember to swap the test key for a live key when you deploy, or real users will never receive codes.