# ACH Tokens

## Get Stored ACH Token

> Retrieve the details of a stored ACH token using the specified token ID.

```json
{"openapi":"3.0.1","info":{"title":"ACH Vault","version":"2.0"},"paths":{"/rest/v2/ach/tokens/{tokenId}":{"get":{"tags":["ACH Tokens"],"summary":"Get Stored ACH Token","description":"Retrieve the details of a stored ACH token using the specified token ID.","operationId":"getToken","parameters":[{"name":"api-key","in":"header","description":"An access API key issued to you by Xplor Pay.","required":true,"schema":{"type":"string"}},{"name":"tokenId","in":"path","description":"Specifies the unique identifier of the ACH token.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AchTokenResponsePayload"}},"application/xml":{"schema":{"$ref":"#/components/schemas/AchTokenResponsePayload"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResult"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorResult"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResult"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorResult"}}}},"402":{"description":"Business Exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResult"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorResult"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResult"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorResult"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResult"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorResult"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResult"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorResult"}}}}}}}},"components":{"schemas":{"AchTokenResponsePayload":{"type":"object","properties":{"ach-token":{"$ref":"#/components/schemas/Ach Token Response"},"payloadType":{"type":"string","description":"Indicates the type of payload returned in the response.","xml":{"name":"type","attribute":true}}},"description":"Payload","xml":{"name":"payload"}},"Ach Token Response":{"type":"object","properties":{"token-id":{"type":"string","description":"Unique identifier of the ACH token."},"times-used":{"type":"integer","description":"Number of times the token has been used in an ACH transaction.","format":"int32"},"last-used":{"type":"string","description":"Date and time when the token was last used (UTC)."},"merchant-id":{"type":"string","description":"The merchant's unique identification number associated with the token."},"routing-number":{"type":"string","description":"Bank routing number"},"account-number":{"type":"string","description":"Masked or last four digits of the bank account number."},"account-type":{"type":"string","description":"Type of the bank account. Possible values: Checking, Savings.","enum":["Checking","Savings"]},"individual-name":{"type":"string","description":"Name associated with the bank account."},"token-description":{"type":"string","description":"A brief description of the ACH token."},"created":{"type":"string","description":"Date and time when the token was created (UTC)."},"updated":{"type":"string","description":"Date and time when the token was last updated (UTC)."},"customer-key":{"type":"string","description":"Unique customer key associated with the token."},"default":{"type":"boolean","description":"Indicates whether this token is the default for the card number."}},"description":"Tokenized ACH account information.","xml":{"name":"ach-token"}},"ErrorResult":{"type":"object","properties":{"errorResults":{"type":"array","items":{"$ref":"#/components/schemas/Error"}}}},"Error":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Describes the reason for the error."},"resultCode":{"type":"integer","description":"Numeric code that identifies the type of error returned by the request.","format":"int32"},"timeStamp":{"type":"string","description":"Date and time when the error occurred, ISO 8601 format (UTC)."}}}}}}
```

## Update ACH tokens

> Update the details of an existing ACH token identified by the specified token ID.

