Plants
& More
Mandate

By continuing you hereby authorize each of Example Store (“Example Company”), its processor, and any financial institution (the “Suppliers”) working in connection with either of them, to debit your bank account up to the full amount of your purchase, including for any applicable fees, taxes, and other costs, including shipping costs.

Additionally, you authorize Example Company to debit or credit your bank account to correct any erroneous debit, to make necessary adjustments to your payment, to issue a refund back to your bank account, or to facilitate any recurring and/or sequential debits initiated by you. This authority remains in full force and effect until Example Company has received written notification from you of its termination in such time and manner as to afford ExampleCompany and the Suppliers to act on it.

If you wish Example Company to charge you for services or purchases that occur on a regular basis, you are authorizing Shift4 Example Store to debit your bank account periodically.

ACH Payment Method with bank account details

This example shows how easily you can setup your site to collect ACH account details using custom forms.

Verification process

When you create PaymentMethod using account details received from customer it is not yet ready to be Charged. PaymentMethod would have status "pending".

Verification process of such account can take up to a week.

Successful Test Case

In Test mode account will be verified and PaymentMethod will became chargeable in a few seconds to simplify testing.

To finish test Payment Method setup one can enter following data.

  • In the Routing number input, enter: 021000021
  • In the Account number input, enter: 4242424242424242
  • In the Account type input, select: Personal Savings
  • Link will display the success view – click continue finish account setup.
Other Test Cases

One can also use above flow with specific account number to trigger various api behaviour

Account verification fail
1111222233339901
Charge processing_error
1111222233338801
Charge insufficient_funds
1111222233338802
Charge payment_method_declined
1111222233338803
Refund error
1111222233337701
Triggers charge dispute
1111222233336602
ACH Mandate

Prior to processing an ACH payment, you must first get permission from the customer by presenting a mandate. This mandate only needs to be displayed the first time you collect the ACH payment details and must be presented as part of the payment flow on your website.

Final language should be reviewed and approved by your legal council review before adding it to your payments checkout page.

Example mandate is present in the example view for reference.

ACH with Plaid

One can also use our Plaid integration to setup ACH account details using Plaid Link and its widget. See our ACH Payment Method with Plaid for more details.


    @AjaxController
    @RequestMapping("/ajax/examples/ach-payment-method-with-account-details")
    public class ExamplesAjaxAchWithAccountDetailsController extends BaseExamplesAjaxAchController {

    @PostMapping("/payment-method")
    Map createPaymentMethod(@RequestBody ExampleRequest initRequest) throws IOException {
        try (Shift4Gateway shift4Gateway = createShift4Gateway()) {
            // create payment method
            PaymentMethodRequest paymentMethodRequest = new PaymentMethodRequest().set("type", "ach")
                    .billing(new BillingRequest()
                            .name(initRequest.billingName))
                    .set("ach", Map.of(
                            "account", Map.of(
                                    "accountNumber", initRequest.accountNumber,
                                    "routingNumber", initRequest.routingNumber,
                                    "accountType", initRequest.accountType.name())
                    )).set("fraudCheckData", Map.of(
                            "ipAddress", initRequest.ipAddress
                    ));

            PaymentMethod paymentMethod = shift4Gateway.createPaymentMethod(paymentMethodRequest);

            // pass clientObjectId of payment method to frontend to finish setup there
            return singletonMap("clientObjectId", paymentMethod.getClientObjectId());

        } catch (Shift4Exception e) {
            throw new BadRequestException(e.getMessage());
        }
    }

    static class ExampleRequest {
        String billingName;
        String routingNumber;
        String accountNumber;
        AccountType accountType;
        String ipAddress;
    }

    enum AccountType {
        personal_checking,
        personal_savings,
        corporate_checking,
        corporate_savings
    }

    ...

}