You are here: Resources > Webhooks > Direct Debit R-Transaction Event

Direct Debit R-Transaction Event

Trigger: A PAIN.002 reject file is imported into Nuapay updating a Direct Debit's payment status.

Webhook Event Message Details:  
Webhook Event Type Nuapay Direct Debit Status
DirectDebitCancel CANCELLED
DirectDebitRefuse REFUSED
DirectDebitReturn RETURNED
DirectDebitRefund REFUNDED

Webhook Event Message Details:

Parent Parameter Type Mandatory / Optional Description
root eventTimestamp number Mandatory The Unix epoch timestamp
root eventType string Mandatory Allowed values are the Webhook Event Types referenced in the table above.
root resourceTechnicalId number Mandatory
root resourceReference string optional This can be the business reference of the resource, useful when filtering events via the Webhooks area of the Developer Dashboard.
root resourceReferenceType string optional This can be a business reference of the resource, useful when filtering events via the Webhooks area of the Developer Dashboard.
root resourceDetails object Mandatory Resource specific data grouping object
resourceDetails uri string Mandatory This is URI of the resource for RESTful API querying; a Direct Debit URI. You can use this to query the resource with a Retrieve Direct Debit call for example.
resourceDetails type string Mandatory This is the type of the resource to which the URI is related. In this case it is a Direct Debit resource.
resourceDetails reasonCode string optional The SEPA Reason Code
root organizationId number Mandatory The unique merchant identifier

 

The following is an example of a Direct Debit Reject event JSON:

       
POST http://example.com/webhooks
Content-Type: application/json;charset=UTF-8
X-Signature: 521ab01d030dee864fb44cc65a3be52ae591f46cde8d14d3e72fbc3790e4a304
Content-Length: 261
X-Request-Id: dc645679-71a5-498d-bb29-ec027948c7c1
	{
		"eventTimestamp": 1501169079000,
		"eventType": "DirectDebitReject",
		"resourceReference": "Webhook1",
		"resourceReferenceType": "EndToEndId",
		"resourceUri": "/schemes/p2lqa394mv/mandates/lbyjxj5ebd/directdebits/a2rexnvdmq",
		"resourceType": "DirectDebit",
		"reasonCode": "MS03"
	}