Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.tesouro.com/llms.txt

Use this file to discover all available pages before exploring further.

Syntax errors occur when Tesouro can’t parse your request. Here are the most common ones you’ll hit when starting your integration:

Invalid request structure

If the request does not match the structure of a valid GraphQL request.
scenarioA missing closing brace caused an error while processing a transaction from Maple Street Coffee, one of Clearpath Payment’s acceptors.
Request with Syntax Error
mutation AuthorizeAndCaptureCard($input: CardPaymentInput!) {
        authorizeAndCaptureCard(input: $input) {
            transactionInformation {
                paymentId
            }
        }
Response: Invalid Request
{
  "errors": [
    {
      "message": "parsing error: ERROR@722:723 \"expected }\" )",
      "extensions": {
        "code": "PARSING_ERROR"
      }
    }
  ]
}

Invalid mutation/query identifier

If the mutation/query identifier doesn’t exist.
ScenarioSending authorizeAndCaptureCards instead of authorizeAndCaptureCard caused an error on an authorization request for Maple Street Coffee, one of Clearpath Payment’s acceptors.
Request with Syntax Error
mutation AuthorizeAndCaptureCard($input: CardPaymentInput!) {
  authorizeAndCaptureCards(input: $input) {
    transactionInformation {
      paymentId
    }
  }
}
Response: Invalid Request
{
  "errors": [
    {
      "message": "parsing error: ERROR@722:723 \"expected }\" )",
      "extensions": {
        "code": "PARSING_ERROR"
      }
    }
  ]
}

Invalid mutation/query input field

If the mutation/query identifier is correct, but one of the input fields does not match the schema
ScenarioSending transactionCurrencys instead of transactionCurrency caused an error while processing a transaction from Maple Street Coffee, one of Clearpath Payment’s acceptors.
Request Variables with Syntax Error
{
  "input": {
    "amountInformation": {
      "transactionAmount": 150,
      "transactionCurrencys": "USD"
    }
  }
}
Response: Invalid Request
{
  "errors": [
    {
      "message": "Field \"transactionCurrencyss\" is not defined by type \"AmountInformationInput\". Did you mean \"transactionCurrency\" or \"transactionAmount\"?",
      "extensions": {
        "code": "GRAPHQL_VALIDATION_FAILED"
      }
    }
  ]
}

Incorrect mutation/query input field type

If an input variable field type is incorrect
ScenarioSending "150.10" instead of 150.10 in the DecimalAmount field caused an error on a $150.10 transaction for Maple Street Coffee, one of Clearpath Payment’s acceptors.
Request Variables with Syntax Error
{
  "input": {
    "amountInformation": {
      "transactionAmount": "150.10",
      "transactionCurrencys": "USD"
    }
  }
}
Response: Invalid Request
{
  "data": null,
  "errors": [
    {
      "message": "HTTP fetch failed from 'paymentprocessing': 400: Bad Request",
      "extensions": {
        "code": "SUBREQUEST_HTTP_ERROR",
        "service": "paymentprocessing",
        "reason": "400: Bad Request",
        "http": {
          "status": 400
        }
      }
    },
    {
      "message": "The specified value type of field `transactionAmount` does not match the field type.",
      "locations": [
        {
          "line": 1,
          "column": 287
        }
      ],
      "path": ["authorizeAndCaptureCard"],
      "extensions": {
        "fieldName": "transactionAmount",
        "fieldType": "DecimalAmount!",
        "locationType": "DecimalAmount!",
        "specifiedBy": "http://spec.graphql.org/October2021/#sec-Values-of-Correct-Type"
      }
    }
  ]
}