Skip to content

Releases: square/square-java-sdk

Version 9.1.0.20210317

17 Mar 21:59
376208d
Compare
Choose a tag to compare

Version 9.1.0.20210317 (2021-03-17)

Existing API updates

  • Payments API:

    • CreatePayment. Until now, the CreatePayment endpoint supported only taking card payments. In this release, the API now supports cash and external payments. For more information, see Take Payments.
    • UpdatePayment. This new endpoint enables developers to change the payment amount and tip amount after a payment is created. For more information, see Update Payments.
  • Invoices API:

    • InvoiceDeliveryMethod enum. Added the read-only SMS value.
    • InvoiceRequestMethod enum (deprecated). Added the read-only SMS, SMS_CHARGE_CARD_ON_FILE, and SMS_CHARGE_BANK_ON_FILE values for backward compatibility.

    These values direct Square to send invoices and receipts to customers using SMS (text message). SMS settings can be configured from first-party Square applications only; they cannot be configured from the Invoices API. Square does not send invoice reminders when using SMS to communicate with customers.

  • Terminal API:

    • TerminalCheckout. Previously, TerminalCheckout only supported tapped, dipped, or swiped credit cards. It now supports manual card entry and e-money. Added the payment_type field to denote a request for a manually entered payment card or an e-money payment.
    • TerminalCheckoutPaymentType. A new enum for the Terminal checkout payment types that can be requested.
    • E-money support is now available for Terminal checkout requests in Japan.

SDKs

  • Square Java SDK:
    • Updated the OkHttp dependency to version 4.9.0.
    • Fixed a NullPointerException when passing an empty order ID to the UpdateOrder method.

Documentation updates

  • Multi-language code examples. Previously, various topics showed only cURL examples for the REST API operations. These topics now show examples in multiple languages. You can use the language drop-down list to choose a language.

  • When to Use Connect V1. Content is revised to reflect the most current information about when to use the Con

Version 9.0.0.20210226

26 Feb 18:50
6e02e77
Compare
Choose a tag to compare

Version 9.0.0.20210226 (2021-02-26)

Existing API updates

  • Customers API:

  • Orders API:

    • CreateOrder. Removed the location_id field from the request. It was an unused field.
  • Payments API:

  • v1 Items API:

  • v1 Employees.Timecards:

    • The following endpoints are retired:
      • CreateTimecard: Use the Square Labor API CreateShift endpoint.
      • DeleteTimecard: Use the Square Labor API DeleteShift endpoint.
      • ListTimecards: Use the Square Labor API SearchShift endpoint.
      • RetrieveTimecards: Use the Square Labor API GetShift endpoint.
      • UpdateTimecard: Use the Square Labor API UpdateShift endpoint.
      • ListTimecardEvents: No direct replacement. To learn about replacing the v1 functionality, see the migration guide.
  • v1 Employees.CashDrawers:

    • The following endpoints are retired:
  • v1 Transactions.BankAccounts:

    • The following endpoints are retired:
      • ListBankAccounts: Use the Square Bank Accounts API ListBankAccounts endpoint.
      • RetrieveBankAccount: Use the Square Bank Accounts API GetBankAccount endpoint.

SDKs

  • All Square SDKs:

    By default, all SDKs send requests to Square's production (https://connect.squareup.com) or sandbox (https://connect.squareupsandbox.com) hosts based on the client's environment parameter.

    You now have the option to use a custom URL instead. To use a custom URL, follow the example for your language to set the environment parameter to custom and the customUrl parameter to your URL:

    • Java

      new SquareClient.Builder()
        .environment(Environment.CUSTOM)
        .customUrl("https://example.com")
    • .NET

      new Square.SquareClient.Builder()
        .Environment(Environment.Custom)
        .CustomUrl("https://example.com")
    • Node.js

      new Client({
        environment: Environment.Custom,
        customUrl: 'https://example.com'
      });
    • PHP

      new Square\SquareClient([
        'environment' => Environment::CUSTOM,
        'customUrl' => 'https://example.com',
      ]);
    • Python

      Client(
        environment = 'custom',
        custom_url = 'https://example.com',)
    • Ruby

      Square::Client.new(
        environment: 'custom',
        custom_url: 'https://example.com'
      });
  • Square .NET SDK:

    Square has overridden the Equals and GetHashCode methods for models:

    • In the Equals override, Square has implemented a field-level comparison.
    • The Square GetHashCode override now ensures that hashes are deterministic and unique for each object.
  • Square Node.js SDK:

    Endpoints that return 64-bit integers now return a BigInt object instead of a Number object.

  • Connect Node.js SDK: (deprecated)

    The deprecated Connect Node.js SDK is in the security maintenance state. It does not receive any bug fixes or API updates from the Square version 2021-02-26 release. However, the SDK will receive support and security patches until it is retired (end of life) in the second quarter of 2021. For more information, including steps for migrating to the Square Node.js SDK, see the Connect SDK README.

Documentation updates

  • Catalog API:

  • Inventory API:

  • Get Started topic. Revised the Get Started experience. In addition to clarifications, it now includes the use of the Square Sandbox and API Explorer. These are the tools and environments developers use to explore

Version 8.1.0.20210121

21 Jan 19:13
be8c615
Compare
Choose a tag to compare

Version 8.1.0.20210121 (2021-01-21T00:00)

