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

bool isOnline = client.directDebitService().monitor();

Direct Debit Purchases

Process a Purchase

Process an ACH purchase
Purchases purchase = Purchases.Builder()
                .merchantRefNum(System.Guid.NewGuid().ToString())
                .amount(999999999)
                .ach()
                     .accountHolderName("computadora")
                     .accountNumber(getRandomNumber())
                     .accountType("CHECKING")
                     .routingNumber("211589828")
                     .payMethod("WEB")
                     .Done()
                     .customerIp("192.0.126.111")
                .profile()
                       .firstName("John")
                       .lastName("Smith")
                       .email("john.smith@somedomain.com")
                       .Done()
                 .billingDetails()
                        .street("100 Queen Street West")
                        .city("Los Angeles")
                        .state("CA")
                        .country("US")
                        .zip("90210")
                        .phone("3102649010")
                        .Done()
                 .Build();
            Purchases response = client.directDebitService().submit(purchase);
Process an ACH purchase using a payment token
Purchases response = client.directDebitService().submit(Purchases.Builder()
                 .merchantRefNum(account.merchantRefNum())
                 .amount(10038)
                 .ach()
                        .paymentToken(account.paymentToken())
                        .payMethod("WEB")
                        .Done()
                 .Build());
Process an EFT purchase
Purchases purchase = Purchases.Builder()
                .merchantRefNum(System.Guid.NewGuid().ToString())
                .amount(10098)
                .eft()
                     .accountHolderName("XYZ Company")
                     .accountNumber(getRandomNumber())
                     .transitNumber("22446")
                     .institutionId("001")
                     .Done()
                .customerIp("192.0.126.111")
                .profile()
                       .firstName("John")
                       .lastName("Smith")
                       .email("john.smith@somedomain.com")
                       .Done()
                 .billingDetails()
                        .street("100 Queen Street West")
                        .city("Ottawa")
                        .state("ON")
                        .country("CA")
                        .zip("M1M1M1")
                        .phone("6139991100")
                        .Done()
                 .Build();
            Purchases response = client.directDebitService().submit(purchase);
Process an EFT purchase using a payment token
Purchases response = client.directDebitService().submit(Purchases.Builder()
             .merchantRefNum(System.Guid.NewGuid().ToString())
             .amount(10038)
             .eft()
                  .paymentToken(account.paymentToken())
                  .Done()
                .Build());
Process a BACS purchase using a payment token
Purchases response = client.directDebitService().submit(Purchases.Builder()
             .merchantRefNum(System.Guid.NewGuid().ToString())
             .amount(10038)
             .bacs()
                  .paymentToken(account.paymentToken())
                  .Done()
             .Build());
Process a SEPA purchase using a payment token
Purchases response = client.directDebitService().submit(Purchases.Builder()
                 .merchantRefNum(System.Guid.NewGuid().ToString())
                 .amount(10038)
                 .sepa()
                        .paymentToken(account.paymentToken())
                        .Done()
                .Build());

Cancel a Purchase

Cancel a purchase
Purchases response = client.directDebitService().cancel(Purchases.Builder()
                .status("CANCELLED")
                .id(purchase.id())
                .Build());

Look Up a Purchase

Look up a purchase using an ID
Purchases response = client.directDebitService().get(Purchases.Builder()
                .id(purchase.id())
                .Build());
Look up a purchase using a merchant reference number
Pagerator<Purchases> response = client.directDebitService().getPurchase(Purchases.Builder()
                .merchantRefNum(purchase.merchantRefNum())
                .Build());

Direct Debit Standalone Credits

Process a Standalone Credit

Process an ACH standalone credit
StandaloneCredits standalonecredit = StandaloneCredits.Builder()
                .merchantRefNum(System.Guid.NewGuid().ToString())
                .amount(10000)
                .ach()
                     .accountHolderName("John Smith")
                     .accountNumber("983417698")
                     .accountType("CHECKING")
                     .routingNumber("211589828")
                     .payMethod("WEB")
                     .Done()
                 .customerIp("192.0.126.111")
                .profile()
                       .firstName("John")
                       .lastName("Smith")
                       .email("john.smith@somedomain.com")
                       .Done()
                 .billingDetails()
                        .street("100 Queen Street West")
                        .city("Los Angeles")
                        .state("CA")
                        .country("US")
                        .zip("90210")
                        .phone("3102649010")
                        .Done()
                 .Build();
StandaloneCredits response = client.directDebitService().submit(standalonecredit);
Process an ACH standalone credit using a payment token
StandaloneCredits response = client.directDebitService().submit(StandaloneCredits.Builder()
             .merchantRefNum(account.merchantRefNum())
             .amount(10038)
             .ach()
                  .paymentToken(account.paymentToken())
                  .payMethod("WEB")
                  .Done()
             .Build());
Process an EFT standalone credit
StandaloneCredits standalonecredit = StandaloneCredits.Builder()
                .merchantRefNum(System.Guid.NewGuid().ToString())
                .amount(10098)
                .eft()
                     .accountHolderName("John Smith")
                     .accountNumber(getRandomNumber())
                     .transitNumber("22446")
                     .institutionId("001")
                     .Done()
                .customerIp("192.0.126.111")
                .profile()
                       .firstName("John")
                       .lastName("Smith")
                       .email("john.smith@somedomain.com")
                       .Done()
                 .billingDetails()
                        .street("100 Queen Street West")
                        .city("Los Angeles")
                        .state("CA")
                        .country("US")
                        .zip("90210")
                        .phone("3102649010")
                        .Done()
                 .Build();
StandaloneCredits response = client.directDebitService().submit(standalonecredit);
Process an EFT standalone credit using a payment token
StandaloneCredits response = client.directDebitService().submit(StandaloneCredits.Builder()
             .merchantRefNum(System.Guid.NewGuid().ToString())
             .amount(10038)
             .eft()
                  .paymentToken(account.paymentToken())
                  .Done()
             .Build());
Process a BACS standalone credit using a payment token
StandaloneCredits standalonecredit = StandaloneCredits.Builder()
                .merchantRefNum(System.Guid.NewGuid().ToString())
                .amount(10000)
                .bacs()
                    .paymentToken(account.paymentToken())
                     .Done()
                .Build();

Cancel a Standalone Credit

Cancel a standalone credit
StandaloneCredits standalonecredit_response = client.directDebitService().cancel(StandaloneCredits.Builder()
                .status("CANCELLED")
                .id(response.id())
                .Build());

Look Up a Standalone Credit

Look up a standalone credit using an ID
StandaloneCredits response = client.directDebitService().get(StandaloneCredits.Builder()
                .id(response.id())
                .Build());
Look up a standalone credit using a merchant reference number
Pagerator<StandaloneCredits> response = client.directDebitService().getStandaloneCredits(StandaloneCredits.Builder()
                .merchantRefNum(standalonecredits.merchantRefNum())
                .Build());
Did you find this page useful?