Search Overlay

Direct Debit

You can integrate your e-commerce application directly to our platform-agnostic Direct Debit API and process purchases and credits through a variety of bank schemes.

Click the links below to view our code samples.

Verify That the Service Is Accessible

paysafeApiClient.DirectDebitServiceHandler(paysafeApiClient).monitor(function(error, responseDel) { });
                                

Direct Debit Purchases

Process a Purchase

var profile = new paysafeApiClient.Profiles();
var purchase = new paysafeApiClient.Purchases();
var achbankAccount = new paysafeApiClient.ACHBankAccounts();
var billingDetails = new paysafeApiClient.BillingDetails();
profile.setFirstName("Joe");
profile.setLastName("Smith");
profile.setEmail(Joe.Smith @hotmail.com);
achbankAccount.setaccountHolderName("XYZ Company");
achbankAccount.setaccountType("CHECKING");
achbankAccount.setaccountNumber("988772192");
achbankAccount.setroutingNumber("211589828");
achbankAccount.setpayMethod("WEB");
billingDetails.setStreet("100 Queen Street West");
billingDetails.setCity("Los Angeles");
billingDetails.setState("CA");
billingDetails.setCountry("US");
billingDetails.setZip("90210");
billingDetails.setPhone("3102649010");
purchase.setmerchantRefNum("ORDER_ID:1231");
purchase.setamount(10098);
purchase.setcustomerIp("192.0.126.111");
purchase.setach(achbankAccount);
purchase.setprofile(profile);
purchase.setbillingDetails(billingDetails);
paysafeApiClient.DirectDebitServiceHandler(paysafeApiClient).submitPurchase(
purchase,
function(error, resprocessACHpurchase) {});

var purchase = new paysafeApiClient.Purchases();
var achbankAccount = new paysafeApiClient.ACHBankAccounts();
achbankAccount.setpaymentToken("DNjEzMTM4NDg1");
achbankAccount.setpayMethod("WEB");
purchase.setmerchantRefNum("ORDER_ID:1235");
purchase.setamount(100);
purchase.setach(achbankAccount);
paysafeApiClient.DirectDebitServiceHandler(paysafeApiClient).submitPurchase(
purchase,
function(error, resprocessACHpurchaseWithPaymentToken) {});

var profile = new paysafeApiClient.Profiles();
var purchase = new paysafeApiClient.Purchases();
var eftbankAccount = new paysafeApiClient.EFTBankAccounts();
var billingDetails = new paysafeApiClient.BillingDetails();
profile.setFirstName("Joe");
profile.setLastName("Smith");
profile.setEmail(Joe.Smith @hotmail.com);
eftbankAccount.setaccountHolderName("Sally");
eftbankAccount.setaccountNumber("519090");
eftbankAccount.settransitNumber("25039");
eftbankAccount.setinstitutionId("001");
billingDetails.setStreet("100 Queen Street West");
billingDetails.setCity("Los Angeles");
billingDetails.setState("CA");
billingDetails.setCountry("US");
billingDetails.setZip("90210");
billingDetails.setPhone("3102649010");
purchase.setmerchantRefNum("ORDER_ID:1235");
purchase.setamount(10098);
purchase.setcustomerIp("192.0.126.111");
purchase.seteft(eftbankAccount);
purchase.setprofile(profile);
purchase.setbillingDetails(billingDetails);
paysafeApiClient.DirectDebitServiceHandler(paysafeApiClient).submitPurchase(
purchase,
function(error, resprocessEFTpurchase) {});

var purchase = new paysafeApiClient.Purchases();
var eftbankAccount = new paysafeApiClient.EFTBankAccounts();
eftbankAccount.setpaymentToken("DTEyMzYzMjQ3ODg");
purchase.setmerchantRefNum("ORDER_ID:1235");
purchase.setamount(100);
purchase.seteft(eftbankAccount);
paysafeApiClient.DirectDebitServiceHandler(paysafeApiClient).submitPurchase(
purchase,
function(error, resprocessEFTpurchaseWithPaymentToken) {});

