Skip to Main Content
Riverty Docs
riverty logo Docs

Getting started with webhook notifications

Notifications in Accounting as a Service are real-time or scheduled alerts triggered by specific events occurring within the system. The purpose of these notifications is to inform you about important actions, such as updates to customer accounts, errors during data processing, payments, or document creation. These notifications are sent via HTTP POST requests to a URL provided by you during the subscription process.

Notifications help ensure you are always up-to-date with key activities, such as receiving feedback on order processing, balance changes, or completed refunds. You can use these notifications to update other internal systems, such as CRM systems, or trigger automated processes, like pausing or reactivating subscriptions.

Accounting as a Service provides a dedicated API for administrating Webhooks subscriptions and callback URLs.

You have to subscribe to a notification to receive updates via a webhook. The subscription process involves setting up an endpoint on your side that can receive HTTP POST requests. Follow these steps:

  • 1. Register to AQI

    Learn more
  • 2. Inform AaaS team about registration

    To link your API key to your setup, the API key has to be provided to your contact on Accounting as a Service side.

    Learn more
  • 3. Subscribe to the webhook

    Make a POST `request to /administration/v1/notification-callbacks` to register your endpoint and the notification types you want to receive.

    Learn more
  • 4. Notify Accounting Team about subscription

    Inform the team to activate the specific notification in the system (except for EDIErrorSent, which is always active).

    Learn more
  • 5. Test in UAT environment

    Test the notification setup in the UAT environment to ensure everything is working properly.

    Learn more

Subscribe to a Webhook

You have to subscribe to a notification to receive updates via a webhook. The subscription process involves

  1. Setting up an HTTPS-secured endpoint on your side that can receive notifications through POST requests.

  2. It is recommended that you whitelist our IPs so that no other other system could access your end-point.

    UAT IP : 20.76.134.255, 4.210.170.174
    PROD IP : 20.103.56.175, 4.180.187.249

  3. Make a POST request to /administration/v1/notification-callbacks to register your endpoint and the notification types you want to receive. You can add more than one callback end-points for the same notification type based on your business case. But be mindful that you will receive duplicate notifications and you need to filter notifications for example, if you want to listen to B2B notifications on one system filter based on the criteria of B2B and similarly you can listen to B2C notifications on another system.

Sample:

POST /administration/v1/notification-callbacks HTTP/1.1
Host: api-uat.accounting.riverty.io
X-Subscription-Key: XXXX //Your API Subscription Token
Content-Type: application/json
 
{
    "callbackUrl": "https://your-endpoint.com/notifications", // URL to send notifications
    "notificationTypes": ["accounting/refundCompleted"]
}

Possible Accounting Notification Types for your business:

  • accounting/EDIErrorSent (Must be subscribed for Accounting as a Service)
  • accounting/invoiceCreated
  • accounting/documentCreated
  • accounting/balanceUpdated
  • accounting/chargebackReceived
  • accounting/paymentReceived
  • accounting/refundCompleted
  • accounting/reminderSent
  • accounting/dailyGLAccountBalanceSent

Once subscribed successfully, you will receive a 200 (OK) response:

{
    "callbackUrl": "https://your-endpoint.com/notifications",
    "description": "Webhook for receiving refund completed notifications",
    "id": "5b2efc5d-eb64-43eb-99fb-69728c3d2ce0",
    "notificationTypes": ["accounting/refundCompleted"]
}

Path

POST /notification-callbacks/{callbackId}