Applies to: Payments API | Web Payments SDK
Learn how to take ACH bank transfer payments using the Payments API.
Applications take ACH bank transfer payments using the Square Web Payments SDK and the Payments API. This topic explains how to use the Payments API (CreatePayment endpoint) to accept ACH bank transfer payments.
The Square API platform manages the complexity of ACH payment processing. The Web Payments SDK uses Plaid for bank account verification. You don't need to have a Plaid account to process ACH payments. Square manages the entire bank account verification process and the ACH bank transfer.
The following applies when using the Payments API for ACH payments:
- The Payments API supports ACH payments only in the United States. In the
CreatePaymentrequest, theamount_moneymust specify USD as thecurrency. - Only the Web Payments SDK supports bank payments.
- ACH payments are asynchronous. It can take up to two to three business days to complete the payment.
- For ACH payments, autocomplete must always be
true. - ACH payments cannot be canceled or completed using the Payments API. The payment is created in a
PENDINGstate and moves toCOMPLETEDorFAILEDbased on the success of the transfer. An ACH transfer can only be refunded after it'sCOMPLETED. The refund amount returns to the buyer's bank account. - Applications can apply only one ACH payment to an order and it must be for the full balance of the order. For more information, see Orders integration.
An ACH payment results in a Payment object whose source_type is BANK_ACCOUNT. Square ACH doesn't move money directly from the buyer's account to the bank account linked to the seller. Instead, it moves money from a buyer's bank account to the Square bank account, which then credits the Seller Balance. The seller can then transfer the money from Square to their linked bank account in the Square Dashboard Banking application. If they've set up automated payouts, the money is moved into their linked bank account on the next payout.
Taking an ACH bank transfer payment is a two-step process:
Generate a payment token - When a buyer chooses ACH bank transfer as the payment method, the Web Payments SDK renders a Plaid UI to let the buyer provide bank account verification. After the bank account is verified, the SDK generates a payment token.
Charge the payment token - Your application makes a server-side
CreatePaymentcall to charge the payment token. Thesource_idfield in the request holds the payment token.The following is an example
CreatePaymentrequest. It directs Square to charge $100 to the bank account identified by the payment token in thesource_idfield.Create payment
Square processes the ACH payment and returns a Payment object in the response as shown:
{ "payment": { "id": "VMnh7EfZj6XR7ykHLWCXAkYDnxEZY", "created_at": "2020-10-19T00:28:36.827Z", "amount_money": { "amount": 10000, "currency": "USD" }, "status": "PENDING", "source_type": "BANK_ACCOUNT", "location_id": "LGEVM1WD8CF5Z", "order_id": "KiYkkC68kzRWroBkpyKN2RZYBeFZY", "total_money": { "amount": 10000, "currency": "USD" }, "bank_account_details": { "bank_name": "Citizens Bank", "transfer_type": "ACH", "account_ownership_type": "INDIVIDUAL", "fingerprint": "sq-1-FlS9Z5LyPjofrv9KWv1...Pud8YioqOqAw", "country": "US", "ach_details": { "routing_number": "0111111111", "account_number_suffix": "000", "account_type": "CHECKING" } } } }Note the following response attributes:
- The
source_typeisBANK_ACCOUNTand thetransfer_typeisACH. - The payment
statusisPENDING. When the transfer is complete, the status is updated toCOMPLETED. If your application has subscribed to thepayment.updatedwebhook event, it receives a notification when the transfer is complete.
- The
Square provides an end-to-end sample application in GitHub. For more information, see the Web Payments SDK Quickstart sample project.