var purchase = new paysafeApiClient.Purchases();
var bacsbankAccount = new paysafeApiClient.BACSBankAccounts();
bacsbankAccount.setpaymentToken("BNjEzMTM4NDg1");
purchase.setmerchantRefNum("ORDER_ID:1235");
purchase.setamount(100);
purchase.setbacs(bacsbankAccount);
paysafeApiClient.DirectDebitServiceHandler(paysafeApiClient).submitPurchase(
purchase,
function(error, resprocessBACSpurchaseWithPaymentToken) {});

var purchase = new paysafeApiClient.Purchases();
var sepabankAccount = new paysafeApiClient.SEPABankAccounts();
sepabankAccount.setpaymentToken("D2jEzMTM4NDg10h");
purchase.setmerchantRefNum("ORDER_ID:1235");
purchase.setamount(100);
purchase.setsepa(sepabankAccount);
paysafeApiClient.DirectDebitServiceHandler(paysafeApiClient).submitPurchase(
purchase,
function(error, resprocessSEPApurchaseWithPaymentToken) {});

Cancel a Purchase

var purchase = new paysafeApiClient.Purchases();
purchase.setId("a02e52c7-c991-4418-966a-b62989cb0eae");
paysafeApiClient.DirectDebitServiceHandler(paysafeApiClient).cancelPurchase(
purchase,
function(error, resCancelACHpurchase) {});

Look Up a Purchase

var purchase = new paysafeApiClient.Purchases();
purchase.setId("a02e52c7-c991-4418-966a-b62989cb0eae");
paysafeApiClient.DirectDebitServiceHandler(paysafeApiClient).getPurchase(
purchase,
function(error, resGetACHpurchase) {});

var purchase = new paysafeApiClient.Purchases();
var pagination = new paysafeApiClient.Pagination();
pagination.setLimit(2);
purchase.setmerchantRefNum("ORDER_ID:1231");
paysafeApiClient.DirectDebitServiceHandler(paysafeApiClient).searchByMerchantRef(
purchases,
pagination,
function(error, resGetACHpurchaseUsingMerRef) {});

Direct Debit Standalone Credits

Process a Standalone Credit

var profile = new paysafeApiClient.Profiles();
var standalonecredits = new paysafeApiClient.Standalonecredits();
var achbankAccount = new paysafeApiClient.ACHBankAccounts();
var billingDetails = new paysafeApiClient.BillingDetails();
profile.setFirstName("Joe");
profile.setLastName("Smith");
profile.setEmail("Joe.Smith@hotmail.com");
achbankAccount.setaccountHolderName("XYZ Company");
achbankAccount.setaccountType("CHECKING");
achbankAccount.setaccountNumber("988772193");
achbankAccount.setroutingNumber("211589828");
achbankAccount.setpayMethod("WEB");
billingDetails.setStreet("100 Queen Street West");
billingDetails.setCity("Los Angeles");
billingDetails.setState("CA");
billingDetails.setCountry("US");
billingDetails.setZip("90210");
billingDetails.setPhone("3102649010");
standalonecredits.setmerchantRefNum("ORDER_ID:1231");
standalonecredits.setamount(10098);
standalonecredits.setcustomerIp("192.0.126.111");
standalonecredits.setach(achbankAccount);
standalonecredits.setprofile(profile);
standalonecredits.setbillingDetails(billingDetails);
paysafeApiClient.DirectDebitServiceHandler(paysafeApiClient).submitStandalone(
standalonecredits,
function(error, resprocessstandalonecredits) {});

var standalonecredits = new paysafeApiClient.Standalonecredits();
var achbankAccount = new paysafeApiClient.ACHBankAccounts();
achbankAccount.setpaymentToken("DTEyMzYzMjQ3ODg");
achbankAccount.setpayMethod("WEB");
standalonecredits.setmerchantRefNum("ORDER_ID:1231");
standalonecredits.setamount(100);
standalonecredits.setach(achbankAccount);
paysafeApiClient.DirectDebitServiceHandler(paysafeApiClient).submitStandalone(
standalonecredits,
function(error, resprocessACHstandalonecreditsWithPaymentToken) {});

