Order Processing Callout Plugin (Synchronous Webhooks)

Callout Plugin

The Callout Plugin allows real-time communication with external systems during order processing. It sends a stringified JSON payload of the Limio order object (schemaarrow-up-right) to a specified endpoint and processes the response before proceeding to the next plugin.

When set to "critical," the process is synchronous, preventing order processing until all key steps are completed. This can be used to ensure customers receive their entitlements correctly and are activated successfully before finalizing the order.

If you don't need webhooks to be synchronous, you can just use asynchronous webhooks, for example to feed into a data warehouse. See our developer guide for more details:

Webhookschevron-right

Key Features

  • Endpoint Configuration: You can configure a target endpoint to receive the order payload. The payload will include full order context and relevant metadata required by the external system.

  • Response Handling:

    • Success: The order processing continues as expected.

    • Failure: Processing halts if a critical failure occurs. To stop processing based on response status codes, you must specify which codes should trigger a failure. Example error: callout plugin failed due to response status: [404]

    • Timeout: If no response is received within the configured timeout, the plugin will fail. If a timeout value is not defined, it defaults to 2000 milliseconds (2 seconds). Example error: This operation was aborted

Example Configuration

{
  "critical": true,
  "name": "calloutPlugin",
  "options": {
    "endpoint": "https://example.com/endpoint",    "timeoutValue": 2000,    "shouldRejectOn": {       "status": [404]     }
  }
}

Example Use Case: User Provisioning and Account Creation

In some integrations, Limio must first create or validate a user in an external system before creating the corresponding account in a billing platform such as Zuora. The Callout Plugin can perform this first step to ensure consistent identifiers across systems.

End-to-End Flow

  1. Customer Submits an Order The order enters Limio’s orchestration pipeline.

  2. Callout Plugin Executes

    • The plugin sends the order payload to an external API endpoint.

    • The external system returns a unique identifier (for example, userId or accountReference).

    • Limio stores this identifier in the Order Context for later use.

    • This step is marked as critical to ensure it completes before proceeding.

  3. Zuora Plugin Executes

    • The standard Limio → Zuora integration runs next.

    • The identifier returned by the Callout Plugin is used as the Zuora Account Number or another field, ensuring cross-system consistency.

    • Zuora account, subscription, and payment data are then created as usual.

  4. Order Completes

    • Limio finalises the order, updating customer and subscription records.

  5. Webhook Executes (Fulfilment or Entitlement Notification)

    • Once the order completes, Limio sends an outbound webhook to the external system to confirm that billing and account creation have succeeded.

    • The external system can then proceed with provisioning or entitlements.

Use Cases

  • Entitlement: Use the payload to confirm whether a user has been successfully entitled or not.

  • Fulfillment: Use the payload to validate an order for fulfillment, enrich the order data with additional delivery data, and confirm it can be delivered.

Note: If you do not need the process to be synchronous, you can use Limio's regular webhooks. See our documentation: https://developers.limio.com/api-docs/using-webhooksarrow-up-right.

Last updated

Was this helpful?