Add utility to verify hash IDs have the expected prefix for certain API calls
robbieaverill opened this issue · 0 comments
robbieaverill commented
If you are calling a cart API, for example GET /v1/carts/cart_ABC123
, we could validate that the hash ID provided in the request starts with cart_
as a fast way to prevent 422 errors from being thrown by the API.
Each "feature" in Commerce.js should come with its own methods for verifying expected hash IDs.