Send an unreferenced refund to a customer’s bank account

Note: Only certain merchant accounts can send unreferenced refunds.

A merchant can refund a payment to a customer’s bank account without a paymentId by running an unreferenced refund.

Integration steps

Step 1. Refund the payment.

Before you begin

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

Step 1. Refund the payment

To refund a bank transfer payment, send a POST request to the Bank Transfer Refunds 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 order.
refundMethodobjectRequired
Polymorphic object that contains payment details for the refund. The value of the type parameter determines which variant you should use: - `ach` - Automated Clearing House (ACH) details - `secureToken` - Secure token details
customerobjectOptional
Object that contains information about the customer.
customFieldslist of objectsOptional
Array of customField objects.

Example request

POST
/v1/bank-transfer-refunds
1curl -X POST https://api.payroc.com/v1/bank-transfer-refunds \
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 "orderId": "OrderRef6543",
9 "description": "Refund for order OrderRef6543",
10 "amount": 4999,
11 "currency": "USD"
12 },
13 "refundMethod": {
14 "type": "ach",
15 "accountNumber": "1234567890",
16 "nameOnAccount": "Sarah Hazel Hopper",
17 "routingNumber": "123456789",
18 "accountType": "checking",
19 "secCode": "web"
20 },
21 "customer": {
22 "notificationLanguage": "en",
23 "contactMethods": [
24 {
25 "type": "email",
26 "value": "[email protected]"
27 }
28 ]
29 },
30 "customFields": [
31 {
32 "name": "yourCustomField",
33 "value": "abc123"
34 }
35 ]
36}'

Response fields

If your request is successful, we send the refund to the customer’s bank account and return a response. The response contains the following fields:

Response

refundIdstringRequired=10 characters
Unique identifier that our gateway assigned to the refund.
processingTerminalIdstringRequired4-50 characters
Unique identifier that we assigned to the terminal.
orderobjectRequired
Object that contains information about the order.
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.
paymentobjectOptional
Object that contains information about a payment.
customFieldslist of objectsOptional
Array of customField objects.

Example response

Response
1{
2 "refundId": "CD3HN88U9F",
3 "processingTerminalId": "1234001",
4 "order": {
5 "orderId": "OrderRef6543",
6 "description": "Refund for order OrderRef6543",
7 "amount": 4999,
8 "currency": "USD",
9 "dateTime": "2024-07-02T15:30:00Z"
10 },
11 "bankAccount": {
12 "type": "ach",
13 "accountNumber": "****7890",
14 "nameOnAccount": "Sarah Hazel Hopper",
15 "routingNumber": "*****6789",
16 "secCode": "web"
17 },
18 "transactionResult": {
19 "type": "unreferencedRefund",
20 "status": "ready",
21 "responseCode": "A",
22 "authorizedAmount": -4999,
23 "currency": "USD",
24 "responseMessage": "NoError",
25 "processorResponseCode": "0"
26 },
27 "customer": {
28 "notificationLanguage": "en",
29 "contactMethods": [
30 {
31 "type": "email",
32 "value": "[email protected]"
33 }
34 ]
35 },
36 "customFields": [
37 {
38 "name": "yourCustomField",
39 "value": "abc123"
40 }
41 ]
42}