ACH Direct Debit
Server-side Implementation
Important
Your integration may be impacted by upcoming certificate changes. Visit our best practices guide to learn more..
GraphQL
Click here to view the server-side implementation using GraphQL.
Availability
ACH Direct Debit is available to
eligible merchants who
can implement a custom client-side integration using our
JavaScript v3 SDK. It's
currently not available in our Drop-in UI.
Server-side flows
Your server-side implementation depends on the verification method(s) you intend to use:
Network check
- Vault the payment method using the payment method nonce from your client
- Check for successful verification
- Create transactions using the vaulted payment method token
You may also find it useful to:
Micro-transfers
- Vault the payment method using the payment method nonce from your client
- Confirm micro-deposit amounts
- Periodically look up the verification's status
- Create transactions using the vaulted payment method token
You may also find it useful to:
Independent check
- Vault the payment method using the payment method nonce from your client
- Create transactions using the vaulted payment method token
You may also find it useful to set up webhooks.
Vaulting the payment method
Note
This step is required in order to verify the payment method and begin transacting on it.
Payment Method: Create
to specify the verification method (network check, micro-transfers, or independent check) and store
the bank account information as a payment method in your Vault:
- Ruby
result = gateway.payment_method.create(
:customer_id => "131866",
:payment_method_nonce => nonce_from_the_client,
:options => {
:us_bank_account_verification_method => "network_check" # or "micro_transfers" or "independent_check"
}
)
Verification Add Ons
Note
This step is optional and only applies to network check verifications.
customer_verification
under verification_add_ons
.
- Ruby
result = gateway.payment_method.create(
:customer_id => "131866",
:payment_method_nonce => nonce_from_the_client,
:options => {
:us_bank_account_verification_method => "network_check",
:verification_add_ons => "customer_verification"
}
)
Checking for successful verification
Note
This step is required when using the network check method.
- Ruby
if result.success?
us_bank_account = result.payment_method
verified = result.verified
response_code = us_bank_account.verifications.first.processor_response_code
# ...
end
Confirming micro-deposit amounts
Note
This step is required when using the micro-transfers method. Until micro-deposit amounts are
confirmed, the vaulted bank account will not be verified or transactable.
- Ruby
result = gateway.us_bank_account_verification.confirm_micro_transfer_amounts(
verification_id_from_payment_method,
[17, 29]
)
if result.success?
# confirmation successful
else
# confirmation failed
end
Looking up individual verification status
Note
This step is required when using the micro-transfers method.
- Ruby
status = gateway.us_bank_account_verification.find(verification_id_from_payment_method).status
if (status == UsBankAccountVerification.Status.Verified) {
# ready for transacting
} elseif (status == UsBankAccountVerification.Status.Pending) {
# continue waiting
} else {
# verification failed
}
Creating transactions
From payment method tokens
Note
This step is applicable to all verification methods.
Payment Method: Create
on a nonce created from your customer's payment information. Pass the token to your server, and
create a transaction.Collect device data
from the client and include the device_data_from_the_client in the
transaction.
- Ruby
result = gateway.transaction.sale(
:amount => "10.00",
:payment_method_token => token_from_vault,
:device_data => device_data_from_the_client,
:options => {
:submit_for_settlement => true
}
)
if result.success?
# See result.transaction for details
else
# Handle errors
end
Retrying verifications
Note
This step is applicable to the network check and micro-transfer methods.
- Ruby
result = gateway.payment_method.update(
"the_token",
:options => {
:us_bank_account_verification_method => UsBankAccountVerification.VerificationMethod.MicroTransfers
# or "network_check" or "independent_check"
}
)
Note
You can't change the details of a vaulted US Bank Account payment method using
Payment Method: Update
. If you need to retry verification with new bank account information,
create a new payment method.
Setting up webhooks
Note
This step is applicable to all verification methods.
- See the webhooks guide for details on how to configure webhooks in general
- See the Transaction webhooks reference for details on the specific notifications available for sales and refunds