Run a sale with bank account details

Our gateway supports the following bank transfer services:

  • Automated Clearing House (ACH): A service that U.S. banks use to transfer funds between accounts.
  • Pre-Authorized Debit (PAD): A service that Canadian banks use to transfer funds between accounts.

Integration steps

  • Create a bank transfer payment.

Before you begin

Authenticate your requests before making API calls. If your request fails, see Errors.

Create a bank transfer payment

To create a bank transfer payment, send a POST request to our Bank Transfer Payments endpoint.

Request parameters

To create the body of your request, use the following parameters:

Request

processingTerminalIdstringRequired4-50 characters
Unique identifier that we assigned to the terminal.
orderobjectRequired
Object that contains information about the transaction.
paymentMethodobjectRequired
Polymorphic object that contains payment detail information. The value of the type parameter determines which variant you should use: - `ach` - Automated Clearing House (ACH) details - `pad` - Pre-authorized debit (PAD) details - `secureToken` - Secure token details - `singleUseToken` - Single-use token details
customerobjectOptional
Object that contains information about the customer.
credentialOnFileobjectOptional
Object that contains information about saving the customer’s payment details.
customFieldslist of objectsOptional
Array of customField objects.

Example request

POST
/v1/bank-transfer-payments
1curl -X POST https://api.payroc.com/v1/bank-transfer-payments \
2 -H "Idempotency-Key: 8e03978e-40d5-43e8-bc93-6894a57f9324" \
3 -H "Authorization: Bearer <token>" \
4 -H "Content-Type: application/json" \
5 -d '{
6 "processingTerminalId": "1234001",
7 "order": {
8 "amount": 4999,
9 "currency": "USD",
10 "orderId": "OrderRef6543",
11 "breakdown": {
12 "subtotal": 4347,
13 "taxes": [
14 {
15 "rate": 5,
16 "name": "Sales Tax",
17 "type": "rate"
18 }
19 ],
20 "tip": {
21 "type": "percentage",
22 "percentage": 10
23 }
24 },
25 "description": "Large Pepperoni Pizza"
26 },
27 "paymentMethod": {
28 "type": "ach",
29 "accountNumber": "11101010",
30 "nameOnAccount": "Sarah Hazel Hopper",
31 "routingNumber": "053200983",
32 "accountType": "checking",
33 "secCode": "web"
34 },
35 "customer": {
36 "notificationLanguage": "en",
37 "contactMethods": [
38 {
39 "type": "email",
40 "value": "[email protected]"
41 }
42 ]
43 },
44 "credentialOnFile": {
45 "tokenize": true
46 },
47 "customFields": [
48 {
49 "name": "yourCustomField",
50 "value": "abc123"
51 }
52 ]
53}'

Response fields

If your request is successful, we create the payment and return the following response:

Response

paymentIdstringRequired=10 characters
Unique identifier that we assigned to the payment.
processingTerminalIdstringRequired4-50 characters
Unique identifier that we assigned to the terminal.
orderobjectRequired
Object that contains information about the transaction.
bankAccountobjectRequired
Polymorphic object that contains bank account information. The value of the type field determines which variant you should use: - `ach` - Automated Clearing House (ACH) details - `pad` - Pre-authorized debit (PAD) details
transactionResultobjectRequiredRead-only
Object that contains information about the transaction.
customerobjectOptional
Object that contains information about the customer.
refundslist of objectsOptional
List of refunds issued against the payment.
returnslist of objectsOptional
List of returns issued against the payment.
representmentobjectOptional
Object that contains details about the re-presented payment linked to the return.
customFieldslist of objectsOptional
Array of customField objects.

Example response

Response
1{
2 "paymentId": "M2MJOG6O2Y",
3 "processingTerminalId": "1234001",
4 "order": {
5 "amount": 4999,
6 "currency": "USD",
7 "orderId": "OrderRef6543",
8 "breakdown": {
9 "subtotal": 4347,
10 "taxes": [
11 {
12 "name": "Sales Tax",
13 "rate": 5,
14 "amount": 217
15 }
16 ],
17 "tip": {
18 "type": "percentage",
19 "amount": 435,
20 "percentage": 10
21 }
22 },
23 "dateTime": "2024-07-02T15:30:00Z",
24 "description": "Large Pepperoni Pizza"
25 },
26 "bankAccount": {
27 "type": "ach",
28 "accountNumber": "****3159",
29 "nameOnAccount": "Sarah Hazel Hopper",
30 "routingNumber": "053200983",
31 "secCode": "web",
32 "secureToken": {
33 "secureTokenId": "MREF_abc1de23-f4a5-6789-bcd0-12e345678901fa",
34 "customerName": "Sarah Hazel Hopper",
35 "token": "296753123456",
36 "status": "notValidated",
37 "link": {
38 "rel": "self",
39 "method": "GET",
40 "href": "https://api.payroc.com/v1/processing-terminals/1234001/secure-tokens/MREF_abc1de23-f4a5-6789-bcd0-12e345678901fa"
41 }
42 }
43 },
44 "transactionResult": {
45 "type": "payment",
46 "status": "ready",
47 "responseCode": "A",
48 "authorizedAmount": 4999,
49 "currency": "USD",
50 "responseMessage": "NoError",
51 "processorResponseCode": "0"
52 },
53 "customer": {
54 "notificationLanguage": "en",
55 "contactMethods": [
56 {
57 "type": "email",
58 "value": "[email protected]"
59 }
60 ]
61 },
62 "customFields": [
63 {
64 "name": "yourCustomField",
65 "value": "abc123"
66 }
67 ]
68}

Test cases

Before you run test cases, read the Payments page in Test Your Integration.

Run a sale with bank account details

Send a POST request to the following endpoint:

POST https://api.uat.payroc.com/v1/bank-transfer-payments

Example response

1{
2 "channel": "POS",
3 "processingTerminalId": "3204001",
4 "operator": "Davi-CHP",
5 "order": {
6 "orderId": "CC-12",
7 "description": "BT ACH - Sale with CC",
8 "currency": "USD",
9 "amount": 9700
10 },
11 "paymentMethod": {
12 "type": "ach",
13 "accountType": "checking",
14 "secCode": "web",
15 "nameOnAccount": "Davi",
16 "accountNumber": "49100130",
17 "routingNumber": "292735277"
18 }
19}