Existing API updates

  • Invoices API: (beta)

    The InvoicePaymentRequest.request_method field is deprecated, and its current options are separated into two new fields that better represent their scope:

    • Invoice.delivery_method specifies how Square should send invoices, reminders, and receipts to the customer.
    • InvoicePaymentRequest.automatic_payment_source specifies the payment method for an automatic payment.

    As part of this change, the InvoiceDeliveryMethod and InvoiceAutomaticPaymentSource enums are added and the InvoiceRequestMethod enum is deprecated.

    The Invoices API will continue to accept request_method in create and update requests until the field is retired, but starting in this version, request_method is not included in returned Invoice objects. For more information, see the migration notes.

  • Locations API:

SDKs

  • Connect Node.js SDK: (deprecated)

    The deprecated Connect Node.js SDK is in the security maintenance state. It will not receive any bug fixes or API updates from the Square version 2021-01-21 release. However, the SDK will receive support and security patches until it is retired (EOL) in Q2, 2021. For more information, including steps for migrating to the Square Node.js SDK, see the Connect SDK README.

Documentation updates

  • Catalog API:

  • Inventory API:

    • The Inventory API content is updated. It provides clearer guidance about how to use the API, with a task-oriented TOC and improved cod

Version 8.0.0.20201216

16 Dec 18:29
0fe8a7a
Compare
Choose a tag to compare

Version 8.0.0.20201216 (2020-12-16T00:00)

Existing API updates

New SDK release

Documentation updates

Version 7.0.0.20201118

18 Nov 18:46
4a16584
Compare
Choose a tag to compare

New API releases

  • Bookings API (beta). This API enables you, as an application developer, to create applications to set up and manage bookings for appointments of fixed duration in which selected staff members of a Square seller provide specified services in supported locations for particular customers.

Existing API updates

  • Payments API:
    • Payment. The object now includes the risk_evaluation field to identify the Square-assigned risk level associated with the payment. Sellers can use this information to provide the goods and services or refund the payment.

New SDK release

Documentation Updates

Version 6.5.0.20201028

28 Oct 19:14
1069b6d
Compare
Choose a tag to compare

Version 6.5.0.20201028 (2020-10-28T00:00)

Existing API updates

Version 6.4.0.20200923 (2020-09-23)

23 Sep 18:46
99b29df
Compare
Choose a tag to compare

Existing API updates

  • Invoices API (beta)
    • InvoiceStatus enum. Added the PAYMENT_PENDING value. Previously, the Invoices API returned a PAID or PARTIALLY_PAID status for invoices in a payment pending state. Now, the Invoices API returns a PAYMENT_PENDING status for all invoices in a payment pending state, including those previously returned as PAID or PARTIALLY_PAID.
  • Payments API
    • ListPayment. The endpoint now supports the limit parameter.
  • Refunds API
  • DeviceDetails. The object now includes the device_installation_id field.

Documentation updates

  • Payment status. Added details about the Payment.status changes and how the status relates to the seller receiving the funds.
  • Refund status. Added details about the PaymentRefund.status changes and how the status relates to the cardholder receiving the funds.
  • CreateRefund errors. Added documentation for the REFUND_DECLINED error code.

Version 6.3.0.20200826 (2020-08-26)

26 Aug 16:27
39fef0d
Compare
Choose a tag to compare

Existing API updates

  • Orders API
    • Order object. The total_tip_money field is now GA.
    • CreateOrder, UpdateOrder, and BatchRetrieveOrders. These APIs now support merchant-scoped endpoints (for example, the CreateOrder endpoint POST /v2/orders). The location-scoped variants of these endpoints (for example, the CreateOrder endpoint POST /v2/locations/{location_id}/orders) continue to work, but these endpoints are now deprecated. You should use the merchant-scoped endpoints (you provide the location information in the request body).
  • Labor API
    • Migrate from Employees to Team Members. The Employees API is now deprecated in this release. Accordingly, update references to the Shift.employee_id field to the Shift.team_member_id field of the Labor API.
  • v2 Employees API (deprecated)
  • v1 Employees API (deprecated)

Documentation updates

  • Point of Sale API
  • Team API
    • Team API Overview. Documented the limitation related to creating a team member in the Square Sandbox.

All SDKs

SDK technical reference documentation:

  • Nulls in SDK documentation example code are replaced with example values.

.NET SDK

Bug fixes:

  • The APIException.Errors property was not set on instantiation. Behavior is now corrected to instantiate the class with an empty Errors list.

Version 6.2.0.20200812 (2020-08-12)

12 Aug 16:59
255183b
Compare
Choose a tag to compare

API releases

Existing API updates

SqPaymentForm SDK updates

Documentation updates

Version 6.1.0.20200722 (2020-07-22)

22 Jul 16:57
85f3485
Compare
Choose a tag to compare

API releases

Existing API updates

  • Catalog API

  • Locations API

  • Merchants API

  • Orders API

    • PricingOptions. You can now enable the auto_apply_discounts of the options to have rule-based discounts automatically applied to an Order that is pre-configured with a pricing rule.
  • Inventory API

    • Replaced 500 error on max string length exceeded with a max length error message. Max length attribute added to string type fields.
  • Terminal API (beta)

    • TerminalCheckout object. The TerminalCheckoutCancelReason field is renamed to ActionCancelReason.

Documentation updates