add state as a paramter so it can validate it with the response.

but default it to 0 incase the provider doesn't send state back in the
response.