Version 9.0.0.20210226 (2021-02-26)
Existing API updates
-
Customers API:
- New webhooks (beta). Square now sends notifications for the following events:
-
Orders API:
- CreateOrder. Removed the
location_id
field from the request. It was an unused field.
- CreateOrder. Removed the
-
Payments API:
- Payment. This type now returns the
card_payment_timeline
(CardPaymentTimeline) as part of thecard_details
field.
- Payment. This type now returns the
-
v1 Items API:
- The following endpoints are retired:
AdjustInventory
: Use the Square Inventory API BatchChangeInventory endpoint.ListInventory
: Use the Square Inventory API BatchRetrieveInventoryCounts endpoint.
- The following endpoints are retired:
-
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.
- The following endpoints are retired:
-
v1 Employees.CashDrawers:
- The following endpoints are retired:
ListCashDrawerShifts
: Use the Square CashDrawerShifts API ListCashDrawerShifts endpoint.RetrieveCashDrawerShift
: Use the Square CashDrawerShifts API RetrieveCashDrawerShift endpoint.
- 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.
- The following endpoints are retired:
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 tocustom
and thecustomUrl
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
andGetHashCode
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.
- In the
-
Square Node.js SDK:
Endpoints that return 64-bit integers now return a
BigInt
object instead of aNumber
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:
- Update Catalog Objects. Provides programming guidance to update catalog objects.
-
Inventory API:
- List or retrieve inventory. Migrate the retired v1 endpoint of
ListInventory
to the v2 endpoint ofBatchRetrieveInventoryCounts
. Compare and contrast the programming patterns between the v1 endpoint ofListInventory
and its v2 counterparts of BatchRetrieveInventoryCounts or RetrieveInventoryCount. - Adjust or change inventory. Migrate the retired v1 endpoint of
AdjustInventory
to the v2 endpoint ofBatchChangeInventory
. Compare and contrast the programming patterns between the v1 endpoint ofAdjustInventory
and its v2 counterparts of BatchChangeInventory.
- List or retrieve inventory. Migrate the retired v1 endpoint of
-
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