logo
Trustly Docs
BETA

Notifications for DirectDebit

Updated 1 day ago

Overview

Debiting the end-user is done with the DirectDebit instruction.

Pending

Immediately after the request has been accepted for processing, a pending notification is sent to the NotificationURL.

Example request

JSON
{
    "method": "pending",
    "params": {
        "uuid": "258a2184-2842-b485-23ca-293425152415",
        "data": {
            "orderid": "87654567",
            "accountid": "1234567890",
            "messageid": "98348932",
            "notificationid": "4876513450",
            "amount": "98.02",
            "currency": "GBP",
            "paymentdate": "2024-01-05",
			"timestamp": "2010-01-20 14:42:04.675645+01"
        },
        "signature": "fVhjuMqbsH0Ku ... S16VbzRsw=="      
    },
    "version": "1.1"
}

Cancel

If the direct-debit could not be processed, a cancel notification is sent.

Example request

JSON
{
    "method": "cancel",
    "params": {
        "uuid": "258a2184-9021-b874-21ca-293425152415",
        "data": {
            "orderid": "87654567",
            "messageid": "98348932",
            "notificationid": "4876513450",
            "attributes": {
            	"reason": "ERROR_CHARGE_NOT_APPROVED",
            	"details": "BACS ARUDD_1(INSTRUCTION CANCELLED BY PAYER)",
            }
        },
        "signature": "F6+hjuMqbsH0Ku ... S16VbzRsw==",      
    },
    "version": "1.1"
}

Credit

When funds have credited the account, a credit notification is sent.

Example request

JSON
{
    "method": "credit",
    "params": {
        "signature": "D67hjuMqbsH0Ku ... S16VbzRsw==",
        "uuid": "258a2184-2842-b485-25ca-293525152425",
        "data": {
            "orderid": "87654567",
            "messageid": "98348932",
            "notificationid": "9876543456",
            "amount": "90.02",
            "currency": "GBP",
            "timestamp": "2010-01-20 14:42:04.675645+01",
            "attributes": {
            	"reference": "TRLY80494-1001",
            	"statement": "TRLY80494-1001"
            }
        }
    },
    "version": "1.1"
}

Debit

If a previously credited direct-debit is reversed, a debit notification is sent for the same order. This basically means that the funds where sent to the merchant account and later sent back to the end-user account.

Example request

JSON
{
    "method": "debit",
    "params": {
        "uuid": "258a2184-2842-b485-25ca-293525152425",
        "data": {
            "orderid": "87654567",
            "messageid": "asdfasdasdf",
            "notificationid": "9876543456",
            "amount": "90.02",
            "currency": "GBP",
            "messageid": "98348932",
            "timestamp": "2010-01-20 14:42:04.675645+01",
            "attributes": {
            	"reference": "TRLY80494-1001",
            	"statement": "TRLY80494-1001",
            	"reason": "ERROR_CHARGE_NOT_APPROVED",
            	"details": "BACS ARUDD_1(INSTRUCTION CANCELLED BY PAYER)"              
            }
        },
        "signature": "D67hjuMqbsH0Ku ... S16VbzRsw==",      
    },
    "version": "1.1"
}