ACH Direct Debit
Server-side Implementation
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
Call
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:
- Python
result = gateway.payment_method.create({
"customer_id": "131866",
"payment_method_nonce": nonce_from_the_client,
"options": {
"us_bank_account_verification_method": UsBankAccountVerification.VerificationMethod.NetworkCheck # or MicroTransfers or IndependentCheck
}
})
Verification Add Ons
For additional personal/business information verification, specify
customer_verification
under verification_add_ons
.
- Python
result = gateway.payment_method.create({
"customer_id": "131866",
"payment_method_nonce": nonce_from_the_client,
"options": {
"us_bank_account_verification_method": UsBankAccountVerification.VerificationMethod.NetworkCheck,
"verification_add_ons": UsBankAccountVerification.VerificationAddOn.CustomerVerification
}
})
Checking for successful verification
- Python
if result.is_success:
us_bank_account = result.payment_method
verified = us_bank_account.verified
response_code = us_bank_account.verifications[0].processor_response_code
# ...
Confirming micro-deposit amounts
- Python
result = gateway.us_bank_account_verification.confirm_micro_transfer_amounts(
verification_id_from_payment_method,
[17, 29]
)
if (result.is_success):
# confirmation successful
else:
# confirmation failed
Looking up individual verification status
- Python
status = gateway.us_bank_account_verification.find(verification_id_from_payment_method);
if status == UsBankAccountVerification.Status.Verified:
# ready for transacting
elif status == UsBankAccountVerification.Status.Pending:
# continue waiting
else:
# verification failed
Creating transactions
From payment method tokens
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.
- Python
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.is_success:
# See result.transaction for details
else:
# Handle errors
Retrying verifications
- Python
result = gateway.payment_method.update("the_token", {
"options": {
"us_bank_account_verification_method": UsBankAccountVerification.VerificationMethod.MicroTransfers # or NetworkCheck or IndependentCheck
}
})
Payment Method: Update
. If you need to retry verification with new bank account information,
create a new payment method.
Setting up webhooks
- 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