Debit Transaction Webhook

The Debit Transaction Webhook is triggered when a debit instruction (transaction) under an eNACH presentation is created, processed, or fails. This allows merchants to track transaction status in real-time and reconcile debit attempts linked to a presentation ID and mandate.


Overview

This webhook is triggered to notify merchants about lifecycle events of a debit transaction under an eNACH presentation. It includes all critical stages — from transaction creation to success/failure.

This helps the merchant reconcile payments, track processing, and take action (e.g., retry, notify customer) based on real-time transaction status.


Trigger Points

Webhook is triggered when any of the following events occur for a debit transaction:

StatusDescription
newTransaction is created but not yet submitted to the bank
submitted_to_bankTransaction submitted to the sponsor/destination bank
payment_successDebit successfully processed
payment_failedDebit attempt failed; reason is sent in remarks field

Webhook Request Format

  • Method: POST
  • Content-Type: application/json
  • Authentication: Optional HMAC-SHA256 signature in header

🔹 Webhook Payload Fields

FieldTypeDescription
transactionIdstringUnique Castler transaction ID
presentationIdstringDebit presentation ID this transaction belongs to
customerNamestringName of the customer
debitAmountnumberAmount attempted to be debited
createdAtdatetimeISO timestamp of when the transaction was created
statementDatedatetimeDate the transaction will reflect in bank statement
nextPaymentDatedatetimeNext scheduled payment date (for recurring mandates)
transactionReferencestringUnique reference sent to NPCI/bank
statusstringTransaction status: new, submitted_to_bank, payment_success, payment_failed
remarksstringPresent only if status is payment_failed. Reason for failure.
paymentCountintegerTotal number of payments scheduled
paidCountintegerNumber of payments already successfully completed

🔹 Sample Webhook Payloads

🟡 1. Transaction Created (new)

{
  "transactionId": "NPT250903111001079LB55PUGBWWZ2TH",
  "presentationId": "NSP2509031106081538R9E4R82462BWW",
  "customerName": "Abhinav Singh",
  "debitAmount": 50,
  "createdAt": "2025-09-03T11:11:37.049813267",
  "statementDate": "2025-09-04T00:00",
  "nextPaymentDate": "2025-09-04T00:00",
  "transactionReference": "LB55PUGBWWZ2TH",
  "status": "new",
  "paymentCount": 2,
  "paidCount": 1
}

📤 2. Submitted to Bank (submitted_to_bank)

{
  "transactionId": "NPT250903111001079LB55PUGBWWZ2TH",
  "presentationId": "NSP2509031106081538R9E4R82462BWW",
  "customerName": "Abhinav Singh",
  "debitAmount": 50,
  "createdAt": "2025-09-03T11:11:37.049813267",
  "statementDate": "2025-09-04T00:00",
  "nextPaymentDate": "2025-09-04T00:00",
  "transactionReference": "LB55PUGBWWZ2TH",
  "status": "submitted_to_bank",
  "paymentCount": 2,
  "paidCount": 1
}

✅ 3. Payment Success (payment_success)

{
  "transactionId": "NPT250903111001079LB55PUGBWWZ2TH",
  "presentationId": "NSP2509031106081538R9E4R82462BWW",
  "customerName": "Abhinav Singh",
  "debitAmount": 50,
  "createdAt": "2025-09-03T11:11:37.049813267",
  "statementDate": "2025-09-04T00:00",
  "nextPaymentDate": "2025-09-04T00:00",
  "transactionReference": "LB55PUGBWWZ2TH",
  "status": "payment_success",
  "paymentCount": 2,
  "paidCount": 1
}

❌ 4. Payment Failed (payment_failed)

{
  "transactionId": "NPT250903111001412E5996AIZKKPM6N",
  "presentationId": "NSP2509031106081538R9E4R82462BWW",
  "customerName": "Abhinav Singh",
  "debitAmount": 50,
  "createdAt": "2025-09-03T11:11:36.783545",
  "statementDate": "2025-09-04T00:00",
  "transactionReference": "E5996AIZKKPM6N",
  "status": "payment_failed",
  "remarks": "Transaction not allowed, Debit is already created for this UMRN",
  "paymentCount": 2,
  "paidCount": 2
}