# Transactions

Transaction ...

# List Transactions

Returns a list of transactions from gateways defined by your organization. Transactions are returned sorted by submitted date, with the most recent transactions appearing first.

GET https://<org-uuid>.production.tratta.io/api/v1/transactions

curl https://<org-uuid>.production.tratta.io/api/v1/transactions \
 -H "Authorization: Bearer eyJ0eXA3asdk..." \
 -d limit=5 \
 -G

# Parameters


limit optional

A limit on the number of records to be returned, between 1 and 500.

start_date optional

A filter based on the submitted_date field. The value must be a date with Y-m-d H:i:s format. start_date filter will be applied only when end_date filter is specified as well.

end_date optional

A filter based on the submitted_date field. The value must be a date with Y-m-d H:i:s format. end_date filter will be applied only when start_date filter is specified as well.

date_range optional

A filter based on the submitted_date field. It specifies the date range of returned records.

Supported values:

  • today
  • this_week
  • this_week_to_date
  • this_month
  • this_month_to_date
  • this_quarter
  • this_quarter_to_date
  • this_year
  • this_year_to_date
  • this_year_to_last_month
  • yesterday
  • last_week
  • last_week_to_date
  • last_month
  • last_month_to_date
  • last_quarter
  • last_quarter_to_date
  • last_year
  • last_year_to_date
  • since_30_days_ago
  • since_60_days_ago
  • since_90_days_ago
  • since_365_days_ago

# Returns


A json with data property that contains an array of limit number of transactions. An optional start_date or end_date parameters will filter down transactions into the requested date range.

# Card Transaction

{
    "id" : "tx_d7c440889f971508d6f21ca6b0274b44",
    "batch_number" : "12345",
    "amount" : 5000,
    "submitted_date" : 1610031662, # Timestamp
    "payment_method_details" : {
      "type" : "Card",
      "card" : {
          "last4" : "XXXXXXXXXXXX1234"
      }
    },
    "shipping_details" : {
      "company" : null,
      "phone" : null,
      "fax" : null,
      "address" : {
          "state" : null,
          "line1" : null,
          "city" : null,
          "country" : null,
          "line2" : null,
          "postal_code" : null
      },
      "last_name" : null,
      "email" : null,
      "first_name" : null
    },
    "billing_details" : {
      "email" : null,
      "first_name" : "Jon",
      "company" : null,
      "phone" : null,
      "fax" : null,
      "address" : {
          "postal_code" : "10001",
          "country" : null,
          "line2" : "5th Ave",
          "city" : "New York",
          "line1" : "5th Ave New York",
          "state" : "NY"
      },
      "last_name" : "Doe"
    },
    "gateway" : {
      "usaepay" : {
          "account_holder" : "Jon Doe",
          "credit_card" : {
            "data_source" : "Card Not Present, Manually Keyed",
            "term_type" : "",
            "mag_support" : "",
            "pares" : "",
            "card_present" : 0,
            "mag_stripe" : "",
            "number" : "XXXXXXXXXXXX1234",
            "type" : "M",
            "expiration" : "XXXX",
            "avs_street" : "1234 5th Ave",
            "code" : "XXX",
            "internal_card_auth" : 0,
            "avs_zip" : "10001"
          },
          "customer_id" : "123456",
          "value_type" : "Sale",
          "shipping_address" : {
            "phone" : null,
            "company" : null,
            "address" : {
                "postal_code" : null,
                "line1" : null,
                "state" : null,
                "country" : null,
                "line2" : null,
                "city" : null
            },
            "last_name" : null,
            "fax" : null,
            "first_name" : null,
            "email" : null
          },
          "billing_details" : {
            "email" : null,
            "first_name" : "Jon",
            "company" : null,
            "phone" : null,
            "fax" : null,
            "address" : {
                "postal_code" : "10001",
                "country" : null,
                "line2" : "5th Ave",
                "city" : "New York",
                "line1" : "5th Ave New York",
                "state" : "NY"
            },
            "last_name" : "Doe"
          },
          "bin" : {
            "bin" : "229852",
            "type" : "Credit",
            "card_network" : "VISA",
            "issuer" : "CHASE",
            "counntry" : "US",
            "country_name" : "UNITED STATES",
            "country_iso" : "840",
            "location" : "HTTP://WWW.CHASE.COM/",
            "phone" : "1-888-3188",
            "category" : "Business"
          },
          "custom_fields" : {
            // Any custom fields returned from usaepay
          },
          "submitted_date" : "2021-01-07 15:01:02",
          "payment_method" : "Card",
          "source" : "TARCS",
          "server_ip" : "10.10.12.12",
          "detail" : {
            "clerk": "",
            "currency": "",
            "description": "Description",
            "comments": "",
            "discount": 0,
            "invoice": "123456789",
            "non_tax": 0,
            "order_id": "",
            "purchase_order_number": "",
            "shipping": "0",
            "subtotal": 0,
            "table_number": "",
            "tax": 0,
            "terminal": "",
            "tip": 0
          },
          "status" : "Authorized (Pending Settlement)",
          "transaction_type" : "Sale",
          "client_ip" : "10.0.0.1",
          "response" : {
            "conversion_rate" : 0,
            "result_code" : "A",
            "customer_key" : null,
            "transaction_key" : "abcdefgh12gqsgfq",
            "error_code" : "0",
            "is_duplicate" : 0,
            "customer_number" : "123456789",
            "avs_result_code" : "Y",
            "status" : "Pending",
            "acs_url" : null,
            "avs_result" : "Address: Match & 5 Digit Zip: Match",
            "vpas_result_code" : null,
            "result" : "Approved",
            "auth_amount" : 5000,
            "reference_number" : 1234567891,
            "converted_amount" : 0,
            "error" : "",
            "auth_code" : "123456",
            "card" : {
                "level_result" : null,
                "code_result_code" : "",
                "code_result" : "No CVV2/CVC data available for transaction.",
                "level_result_code" : null
            },
            "batch" : {
                "sequence" : 123,
                "key" : "abcdefgh12345678",
                "reference_number" : "12345678"
            },
            "status_code" : "P",
            "converted_amount_currency" : ""
          },
          "user" : ""
      }
    },
}

