logo
Trustly Docs
BETA

DirectPaymentBatch

Updated 4 days ago

Overview

Sends multiple payment instructions for directdebit for already existing mandates or credits (no need for a mandate). You connect to the sftp server with the username provided by Trustly and the same private key used to sign the requests. Please note that if the content of the file is rejected the response will be successful however you will receive a cancel notification.

Please see SFTP for how to connect and where to put/read files.

Request parameters

Example request

JSON
{  
   "method":"DirectPaymentBatch",
   "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",
         "Currency":"GBP",
         "Country":"GB",
         "BatchFile":"batch-20230215.csv",
         "Checksum":"0cdf0945096283b9ba94e42150ba84d8",
         "Attributes":{  
            "PaymentDate":"2022-11-17"
         }
      }
   },
   "version":"1.1"
}

Response parameters


Example response

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