```json
{"openapi":"3.0.1","info":{"title":"ACH Vault","version":"2.0"},"paths":{"/rest/v2/ach/tokens/{tokenId}":{"put":{"tags":["ACH Tokens"],"summary":"Update ACH tokens","description":"Update the details of an existing ACH token identified by the specified token ID.","operationId":"updateToken","parameters":[{"name":"api-key","in":"header","description":"An access API key issued to you by Xplor Pay.","required":true,"schema":{"type":"string"}},{"name":"tokenId","in":"path","description":"Specifies the unique identifier of the ACH token.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ach-token"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ach-token"}}},"required":true},"responses":{"200":{"description":"Successful Token Update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AchTokenResponsePayload"}},"application/xml":{"schema":{"$ref":"#/components/schemas/AchTokenResponsePayload"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResult"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorResult"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResult"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorResult"}}}},"402":{"description":"Business Exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResult"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorResult"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResult"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorResult"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResult"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorResult"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResult"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorResult"}}}}}}}},"components":{"schemas":{"ach-token":{"required":["account-number","account-type","individual-name","routing-number","software-type","software-type-version"],"type":"object","properties":{"routing-number":{"type":"string","description":"Specifies the bank routing number used to create the ACH token."},"account-number":{"type":"string","description":"Specifies the bank account number (1 to 17 digits) used to create the ACH token."},"account-type":{"type":"string","description":"Specifies the type of bank account. Possible values: Checking, Savings.","enum":["Checking,Savings"]},"individual-name":{"type":"string","description":"Specifies the name of the bank account holder."},"token-description":{"type":"string","description":"Provides a description for the ACH token."},"customer-key":{"type":"string","description":"Identifies the customer associated with the ACH token."},"default":{"type":"boolean","description":"Indicates whether this token is the default payment method for the customer."},"software-type":{"type":"string","description":"Identifies the software application."},"software-type-version":{"type":"string","description":"Specifies the version of the software application."},"check-digit-enabled":{"type":"boolean","description":"Indicates whether the check-digit validation algorithm is enabled for New Zealand (NZ) bank accounts."}},"description":"Use this model when creating a new ach token","xml":{"name":"ach-token"}},"AchTokenResponsePayload":{"type":"object","properties":{"ach-token":{"$ref":"#/components/schemas/Ach Token Response"},"payloadType":{"type":"string","description":"Indicates the type of payload returned in the response.","xml":{"name":"type","attribute":true}}},"description":"Payload","xml":{"name":"payload"}},"Ach Token Response":{"type":"object","properties":{"token-id":{"type":"string","description":"Unique identifier of the ACH token."},"times-used":{"type":"integer","description":"Number of times the token has been used in an ACH transaction.","format":"int32"},"last-used":{"type":"string","description":"Date and time when the token was last used (UTC)."},"merchant-id":{"type":"string","description":"The merchant's unique identification number associated with the token."},"routing-number":{"type":"string","description":"Bank routing number"},"account-number":{"type":"string","description":"Masked or last four digits of the bank account number."},"account-type":{"type":"string","description":"Type of the bank account. Possible values: Checking, Savings.","enum":["Checking","Savings"]},"individual-name":{"type":"string","description":"Name associated with the bank account."},"token-description":{"type":"string","description":"A brief description of the ACH token."},"created":{"type":"string","description":"Date and time when the token was created (UTC)."},"updated":{"type":"string","description":"Date and time when the token was last updated (UTC)."},"customer-key":{"type":"string","description":"Unique customer key associated with the token."},"default":{"type":"boolean","description":"Indicates whether this token is the default for the card number."}},"description":"Tokenized ACH account information.","xml":{"name":"ach-token"}},"ErrorResult":{"type":"object","properties":{"errorResults":{"type":"array","items":{"$ref":"#/components/schemas/Error"}}}},"Error":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Describes the reason for the error."},"resultCode":{"type":"integer","description":"Numeric code that identifies the type of error returned by the request.","format":"int32"},"timeStamp":{"type":"string","description":"Date and time when the error occurred, ISO 8601 format (UTC)."}}}}}}
```

## Delete an ACH Token

> Delete the ACH token identified by the specified token ID.

```json
{"openapi":"3.0.1","info":{"title":"ACH Vault","version":"2.0"},"paths":{"/rest/v2/ach/tokens/{tokenId}":{"delete":{"tags":["ACH Tokens"],"summary":"Delete an ACH Token","description":"Delete the ACH token identified by the specified token ID.","operationId":"deleteToken","parameters":[{"name":"api-key","in":"header","description":"An access API key issued to you by Xplor Pay.","required":true,"schema":{"type":"string"}},{"name":"tokenId","in":"path","description":"Specifies the unique identifier of the ACH token.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AchTokenResponsePayload"}},"application/xml":{"schema":{"$ref":"#/components/schemas/AchTokenResponsePayload"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResult"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorResult"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResult"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorResult"}}}},"402":{"description":"Business Exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResult"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorResult"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResult"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorResult"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResult"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorResult"}}}}}}}},"components":{"schemas":{"AchTokenResponsePayload":{"type":"object","properties":{"ach-token":{"$ref":"#/components/schemas/Ach Token Response"},"payloadType":{"type":"string","description":"Indicates the type of payload returned in the response.","xml":{"name":"type","attribute":true}}},"description":"Payload","xml":{"name":"payload"}},"Ach Token Response":{"type":"object","properties":{"token-id":{"type":"string","description":"Unique identifier of the ACH token."},"times-used":{"type":"integer","description":"Number of times the token has been used in an ACH transaction.","format":"int32"},"last-used":{"type":"string","description":"Date and time when the token was last used (UTC)."},"merchant-id":{"type":"string","description":"The merchant's unique identification number associated with the token."},"routing-number":{"type":"string","description":"Bank routing number"},"account-number":{"type":"string","description":"Masked or last four digits of the bank account number."},"account-type":{"type":"string","description":"Type of the bank account. Possible values: Checking, Savings.","enum":["Checking","Savings"]},"individual-name":{"type":"string","description":"Name associated with the bank account."},"token-description":{"type":"string","description":"A brief description of the ACH token."},"created":{"type":"string","description":"Date and time when the token was created (UTC)."},"updated":{"type":"string","description":"Date and time when the token was last updated (UTC)."},"customer-key":{"type":"string","description":"Unique customer key associated with the token."},"default":{"type":"boolean","description":"Indicates whether this token is the default for the card number."}},"description":"Tokenized ACH account information.","xml":{"name":"ach-token"}},"ErrorResult":{"type":"object","properties":{"errorResults":{"type":"array","items":{"$ref":"#/components/schemas/Error"}}}},"Error":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Describes the reason for the error."},"resultCode":{"type":"integer","description":"Numeric code that identifies the type of error returned by the request.","format":"int32"},"timeStamp":{"type":"string","description":"Date and time when the error occurred, ISO 8601 format (UTC)."}}}}}}
```

