Skip to content

Releases: square/square-nodejs-sdk

Version 9.1.0

17 Mar 21:59
932b83a
Compare
Choose a tag to compare

Version 9.1.0 (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

26 Feb 18:50
6276ce6
Compare
Choose a tag to compare

Version 9.0.0 (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.1

28 Jan 01:09
40ec3ef
Compare
Choose a tag to compare

Version 8.1.1 (2021-01-27T00:00)

SDKs

  • Fixed Node.js test testCreateInvoice. Uses Invoice.delivery_method instead of deprecated field InvoicePaymentRequest.request_method

Version 8.1.0

21 Jan 19:13
1010a56
Compare
Choose a tag to compare

Version (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

16 Dec 18:29
b7d0d21
Compare
Choose a tag to compare

Version (2020-12-16T00:00)

Existing API updates

New SDK release

Documentation updates

Version 7.0.0

18 Nov 18:48
141a321
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