> For the complete documentation index, see [llms.txt](https://docs.payengine.co/merchant-api-reference/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/merchant-api-reference/transactions/ach-sale.md).

# ACH Sale

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

#### Request Body

<table><thead><tr><th width="248.927001953125">Name</th><th width="100.333251953125">Type</th><th>Description</th></tr></thead><tbody><tr><td>data.accountToken<mark style="color:red;">*</mark></td><td>String</td><td>Bank Account Token</td></tr><tr><td>data.transactionAmount<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>data.store_payment_method</td><td>boolean</td><td>true | false – Indicates whether the bank account should be stored for future use. Set to true to store the card. Defaults to true.</td></tr><tr><td>data.initiated_by</td><td>string</td><td>merchant | customer – Indicates who initiated the transaction. Defaults to customer</td></tr><tr><td>merchant_id<mark style="color:red;">*</mark></td><td>string</td><td>Merchant ID</td></tr><tr><td>data.internalTransactionID</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="329.041748046875">Field Name</th><th>Type</th><th width="266.177001953125">Description</th><th>Required?</th></tr></thead><tbody><tr><td>ID</td><td>string</td><td>Platform system ID for the sale request</td><td>Required</td></tr><tr><td>TransactionID</td><td>string</td><td>Unique transaction ID</td><td>Required</td></tr><tr><td>MerchantID</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>Required</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>The bank token used to process this transaction, as provided in the request. This field will be included in the response only if <code>store_payment_method</code> is set to true.</td><td>Required</td></tr><tr><td>store_payment_method</td><td>boolean</td><td>true | false</td><td>Optional</td></tr><tr><td>initiated_by</td><td>string</td><td>merchant | customer</td><td>Optional</td></tr><tr><td>internalTransactionID</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>AchResponse.status</td><td>string</td><td>Transaction execution status.<br>Allowed values PASS | FAIL</td><td>Required</td></tr><tr><td>AchResponse.responseCode</td><td>string</td><td><a href="/pages/xwyEsKkXwPCax4ld7hLr">The code representing the status of the processed request</a>. It comes from the processor</td><td>Required</td></tr><tr><td>AchResponse.responseMessage</td><td>string</td><td>The corresponding message for the response code. It comes from the processor</td><td>Required</td></tr><tr><td>AchResponse.achHostTransactionID</td><td>string</td><td>The unique identifier for the ACH transaction by the processor</td><td>Optional</td></tr><tr><td>AchResponse.achHostTransactionStatus</td><td>string</td><td><a href="/pages/Ff4WHygBFwEU6W5BdSTE">The current status of the ACH transaction.</a></td><td>Optional</td></tr><tr><td>AchResponse.achHostResponseCode</td><td>string</td><td><a href="/pages/xwyEsKkXwPCax4ld7hLr">Host response code from acquiring processor</a></td><td>Optional</td></tr><tr><td>AchResponse.achHostMessage</td><td>string</td><td>Host response message from acquiring processor</td><td>Optional</td></tr><tr><td>AchResponse.taskID</td><td>string</td><td>Task identification number from acquiring processor</td><td>Optional</td></tr><tr><td>AchResponse.transactionID</td><td>string</td><td>Transaction Identifier</td><td>Optional</td></tr><tr><td>AchResponse.transactionTimestamp</td><td>string</td><td>Transaction timestamp in merchant's timezone</td><td>Required</td></tr><tr><td>AchResponse.bank_routing_number</td><td>string</td><td>Bank routing number</td><td>Optional</td></tr><tr><td>AchResponse.masked_bank_account</td><td>string</td><td>Masked bank account</td><td>Optional</td></tr><tr><td>AchResponse.customerReceipt</td><td>string</td><td>Printable customer receipt</td><td>Optional</td></tr><tr><td>AchResponse.merchantReceipt</td><td>string</td><td>Printable merchant receipt</td><td>Optional</td></tr><tr><td>AdditionalData</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" %}

```javascript
{    
    "merchant_id": "8bb35bfc-1620-4901-bb7e-f926710024a1",
    "data": {
        "accountToken": "ba_sandbox_xxxx",
        "transactionAmount": "100.00",
        "store_payment_method": true,
        "initiated_by": "customer",
        "internalTransactionID": "987654321",
        "description": "Payment for the services",
        "order_number": "150t65898",
        "metadata": {
            "customerId": "123",
            "email" : "test@test.com"
        }
    }
}
```

{% endtab %}

{% tab title="Response" %}

```javascript
{
    "data": {
        "ID": "026ef76b-b058-4e8a-968a-8ea5053b8f41",
        "TransactionID": "0b8ff792-04a5-44c2-b28d-62236668ffb2",
        "MerchantID": "1e4e6029-2cc9-4b2c-87c1-7a4b2af6d6c6",
        "gateway_id": "1f3e0f67-d560-494c-bb1a-97558a462cc5",
        "Description": "Payment for the services",
        "internalTransactionID": "987654321",
        "store_payment_method": true,
        "initiated_by": "customer",
        "AchResponse": {
            "status": "PASS",
            "responseCode": "A0000",
            "responseMessage": "Success",
            "hostReferenceNumber": "679105875316",
            "taskID": "14947358",
            "transactionID": "14697466",
            "transactionTimestamp": "2025-04-02T18:49:47",
            "transactionAmount": "150.00",
            "processedAmount": "150.00",
            "totalAmount": "150.00",
            "bank_routing_number":"121122676",
	    "masked_bank_account":"9020",
            "customerReceipt": "        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",
            "merchantReceipt": "        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": {
            "customerId": "123",
            "email" : "test@test.com"
        },
        "order_number": "150t65898",
        "token": "ba_sandbox_pjkaTwqPT9VbXAkW8PJRyIvD"
    }
}
```

{% endtab %}
{% endtabs %}
