# Get ACH transaction

To get an ACH transaction:

{% stepper %}
{% step %}
Use the GET method with the `/rest/v2/ach/transactions` endpoint.
{% endstep %}

{% step %}
Enter the ID returned in the ACH payment response in the search criteria to find the transaction.
{% endstep %}
{% endstepper %}

The `ach-transaction` returns the following response:

{% code lineNumbers="true" %}

```json
{ 
 "ach-transaction": 
  [ 
   { 
    "check-field": "invoice", 
    "client-ip": "111.22.22.333", 
    "dob-year": "dob-year", 
    "email-receipt": "true", 
    "software-type-version": "1.0", 
    "type": "Debit", 
    "validate-account": "true", 
    "amount": "string", 
    "routing-number": "string", 
    "account-number": "string", 
    "account-type": "Checking", 
    "standard-entry-class-code": "PPD", 
    "check-number": "string", 
    "create-token": "false", 
    "create-description": "false", 
    "individual-name": "string", 
    "token-id": "1188888888888888", 
    "id": "string", 
    "status": "Pending", 
    "billing": 
     { 
      "city": "City", 
      "company": "Company", 
      "country": "Country", 
      "first-name": "John", 
      "last-name": "Doe", 
      "phone": "Phone", 
      "state": "State", 
      "street": "Street", 
      "street2": "Street2", 
      "zip": "Zip" 
     }, 
      "shipping": 
       { 
        "city": "City", 
        "company": "Company", 
        "country": "Country", 
        "first-name": "John", 
        "last-name": "Doe", 
        "phone": "Phone", 
        "state": "State", 
        "street": "Street", 
        "street2": "Street2", 
        "zip": "Zip" 
       }, 
        "invoice": "string", 
        "purchase-order": "string", 
        "customer-id": "string", 
        "order-id": "string", 
        "email-address": "string", 
        "description": "string", 
        "comments": "string", 
        "billing-is-shipping": "true", 
        "status-change-date": "string", 
        "display-message": "string", 
        "provider-transaction-id": "string", 
        "trace-number": "string", 
        "settled-date": "string", 
        "returned-date": "string", 
        "returned-code": "string", 
        "returned-message": "string", 
        "ach-token": 
         { 
          "account-number": "1111", 
          "account-type": "Checking", 
          "created": "1100000000000000", 
          "customer-key": "customer123", 
          "default": true, 
          "individual-name": "John Doe", 
          "last-used": "1100000000000000", 
          "merchant-id": "000008888", 
          "routing-number": "081009813", 
          "times-used": 14, 
          "token-description": "Travel checking account", 
          "token-id": "1100000000000000", 
          "updated": "1100000000000000" 
         }, 
          "merchant-id": "string", 
          "terminal-id": "string", 
          "software-type": "MySoftware_Version1.3", 
          "paya-authorization": "string" 
   } 
  ] 
}
```

{% endcode %}

The following table describes the fields in the response body:

