Webhook

The CDC bank sends notification webhooks to communicate events such as cashout confirmations, refunded transactions and many other events. You can check the complete list of webhooks notification events below.

The CDC will send HTTP POST requests to a specified URL endpoint hosted in your environment and configured to receive and process them.

📘

To start using CDC's webhooks, you will need to:

  1. Expose an endpoint on your server
  2. Register your endpoint and the events you would like to subscribe
  3. Process CDC's notifications

Retry Logic

The CDC uses at-least-once delivery to ensure that your application has received a notification. If your application has not acknowledged a message within 7 seconds, we will keep sending the request until it is accepted.

📘

Retry attempts will happen regularly, at increasing time intervals:

  • 7 seconds (two times)
  • 2 minutes
  • 5 minutes
  • 15 minutes
  • 1 hour
  • 3 hours
  • Every 12 hours for the following 5 days

Your webhook endpoint might occasionally receive the same notification more than once. You can handle these cases by making your event processing idempotent using the unique code field for every event.


Prepare receive of callback

For every request received by CDC, we will send a HTTP POST requests to a specified URL endpoint hosted in your environment and configured to receive and process them by the webhook in shape of callbacks.


Webhook templates

This is a list of all possible webhooks templates

Cashout Confirmation

{
    "return": true,
    "message": "PIX approved",
    "data": {
        "url": "https://url.com",
        "description": "Example Webhook",
        "event_name": "Cashout Confirmation",
        "event_code": 1,
        "created_at": "2025-01-02 12:53:03",
        "transaction": {
            "end_to_end": "E183942282025010215530158448612313",
            "code": "a55cb1cc-8d69-4893-a899-a0f858e38123",
            "code_transfer_control": "1",
            "transfer_control": "sent",
            "code_transaction_status": "2",
            "transaction_status": "approved",
            "description": "PIX approved",
            "message": null,
            "value": "10.01",
            "correlation_id": "b4634fb7-3011-4f1f-ae89-12345678910",
            "receiver_account": {
                "name": "CDC BANK",
                "document": "***.000.000-**",
                "banking_data": {
                    "bank_name": "CDC SOCIEDADE DE CRÉDITO",
                    "bank": "470",
                    "account": "47000000",
                    "digit": "0",
                    "agency": "1",
                    "type": "cc"
                }
        }
    }
}

Cashout Refund

{
    "return": true,
    "message": "PIX refund made",
    "data": {
        "url": "https://url.com",
        "description": "Example Webhook",
        "event_name": "Cashout Refund",
        "event_code": "2",
        "created_at": "2025-01-02 14:41:11",
        "transaction": {
            "end_to_end": "E18394228202501021620593054b1234",
            "code": "9cae8013-3045-4cdd-8923-0eaf2df31234",
            "code_transfer_control": "2",
            "transfer_control": "received",
            "code_transaction_status": "4",
            "transaction_status": "refund made",
            "description": "PIX refund made",
            "message": "DEVOLUÇÃO TRANSFERÊNCIA PIX",
            "value": "10.01"
        }
    }
}