# Ach Transaction

{
    "id" : "tx_d7c440889f971508d6f21ca6b0274b44",
    "batch_number" : "12345",
    "amount" : 5000,
    "submitted_date" : 1610031662, # Timestamp
    "payment_method_details" : {
        "type" : "ACH",
        "ach" : {
          "account_type" : "Checking",
          "check_number" : null,
          "return_code" : null,
          "last4" : "XXXXX1234",
          "drivers_licence" : null,
          "processed_date" : null,
          "sec_code" : null,
          "drivers_licence_state" : null,
          "effective_date" : 1610064000,
          "addenda" : null,
          "routing_number" : "XXXXX1234",
          "ssn" : null,
          "returned_date" : null,
          "return_reason" : null,
          "settled_date" : null
        }
    },
    "shipping_details" : {
      "company" : null,
      "phone" : null,
      "fax" : null,
      "address" : {
          "state" : null,
          "line1" : null,
          "city" : null,
          "country" : null,
          "line2" : null,
          "postal_code" : null
      },
      "last_name" : null,
      "email" : null,
      "first_name" : null
    },
    "billing_details" : {
      "email" : null,
      "first_name" : "Jon",
      "company" : null,
      "phone" : null,
      "fax" : null,
      "address" : {
          "postal_code" : "10001",
          "country" : null,
          "line2" : "5th Ave",
          "city" : "New York",
          "line1" : "5th Ave New York",
          "state" : "NY"
      },
      "last_name" : "Doe"
    },
    "gateway" : {
      "usaepay" : {
          "account_holder" : "Jon Doe",
          "check" : {
            "ssn" : "",
            "drivers_license" : "XXXXX",
            "account" : "XXXXX1234",
            "routing" : "XXXXX1234",
            "record_type" : "WEB",
            "check_number" : null,
            "account_type" : "Checking",
            "drivers_license_state" : ""
         },
         "check_trace" : {
            "return_code" : null,
            "reason" : null,
            "bank_note" : null,
            "status" : "Pending",
            "settled_date" : null,
            "returned_date" : null,
            "processed_date" : null,
            "effective_date" : "2021-01-08 00:00:00",
            "tracking_number" : "1234567891234",
            "status_code" : "P"
         },
          "customer_id" : "123456",
          "value_type" : "Sale",
          "shipping_address" : {
            "phone" : null,
            "company" : null,
            "address" : {
                "postal_code" : null,
                "line1" : null,
                "state" : null,
                "country" : null,
                "line2" : null,
                "city" : null
            },
            "last_name" : null,
            "fax" : null,
            "first_name" : null,
            "email" : null
          },
          "billing_details" : {
            "email" : null,
            "first_name" : "Jon",
            "company" : null,
            "phone" : null,
            "fax" : null,
            "address" : {
                "postal_code" : "10001",
                "country" : null,
                "line2" : "5th Ave",
                "city" : "New York",
                "line1" : "5th Ave New York",
                "state" : "NY"
            },
            "last_name" : "Doe"
          },
          "custom_fields" : {
            // Any custom fields returned from usaepay
          },
          "submitted_date" : "2021-01-07 15:01:02",
          "payment_method" : "Card",
          "source" : "TARCS",
          "server_ip" : "10.10.12.12",
          "detail" : {
            "clerk": "",
            "currency": "",
            "description": "Description",
            "comments": "",
            "discount": 0,
            "invoice": "123456789",
            "non_tax": 0,
            "order_id": "",
            "purchase_order_number": "",
            "shipping": "0",
            "subtotal": 0,
            "table_number": "",
            "tax": 0,
            "terminal": "",
            "tip": 0
          },
          "status" : "Authorized (Pending Settlement)",
          "transaction_type" : "Sale",
          "client_ip" : "10.0.0.1",
          "response" : {
            "conversion_rate" : 0,
            "result_code" : "A",
            "customer_key" : null,
            "transaction_key" : "abcdefgh12gqsgfq",
            "error_code" : "0",
            "is_duplicate" : 0,
            "customer_number" : "123456789",
            "avs_result_code" : "Y",
            "status" : "Pending",
            "acs_url" : null,
            "avs_result" : "Address: Match & 5 Digit Zip: Match",
            "vpas_result_code" : null,
            "result" : "Approved",
            "auth_amount" : 5000,
            "reference_number" : 1234567891,
            "converted_amount" : 0,
            "error" : "",
            "auth_code" : "123456",
            "card" : {
                "level_result" : null,
                "code_result_code" : "",
                "code_result" : "No CVV2/CVC data available for transaction.",
                "level_result_code" : null
            },
            "batch" : {
                "sequence" : 123,
                "key" : "abcdefgh12345678",
                "reference_number" : "12345678"
            },
            "status_code" : "P",
            "converted_amount_currency" : ""
          },
          "user" : ""
      }
    },
}