---
page_title: Webhooks Request
product: upi-qr-code
page_source: https://docs.juspay.io/upi-qr-code/docs/scan--pay/webhooks-request
llms_txt: https://docs.juspay.io/llms.txt
product_llms_txt: https://docs.juspay.io/upi-qr-code/llms.txt
---


# Webhooks



After the completion of every payment/refund call, Juspay will provide direct notification to your server regarding events, like: Order Succeeded, Transaction Charged etc.. These direct notifications are called Webhooks.

For transactions processed through UPI QR Code flow, the `"txn_flow_type"` parameter value will be `QR`.

## Sample Code Snippets:
### Top Header:

#### ORDER_SUCCEEDED Code Snippet:

```order_succeeded
{
    "event_name": "ORDER_SUCCEEDED",
    "content": {
        "order": {
            "payer_app_name": "",
            "bank_pg": "UPI-PG",
            "payment_method": "UPI",
            "customer_phone": "FILTERED",
            "payment_gateway_response": {
                "txn_id": "test-40071826911-1",
                "rrn": "43888933",
                "auth_id_code": "880599",
                "resp_message": "SUCCESS|Completed Using Callback",
                "epg_txn_id": "190236",
                "resp_code": "success",
                "created": "2024-01-22T03:28:35Z"
            },
            "udf8": "",
            "txn_id": "test-40071826911-1",
            "order_id": "40071826911",
            "gateway_reference_id": "",
            "maximum_eligible_refund_amount": "FILTERED",
            "udf9": "",
            "txn_detail": {
                "txn_id": "test-40071826911-1",
                "order_id": "40071826911",
                "error_code": "",
                "txn_flow_type": "QR",
                "status": "CHARGED",
                "express_checkout": false,
                "gateway_id": ,
                "error_message": "",
                "tax_amount": null,
                "currency": "INR",
                "txn_amount": 1295,
                "created": "2024-01-22T03:28:05Z",
                "gateway": "PAYU",
                "surcharge_amount": null,
                "txn_uuid": "mozcFisaWkZZPn",
                "net_amount": 1295,
                "redirect": true,
                "metadata": {
                    "payment_channel": "WEB"
                }
            },
            "customer_id": null,
            "amount": 1295,
            "udf4": "",
            "status": "CHARGED",
            "udf5": "",
            "udf6": "FAID87",
            "status_id": 21,
            "offers": [],
            "udf7": "",
            "product_id": "",
            "refunded": false,
            "udf10": "",
            "gateway_id": ,
            "udf1": "circleId_0008",
            "udf2": "",
            "udf3": "",
            "date_created": "2024-01-22T03:28:05Z",
            "id": "ordeh_cd352322f5f6842aa4ecce7",
            "merchant_id": "test",
            "return_url": "https://www.test.in",
            "effective_amount": 1295,
            "currency": "INR",
            "auth_type": "",
            "customer_email": "1111111",
            "upi": {
                "txn_flow_type": "QR"
            },
            "payment_method_type": "UPI",
            "txn_uuid": "mozcFisaWkZZPn",
            "payment_links": {
                "mobile": "https://api.juspay.in/orders/ordeh_cd352322f5f6842aa4ecce7/payment-page",
                "web": "https://api.juspay.in/orders/ordeh_cd352322f5f6842aa4ecce7/payment-page",
                "iframe": "https://api.juspay.in/orders/ordeh_cd352322f5f6842aa4ecce7/payment-page"
            },
            "amount_refunded": 0,
            "bank_error_code": "",
            "bank_error_message": ""
        }
    },
    "date_created": "2024-01-22T03:28:35Z",
    "id": "evt_V2_1f3700949481544"
}

```

#### ORDER_FAILED Code Snippet:

```order_failed
{
    "event_name": "ORDER_FAILED",
    "content": {
        "order": {
            "payer_app_name": "",
            "bank_pg": null,
            "payment_method": "UPI",
            "customer_phone": "FILTERED",
            "payment_gateway_response": {
                "txn_id": "test-0338657115-1",
                "rrn": null,
                "auth_id_code": "NA",
                "resp_message": "acquirer_processing_error. Debit failed",
                "epg_txn_id": "ZHD593147",
                "resp_code": "0399",
                "created": "2024-01-22T08:32:37Z"
            },
            "udf8": "",
            "txn_id": "test-0338657115-1",
            "order_id": "0338657115",
            "gateway_reference_id": "",
            "udf9": "",
            "txn_detail": {
                "txn_id": "test-0338657115-1",
                "order_id": "0338657115",
                "error_code": "0399",
                "txn_flow_type": "QR",
                "status": "AUTHENTICATION_FAILED",
                "express_checkout": false,
                "gateway_id": ,
                "error_message": "acquirer_processing_error. Debit failed",
                "tax_amount": null,
                "currency": "INR",
                "txn_amount": 719,
                "created": "2024-01-22T08:32:03Z",
                "gateway": "",
                "surcharge_amount": null,
                "txn_uuid": "mozoD3rYSbY8VN",
                "net_amount": 719,
                "redirect": true,
                "metadata": {
                    "payment_channel": "WEB"
                }
            },
            "customer_id": null,
            "amount": 719,
            "udf4": "",
            "status": "AUTHENTICATION_FAILED",
            "udf5": "",
            "udf6": "",
            "status_id": 26,
            "offers": [],
            "udf7": "",
            "product_id": "",
            "refunded": false,
            "udf10": "",
            "gateway_id": ,
            "udf1": "",
            "udf2": "",
            "udf3": "",
            "date_created": "2024-01-22T08:32:03Z",
            "id": "ordeh_8a88770a843a7e4a095",
            "merchant_id": "test",
            "return_url": "https://www.test.in",
            "effective_amount": 719,
            "currency": "INR",
            "auth_type": "",
            "customer_email": "1111111",
            "upi": {
                "txn_flow_type": "QR"
            },
            "payment_method_type": "UPI",
            "txn_uuid": "mozoD3rYSbY8VN",
            "payment_links": {
                "mobile": "https://api.juspay.in/orders/ordeh_8a88770a843a7e4a095/payment-page",
                "web": "https://api.juspay.in/orders/ordeh_8a88770a843a7e4a095/payment-page",
                "iframe": "https://api.juspay.in/orders/ordeh_8a88770a843a7e4a095/payment-page"
            },
            "amount_refunded": 0,
            "bank_error_code": "0399",
            "bank_error_message": "acquirer_processing_error. Debit failed"
        }
    },
    "date_created": "2024-01-22T08:32:38Z",
    "id": "evt_V2_e51461e9b5febd5cade25a7"
}

```