<table><thead><tr><th width="215.00006103515625" valign="top">Name</th><th width="129.66668701171875" valign="top">Data type</th><th valign="top">Description</th></tr></thead><tbody><tr><td valign="top"><code>ach-transaction</code></td><td valign="top">Array of strings</td><td valign="top">Contains the details of the ACH transaction.</td></tr><tr><td valign="top"><code>check-field</code></td><td valign="top">String</td><td valign="top">Specifies the field used for check identification, such as an invoice number.</td></tr><tr><td valign="top"><code>client-ip</code></td><td valign="top">String</td><td valign="top">The IP address of the client initiating the request.</td></tr><tr><td valign="top"><code>dob-year</code></td><td valign="top">String</td><td valign="top">The customers year of birth.</td></tr><tr><td valign="top"><code>email-receipt</code></td><td valign="top">String</td><td valign="top">Indicates whether to send an email receipt.</td></tr><tr><td valign="top"><code>software-type-version</code></td><td valign="top">String</td><td valign="top">The version of the software used to initiate the transaction.</td></tr><tr><td valign="top"><code>type</code></td><td valign="top">String</td><td valign="top">The transaction type. For example, Debit.</td></tr><tr><td valign="top"><code>validate-account</code></td><td valign="top">String</td><td valign="top">Indicates whether to validate the bank account.</td></tr><tr><td valign="top"><code>amount</code></td><td valign="top">String</td><td valign="top">The transaction amount.</td></tr><tr><td valign="top"><code>routing-number</code></td><td valign="top">String</td><td valign="top">The bank routing number.</td></tr><tr><td valign="top"><code>account-number</code></td><td valign="top">String</td><td valign="top">The bank account number.</td></tr><tr><td valign="top"><code>account-type</code></td><td valign="top">String</td><td valign="top">The type of bank account. For example, Checking or Savings.</td></tr><tr><td valign="top"><code>standard-entry-class-code</code></td><td valign="top">String</td><td valign="top">The ACH standard entry class code. For example, PPD.</td></tr><tr><td valign="top"><code>check-number</code></td><td valign="top">String</td><td valign="top">The check number associated with the transaction.</td></tr><tr><td valign="top"><code>create-token</code></td><td valign="top">String</td><td valign="top">Indicates whether to create a reusable token.</td></tr><tr><td valign="top"><code>create-description</code></td><td valign="top">String</td><td valign="top">Indicates whether to create a transaction description.</td></tr><tr><td valign="top"><code>individual-name</code></td><td valign="top">String</td><td valign="top">The name of the individual associated with the transaction.</td></tr><tr><td valign="top"><code>token-id</code></td><td valign="top">String</td><td valign="top">The unique identifier of the token.</td></tr><tr><td valign="top"><code>id</code></td><td valign="top">String</td><td valign="top">The unique identifier of the transaction.</td></tr><tr><td valign="top"><code>status</code></td><td valign="top">String</td><td valign="top">The current status of the transaction. For example, Pending.</td></tr><tr><td valign="top"><code>billing</code></td><td valign="top">Object</td><td valign="top">Contains billing address details.</td></tr><tr><td valign="top"><code>billing.city</code></td><td valign="top">String</td><td valign="top">The billing city.</td></tr><tr><td valign="top"><code>billing.company</code></td><td valign="top">String</td><td valign="top">The billing company.</td></tr><tr><td valign="top"><code>billing.country</code></td><td valign="top">String</td><td valign="top">The billing country.</td></tr><tr><td valign="top"><code>billing.first-name</code></td><td valign="top">String</td><td valign="top">The first name of the billing contact.</td></tr><tr><td valign="top"><code>billing.last-name</code></td><td valign="top">String</td><td valign="top">The last name of the billing contact.</td></tr><tr><td valign="top"><code>billing.phone</code></td><td valign="top">String</td><td valign="top">The phone number of the billing contact.</td></tr><tr><td valign="top"><code>billing.state</code></td><td valign="top">String</td><td valign="top">The billing state.</td></tr><tr><td valign="top"><code>billing.street</code></td><td valign="top">String</td><td valign="top">The billing street address.</td></tr><tr><td valign="top"><code>billing.street2</code></td><td valign="top">String</td><td valign="top">The second line of the billing street address.</td></tr><tr><td valign="top"><code>billing.zip</code></td><td valign="top">String</td><td valign="top">The billing ZIP code.</td></tr><tr><td valign="top"><code>shipping</code></td><td valign="top">Object</td><td valign="top">Contains shipping address details.</td></tr><tr><td valign="top"><code>shipping.city</code></td><td valign="top">String</td><td valign="top">The shipping city.</td></tr><tr><td valign="top"><code>shipping.company</code></td><td valign="top">String</td><td valign="top">The shipping company.</td></tr><tr><td valign="top"><code>shipping.country</code></td><td valign="top">String</td><td valign="top">The shipping country.</td></tr><tr><td valign="top"><code>shipping.first-name</code></td><td valign="top">String</td><td valign="top">The first name of the shipping contact.</td></tr><tr><td valign="top"><code>shipping.last-name</code></td><td valign="top">String</td><td valign="top">The last name of the shipping contact.</td></tr><tr><td valign="top"><code>shipping.phone</code></td><td valign="top">String</td><td valign="top">The phone number of the shipping contact.</td></tr><tr><td valign="top"><code>shipping.state</code></td><td valign="top">String</td><td valign="top">The shipping state.</td></tr><tr><td valign="top"><code>shipping.street</code></td><td valign="top">String</td><td valign="top">The shipping street address.</td></tr><tr><td valign="top"><code>shipping.street2</code></td><td valign="top">String</td><td valign="top">The second line of the shipping street address.</td></tr><tr><td valign="top"><code>shipping.zip</code></td><td valign="top">String</td><td valign="top">The shipping ZIP code.</td></tr><tr><td valign="top"><code>invoice</code></td><td valign="top">String</td><td valign="top">The invoice number associated with the transaction.</td></tr><tr><td valign="top"><code>purchase-order</code></td><td valign="top">String</td><td valign="top">The purchase order number associated with the transaction.</td></tr><tr><td valign="top"><code>customer-id</code></td><td valign="top">String</td><td valign="top">The unique identifier of the customer.</td></tr><tr><td valign="top"><code>order-id</code></td><td valign="top">String</td><td valign="top">The unique identifier of the order.</td></tr><tr><td valign="top"><code>email-address</code></td><td valign="top">String</td><td valign="top">The email address of the customer.</td></tr><tr><td valign="top"><code>description</code></td><td valign="top">String</td><td valign="top">A description of the transaction.</td></tr><tr><td valign="top"><code>comments</code></td><td valign="top">String</td><td valign="top">Additional comments about the transaction.</td></tr><tr><td valign="top"><code>billing-is-shipping</code></td><td valign="top">String</td><td valign="top">Indicates whether the billing address is the same as the shipping address. Use true or false.</td></tr><tr><td valign="top"><code>status-change-date</code></td><td valign="top">String</td><td valign="top">The date when the transaction status last changed.</td></tr><tr><td valign="top"><code>display-message</code></td><td valign="top">String</td><td valign="top">A message to be displayed to the user.</td></tr><tr><td valign="top"><code>provider-transaction-id</code></td><td valign="top">String</td><td valign="top">The unique identifier of the transaction from the payment provider.</td></tr><tr><td valign="top"><code>trace-number</code></td><td valign="top">String</td><td valign="top">The trace number associated with the transaction.</td></tr><tr><td valign="top"><code>settled-date</code></td><td valign="top">String</td><td valign="top">The date when the transaction was settled.</td></tr><tr><td valign="top"><code>returned-date</code></td><td valign="top">String</td><td valign="top">The date when the transaction was returned.</td></tr><tr><td valign="top"><code>returned-code</code></td><td valign="top">String</td><td valign="top">The code indicating the reason for the transaction return.</td></tr><tr><td valign="top"><code>returned-message</code></td><td valign="top">String</td><td valign="top">The message indicating the reason for the transaction return.</td></tr><tr><td valign="top"><code>ach-token</code></td><td valign="top">Object</td><td valign="top">Contains details of the ACH token.</td></tr><tr><td valign="top"><code>ach-token.account-number</code></td><td valign="top">String</td><td valign="top">The masked bank account number associated with the token.</td></tr><tr><td valign="top"><code>ach-token.account-type</code></td><td valign="top">String</td><td valign="top">The type of bank account. For example, Checking or Savings.</td></tr><tr><td valign="top"><code>ach-token.created</code></td><td valign="top">String</td><td valign="top">The timestamp when the ACH token was created.</td></tr><tr><td valign="top"><code>ach-token.customer-key</code></td><td valign="top">String</td><td valign="top">The unique key of the customer associated with the ACH token.</td></tr><tr><td valign="top"><code>ach-token.default</code></td><td valign="top">Boolean</td><td valign="top">Indicates whether the ACH token is the default token.</td></tr><tr><td valign="top"><code>ach-token.individual-name</code></td><td valign="top">String</td><td valign="top">The name of the individual associated with the ACH token.</td></tr><tr><td valign="top"><code>ach-token.last-used</code></td><td valign="top">String</td><td valign="top">The timestamp when the ACH token was last used.</td></tr><tr><td valign="top"><code>ach-token.merchant-id</code></td><td valign="top">String</td><td valign="top">The unique identifier of the merchant associated with the ACH token.</td></tr><tr><td valign="top"><code>ach-token.routing-number</code></td><td valign="top">String</td><td valign="top">The bank routing number associated with the account.</td></tr><tr><td valign="top"><code>ach-token.times-used</code></td><td valign="top">String</td><td valign="top">The number of times the ACH token has been used.</td></tr><tr><td valign="top"><code>ach-token.token-description</code></td><td valign="top">String</td><td valign="top">A description of the ACH token, such as the accounts purpose.</td></tr><tr><td valign="top"><code>ach-token.token-id</code></td><td valign="top">String</td><td valign="top">The unique identifier of the ACH token.</td></tr><tr><td valign="top"><code>ach-token.updated</code></td><td valign="top">String</td><td valign="top">The timestamp when the ACH token was last updated.</td></tr><tr><td valign="top"><code>merchant-id</code></td><td valign="top">String</td><td valign="top">The unique identifier of the merchant.</td></tr><tr><td valign="top"><code>terminal-id</code></td><td valign="top">String</td><td valign="top">The unique identifier of the terminal.</td></tr><tr><td valign="top"><code>software-type</code></td><td valign="top">String</td><td valign="top">The name and version of the software initiating the request.</td></tr><tr><td valign="top"><code>paya-authorization</code></td><td valign="top">String</td><td valign="top">The authorization code from Paya.</td></tr></tbody></table>

The `ach-transaction` returns the following status and error codes:

<table><thead><tr><th width="120.00006103515625">Code</th><th>Description</th></tr></thead><tbody><tr><td>401</td><td>If the ACH token has expired or the signature does not match the token.</td></tr><tr><td>204</td><td>Not found.</td></tr><tr><td>200</td><td>The ACH transaction list was generated successfully.</td></tr></tbody></table>

{% hint style="success" %}
Use webhooks to retrieve ACH transaction statuses. For more information, see [ACH Transaction Status Webhooks](https://docs.xplorpay.com/api-reference/webhooks/working-with-webhooks/ach-transaction-status-webhooks).
{% endhint %}
