Topics and Events
Topics
A topic represents a category of notifications that your webhook can subscribe to. It groups related events under a single, descriptive label. Topics allow you to organize and filter the types of updates you want to receive.
Events
An event is a notification that a specific action or change has occurred within Commenda’s system. Each event belongs to a topic and carries detailed information about the triggering action or change.
All events share certain fields including the time they occur and the id of the affected organization. Events also have a field data
which will be different for each topic.
Topic Categories
Commenda provides webhook notifications for events related to the following objects. This list is not exhaustive and more topic categories will be added soon.
- Existing Registrations
- New Registrations
- Nexus
- Exemption Certificates
- Customs Duty
Existing Registrations
-
REGISTRATIONS.EXISTING.VALIDATION.SUCCEEDED
In order to allow Commenda to do automated sales tax and use tax filings for a corporation’s existing registration, the registration needs to be validated by Commenda. To initiate the validation process the user can call the
POST /registrations/request-validation
endpoint. Validating a registration happens asynchronously and once the validation is successful this webhook is triggered. -
REGISTRATIONS.EXISTING.VALIDATION.FAILED
In some cases, a registration under validation will fail to pass our internal criteria. A non exhaustive list of failure cases is included below. More cases will be added over time.
-
INPUTS.INVALID_CREDENTIALS
Trigger: To successfully file monthly sales tax for the customer, we need their tax portal credentials. If the entered credentials are wrong this error will be triggered.
Resolution: The user needs to re-enter their credentials by hitting the
POST registrations/:id
. Once all the details are confirmed, you can call thePOST /registrations/request-validation
API endpoint again to request revalidation. -
INPUTS.INVALID_STATE_REGISTRATION_ID
Trigger: If the entered state registration ID is invalid, this error will be triggered.
Resolution: The user needs to re-enter the invalid details by hitting the
POST registrations/:id
. Once all the details are confirmed, you can call thePOST /registrations/request-validation
API endpoint again to request revalidation. -
PAYMENTS.PORTAL_HAS_EXISTING_PENDING_PAYMENTS
Trigger: Every customer who is registered for sales tax needs to file and pay taxes to the state government. If during validation we find out that the customer has existing pending payments this error will be thrown.
Resolution: The customer will need to make the payment for their pending filings. Once all the dues are cleared, you can call the
POST /registrations/request-validation
API endpoint again to request revalidation. -
OTHER
Trigger: Something unexpected went wrong. A human readable message on how to resolve the error and what went wrong will be attached.
Resolution: The
data
interface of the event payload will contain a possible resolution for the error.
-
New Registrations
-
This webhook triggers when a new registration is successfully created.REGISTRATIONS.NEW.SUCCEEDED
Nexus
-
NEXUS.THRESHOLD.STATE.ALERT
Commenda internally tracks each corporation’s progress towards economic nexus. If nexus is about to be breached in a state where the customer is not registered, the customer will need to register in that state. Registrations generally take some time and it’s better to register once you have reached around 80% of the nexus threshold.
This webhook is triggered everyday from the day when 80% threshold is crossed in a non registered state.
Exemptions Certificates
-
EXEMPTION_CERTIFICATES.VERIFICATION.SUCCEEDED
Once a customer uploads an exemption certificate Commenda begins the process of validating it. Once the validation is complete, Commenda begins treating related transactions as tax exempt. This webhook is triggered once the validation process succeeds.
-
EXEMPTION_CERTIFICATES.VERIFICATION.FAILED
In some cases, a exemption certificate under validation will fail to pass our internal criteria. A non exhaustive list of failure cases is included below. More cases will be added over time.
-
INPUTS.NAME_MISMATCH
Trigger: If the name of the customer doesn’t matches the name mentioned on the exemption certificate.
Resolution: Either update the name of the customer or upload the right exemption certificate.
-
CERTIFICATE.CERTIFICATE_HAS_EXPIRED
Trigger: The expiration date mentioned on the exemption certificate has already passed and the certificate is no longer valid.
Resolution: The customer will need to upload the latest version of the exemption certificate for the purchaser.
-
CERTIFICATE.INVALID_TYPE_OR_FORMAT
Trigger: If the type of the certificate is invalid for this customer this webhook will be triggered.
Resolution: The customer will need to upload the latest version of the exemption certificate for the purchaser.
-
PURCHASER.MISSING_ADDRESS
Trigger: Some states like Texas requires the address of the purchaser to be present on the exemption certificate. This webhook will be triggered if the address is missing.
Resolution: Upload a newer version of exemption certificate that contains the purchaser’s address.
-
OTHER
Trigger: This is to cover edge cases. A human readable message on how to resolve the error and what went wrong will be attached.
Resolution: The
data
interface of the event payload will contain a possible resolution for the error.
-
We send out a notification two weeks before an exemption certificate is expiring, to give a customer notice that they’ll need to upload a new one. Trigger: The expiration date mentioned on the exemption certificate is passing and the certificate will no longer be valid.EXEMPTION_CERTIFICATES.EXPIRATION
Resolution: The customer will need to upload the latest version of the exemption certificate for the purchaser.
-
Customs Duty
-
CUSTOMS_DUTY.CUSTOMS_CODE.UPDATE
When products are shipped internationally, importing countries may charge customs duties on the shipment. The duty can be based on the price of the shipment, or on some other property like its weight or volume.
When the required properties change, Commenda will notify users who have webhooks registered in order to inform them that they need to collect additional information about those products in order to calculate customs duty.