curl --request POST \
--url https://api.sandbox.lead.bank/v1/ach/{ach_id}/reverse \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"metadata": {}
}'import requests
url = "https://api.sandbox.lead.bank/v1/ach/{ach_id}/reverse"
payload = { "metadata": {} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({metadata: {}})
};
fetch('https://api.sandbox.lead.bank/v1/ach/{ach_id}/reverse', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.lead.bank/v1/ach/{ach_id}/reverse",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.lead.bank/v1/ach/{ach_id}/reverse"
payload := strings.NewReader("{\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.lead.bank/v1/ach/{ach_id}/reverse")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.lead.bank/v1/ach/{ach_id}/reverse")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "ach_xyz001",
"created_at": "2022-06-27T11:22:33Z",
"updated_at": "2022-06-27T11:22:33Z",
"status": "submitted",
"amount": 5000,
"account_id": "account_xyz123",
"account_number_id": "account_number_xyz123",
"direction": "outgoing",
"delivery_type": "same_business_day",
"transaction_type": "credit",
"sec_code": "WEB",
"currency_code": "USD",
"statement_descriptor": "P2P Credit",
"record_details": {
"transaction_code": "checking_credit",
"company_name": "Acme Inc.",
"company_id": "1234",
"company_discretionary_data": "Acme Inc.",
"effective_date": "2022-06-27",
"settlement_date": "2022-06-27",
"individual_id": "<string>",
"receiver_name": "<string>",
"descriptive_date": "220627",
"additional_information": "<string>",
"trace_number": "123456789012345"
},
"counterparty": {
"name": "Lara Smikle",
"account_number": "1032345678",
"routing_number": "021000021",
"account_type": "checking"
},
"returns": [
{
"type": "return",
"status": "submitted",
"return_code": "R02",
"return_reason": "<string>",
"trace_number": "123456789012345",
"additional_information": "<string>"
}
],
"reversal": {
"reversal_reason": "duplicate",
"linked_ach_id": "<string>"
},
"rejection": {
"reason": "account_number_status",
"details": "Account number account_123 is inactive."
},
"correction": {
"account_number": "1032345678",
"routing_number": "021000021",
"account_type": "checking"
},
"metadata": {},
"iat_details": {
"transaction_type_code": "business",
"destination_country": "CA",
"originator_currency_code": "USD",
"destination_currency_code": "CAD",
"foreign_trace_number": "FRN-2024-98765-INTL",
"additional_information": "<string>",
"originator": {
"name": "Acme Inc.",
"street_address": "123 Main Street",
"city_state_province": "New York*NY\\",
"country_postal_code": "US*10001\\"
},
"originating_financial_institution": {
"name": "First National Bank",
"identifier_type": "swift_bic",
"identifier_code": "FNBUS33XXX",
"branch_country": "US"
},
"receiver": {
"name": "Lara Smikle",
"reference_number": "RCV-2024-001",
"street_address": "456 Maple Avenue",
"city_state_province": "Toronto*ON\\",
"country_postal_code": "CA*M5H 2N2\\"
},
"receiving_financial_institution": {
"name": "First National Bank",
"identifier_type": "swift_bic",
"identifier_code": "FNBUS33XXX",
"branch_country": "US"
},
"foreign_correspondent_banks": [
{
"name": "First National Bank",
"identifier_type": "swift_bic",
"identifier_code": "FNBUS33XXX",
"branch_country": "US"
}
]
}
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}Reverse an ACH
Reverse an outgoing ACH.
curl --request POST \
--url https://api.sandbox.lead.bank/v1/ach/{ach_id}/reverse \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"metadata": {}
}'import requests
url = "https://api.sandbox.lead.bank/v1/ach/{ach_id}/reverse"
payload = { "metadata": {} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({metadata: {}})
};
fetch('https://api.sandbox.lead.bank/v1/ach/{ach_id}/reverse', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.lead.bank/v1/ach/{ach_id}/reverse",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.lead.bank/v1/ach/{ach_id}/reverse"
payload := strings.NewReader("{\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.lead.bank/v1/ach/{ach_id}/reverse")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.lead.bank/v1/ach/{ach_id}/reverse")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "ach_xyz001",
"created_at": "2022-06-27T11:22:33Z",
"updated_at": "2022-06-27T11:22:33Z",
"status": "submitted",
"amount": 5000,
"account_id": "account_xyz123",
"account_number_id": "account_number_xyz123",
"direction": "outgoing",
"delivery_type": "same_business_day",
"transaction_type": "credit",
"sec_code": "WEB",
"currency_code": "USD",
"statement_descriptor": "P2P Credit",
"record_details": {
"transaction_code": "checking_credit",
"company_name": "Acme Inc.",
"company_id": "1234",
"company_discretionary_data": "Acme Inc.",
"effective_date": "2022-06-27",
"settlement_date": "2022-06-27",
"individual_id": "<string>",
"receiver_name": "<string>",
"descriptive_date": "220627",
"additional_information": "<string>",
"trace_number": "123456789012345"
},
"counterparty": {
"name": "Lara Smikle",
"account_number": "1032345678",
"routing_number": "021000021",
"account_type": "checking"
},
"returns": [
{
"type": "return",
"status": "submitted",
"return_code": "R02",
"return_reason": "<string>",
"trace_number": "123456789012345",
"additional_information": "<string>"
}
],
"reversal": {
"reversal_reason": "duplicate",
"linked_ach_id": "<string>"
},
"rejection": {
"reason": "account_number_status",
"details": "Account number account_123 is inactive."
},
"correction": {
"account_number": "1032345678",
"routing_number": "021000021",
"account_type": "checking"
},
"metadata": {},
"iat_details": {
"transaction_type_code": "business",
"destination_country": "CA",
"originator_currency_code": "USD",
"destination_currency_code": "CAD",
"foreign_trace_number": "FRN-2024-98765-INTL",
"additional_information": "<string>",
"originator": {
"name": "Acme Inc.",
"street_address": "123 Main Street",
"city_state_province": "New York*NY\\",
"country_postal_code": "US*10001\\"
},
"originating_financial_institution": {
"name": "First National Bank",
"identifier_type": "swift_bic",
"identifier_code": "FNBUS33XXX",
"branch_country": "US"
},
"receiver": {
"name": "Lara Smikle",
"reference_number": "RCV-2024-001",
"street_address": "456 Maple Avenue",
"city_state_province": "Toronto*ON\\",
"country_postal_code": "CA*M5H 2N2\\"
},
"receiving_financial_institution": {
"name": "First National Bank",
"identifier_type": "swift_bic",
"identifier_code": "FNBUS33XXX",
"branch_country": "US"
},
"foreign_correspondent_banks": [
{
"name": "First National Bank",
"identifier_type": "swift_bic",
"identifier_code": "FNBUS33XXX",
"branch_country": "US"
}
]
}
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Idempotency key
255Path Parameters
ID of the ACH you want to return.
^ach_\w+$Body
Reason you want to initiate a reversal.
duplicate, receiver_incorrect, amount_incorrect, debit_too_early, credit_too_late A set of key-value pairs that can be used to store additional information related to this object.
Show child attributes
Show child attributes
Response
The new reversal ACH object.
id of the ACH object
^ach_\w+$"ach_xyz001"
The ISO-8601 timestamp at which the ACH object was created.
"2022-06-27T11:22:33Z"
The ISO-8601 timestamp at which the ACH object was last updated.
"2022-06-27T11:22:33Z"
The current status of the ACH object.
scheduled, processing, submitted, posted, canceled, under_review, approved, rejected, pending_return, returned, pending_dishonored_return, return_dishonored, pending_contested_return, return_contested "submitted"
The amount of the transaction in cents.
0 <= x <= 99000000005000
The ID of the Account object.
^account_\w+$"account_xyz123"
The ID of the Lead Bank Account Number object.
^account_number_\w+$"account_number_xyz123"
Who is initiating the transaction.
outgoing: You are sending a transaction to a counterparty. incoming: You are receiving a transaction from a counterparty.
outgoing, incoming "outgoing"
How fast you want the counterparty to receive the ACH.
same_business_day: if the ACH request is submitted before the cutoff window with the same business day option, funds will settle on the same day.next_business_day: standard ACH processing, for funds to settle on the next business day.
same_business_day, next_business_day "same_business_day"
ACH transaction type.
credit, debit "credit"
Standard Entry Class (SEC) code to use for this ACH object.
Lead currently only supports CCD, PPD, WEB, and TEL for outgoing ACHes.
PPD, CCD, ARC, BOC, CIE, CTX, IAT, POP, POS, RCK, TEL, WEB, ADV, DNE, ENR, MTE, SHR, TRC, TRX, COR "WEB"
A three-letter currency code as defined in ISO 4217.
USD "USD"
The description you would like to appear on your customers’ statement. Maximum number of characters is 10.
1 - 10^(?!0+$)(?! +$)[\x20-\x7E]*$"P2P Credit"
Show child attributes
Show child attributes
The details of the counterparty you are sending/receiving money from.
Show child attributes
Show child attributes
Associated returns.
Show child attributes
Show child attributes
A reversal associated with this object.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The corrected counterparty details.
Show child attributes
Show child attributes
A set of key-value pairs that can be used to store additional information related to this object.
Show child attributes
Show child attributes
IAT (International ACH Transaction) specific details. Present only when sec_code is IAT.
Show child attributes
Show child attributes
Was this page helpful?

