Skip to main content
POST
/
ach_returns
Create ACH Return
curl --request POST \
  --url https://int-api.mx.com/ach_returns \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{}'
import requests

url = "https://int-api.mx.com/ach_returns"

payload = {}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};

fetch('https://int-api.mx.com/ach_returns', 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://int-api.mx.com/ach_returns",
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([

]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://int-api.mx.com/ach_returns"

payload := strings.NewReader("{}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Basic <encoded-value>")
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://int-api.mx.com/ach_returns")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://int-api.mx.com/ach_returns")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
{
  "ach_return": {
    "account_guid": "ACT-06d7f44b-caae-0f6e-1384-01f52e75dcb1",
    "account_number_last_four": "1234",
    "account_type": "CHECKING",
    "ach_initiated_at": "2025-02-13T18:08:00+00:00",
    "client_guid": "CLT-abcd-1234",
    "corrected_account_number": null,
    "corrected_routing_number": null,
    "created_at": "2025-02-13T18:08:00+00:00",
    "guid": "ACH-d74cb14f-fd0a-449f-991b-e0362a63d9c6",
    "id": "client_ach_return_id_1234",
    "institution_guid": "INS-34r4f44b-cfge-0f6e-3484-21f47e45tfv7",
    "investigation_notes": null,
    "member_guid": "MBR-7c6f361b-e582-15b6-60c0-358f12466b4b",
    "processing_errors": null,
    "resolution_code": null,
    "resolution_detail": null,
    "resolved_status_at": null,
    "return_code": "R01",
    "return_notes": null,
    "return_account_number": null,
    "return_routing_number": null,
    "return_status": "SUBMITTED",
    "returned_at": "2025-02-13T18:09:00+00:00",
    "sec_code": "PPD",
    "started_processing_at": null,
    "submitted_at": null,
    "transaction_amount": 225.84,
    "updated_at": "null",
    "user_guid": "USR-fa7537f3-48aa-a683-a02a-b18940482f54"
  }
}
The features documented here are in a beta state, and this documentation is considered draft material subject to frequent change.
Use this endpoint to create an ACH return in our system.

Authorizations

Authorization
string
header
required

The MX Platform API requires basic access authentication using your client_id and api_key. These credentials must be Base64 encoded and included in the Authorization header of each API request to ensure secure access.

Here's an example using curl to access v20250224. Replace https://int-api.mx.com/endpoint with the actual API endpoint you wish to access and your Base64 encoded client_id and api_key.

curl -L -X POST `https://int-api.mx.com/endpoint' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Accept-Version: v20250224'
-H 'Authorization: Basic BASE_64_ENCODING_OF{client_id:api_key}'

Body

application/json

ACH return object to be created.

ach_return
object

Response

200 - application/json

OK

ach_return
object