var profile = new paysafeApiClient.Profiles();
var standalonecredits = new paysafeApiClient.Standalonecredits();
var eftbankAccount = new paysafeApiClient.EFTBankAccounts();
var billingDetails = new paysafeApiClient.BillingDetails();
profile.setFirstName("Joe");
profile.setLastName("Smith");
profile.setEmail("Joe.Smith@hotmail.com");
eftbankAccount.setaccountHolderName("Sally");
eftbankAccount.setaccountNumber("519090");
eftbankAccount.settransitNumber("25039");
eftbankAccount.setinstitutionId("001");
billingDetails.setStreet("100 Queen Street West");
billingDetails.setCity("Los Angeles");
billingDetails.setState("CA");
billingDetails.setCountry("US");
billingDetails.setZip("90210");
billingDetails.setPhone("3102649010");
standalonecredits.setmerchantRefNum("ORDER_ID:1231");
standalonecredits.setamount(10098);
standalonecredits.setcustomerIp("192.0.126.111");
standalonecredits.seteft(eftbankAccount);
standalonecredits.setprofile(profile);
standalonecredits.setbillingDetails(billingDetails);
paysafeApiClient.DirectDebitServiceHandler(paysafeApiClient).submitStandalone(
standalonecredits,
function(error, resprocessstandalonecredits) {});

var standalonecredits = new paysafeApiClient.Standalonecredits();
var eftbankAccount = new paysafeApiClient.EFTBankAccounts();
eftbankAccount.setpaymentToken("DTEyMzYzMjQ3ODg");
standalonecredits.setmerchantRefNum("ORDER_ID:1235");
standalonecredits.setamount(100);
standalonecredits.seteft(eftbankAccount);
paysafeApiClient.DirectDebitServiceHandler(paysafeApiClient).submitStandalone(
standalonecredits,
function(error, resprocessEFTstandalonecreditsWithPaymentToken) {});

var standalonecredits = new paysafeApiClient.Standalonecredits();
var bacsbankAccount = new paysafeApiClient.BACSBankAccounts();
bacsbankAccount.setpaymentToken("MTEyMzYzMjQ3ODg");
standalonecredits.setmerchantRefNum("ORDER_ID:1231");
standalonecredits.setamount(100);
standalonecredits.setbacs(bacsbankAccount);
paysafeApiClient.DirectDebitServiceHandler(paysafeApiClient).submitStandalone(
standalonecredits,
function(error, resprocessBACSstandalonecreditsWithPaymentToken) {});

Cancel a Standalone Credit

var standalonecredits = new paysafeApiClient.Standalonecredits();
standalonecredits.setId("a02e52c7-c991-4418-966a-b62989cb0eae");
paysafeApiClient.DirectDebitServiceHandler(paysafeApiClient).cancelStandaloneCredits(
standalonecredits,
function(error, resCancelACHstandalonecredits) {});

Look Up a Standalone Credit

var standalonecredits = new paysafeApiClient.Standalonecredits();
standalonecredits.setId("a02e52c7-c991-4418-966a-b62989cb0eae");
paysafeApiClient.DirectDebitServiceHandler(paysafeApiClient).getStandalone(
standalonecredits,
function(error, resGetACHstandalone) {});

var standalonecredits = new paysafeApiClient.Standalonecredits();
standalonecredits.setmerchantRefNum("ORDER_ID:1231");
var pagination = new paysafeApiClient.Pagination();
pagination.setLimit(2);
paysafeApiClient.DirectDebitServiceHandler(paysafeApiClient).searchByMerchantRef(
standalonecredits,
pagination,
function(error, resGetACHstandaloneUsingMerRef) {});