## Create Reusable ACH Token

> Create a reusable ACH token by securely storing a customer's bank account details.

```json
{"openapi":"3.0.1","info":{"title":"ACH Vault","version":"2.0"},"paths":{"/rest/v2/ach/tokens":{"post":{"tags":["ACH Tokens"],"summary":"Create Reusable ACH Token","description":"Create a reusable ACH token by securely storing a customer's bank account details.","operationId":"createToken","parameters":[{"name":"api-key","in":"header","description":"An access API key issued to you by Xplor Pay.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ach-token"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ach-token"}}},"required":true},"responses":{"200":{"description":"Successful Token Creation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AchTokenResponsePayload"}},"application/xml":{"schema":{"$ref":"#/components/schemas/AchTokenResponsePayload"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResult"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorResult"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResult"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorResult"}}}},"402":{"description":"Business Exception","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResult"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorResult"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResult"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorResult"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResult"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorResult"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResult"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorResult"}}}}}}}},"components":{"schemas":{"ach-token":{"required":["account-number","account-type","individual-name","routing-number","software-type","software-type-version"],"type":"object","properties":{"routing-number":{"type":"string","description":"Specifies the bank routing number used to create the ACH token."},"account-number":{"type":"string","description":"Specifies the bank account number (1 to 17 digits) used to create the ACH token."},"account-type":{"type":"string","description":"Specifies the type of bank account. Possible values: Checking, Savings.","enum":["Checking,Savings"]},"individual-name":{"type":"string","description":"Specifies the name of the bank account holder."},"token-description":{"type":"string","description":"Provides a description for the ACH token."},"customer-key":{"type":"string","description":"Identifies the customer associated with the ACH token."},"default":{"type":"boolean","description":"Indicates whether this token is the default payment method for the customer."},"software-type":{"type":"string","description":"Identifies the software application."},"software-type-version":{"type":"string","description":"Specifies the version of the software application."},"check-digit-enabled":{"type":"boolean","description":"Indicates whether the check-digit validation algorithm is enabled for New Zealand (NZ) bank accounts."}},"description":"Use this model when creating a new ach token","xml":{"name":"ach-token"}},"AchTokenResponsePayload":{"type":"object","properties":{"ach-token":{"$ref":"#/components/schemas/Ach Token Response"},"payloadType":{"type":"string","description":"Indicates the type of payload returned in the response.","xml":{"name":"type","attribute":true}}},"description":"Payload","xml":{"name":"payload"}},"Ach Token Response":{"type":"object","properties":{"token-id":{"type":"string","description":"Unique identifier of the ACH token."},"times-used":{"type":"integer","description":"Number of times the token has been used in an ACH transaction.","format":"int32"},"last-used":{"type":"string","description":"Date and time when the token was last used (UTC)."},"merchant-id":{"type":"string","description":"The merchant's unique identification number associated with the token."},"routing-number":{"type":"string","description":"Bank routing number"},"account-number":{"type":"string","description":"Masked or last four digits of the bank account number."},"account-type":{"type":"string","description":"Type of the bank account. Possible values: Checking, Savings.","enum":["Checking","Savings"]},"individual-name":{"type":"string","description":"Name associated with the bank account."},"token-description":{"type":"string","description":"A brief description of the ACH token."},"created":{"type":"string","description":"Date and time when the token was created (UTC)."},"updated":{"type":"string","description":"Date and time when the token was last updated (UTC)."},"customer-key":{"type":"string","description":"Unique customer key associated with the token."},"default":{"type":"boolean","description":"Indicates whether this token is the default for the card number."}},"description":"Tokenized ACH account information.","xml":{"name":"ach-token"}},"ErrorResult":{"type":"object","properties":{"errorResults":{"type":"array","items":{"$ref":"#/components/schemas/Error"}}}},"Error":{"type":"object","properties":{"errorMessage":{"type":"string","description":"Describes the reason for the error."},"resultCode":{"type":"integer","description":"Numeric code that identifies the type of error returned by the request.","format":"int32"},"timeStamp":{"type":"string","description":"Date and time when the error occurred, ISO 8601 format (UTC)."}}}}}}
```
