# Square Corner Blog - Medium

Buying and selling sound like simple things - and they should be. Somewhere along the way, they got complicated. At Square, we're working hard to make commerce easy for everyone. - Medium

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## The Corner Round-up June 2020

DevFeed: [The Corner Round-up June 2020](<https://devfeed.tech/articles/the-corner-round-up-june-2020-27019.md>)

Original publisher: [Read original article](<https://medium.com/square-corner-blog/the-corner-round-up-june-2020-5f0eaa1d341e?source=rss----3650599ae4e2---4>)

Author: Richard Moot

Published: 2020-06-30T22:59:20Z

Content type: article

Language: en

Sources: [Square Corner Blog - Medium](<https://devfeed.tech/sources/square-corner-blog-medium.md>)

Topics: [API](<https://devfeed.tech/topics/api.md>), [Dependency injection](<https://devfeed.tech/topics/dependency-injection.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [Dagger](<https://devfeed.tech/topics/dagger.md>), [Kubernetes](<https://devfeed.tech/topics/kubernetes.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [apis](<https://devfeed.tech/tags/apis.md>), [cloud](<https://devfeed.tech/tags/cloud.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [dagger-2](<https://devfeed.tech/tags/dagger-2.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [payments](<https://devfeed.tech/tags/payments.md>), [pos](<https://devfeed.tech/tags/pos.md>), [security](<https://devfeed.tech/tags/security.md>)

### AI overview

The Corner Round-up June 2020 recaps selected publications from Square's developer blog. It covers the Square Team API, the Hephaestus open source compiler plugin for Dagger 2, API Explorer's move from beta to general availability, Kubernetes pod security guidance, Loyalty and Customers APIs, and the Square Terminal API beta.

### Source excerpt

In order to keep some of the followers still here on Medium, we wanted to provide a quick recap on some of the things that have been published over at The Corner Blog's new home https://developer.squareup.com/blog (in case you didn't know that already). We'll just be doing a quick summary of each new thing, but you can check out each topic in detail over at our new home. Manage Team Data from Any Platform with Square Team API We released a new Team API to allow managing Team data from any platform. You can track and edit large volumes of team member data automatically and synchronize data with any third-party platform in real time! Introducing Hephaestus In order to make dependency injection with Dagger 2 easier, we had created Hephaestus. It is an open source compiler plugin that automatically merges Dagger modules and component interfaces to make development more enjoyable. API Explorer Moves to General Availability The Square Developer team also transitioned the API Explorer from Beta to GA, bringing with it a lot of improvements to make testing Square APIs much more enjoyable and easy. Kubernetes - Pod Security Policies The cloud team at Square also did a write-up that provides some useful guidance and examples for handling Pod Security in Kubernetes. Reward Customers Wherever They Shop with Loyalty API and Customers API Additionally, Square Loyalty now has an API to make providing rewards to customers on other platforms. Using the Customers API and Loyalty API in combination can allow any developer to create a great rewards system, no matter where their customers are. Announcing Square Terminal API Beta Finally, we also released Terminal API, which lets you programmatically take payments using Square Terminal. This API allows developers to connect Square Terminal, an all-in-one card payments device, to their custom-built POS systems, no matter which platforms or operating systems they're developed on. Now that isn't everything that we've published since you've

## Introducing PySurvival

DevFeed: [Introducing PySurvival](<https://devfeed.tech/articles/introducing-pysurvival-27014.md>)

Original publisher: [Read original article](<https://medium.com/square-corner-blog/introducing-pysurvival-5a274b072381?source=rss----3650599ae4e2---4>)

Author: sfotso

Published: 2019-04-12T21:06:21Z

Content type: article

Language: en

Sources: [Square Corner Blog - Medium](<https://devfeed.tech/sources/square-corner-blog-medium.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [Data analysis](<https://devfeed.tech/topics/data-analysis.md>), [NumPy](<https://devfeed.tech/topics/numpy.md>), [PyTorch](<https://devfeed.tech/topics/pytorch.md>), [SciPy](<https://devfeed.tech/topics/scipy.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [article](<https://devfeed.tech/tags/article.md>), [data-analysis](<https://devfeed.tech/tags/data-analysis.md>), [data-science](<https://devfeed.tech/tags/data-science.md>), [deep-learning](<https://devfeed.tech/tags/deep-learning.md>), [machine-learning](<https://devfeed.tech/tags/machine-learning.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [performance-metrics](<https://devfeed.tech/tags/performance-metrics.md>), [python](<https://devfeed.tech/tags/python.md>), [pytorch](<https://devfeed.tech/tags/pytorch.md>), [survival-analysis](<https://devfeed.tech/tags/survival-analysis.md>), [tutorials](<https://devfeed.tech/tags/tutorials.md>)

### AI overview

Square introduces PySurvival, an open source Python package for survival analysis modeling. The article describes its models, theory summaries, API documentation, examples, tutorials, performance metrics, and model loading and saving features.

### Source excerpt

Heads up, we've moved! If you'd like to continue keeping up with the latest technical content from Square please visit us at our new home https://developer.squareup.com/blogPySurvival is an open source python package for Survival Analysis modeling. Today, we're excited to introduce PySurvival, a python package for Survival Analysis modeling. This article is the first installment in a four part series, which will include tutorials designed to demonstrate how to easily make the most of the package. You can also find these tutorials on the official website: Churn modeling Predictive maintenance Credit risk PySurvival LogoWhat is PySurvival ? PySurvival is an open source python package for Survival Analysis modeling -- the modeling concept used to analyze or predict when an event is likely to happen. It is built on top the most commonly used machine learning packages: NumPy, SciPy, and PyTorch. PySurvival provides a very easy way to navigate between theoretical knowledge on Survival Analysis and detailed tutorials on how to conduct a full analysis, as well as build and use a model. The package contains: 10+ models ranging from the Cox Proportional Hazard model and the Neural Multi-Task Logistic Regression, to Random Survival Forest Summaries of the theory behind each model as well as API descriptions and examples Detailed tutorials on how to perform exploratory data analysis, survival modeling, cross-validation and prediction, for churn modeling and credit risk, for example Performance metrics to assess the models' abilities like c-index or brier score Simple ways to load and save models Installation If you have already installed a working version of gcc, the easiest way to install Pysurvival is using pip. pip install pysurvival The complete installation steps can be found here. Introduction to Survival analysisWhat is Survival Analysis ? Survival analysis is used to analyze or predict when an event is likely to happen. It originated in medical research, but its use has

## Zooming Out From Engineering

DevFeed: [Zooming Out From Engineering](<https://devfeed.tech/articles/zooming-out-from-engineering-27022.md>)

Original publisher: [Read original article](<https://medium.com/square-corner-blog/zooming-out-from-engineering-dc75c1509fa2?source=rss----3650599ae4e2---4>)

Author: Square Engineering

Published: 2019-04-11T17:24:50Z

Content type: opinion

Language: en

Sources: [Square Corner Blog - Medium](<https://devfeed.tech/sources/square-corner-blog-medium.md>)

Topics: [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>), [Development](<https://devfeed.tech/topics/development.md>), [Microsoft](<https://devfeed.tech/topics/microsoft.md>), [Amazon S3](<https://devfeed.tech/topics/amazon-s3.md>)

Tags: [advice](<https://devfeed.tech/tags/advice.md>), [career](<https://devfeed.tech/tags/career.md>), [communication](<https://devfeed.tech/tags/communication.md>), [cross-functional-teams](<https://devfeed.tech/tags/cross-functional-teams.md>), [culture](<https://devfeed.tech/tags/culture.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [engineering-mangement](<https://devfeed.tech/tags/engineering-mangement.md>), [leadership](<https://devfeed.tech/tags/leadership.md>), [management](<https://devfeed.tech/tags/management.md>), [organization](<https://devfeed.tech/tags/organization.md>), [scale](<https://devfeed.tech/tags/scale.md>), [teams](<https://devfeed.tech/tags/teams.md>), [tech-industry](<https://devfeed.tech/tags/tech-industry.md>), [work](<https://devfeed.tech/tags/work.md>)

### AI overview

An edited fireside discussion with Square engineering leader Alyssa Henry about leading organizations as they scale. It covers communication, giving employees autonomy, mastery, and purpose, building company culture, and managing cross-functional teams.

### Source excerpt

As originally seen on Greylock Partners' blog, here are some insights on leadership, career development, and building teams at scale that Square's Head of Seller, Alyssa Henry, shared during the 2019 SFELC Summit.Square's Head of Seller & Developer Business Units & Infrastructure Engineering, Alyssa HenryHeads up, we've moved! If you'd like to continue keeping up with the latest technical content from Square please visit us at our new home https://developer.squareup.com/blog Leading an organization of 10 employees is considerably different than leading an organization of 10,000+ employees. As teams increase and communication becomes more challenging, a lot can break down. In this episode of Greymatter, we share a fireside discussion from the 2019 SFELC Summit on building and managing scaling teams. NodeSource VP of Engineering, Chanda Dharap talks with Square's Head of Seller & Developer Business Units & Infrastructure Engineering, Alyssa Henry. Alyssa shares lessons from scaling companies at hyper-scale including Square and AWS, how to bring purpose to your employee's work, and advice for building company culture. Alyssa leads Square's cross functional teams with P&L responsibility and is working to shift Square from an app focused on payment processing to a broad financial services platform and commerce ecosystem. Prior, she led AWS Storage Services including Amazon Simple Storage Service and Amazon Glacier where she was responsible for software development and operations. Earlier in her career, Alyssa held several roles in program and product management at Microsoft. SFELC is a curated community of 2500+ engineering leaders evolving the way leadership is implemented in the tech industry. Greylock Partners is the VC partner for SFELC, and sponsored the annual SFELC Summit which hosted top industry leaders to share management best practices and leadership advice. Below is an edited transcript of key points from Dan and Aditya's fireside discussion. https://medium.c

## Spin Cycle: An orchestration framework for automating database infrastructure tasks

DevFeed: [Spin Cycle: An orchestration framework for automating database infrastructure tasks](<https://devfeed.tech/articles/spin-cycle-automating-the-tedious-27016.md>)

Original publisher: [Read original article](<https://medium.com/square-corner-blog/spin-cycle-automating-the-tedious-3f569106fd3c?source=rss----3650599ae4e2---4>)

Author: Felix Plajer

Published: 2019-04-09T18:16:58Z

Content type: article

Language: en

Sources: [Square Corner Blog - Medium](<https://devfeed.tech/sources/square-corner-blog-medium.md>)

Topics: [Orchestration](<https://devfeed.tech/topics/orchestration.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [MySQL](<https://devfeed.tech/topics/mysql.md>), [Docker](<https://devfeed.tech/topics/docker.md>), [unit tests](<https://devfeed.tech/topics/unit-tests.md>)

Tags: [automation](<https://devfeed.tech/tags/automation.md>), [code](<https://devfeed.tech/tags/code.md>), [database](<https://devfeed.tech/tags/database.md>), [databases](<https://devfeed.tech/tags/databases.md>), [docker](<https://devfeed.tech/tags/docker.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [orchestration](<https://devfeed.tech/tags/orchestration.md>), [tests](<https://devfeed.tech/tags/tests.md>)

### AI overview

Square announces the general availability of Spin Cycle, an orchestration framework its database team uses to automate infrastructure tasks such as provisioning and decommissioning database clusters, upgrading MySQL and Docker, and managing database hosts.

### Source excerpt

Spin Cycle -- Automating the TediousAn orchestration framework to automate anythingHeads up, we've moved! If you'd like to continue keeping up with the latest technical content from Square please visit us at our new home https://developer.squareup.com/blog Spin Cycle makes it easy to automate complex infrastructure tasks. The database team at Square uses it for most of our day-to-day operations -- provisioning new clusters and decommissioning old ones, upgrading MySQL and Docker, stopping and starting database hosts, and more. We've been developing and using Spin Cycle for over two years now, and today we're happy to announce its GA release. Scripts Don't Scale Before Spin Cycle, databases at Square were managed by hand. This worked, but it wasn't ideal. For example, we had a script to provision a new database cluster. This script had been used for a few years, and for the most part it served its purpose. The original engineer who wrote it designed it well enough -- it was a fully fledged program with functions and classes and unit tests. The script became a problem when other engineers needed to update it. It was difficult to add new tests when not familiar with all the code, so inevitably a lot of untested changes accrued. When the script broke it was hard to fix and even harder to make sure your fix didn't break any of the untested bits. The script was slow, running its steps serially instead of concurrently, because that was easier to develop and debug. Over time, an important business process became embedded in this tangled ball of code. Provisioning a new database wasn't a series of orderly steps anymore. Even if our script had been perfect -- tests for every new change, each step totally encapsulated -- we would have had problems. To provision 10 databases, you had to run the script 10 times in 10 windows -- hopefully an error didn't get lost in the noise. You couldn't see the arguments someone else passed in and what output they got back, let alone look at past ru

## Announcing Our Connect v2 Labor API

DevFeed: [Announcing Our Connect v2 Labor API](<https://devfeed.tech/articles/announcing-our-connect-v2-labor-api-27013.md>)

Original publisher: [Read original article](<https://medium.com/square-corner-blog/announcing-our-connect-v2-labor-api-1e1f26c99f7f?source=rss----3650599ae4e2---4>)

Author: Dina Spitzer

Published: 2019-04-04T21:38:53Z

Content type: release

Language: en

Sources: [Square Corner Blog - Medium](<https://devfeed.tech/sources/square-corner-blog-medium.md>)

Topics: [API](<https://devfeed.tech/topics/api.md>), [data](<https://devfeed.tech/topics/data.md>), [import](<https://devfeed.tech/topics/import.md>), [Job](<https://devfeed.tech/topics/job.md>)

Tags: [announce](<https://devfeed.tech/tags/announce.md>), [api](<https://devfeed.tech/tags/api.md>), [blog](<https://devfeed.tech/tags/blog.md>), [business](<https://devfeed.tech/tags/business.md>), [data](<https://devfeed.tech/tags/data.md>), [developer](<https://devfeed.tech/tags/developer.md>), [employment](<https://devfeed.tech/tags/employment.md>), [import](<https://devfeed.tech/tags/import.md>), [integrations](<https://devfeed.tech/tags/integrations.md>), [job](<https://devfeed.tech/tags/job.md>), [release](<https://devfeed.tech/tags/release.md>), [scheduling](<https://devfeed.tech/tags/scheduling.md>), [search](<https://devfeed.tech/tags/search.md>), [web-development](<https://devfeed.tech/tags/web-development.md>)

### AI overview

Square announces the release of the Connect v2 Labor API, renamed from the Timecard API. The release adds functionality for employee shifts, break tracking, multiple jobs and wages, labor data import/export, and shift search.

### Source excerpt

Capture employee working hours with breaks and hourly pay rateHeads up, we've moved! If you'd like to continue keeping up with the latest technical content from Square please visit us at our new home https://developer.squareup.com/blog We're very excited to announce the release of the Square Connect v2 Labor API. Having visibility into daily employee operations and labor costs is a critical part of managing a business. It helps business owners better understand the performance of their business, employees, and ultimately make more informed & cost-effective staffing decisions. With the Labor API, partners can build stronger, more accurate, and more comprehensive labor management integrations on behalf of our shared customers. To highlight the changes and additional functionality recently implemented (i.e. break tracking, multiple wages, etc...), we updated the name from Timecard API to Labor API. The new name better aligns with the breadth of labor management functionalities our partners can power with the Labor API. You can more easily manage employee's hours, breaks, shift wages, and import/export labor data. How to create a Shift (including break and wage information):https://medium.com/media/281fb8863abf67cb66c58e404143445e/hrefHow to query a set of closed shifts from a workweek:https://medium.com/media/b15dbea66bdaaf0f8f8a3a6a6cf48d29/href You will find below a list of functionalities we implemented with this release: Employee shifts: View/create shifts worked by any employee, including the business location where the shift was worked, shift start/end times, and regular, overtime, and double time hours worked during the shift. Employee break tracking: Track employee breaks over the course of a worked shift, including break start/end times, durations, and whether they were paid/unpaid. Employee job tracking: View/edit the job (and wage) worked by an employee for any given shift, including the ability for one employee to have multiple jobs (and wages). Search: Searc

## The Road to an Envoy Service Mesh

DevFeed: [The Road to an Envoy Service Mesh](<https://devfeed.tech/articles/the-road-to-an-envoy-service-mesh-27020.md>)

Original publisher: [Read original article](<https://medium.com/square-corner-blog/the-road-to-an-envoy-service-mesh-d1a51cbd31dd?source=rss----3650599ae4e2---4>)

Author: Snow Pettersen

Published: 2019-03-29T15:36:51Z

Content type: article

Language: en

Sources: [Square Corner Blog - Medium](<https://devfeed.tech/sources/square-corner-blog-medium.md>)

Topics: [microservices architecture](<https://devfeed.tech/topics/microservices-architecture.md>), [Architecture & Design](<https://devfeed.tech/topics/architecture-design.md>), [interoperability](<https://devfeed.tech/topics/interoperability.md>), [Remote Procedure Call (RPC)](<https://devfeed.tech/topics/rpc.md>), [Go Language](<https://devfeed.tech/topics/go-language.md>), [Java](<https://devfeed.tech/topics/java.md>), [Ruby](<https://devfeed.tech/topics/ruby.md>), [Ruby on Rails](<https://devfeed.tech/topics/ruby-on-rails.md>), [gRPC](<https://devfeed.tech/topics/grpc.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [architecture](<https://devfeed.tech/tags/architecture.md>), [automatic](<https://devfeed.tech/tags/automatic.md>), [discovery](<https://devfeed.tech/tags/discovery.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [envoy-proxy](<https://devfeed.tech/tags/envoy-proxy.md>), [failover](<https://devfeed.tech/tags/failover.md>), [go](<https://devfeed.tech/tags/go.md>), [http](<https://devfeed.tech/tags/http.md>), [interoperability](<https://devfeed.tech/tags/interoperability.md>), [java](<https://devfeed.tech/tags/java.md>), [microservices](<https://devfeed.tech/tags/microservices.md>), [microservices-architecture](<https://devfeed.tech/tags/microservices-architecture.md>), [routing](<https://devfeed.tech/tags/routing.md>), [rpc](<https://devfeed.tech/tags/rpc.md>), [ruby](<https://devfeed.tech/tags/ruby.md>), [service-mesh](<https://devfeed.tech/tags/service-mesh.md>)

### AI overview

Square describes its evolution from a Ruby on Rails monolith to a microservices architecture and explains the interoperability challenges created by its Java, Ruby, and Go stack. The article outlines its Protobuf-based Sake RPC framework, its routing, failover, traffic-shaping, and service-discovery features, and Square's migration toward a full service mesh.

### Source excerpt

Heads up, we've moved! If you'd like to continue keeping up with the latest technical content from Square please visit us at our new home https://developer.squareup.com/blog At Square we've been running a microservices architecture for years, primarily using three different languages: Java, Ruby and Go. Running such a diverse stack can make interoperability between the different languages/frameworks challenging, and in this post I'll talk about how Square has handled this in the past and where we're at today -- actively migrating towards a full service mesh. The Old World Square started off, like many other companies, just running one large monolith. For Square this was a big Ruby on Rails service, that handled everything that Square did. A monolith makes service to service communication completely unnecessary: everything runs in the same code base on a single database, so everything can be implemented without making any outbound network calls (except to third parties outside of Square). After a while, Square decided to move more towards a service oriented architecture to reduce the reliance on a single, large application. To do this Square decided to build their own Protobuf based RPC framework, inspired by Google's Stubby. This was years before gRPC was created, so there weren't any open source options at the time. This RPC framework, called Sake, was implemented for Java and Go as these were the languages used for higher availability services, while regular REST HTTP was used between services that didn't understand Sake. (Incidentally, Sake became a part of gRPC's DNA) Over time this framework became fairly sophisticated, with many features not generally available: Smart retries with automatic failover Prioritized routing based on upstream health Traffic shaping and service discovery This ended up working well, but relied on fat client/server libraries, so extending support to other languages was hard. Attempts were made to bring feature parity between languages i

## Mobile Web Performance @ Caviar

DevFeed: [Mobile Web Performance @ Caviar](<https://devfeed.tech/articles/mobile-web-performance-caviar-27015.md>)

Original publisher: [Read original article](<https://medium.com/square-corner-blog/mobile-web-performance-caviar-1a57da0cc233?source=rss----3650599ae4e2---4>)

Author: Evelyn Chan

Published: 2019-03-28T22:46:49Z

Content type: tutorial

Language: en

Sources: [Square Corner Blog - Medium](<https://devfeed.tech/sources/square-corner-blog-medium.md>)

Topics: [Mobile](<https://devfeed.tech/topics/mobile.md>), [Web](<https://devfeed.tech/topics/web.md>), [Webpack](<https://devfeed.tech/topics/webpack.md>), [Latency](<https://devfeed.tech/topics/latency.md>), [React](<https://devfeed.tech/topics/react.md>), [Rails](<https://devfeed.tech/topics/rails.md>)

Tags: [caviar](<https://devfeed.tech/tags/caviar.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [mobile-web](<https://devfeed.tech/tags/mobile-web.md>), [performance](<https://devfeed.tech/tags/performance.md>), [programming](<https://devfeed.tech/tags/programming.md>), [rails](<https://devfeed.tech/tags/rails.md>), [react](<https://devfeed.tech/tags/react.md>), [web-development](<https://devfeed.tech/tags/web-development.md>), [web-performance](<https://devfeed.tech/tags/web-performance.md>), [webpack](<https://devfeed.tech/tags/webpack.md>)

### AI overview

This article describes Caviar's effort to improve mobile web performance after recognizing that its website had been built primarily for desktop. It focuses on auditing the home page with Google Lighthouse and examining the React/Rails front-end bundle with Webpack and Webpack Bundle Analyzer.

### Source excerpt

Heads up, we've moved! If you'd like to continue keeping up with the latest technical content from Square please visit us at our new home https://developer.squareup.com/blog Across any e-commerce website, page load times are directly correlated with conversion rate. Faced with a page that takes longer than 3 seconds to load, 53% of users drop off, perhaps never to return. A 1 second delay in load time results in a 7% loss in conversions, 11% fewer page views, and 16% decrease in customer satisfaction. In terms of SEO, slow page speeds also impact indexing algorithms, which hurt crawl efficiency and leads to fewer pages being indexed. For consumers on mobile, slow speeds are even more painful. As more and more consumers move towards a mobile first experience, we need to optimize for speeds that don't necessitate blazingly fast internet or even 4G speeds. Typically, improvements in this area means managing your requests and what you load better and more efficiently. This mobile first perspective is top of mind for Caviar as we expand to new markets this year. During our adoption of this methodology, we started noticing that trying out new features on mobile web seemed to take unusually long. We realized that our mobile web experience was far from ideal as the Caviar website was originally built for desktop. The shift in perspective from desktop to mobile was not a clean switch from a developer standpoint as we naturally have more resources for web and are less likely to test for mobile. We mapped out the core webpages on our user's critical path and decided to focus on the starting point: our home page. This is the page most visitors of trycaviar.com start off on and remains one of our most trafficked pages. We used Google Lighthouse to audit our home page as a baseline and full disclosure -- it was not pretty. Our initial Lighthouse audit.Setting Up Metrics At Caviar, our stack includes React/Rails on our web interface bundled with Webpack, a build tool commonly used

## Streamline Checkout with Shipping Options in Apple Pay

DevFeed: [Streamline Checkout with Shipping Options in Apple Pay](<https://devfeed.tech/articles/streamline-checkout-with-shipping-options-in-apple-pay-27018.md>)

Original publisher: [Read original article](<https://medium.com/square-corner-blog/streamline-checkout-with-shipping-options-in-apple-pay-7f3836245950?source=rss----3650599ae4e2---4>)

Author: Ajay Anandan

Published: 2019-03-28T18:12:50Z

Content type: release

Language: en

Sources: [Square Corner Blog - Medium](<https://devfeed.tech/sources/square-corner-blog-medium.md>)

Topics: [API](<https://devfeed.tech/topics/api.md>), [web applications](<https://devfeed.tech/topics/web-applications.md>), [Web](<https://devfeed.tech/topics/web.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [apple-pay](<https://devfeed.tech/tags/apple-pay.md>), [applications](<https://devfeed.tech/tags/applications.md>), [checkout](<https://devfeed.tech/tags/checkout.md>), [developer](<https://devfeed.tech/tags/developer.md>), [ecommerce](<https://devfeed.tech/tags/ecommerce.md>), [payments](<https://devfeed.tech/tags/payments.md>), [platform](<https://devfeed.tech/tags/platform.md>), [square](<https://devfeed.tech/tags/square.md>), [update](<https://devfeed.tech/tags/update.md>), [web](<https://devfeed.tech/tags/web.md>), [web-development](<https://devfeed.tech/tags/web-development.md>)

### AI overview

Square's Online Payments API now supports shipping options in Apple Pay on the Web. Developers can collect and validate shipping addresses, update shipping options, fees, taxes, line items, and totals during checkout, and receive the final shipping details after authorization.

### Source excerpt

Use Apple Pay to Handle Selecting Shipping OptionsHeads up, we've moved! If you'd like to continue keeping up with the latest technical content from Square please visit us at our new home https://developer.squareup.com/blog A little over a year ago, we added support for Apple Pay on the Web in our Online Payments APIs to help developers easily integrate Apple Pay into their websites. However, we know eCommerce checkouts don't stop with payments -- you also need to collect additional details for fulfilling and shipping orders. Specifically, you need to collect a shipping address and offer different shipping options based on that address. You might provide a free shipping option and a paid shipping option, for those who need a faster delivery. Even though our Online Payments APIs supported collecting a shipping address from within Apple Pay, you had to handle shipping options outside the Apple Pay experience. With today's update, Square's API now supports the entire checkout experience for Apple Pay on the Web, including support for shipping options. You can take payments, ask for and validate the shipping address, and provide various shipping options, all within Apple Pay's web experience. This speeds up checkout, which in turn increases conversions, with easy to use checkout flows via Apple Pay on web. How Apple Pay Shipping Options Work:Add shipping options You can define any number of shipping options in the PaymentRequest object. The first shipping option will be the default value shown. https://medium.com/media/78471b15e4db3e80ebda3c7748597d30/hrefValidate a shipping address When your customer chooses a shipping address, the shippingContactChanged callback will be invoked. You can use this callback to validate the shipping address, add new fees and/or taxes based on the shipping address, and update the shipping options. Errors shown when a shipping address isn't supported by that merchantShipping options and taxes are updated when they choose a Canadian addressht

## Square In-App Payments SDK for React Native

DevFeed: [Square In-App Payments SDK for React Native](<https://devfeed.tech/articles/square-in-app-payments-sdk-for-react-native-27017.md>)

Original publisher: [Read original article](<https://medium.com/square-corner-blog/square-in-app-payments-sdk-for-react-native-499520539d9a?source=rss----3650599ae4e2---4>)

Author: Richard Moot

Published: 2019-03-15T16:36:30Z

Content type: tutorial

Language: en

Sources: [Square Corner Blog - Medium](<https://devfeed.tech/sources/square-corner-blog-medium.md>)

Topics: [React Native](<https://devfeed.tech/topics/react-native.md>), [SDK](<https://devfeed.tech/topics/sdk.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>), [Android](<https://devfeed.tech/topics/android.md>), [iOS](<https://devfeed.tech/topics/ios.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-studio](<https://devfeed.tech/tags/android-studio.md>), [api](<https://devfeed.tech/tags/api.md>), [cli](<https://devfeed.tech/tags/cli.md>), [ecommerce](<https://devfeed.tech/tags/ecommerce.md>), [mobile-development](<https://devfeed.tech/tags/mobile-development.md>), [native](<https://devfeed.tech/tags/native.md>), [npm](<https://devfeed.tech/tags/npm.md>), [payments](<https://devfeed.tech/tags/payments.md>), [react-native](<https://devfeed.tech/tags/react-native.md>), [sdk](<https://devfeed.tech/tags/sdk.md>), [software-engineering](<https://devfeed.tech/tags/software-engineering.md>), [xcode](<https://devfeed.tech/tags/xcode.md>)

### AI overview

A tutorial for integrating Square's In-App Payments SDK into a React Native mobile application. It covers the development prerequisites, React Native CLI setup, plugin installation, and the SDK interfaces used for payment initialization and card-entry handling.

### Source excerpt

A React Native Plugin for the Square In-App Payments SDKHeads up, we've moved! If you'd like to continue keeping up with the latest technical content from Square please visit us at our new home https://developer.squareup.com/blog Since the release of our In-App Payments SDK, we've been getting a lot of requests for when this would be available for React Native. It is officially here! You can simply npm install -- save react-native-square-in-app-payments inside your React Native project and follow the setup guide over here to start accepting payments in your React Native app. If you're not already familiar with the In-App Payments SDK, it enables developers to accept Square-powered payments from within their own mobile apps. Now, it would be too easy to say just install the SDK and move on, so we'll dig into a React Native app that I built to show how this works. Our Order Ahead React Native App for buying Square Legos and demoed at ShopTalk.Getting Your Developer Environment Setup Prerequisites: Android Studio (follow link to download and install) Xcode (can be installed via App Store on macOS) Square Account (sign-up here) React Native CLI (follow guide for "Building Projects with Native Code") To be clear, you only need either Android Studio or Xcode if you plan on having your app work on their respective platforms and want to use their simulators for development. Step 1: Get React Native CLI installed and set-up npm install -g react-native-cli Make sure to follow the React Native setup guide for "Building Projects with Native Code". Using the react-native-square-in-app-payments plugin requires the In-App Payments SDK, which is native code for iOS and Android. Also, part of following that guide has you install the React Native CLI (command seen above), which helps facilitate linking libraries and running the simulator while developing. Step 2: Add In-App Payments React Native Plugin to your Project After you've setup React Native, you'll want to follow the Square g