Bloquo API Webhooks: Real-Time Order Status Notifications Guide

πŸ“š Bloquo Webhooks Integration: Receiving Real-Time Order Status Notifications

πŸ“š Bloquo Webhooks Integration: Receiving Real-Time Order Status Notifications

πŸ’‘ Feature Overview

Bloquo Webhooks are a critical real-time notification mechanism that ensures clients are immediately informed about any status change in their Deposit or Withdrawal orders.

Unlike a polling system, Bloquo actively sends an HTTP POST request to a URL you specify when creating the order, ensuring instant and efficient communication.

πŸ› οΈ How Webhook Delivery Works

1. Creation and Delivery Flow

  1. Order Creation: When creating a new Deposit or Withdrawal order via the API, the client must include the target URL in the WebhookUrl property of the request body.

  2. Monitoring: Bloquo monitors the internal status of the order.

  3. Notification: Whenever the order's status changes (e.g., from PENDING to COMPLETED or FAILED), Bloquo sends an HTTP POST request to the provided WebhookUrl.

  4. Confirmation: The client's endpoint MUST respond with an HTTP 200 OK status to confirm that the notification has been received and will be processed.

2. POST Request Content

The POST request sent by Bloquo will contain a detailed JSON body with all the updated order information, including:

Main FieldTypeDescription
StatusSTRINGThe new status of the order (e.g., COMPLETED, FAILED). This is the key field.
OrderIdINTEGERThe unique Bloquo order ID.
OrderTypeSTRINGType of order (Withdrawal or Deposit).
E2EIdSTRINGEnd-to-End Identifier (if applicable), useful for tracking.
RequestedAmountDECIMALThe value originally requested.
TotalAmountDECIMALThe total value after fees.
FeeAmountDECIMALThe fee amount charged (if any).
FinalizedAtDATETIMETimestamp of when the current status was finalized.
FailureReasonSTRINGThe code and description of the failure reason (if Status is FAILED).

(Refer to the Withdrawal Order and Deposit Order examples for the complete structure.)

πŸ”’ Authentication and Source Security

Important: Webhook requests DO NOT use a Bearer Token, hash, or security signature in the request.

Communication security is ensured through Source Validation.

  • All webhook requests come EXCLUSIVELY from Bloquo's API servers.

  • Servers are segregated by environment (Sandbox, Production, etc.).

  • Required Action: To validate the source of the request on your endpoint, you MUST request the official origin endpoint or IP address corresponding to your integration environment from Bloquo and configure your firewall/server to accept requests only from this source.

πŸ”„ Retry Policy

Bloquo uses a robust retry policy to ensure notification delivery, in case your server does not acknowledge receipt.

Retry ConditionAction
Occurrence:Your server DOES NOT return an HTTP 2xx status (e.g., 200 OK) to Bloquo.
Mechanism:Exponential Backoff with Jitter (Exponential delay with random variation).
Base Delay:1 minute.
Pattern:The delay doubles with each retry, with a small random variation (approx. 1m β†’ 2m β†’ 4m β†’ 8m...).
Maximum:10 attempts.
Final Result:After 10 failures, the webhook is permanently marked as Failed, and there will be no further automatic attempts.

βœ… Best Integration Practices

To ensure a reliable and efficient webhook integration, follow these recommendations:

  1. Immediate Response (200 OK): Your endpoint must return HTTP 200 OK as quickly as possible. Heavy logic processing, database updates, or other time-consuming tasks MUST be handled asynchronously (in a queue/background). This prevents timeouts and unnecessary retries from Bloquo.

  2. Idempotency: Make your endpoint idempotent. If Bloquo sends a duplicate notification (which can occur during network failures before the 200 OK receipt), processing the second notification should not cause unwanted side effects (e.g., crediting the customer twice). Use the OrderId and Status to check if the event has already been processed.

  3. Logging: Log (record) all incoming webhook requests in full. This is crucial for auditing, troubleshooting, and validation against the Bloquo system.

  4. Data Validation: Before processing the notification, validate that the OrderId and E2EId values match the data expected in your system.

    • Related Articles

    • How to use the Notifications endpoints in the Bloquo API?

      ? Bloquo API: Notification Endpoints Overview The Notifications endpoints allow clients to retrieve a history of notifications generated by the platform (such as transaction status changes) and to manually trigger resending of notifications if ...
    • How to use the Orders endpoints in the Bloquo API?

      ? Bloquo API: Orders Endpoints Overview The Orders section of the Bloquo API allows you to create, list, and refund deposit and withdrawal orders. This functionality is essential for managing incoming and outgoing transactions on the platform. ? ...
    • How to use the Trades endpoints in the Bloquo API?

      ? Bloquo API: Trades Endpoints Overview The Trades endpoints allow efficient currency exchange operations on the platform, including quote requests, trade confirmations, and trade history listing. ? Request Quote POST Request Quote Request a quote ...
    • Guide: Withdrawal Flow

      ?Guide: Withdrawal Flow This guide walks you through how to withdraw funds from the platform β€” either in fiat (BRL) or cryptocurrencies β€” including order creation, form completion, and transaction tracking. Step 1: Accessing the Withdrawal Feature ...
    • Guide: Deposit Flow

      ?Guide: Deposit Flow This guide explains how to make a deposit on the platform β€” from choosing the account to confirming the transaction using a QR Code or payment link. Step 1: Accessing the Deposit Feature Step 1.1: Locating the buttons Go to the ...