x

TransactionList API - SQ Java SDK does not seem to capture sales-tax information in transactions?

I am exploring the Square Connect APIs to pull all the transactions (e.g. payments, orders, refunds etc). As part of that I notice that there is java sdk/client-libraries available as well, which is great!.

 

But one issue I notice is that the java sdk does not expose any of the sales-tax information (e.g. sales tax rate, sales tax amount etc) in the models for transaction or Tender, or in any related model objects. Is that true?. The sales tax information seems to be only accessible via the v1 REST api (e.g. payments end-point)?. Any information in this regard would be helpful. I want to retrieve all transactions for a location, with sales tax information for each transaction, preferably via the java SDK.

2,094 Views
Message 1 of 4
Report
1 Best Answer
Alumni

Best Answer

2.1 went live today! 

 

https://github.com/square/connect-java-sdk

 

We are still working on getting feature parity for the v1 and v2 endpoints. If you need information in the v1 response, I would keep using the v1 APIs and page through via date, or page token depending on your use case. 

View Best Answer >

2,324 Views
Message 4 of 4
Report
3 REPLIES 3
Alumni

Glad you like the Java SDK (we just released it!) 

 

We are actively working on getting v1 endpoints into the SDK, in fact, you can use the  release/2.1.0 branch to use them today! We are still inspecting this update for any possible bugs, so please let us know if you have any problems. You can see the branch here: 

https://github.com/square/connect-java-sdk/tree/release/2.1.0. 

2,078 Views
Message 2 of 4
Report

Thanks @tristansokol for the follow-up, and providing details on the upcoming SDK. BTW, when is the release/2.1.0 SDK planned for official release?.

 

Also, outside of the SDK use -- I also wanted to ask about the best way to obtain detailed TransactionList, which includes information on Sales Tax amount/charge breakdown, Discount amount, Tip amount etc. I see FAQ mentions Connect API V2 provides APIs for retrieving merchant's transaction history (e.g. payment and refunds), but I notice that the V2 ListTransaction or RetrieveTransaction API does NOT provide much detail/breakdown of the transaction, and only gives 3 to 4 attributes when it comes to the amounts breakdown, and none of those attributes includes sales tax charged amount details (see output below). The fields provided are e.g. "amount_money", "processing_fee_money", "cash_details.buyer_tendered_money", "cash_details.change_back_money".

 

Whereas the V1 transaction related API (e.g. /v1/{location_id}/payments) does provide a more detailed breakdown of the transaction, with attribute as "tax_money", "additive_tax_money", "inclusive_tax_money", "discount_money", "total_collected_money", "gross_sales_money" and so on, which is what I am looking for (see output below).

 

Couple of questions I have are:

 

 # Curious why the V2 version of the ListTransaction or RetrieveTransaction API not provide those details?, and more importantly, if in the near future, they would be included?. I ask, because we are in very early phase of our integration, and would like to use the latest and greatest of the Connect APIs, so as to avoid having the refactor later.

 # In our Square integration app, we want to retrieve all transactions (for a certain period) with detail breakdown of all the charged amounts, mainly the sales tax charged/breakdown. Would V1 version of the APIs (e.g. /v1/{location_id}/payments, /v1/{location_id}/refunds) the way to go for us?, or you have any suggestions on any alternative Connect V2 APIs, which can be used to achieve the purpose?.

 

Thanks in advance,

 

For Reference - Below is the transaction detail from both /V1 and /V2 Transaction apis 

==========================================================================

 

Output from /v1/{location_id}/payments API

