query AchReturns($input: AchReturnsInput!) {
achReturns(input: $input) {
items {
acceptor {
businessName
id
name
reference
}
accountNumberEndingIn
accountOwnerName
accountOwnerType
accountType
activityDate
amount
currency
id
organization {
achReturns
businessName
capabilities
id
legalName
name
phoneNumber
}
paymentId
reason
reasonCode
routingNumber
traceNumber
transactionActivityDate
transactionAmount
transactionDateTime
transactionId
transactionReference
transactionTraceNumber
transactionType
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
}
{
"input": {
"paging": {
"skip": 0,
"take": 0
},
"where": {
"acceptorId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"activityDate": "example",
"id": "example"
}
}
}
curl --request POST \
--url https://api.sandbox.com/graphql \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--data '{
"query": "query AchReturns($input: AchReturnsInput!) {\n achReturns(input: $input) {\n items {\n acceptor {\n businessName\n id\n name\n reference\n }\n accountNumberEndingIn\n accountOwnerName\n accountOwnerType\n accountType\n activityDate\n amount\n currency\n id\n organization {\n achReturns\n businessName\n capabilities\n id\n legalName\n name\n phoneNumber\n }\n paymentId\n reason\n reasonCode\n routingNumber\n traceNumber\n transactionActivityDate\n transactionAmount\n transactionDateTime\n transactionId\n transactionReference\n transactionTraceNumber\n transactionType\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n }\n }\n}",
"variables": {
"input": {
"paging": {
"skip": 0,
"take": 0
},
"where": {
"acceptorId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"activityDate": "example",
"id": "example"
}
}
}
}'
{
"data": {
"achReturns": {
"items": [
{
"acceptor": {
"allocations": "example",
"authorizationSummaries": "example",
"billingDescriptor": "CLACKSWORTH KEYBOARDS",
"businessName": "Clacksworth Keyboards",
"fees": "example",
"feeSummaries": "example",
"fundingAchReturns": "example",
"fundingDisputeEvents": "example",
"fundingSummaries": "example",
"fundingTransactions": "example",
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Ben Torres",
"paymentTransactions": "example",
"paymentTransactionSummaries": "example",
"reference": "example"
},
"accountNumberEndingIn": "example",
"accountOwnerName": "example",
"accountOwnerType": "CONSUMER",
"accountType": "CHECKING",
"activityDate": "2026-01-15",
"amount": 0,
"currency": "example",
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"organization": {
"acceptorApplicationCounts": [
"example"
],
"acceptors": "example",
"achNotificationsOfChange": "example",
"achReturns": "example",
"allocations": "example",
"allowedMerchantCategories": [
"example"
],
"authorizationSummaries": "example",
"businessAddress": "example",
"businessName": "Clacksworth Keyboards",
"capabilities": [
"ACQUIRING"
],
"fees": "example",
"feeSummaries": "example",
"fundingAchReturns": "example",
"fundingDisbursementReturns": "example",
"fundingDisputeEvents": "example",
"fundingSummaries": "example",
"fundingTransactions": "example",
"id": "c9a1e2d3-4b5f-6789-0abc-def123456789",
"legalName": "example",
"name": "Ben Torres",
"paymentTransactions": "example",
"paymentTransactionSummaries": "example",
"phoneNumber": "example",
"reportAvailability": [
"example"
],
"settings": "example"
},
"paymentId": "d8b2f3e4-5c6a-7890-1bcd-ef2345678901",
"reason": "example",
"reasonCode": "R01",
"routingNumber": "example",
"traceNumber": "example",
"transactionActivityDate": "2026-01-15",
"transactionAmount": 0,
"transactionDateTime": "2026-01-15T14:30:00Z",
"transactionId": "e7c3a4b5-6d7e-8901-2cde-f34567890123",
"transactionReference": "example",
"transactionTraceNumber": "example",
"transactionType": "AUTHORIZATION"
}
],
"pageInfo": {
"hasNextPage": true,
"hasPreviousPage": true
}
}
}
}
Reporting
achReturns
An itemized list of ach returns.
query AchReturns($input: AchReturnsInput!) {
achReturns(input: $input) {
items {
acceptor {
businessName
id
name
reference
}
accountNumberEndingIn
accountOwnerName
accountOwnerType
accountType
activityDate
amount
currency
id
organization {
achReturns
businessName
capabilities
id
legalName
name
phoneNumber
}
paymentId
reason
reasonCode
routingNumber
traceNumber
transactionActivityDate
transactionAmount
transactionDateTime
transactionId
transactionReference
transactionTraceNumber
transactionType
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
}
{
"input": {
"paging": {
"skip": 0,
"take": 0
},
"where": {
"acceptorId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"activityDate": "example",
"id": "example"
}
}
}
curl --request POST \
--url https://api.sandbox.com/graphql \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--data '{
"query": "query AchReturns($input: AchReturnsInput!) {\n achReturns(input: $input) {\n items {\n acceptor {\n businessName\n id\n name\n reference\n }\n accountNumberEndingIn\n accountOwnerName\n accountOwnerType\n accountType\n activityDate\n amount\n currency\n id\n organization {\n achReturns\n businessName\n capabilities\n id\n legalName\n name\n phoneNumber\n }\n paymentId\n reason\n reasonCode\n routingNumber\n traceNumber\n transactionActivityDate\n transactionAmount\n transactionDateTime\n transactionId\n transactionReference\n transactionTraceNumber\n transactionType\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n }\n }\n}",
"variables": {
"input": {
"paging": {
"skip": 0,
"take": 0
},
"where": {
"acceptorId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"activityDate": "example",
"id": "example"
}
}
}
}'
{
"data": {
"achReturns": {
"items": [
{
"acceptor": {
"allocations": "example",
"authorizationSummaries": "example",
"billingDescriptor": "CLACKSWORTH KEYBOARDS",
"businessName": "Clacksworth Keyboards",
"fees": "example",
"feeSummaries": "example",
"fundingAchReturns": "example",
"fundingDisputeEvents": "example",
"fundingSummaries": "example",
"fundingTransactions": "example",
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Ben Torres",
"paymentTransactions": "example",
"paymentTransactionSummaries": "example",
"reference": "example"
},
"accountNumberEndingIn": "example",
"accountOwnerName": "example",
"accountOwnerType": "CONSUMER",
"accountType": "CHECKING",
"activityDate": "2026-01-15",
"amount": 0,
"currency": "example",
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"organization": {
"acceptorApplicationCounts": [
"example"
],
"acceptors": "example",
"achNotificationsOfChange": "example",
"achReturns": "example",
"allocations": "example",
"allowedMerchantCategories": [
"example"
],
"authorizationSummaries": "example",
"businessAddress": "example",
"businessName": "Clacksworth Keyboards",
"capabilities": [
"ACQUIRING"
],
"fees": "example",
"feeSummaries": "example",
"fundingAchReturns": "example",
"fundingDisbursementReturns": "example",
"fundingDisputeEvents": "example",
"fundingSummaries": "example",
"fundingTransactions": "example",
"id": "c9a1e2d3-4b5f-6789-0abc-def123456789",
"legalName": "example",
"name": "Ben Torres",
"paymentTransactions": "example",
"paymentTransactionSummaries": "example",
"phoneNumber": "example",
"reportAvailability": [
"example"
],
"settings": "example"
},
"paymentId": "d8b2f3e4-5c6a-7890-1bcd-ef2345678901",
"reason": "example",
"reasonCode": "R01",
"routingNumber": "example",
"traceNumber": "example",
"transactionActivityDate": "2026-01-15",
"transactionAmount": 0,
"transactionDateTime": "2026-01-15T14:30:00Z",
"transactionId": "e7c3a4b5-6d7e-8901-2cde-f34567890123",
"transactionReference": "example",
"transactionTraceNumber": "example",
"transactionType": "AUTHORIZATION"
}
],
"pageInfo": {
"hasNextPage": true,
"hasPreviousPage": true
}
}
}
}
Query
Arguments
AchReturnsInput!
required
Show child attributes
Show child attributes
PagingInput!
required
See PagingInput
AchReturnFilterInput!
required
Show child attributes
Show child attributes
GuidFilterInput
See GuidFilterInput
DateRangeFilterInput
GuidFilterInput
See GuidFilterInput
GuidFilterInput
See GuidFilterInput
EnumFilterInputOfAchReturnCodeInput
Show child attributes
Show child attributes
DateRangeFilterInput
GuidFilterInput
See GuidFilterInput
StringFilterInput
EnumFilterInputOfPaymentTransactionTypeInput
Return type
AchReturnCollection
[AchReturn!]!
required
Show child attributes
Show child attributes
String
The last few numbers of the bank account used as a visual reference to the full account numer.
String
The name of the bank account owner, as provided by the NACHA report.
AccountOwnerType
The type of the bank account owner, as provided by the NACHA report.See AccountOwnerType
BankAccountType
The type of the bank account, e.g., Checking or Savings.See BankAccountType
Date!
required
The date Tesouro received the ach return.
Decimal!
required
The amount of the ach return.
String!
required
The currency specified on the ach return.
UUID!
required
A unique, 36 character identifier created by Tesouro and assigned to the ACH return.
Organization!
required
See Organization
UUID
A unique 36 character identifier created by Tesouro and assigned to a group of transactions in the same payment request cohort. e.g., An authorization request, incremental authorization request, and the final capture would have the same paymentID.
String!
required
Description of return reason.
AchReturnCode!
required
Nacha Return Codes and associated ISO Status Reason Codes for returns and reversals from the External Code List.See AchReturnCode
String!
required
A unique nine-digit number that identifies a bank and is used for electronic transactions. It’s also known as an ABA routing number, or routing transit number (RTN).
String!
required
A unique 15 digit reference number created by the bank and used to investigate and research ACH transfers and returns.
Date
The date Tesouro recognized the original ACH payment request, based upon the acceptor cutoff. Formatted as YYYY-MM-DD
Decimal!
required
The transaction amount submitted with the original ach request.
DateTime!
required
The date and time that Tesouro received the original ach transaction, in UTC. Formatted as 2024-03-27T02:40:00Z
UUID!
required
A unique identifier assigned by Tesouro to the original ach transaction.
String
A unique identifier from original ach transaction created by the entity holding the direct relationship with the Acceptor. Tesouro uses this identifier to manage idempotency.
String!
required
A number that a bank can you to investigate and research an ach transaction.
TransactionType!
required
The type of original ach transaction, e.g., Sale or Refund.See TransactionType
query AchReturns($input: AchReturnsInput!) {
achReturns(input: $input) {
items {
acceptor {
businessName
id
name
reference
}
accountNumberEndingIn
accountOwnerName
accountOwnerType
accountType
activityDate
amount
currency
id
organization {
achReturns
businessName
capabilities
id
legalName
name
phoneNumber
}
paymentId
reason
reasonCode
routingNumber
traceNumber
transactionActivityDate
transactionAmount
transactionDateTime
transactionId
transactionReference
transactionTraceNumber
transactionType
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
}
{
"input": {
"paging": {
"skip": 0,
"take": 0
},
"where": {
"acceptorId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"activityDate": "example",
"id": "example"
}
}
}
curl --request POST \
--url https://api.sandbox.com/graphql \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--data '{
"query": "query AchReturns($input: AchReturnsInput!) {\n achReturns(input: $input) {\n items {\n acceptor {\n businessName\n id\n name\n reference\n }\n accountNumberEndingIn\n accountOwnerName\n accountOwnerType\n accountType\n activityDate\n amount\n currency\n id\n organization {\n achReturns\n businessName\n capabilities\n id\n legalName\n name\n phoneNumber\n }\n paymentId\n reason\n reasonCode\n routingNumber\n traceNumber\n transactionActivityDate\n transactionAmount\n transactionDateTime\n transactionId\n transactionReference\n transactionTraceNumber\n transactionType\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n }\n }\n}",
"variables": {
"input": {
"paging": {
"skip": 0,
"take": 0
},
"where": {
"acceptorId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"activityDate": "example",
"id": "example"
}
}
}
}'
{
"data": {
"achReturns": {
"items": [
{
"acceptor": {
"allocations": "example",
"authorizationSummaries": "example",
"billingDescriptor": "CLACKSWORTH KEYBOARDS",
"businessName": "Clacksworth Keyboards",
"fees": "example",
"feeSummaries": "example",
"fundingAchReturns": "example",
"fundingDisputeEvents": "example",
"fundingSummaries": "example",
"fundingTransactions": "example",
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Ben Torres",
"paymentTransactions": "example",
"paymentTransactionSummaries": "example",
"reference": "example"
},
"accountNumberEndingIn": "example",
"accountOwnerName": "example",
"accountOwnerType": "CONSUMER",
"accountType": "CHECKING",
"activityDate": "2026-01-15",
"amount": 0,
"currency": "example",
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"organization": {
"acceptorApplicationCounts": [
"example"
],
"acceptors": "example",
"achNotificationsOfChange": "example",
"achReturns": "example",
"allocations": "example",
"allowedMerchantCategories": [
"example"
],
"authorizationSummaries": "example",
"businessAddress": "example",
"businessName": "Clacksworth Keyboards",
"capabilities": [
"ACQUIRING"
],
"fees": "example",
"feeSummaries": "example",
"fundingAchReturns": "example",
"fundingDisbursementReturns": "example",
"fundingDisputeEvents": "example",
"fundingSummaries": "example",
"fundingTransactions": "example",
"id": "c9a1e2d3-4b5f-6789-0abc-def123456789",
"legalName": "example",
"name": "Ben Torres",
"paymentTransactions": "example",
"paymentTransactionSummaries": "example",
"phoneNumber": "example",
"reportAvailability": [
"example"
],
"settings": "example"
},
"paymentId": "d8b2f3e4-5c6a-7890-1bcd-ef2345678901",
"reason": "example",
"reasonCode": "R01",
"routingNumber": "example",
"traceNumber": "example",
"transactionActivityDate": "2026-01-15",
"transactionAmount": 0,
"transactionDateTime": "2026-01-15T14:30:00Z",
"transactionId": "e7c3a4b5-6d7e-8901-2cde-f34567890123",
"transactionReference": "example",
"transactionTraceNumber": "example",
"transactionType": "AUTHORIZATION"
}
],
"pageInfo": {
"hasNextPage": true,
"hasPreviousPage": true
}
}
}
}
Was this page helpful?