eCheck & ACH Payments
Follow these steps to take eCheck/ACH payments using your language of choice.
Prepare to Charge an eCheck/ACH Account
For the below sections, the code samples will reference the following objects:
Prepare to charge an eCheck/ACH account
using GlobalPayments.Api.Entities;
using GlobalPayments.Api.PaymentMethods;
var check = new eCheck {
AccountNumber = "1357902468";,
RoutingNumber = "122000030",
AccountType = AccountType.Checking,
SecCode = SecCode.PPD,//required
CheckType = CheckType.Personal,
CheckHolderName = "Jane Smith"
};
var address new Address {
PostalCode = "12345"
};
<?php
use GlobalPayments\Api\Entities\Address;
use GlobalPayments\Api\Entities\Enums\AccountType;
use GlobalPayments\Api\Entities\Enums\CheckType;
use GlobalPayments\Api\PaymentMethods\ECheck;
use GlobalPayments\Api\Entities\Enums\SecCode;
$check = new ECheck();
$check->accountNumber = "1357902468";
$check->routingNumber = "122000030";
$check->accountType = AccountType::CHECKING;
$check->checkType = CheckType::PERSONAL;
$check->checkHolderName = "Jane Smith";
$check->secCode = SecCode::WEB;//required
$address = new Address();
$address->postalCode = "12345";
import com.global.api.entities.Address;
import com.global.api.entities.enums.AccountType;
import com.global.api.entities.enums.CheckType;
import com.global.api.paymentMethods.eCheck;
import com.global.api.entities.enums.SecCode;
eCheck check = new eCheck();
check.setAccountNumber("1357902468");
check.setRoutingNumber("122000030");
check.setSecCode(SecCode.Web);//required
check.setAccountType(AccountType.Checking);
check.setCheckType(CheckType.Personal);
check.setCheckHolderName("Jane Smith");
Address address = new Address();
address.setPostalCode("12345")
# coming soon
from globalpayments.api.entities import Address
from globalpayments.api.entities.enums import AccountType, CheckType, SecCode
from globalpayments.api.payment_methods import ECheck
check = ECheck()
check.account_number = '1357902468'
check.routing_number = '122000030'
check.account_type = AccountType.Checking
check.check_type = CheckType.Personal
check.sec_code = SecCode.PPD //required
check.check_holder_name = 'Jane Smith'
address = Address()
address.postal_code = '12345'
import {
AccountType,
Address,
CheckType,
ECheck,
SecCode
} from "globalpayments-api";
const check = new ECheck();
check.accountNumber = "1357902468";
check.routingNumber = "122000030";
check.accountType = AccountType.Checking;
check.checkType = CheckType.Personal;
check.secCode = SecCode.PPD;//required
check.checkHolderName = "Jane Smith";
const address = new Address();
address.postalCode = "12345";
Charge an eCheck/ACH account
The check sale transaction authorizes a sale purchased with an eCheck/ACH. The transaction is sent to the merchant account’s configured check processor. Currently, Heartland ACH and Sage/Geti are available check processors, depending on the merchant account’s needs and configuration.
Charge an eCheck/ACH account
var response = check.Charge(10.00m)
.WithCurrency("USD")
.WithAddress(address)
.Execute();
<?php
$response = $check->charge(10)
->withCurrency("USD")
->withAddress($address)
->execute();
import com.global.api.entities.Transaction;
import java.math.BigDecimal;
Transaction response = check.charge(new BigDecimal("10"))
.withCurrency("USD")
.withAddress(address)
.execute();
# coming soon
response = check.charge(10) \
.with_currency('USD') \
.with_address(address) \
.execute()
const response = await check.charge(10)
.withCurrency("USD")
.withAddress(address)
.execute();
Void an eCheck/ACH account
CheckVoid is used to cancel a previously successful CheckSale transaction. It can also be used to cancel a prior CheckSale transaction. This should be used in timeout situations or when a complete response is not received.
Void an eCheck/ACH account
Transaction voidResponse = Transaction.FromId(response.TransactionId, PaymentMethodType.ACH)
.Void()
.Execute();
<?php
Transaction::fromId($response->transactionId, null, PaymentMethodType::ACH) // arguments are required
->void()
->execute();
import com.global.api.entities.Transaction;
import com.global.api.entities.enums.PaymentMethodType;
Transaction voidResponse =Transaction.FromId(response.TransactionId,PaymentMethodType.ACH)
.Void()
.Execute();
# coming soon
# coming soon
Transaction voidResponse = Transaction.FromId(response.TransactionId, PaymentMethodType.ACH)
.Void()
.Execute();