Skip to main content

ACH

warning

Before you start integrating ACH, please contact support. You won't get a success response without domain registration.

ACH in Advanced mode connects the bank account through Plaid.

Key requirements​

  • config.ach selects the ACH flow.
  • config.ach.redirectURL: string | URL (required)
  • config.sandbox: boolean (optional; enables the Plaid sandbox)

Configuration Reference​

OptionTypeDefaultRequiredDescription
ach.redirectURLstring | URL-YesPlaid redirect URL used during bank account verification.
ach.fields.email.idstring-No/YesID of your own email input element. Required when strictMode: true.
ach.fields.email.requiredbooleanfalseNoMarks email as required.
ach.fields.email.valuestring-NoDefault email value. Also mirrored to reverePay.email.
ach.fields.email.placeholderstring-NoNot applied at init. Set it on your own input, or use updateFields.
sandboxbooleanfalseNoEnables the Plaid sandbox environment.
strictModebooleanfalseNoEnables the email duplication check. Requires ach.fields.email.

The email input is an element you own. Keep its value in sync, on every change, through the instance's email setter or updateFields({ email: { value } }).

AdvancedACHOptions​

type AdvancedACHOptions = {
	redirectURL: URL | string;
	fields?: {
		email?: FieldConfigBase & { placeholder?: string; value?: string; required?: boolean };
	};
};

See FieldConfigBase.

Example (TypeScript)​

import { AdvancedReverePay } from '@revere_payments/tokenizer';
import type { SuccessResponse, ErrorResponse, Validation } from '@revere_payments/tokenizer/types';

const reverePay = new AdvancedReverePay({
	merchantId: 'yourMerchantId',
	publicAPIKey: 'yourPublicAPIKey',
	config: {
		sandbox: true,
		ach: {
			redirectURL: 'https://merchant.example.com'
		}
	},
	onLoaded: () => console.log('Tokenizer loaded - ACH'),
	onSuccess: (res: SuccessResponse) => console.log('SUCCESS', res),
	onError: (status: number, validation: Validation, err?: ErrorResponse) => {
		console.log('ERROR', status, validation, err);
	}
});

reverePay.submit();

Validation and callbacks​

submit() starts the bank verification. Each call ends in exactly one onSuccess or onError, and a submit() made while a verification is in progress is ignored with a console warning.

  • Email: when an email field is configured, submit() checks it first (required and format). If it is invalid, Plaid does not open and onError(422, validation, { error: 'Validation error' }) is called. onCheckValidity(validation) is called first, when you passed it.
  • Success: onSuccess receives the ACH details and a token.
  • The customer closes Plaid: onError(400, validation, { error: 'user-cancelled' }).
  • Plaid reports an error: onError(400, validation, { error: '<Plaid error code>' }), for example 'INVALID_CREDENTIALS'.
  • The bank link can't be loaded or started: onError(500, validation, error), with a correlationId for support.

See When onError fires for the full list.

Response Types​

For detailed information about response types, see Response Types.

Playgrounds​