> For the complete documentation index, see [llms.txt](https://docs.payengine.co/payengine-api-v2.5/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payengine.co/payengine-api-v2.5/transactions/ach.md).

# ACH Sale

<mark style="color:green;">`POST`</mark> `https://<Platform-host>/api/payment/ach`

#### Request Body

<table><thead><tr><th width="256">Name</th><th width="107">Type</th><th>Description</th></tr></thead><tbody><tr><td>data.account_token<mark style="color:red;">*</mark></td><td>String</td><td>Bank Account Token</td></tr><tr><td>data.transaction_amount<mark style="color:red;">*</mark></td><td>string</td><td>Max Length=12<br>Allowed characters: 0-9 and .(dot)<br><br>Note: this value always reflects the total dollar amount for example 1.00 and 1 both will be considered $1.00 and 0.10 will be 10 cents.</td></tr><tr><td>merchant_id<mark style="color:red;">*</mark></td><td>string</td><td>Merchant ID</td></tr><tr><td>data.internal_transaction_id</td><td>string</td><td>An internal ID from integrating system. Will be returned in the response and associated refunds if provided.</td></tr><tr><td>data.order_number</td><td>string</td><td>Order number or PO number specified in billing statement of the cardholder.<br>Alphanumeric (a-z A-Z 0-9) maximum 20 characters</td></tr><tr><td>data.description</td><td>string</td><td>Transaction description. Character limit is 255</td></tr><tr><td>data.additional_data</td><td>object</td><td>Optional data. Currently, it is specific to certain use case for accounting integration</td></tr><tr><td>data.metadata</td><td>object</td><td>Add any additional metadata by passing a json object</td></tr></tbody></table>

{% tabs %}
{% tab title="200 " %}
{% tabs %}
{% tab title="ACH Response Fields Definitions" %}

<table><thead><tr><th width="328.255859375">Field Name</th><th width="93">Type</th><th width="264">Description</th><th>Required?</th></tr></thead><tbody><tr><td>id</td><td>string</td><td>Platform payment ID for the sale request</td><td>Required</td></tr><tr><td>transaction_id</td><td>string</td><td>Unique transaction ID</td><td>Required</td></tr><tr><td>merchant_id</td><td>string</td><td>Merchant ID</td><td>Required</td></tr><tr><td>gateway_id</td><td>string</td><td>ID of the gateway through which the transaction is processed</td><td>Optional</td></tr><tr><td>description</td><td>string</td><td>Transaction Description</td><td>Optional</td></tr><tr><td>token</td><td>string</td><td>Bank token provided in the request that is used to process this ACH transaction</td><td>Required</td></tr><tr><td>internal_transaction_id</td><td>string</td><td>Internal Transaction ID provided in the request</td><td>Optional</td></tr><tr><td>order_number</td><td>string</td><td>Order number provided in the request</td><td>Optional</td></tr><tr><td>ach_response.status</td><td>string</td><td>Transaction execution status.<br>Allowed values PASS | FAIL</td><td>Required</td></tr><tr><td>ach_response.response_code</td><td>string</td><td><a href="/pages/3svuRYXMTJ1St1Zhun0p">The code representing the status of the processed request</a>. It comes from the processor</td><td>Required</td></tr><tr><td>ach_response.response_message</td><td>string</td><td>The corresponding message for the response code. It comes from the processor</td><td>Required</td></tr><tr><td>ach_response.ach_host_transaction_id</td><td>string</td><td>The unique identifier for the ACH transaction by the processor</td><td>Optional</td></tr><tr><td>ach_response.ach_host_transaction_status</td><td>string</td><td><a href="/pages/x6o9VzELR3azf6mxEeN9">The current status of the ACH transaction.</a></td><td>Optional</td></tr><tr><td>ach_response.ach_host_response_code</td><td>string</td><td><a href="/pages/rvvCo43nCCq6RJoZX2Se">Host response code from acquiring processor</a></td><td>Optional</td></tr><tr><td>ach_response.ach_host_message</td><td>string</td><td>Host response message from acquiring processor</td><td>Optional</td></tr><tr><td>ach_response.task_id</td><td>string</td><td>Task identification number from acquiring processor</td><td>Optional</td></tr><tr><td>ach_response.transaction_id</td><td>string</td><td>Transaction Identifier</td><td>Optional</td></tr><tr><td>ach_response.transaction_timestamp</td><td>string</td><td>Transaction timestamp in merchant's timezone</td><td>Required</td></tr><tr><td>ach_response.customer_receipt</td><td>string</td><td>Printable customer receipt</td><td>Optional</td></tr><tr><td>ach_response.merchant_receipt</td><td>string</td><td>Printable merchant receipt</td><td>Optional</td></tr><tr><td>additional_data</td><td>object</td><td>Additional Data from the request</td><td>Optional</td></tr><tr><td>metadata</td><td>object</td><td>Metadata from the request</td><td>Optional</td></tr></tbody></table>
{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

### Sample Request / Response

{% tabs %}
{% tab title="Request Body" %}

```json
{    
    "merchant_id": "8bb35bfc-1620-4901-bb7e-f926710024a1",
    "data": {
        "account_token": "ba_sandbox_xxxx",
        "transaction_amount": "100.00",
        "internal_transaction_id": "987654321",
        "description": "Payment for the services",
        "order_number": "150t65898",
        "metadata": {
            "customer_id": "123",
            "email" : "test@test.com"
        }
    }
}
```

{% endtab %}

{% tab title="Response Body" %}

```json
{
    "data": {
        "id": "026ef76b-b058-4e8a-968a-8ea5053b8f41",
        "transaction_id": "0b8ff792-04a5-44c2-b28d-62236668ffb2",
        "merchant_id": "1e4e6029-2cc9-4b2c-87c1-7a4b2af6d6c6",
        "gateway_id": "1f3e0f67-d560-494c-bb1a-97558a462cc5",
        "description": "Payment for the services",
        "internal_transaction_id": "987654321",
        "ach_response": {
            "status": "PASS",
            "response_code": "A0000",
            "response_message": "Success",
            "host_reference_number": "679105875316",
            "task_id": "14947358",
            "transaction_id": "14697466",
            "transaction_timestamp": "2025-04-02T18:49:47",
            "transaction_amount": "150.00",
            "processed_amount": "150.00",
            "total_amount": "150.00",
            "customer_receipt": "        Sandbox US Merchant         \\n        200 Epcot Center Dr         \\n         Orlando, FL 32836          \\n            800-490-8514            \\n                 \\n                 \\n        2025-04-02 06:49 PM         \\n             ACH - SALE             \\n         Entry Mode : KEYED         \\n      Transaction ID: 14697466      \\n     Invoice Number: 150t65898      \\n       SUBTOTAL: USD $150.00        \\n         TOTAL: USD $150.00         \\n                 \\n                 \\n       NO SIGNATURE REQUIRED        \\n              APPROVED              \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n           Customer Copy            \\n",
            "merchant_receipt": "        Sandbox US Merchant         \\n        200 Epcot Center Dr         \\n         Orlando, FL 32836          \\n            800-490-8514            \\n                 \\n                 \\n        2025-04-02 06:49 PM         \\n             ACH - SALE             \\n         Entry Mode : KEYED         \\n      Transaction ID: 14697466      \\n     Invoice Number: 150t65898      \\n       SUBTOTAL: USD $150.00        \\n         TOTAL: USD $150.00         \\n                 \\n                 \\n      X_______________________      \\nI AGREE TO PAY ABOVE TOTAL AMOUNT IN\\n ACCORDANCE WITH CARD ISSUER's AGREE\\nMENT (MERCHANT AGREEMENT IF CREDIT V\\n              OUCHER)               \\n     KEEP COPY FOR YOUR RECORDS     \\n               \\n \\n                \\n              APPROVED              \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n           Merchant Copy            \\n"
        },
        "metadata": {
            "customer_id": "123",
            "email" : "test@test.com"
        },
        "order_number": "150t65898",
        "token": "ba_sandbox_pjkaTwqPT9VbXAkW8PJRyIvD"
    }
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
Webhook event: **PAYMENT\_ACH**
{% endhint %}

#### Webhook Payload Example

```json
{
    "event_uid": "ebcb043c76820147048847ae098ff29f",
    "event": "PAYMENT_ACH",
    "data": {
        "token": "ba_sandbox_pjkaTwqPT9VbXAkW8PJRyIvD",
        "metadata": {
            "customer_id": "123",
            "email" : "test@test.com"
        },
        "account_id": "fa3ac0a8-0cda-4e38-ba9d-357b0f0bd844",
        "gateway_id": "1f3e0f67-d560-494c-bb1a-97558a462cc5",
        "payment_id": "026ef76b-b058-4e8a-968a-8ea5053b8f41",
        "description": "Payment for the services",,
        "merchant_id": "1e4e6029-2cc9-4b2c-87c1-7a4b2af6d6c6",
        "ach_response": {
            "status": "PASS",
            "task_id": "14947358",
            "total_amount": "150.00",
            "response_code": "A0000",
            "transaction_id": "14697466",
            "customer_receipt": "        Sandbox US Merchant         \\n        200 Epcot Center Dr         \\n         Orlando, FL 32836          \\n            800-490-8514            \\n                 \\n                 \\n        2025-04-02 06:49 PM         \\n             ACH - SALE             \\n         Entry Mode : KEYED         \\n      Transaction ID: 14697466      \\n     Invoice Number: 150t65898      \\n       SUBTOTAL: USD $150.00        \\n         TOTAL: USD $150.00         \\n                 \\n                 \\n       NO SIGNATURE REQUIRED        \\n              APPROVED              \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n           Customer Copy            \\n",
            "merchant_receipt": "        Sandbox US Merchant         \\n        200 Epcot Center Dr         \\n         Orlando, FL 32836          \\n            800-490-8514            \\n                 \\n                 \\n        2025-04-02 06:49 PM         \\n             ACH - SALE             \\n         Entry Mode : KEYED         \\n      Transaction ID: 14697466      \\n     Invoice Number: 150t65898      \\n       SUBTOTAL: USD $150.00        \\n         TOTAL: USD $150.00         \\n                 \\n                 \\n      X_______________________      \\nI AGREE TO PAY ABOVE TOTAL AMOUNT IN\\n ACCORDANCE WITH CARD ISSUER's AGREE\\nMENT (MERCHANT AGREEMENT IF CREDIT V\\n              OUCHER)               \\n     KEEP COPY FOR YOUR RECORDS     \\n               \\n \\n                \\n              APPROVED              \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n           Merchant Copy            \\n",
            "processed_amount": "150.00",
            "response_message": "Success",
            "transaction_amount": "150.00",
            "host_reference_number": "679105875316",
            "transaction_timestamp": "2025-04-02T18:49:47"
        },
        "order_number": "150t65898",
        "transaction_id": "0b8ff792-04a5-44c2-b28d-62236668ffb2",
        "internal_transaction_id": "987654321"
    }
}
```
