logo
Trustly Docs
BETA

DirectDebit

Debiting the end-user is done with the DirectDebit instruction.
Updated 4 days ago

DirectDebit

This method is used to debit the end-user, please note that an active mandate is mandatory for this operation. Once the end-user has been debited a credit notification is sent, eg merchant account is credited.

Request parameters

Example request

JSON
{  
   "method":"DirectDebit",
   "params":{  
      "Signature":"f4ThjuMqbsdG6u ... S16VbzD4h==",
      "UUID":"258a2184-2842-b485-25ca-293525152425",
      "Data":{  
         "Username":"merchant_username",
         "Password":"merchant_password",
         "MessageID":"your_unique_order_id",
         "NotificationURL":"https://URL_to_your_notification_service",
         "AccountID":"1234567890",
         "Amount":"25.00",
         "Currency":"GBP",
         "Attributes":{  
            "PaymentDate":"2022-11-17"
         }
      }
   },
   "version":"1.1"
}

Example response

JSON
{
  "result": {
     "method":"DirectDebit",
     "uuid":"258a2184-2842-b485-25ca-293525152425",
     "data":{  
        "result":"1",
        "rejected":"",
        "orderid":"1234512345"
     },
     "signature":"QBuLx ... JDGM/GVq5EBaPnGmvxA=="
  },
  "version": "1.1"
}