{
    "id": "xxx1313123",
    "merchant_id": "xx123123132",
    "creator_id": "asdfsdafa12313",
    "created_at": "2017-05-22T23:53:04Z",
    "device": {
      "id": "DEVICE_INSTALLATION_ID:abc123",
      "name": "Test Device Name"
    },
    "payment_url": "https://squareup.com/dashboard/sales/transactions/sadfasfasdfasfd",
    "receipt_url": "https://squareup.com/receipt/preview/asdfasfdasfasf",
    "inclusive_tax_money": {
      "amount": 0,
      "currency_code": "USD"
    },
    "additive_tax_money": {
      "amount": 1000,
      "currency_code": "USD"
    },
    "tax_money": {
      "amount": 1000,
      "currency_code": "USD"
    },
    "tip_money": {
      "amount": 0,
      "currency_code": "USD"
    },
    "discount_money": {
      "amount": 0,
      "currency_code": "USD"
    },
    "total_collected_money": {
      "amount": 11000,
      "currency_code": "USD"
    },
    "processing_fee_money": {
      "amount": 0,
      "currency_code": "USD"
    },
    "net_total_money": {
      "amount": 11000,
      "currency_code": "USD"
    },
    "refunded_money": {
      "amount": 0,
      "currency_code": "USD"
    },
    "gross_sales_money": {
      "amount": 10000,
      "currency_code": "USD"
    },
    "net_sales_money": {
      "amount": 10000,
      "currency_code": "USD"
    },
    "inclusive_tax": [],
    "additive_tax": [
      {
        "name": "TestTax",
        "rate": "0.10000000",
        "inclusion_type": "ADDITIVE",
        "applied_money": {
          "amount": 1000,
          "currency_code": "USD"
        },
        "fee_id": "asdfasfdsafdaf"
      }
    ],
    "tender": [
      {
        "type": "CASH",
        "name": "Cash",
        "id": "sdfasfsafasfd",
        "total_money": {
          "amount": 11000,
          "currency_code": "USD"
        },
        "tendered_money": {
          "amount": 11000,
          "currency_code": "USD"
        },
        "change_back_money": {
          "amount": 0,
          "currency_code": "USD"
        },
        "refunded_money": {
          "amount": 0,
          "currency_code": "USD"
        },
        "receipt_url": "https://squareup.com/receipt/preview/sadfasfsafasf"
      }
    ],
    "refunds": [],
    "itemizations": [
      {
        "name": "Custom Amount",
        "quantity": "1.00000000",
        "item_detail": {
          "category_name": "",
          "sku": ""
        },
        "itemization_type": "CUSTOM_AMOUNT",
        "total_money": {
          "amount": 11000,
          "currency_code": "USD"
        },
        "single_quantity_money": {
          "amount": 10000,
          "currency_code": "USD"
        },
        "gross_sales_money": {
          "amount": 10000,
          "currency_code": "USD"
        },
        "discount_money": {
          "amount": 0,
          "currency_code": "USD"
        },
        "net_sales_money": {
          "amount": 10000,
          "currency_code": "USD"
        },
        "taxes": [
          {
            "name": "TestTax",
            "rate": "0.10000000",
            "inclusion_type": "ADDITIVE",
            "applied_money": {
              "amount": 1000,
              "currency_code": "USD"
            },
            "fee_id": "asdfasfdsafasdf"
          }
        ],
        "discounts": [],
        "modifiers": []
      }
    ]
  }

 

Output from /v2/locations/{location_id}/transactions/{transaction_id} API

 

{
  "transaction": {
    "id": "asdfasfdasfasfsaf",
    "location_id": "asdfasfasddfsafd",
    "created_at": "2017-05-23T00:24:26Z",
    "tenders": [
      {
        "id": "asdfasfddsafasfd123123",
        "location_id": "asdfasfasdfsaf",
        "transaction_id": "asdfasfsadfasdf",
        "created_at": "2017-05-23T00:24:24Z",
        "amount_money": {
          "amount": 5500,
          "currency": "USD"
        },
        "processing_fee_money": {
          "amount": 0,
          "currency": "USD"
        },
        "type": "CASH",
        "cash_details": {
          "buyer_tendered_money": {
            "amount": 5500,
            "currency": "USD"
          },
          "change_back_money": {
            "amount": 0,
            "currency": "USD"
          }
        }
      }
    ],
    "product": "REGISTER",
    "client_id": "asdfaasdf0-sdfasdf-asdfasfd-dfsasaf-1231313asdfasf"
  }
}
2,041 Views
Message 3 of 4
Report
Alumni

Best Answer

2.1 went live today! 

 

https://github.com/square/connect-java-sdk

 

We are still working on getting feature parity for the v1 and v2 endpoints. If you need information in the v1 response, I would keep using the v1 APIs and page through via date, or page token depending on your use case. 

2,325 Views
Message 4 of 4
Report