Uploaded August 2020 | Updated September 2026, 10 hours ago
What is idempotency? An API call or operation is idempotent if it has the same result no matter how many times it is applied.
Square APIs require idempotency keys to protect against accidental duplicate calls when duplicate calls can have negative consequences (for example, charging a credit card twice). For example, suppose you make a successful CreatePayment request, but your connection fails before you receive success confirmation. If you make the exact same request again, the endpoint knows it is a duplicate request and does not charge the card a second time. The result of your duplicate CreatePayment request is the same as if you had only made the request once.
Idempotency keys can be anything, but they need to be unique. Virtually all popular programming languages provide a function for generating unique strings. We have a more in-depth video linked below that covers more about idempotency if you’re interested in learning more.
The Sandbox Show Idempotency: youtube.com/watch?v=Hx8UdQx_4bE
Square Developer Forums – developer.squareup.com/forums
Square Developer Community – https://squ.re/slack
Square Developer Twitter – twitter.com/squaredev
Square Developer Blog – developer.squareup.com/blog
What is idempotency? An API call or operation is idempotent if it has the same result no matter how many times it is applied.
Square APIs require idempotency keys to protect against accidental duplicate calls when duplicate calls can have negative consequences (for example, charging a credit card twice). For example, suppose you make a successful CreatePayment request, but your connection fails before you receive success confirmation. If you make the exact same request again, the endpoint knows it is a duplicate request and does not charge the card a second time. The result of your duplicate CreatePayment request is the same as if you had only made the request once.
Idempotency keys can be anything, but they need to be unique. Virtually all popular programming languages provide a function for generating unique strings. We have a more in-depth video linked below that covers more about idempotency if you’re interested in learning more.
The Sandbox Show Idempotency: youtube.com/watch?v=Hx8UdQx_4bE
Square Developer Forums – developer.squareup.com/forums
Square Developer Community – https://squ.re/slack
Square Developer Twitter – twitter.com/squaredev
Square Developer Blog – developer.squareup.com/blog

![Square | INTRODUCING SNIPPETS API
Learn all about how you can build eCommerce apps with the new Snippets API and help the thousands of sellers who sign up for Square Online every day at developer.squareup.com/snippets-api.
The Snippets API inserts your Javascript, HTML, or CSS into Square Online with a simple POST request. So you can build custom add-ons that sellers can add to their online sites. Easy!
You can market your app in the Square App Marketplace. And sellers can install your app as an add-on with just a few clicks. Boom—everybody wins.
Start building today: developer.squareup.com/snippets-api.
[TRANSCRIPT]
Thousands of merchants sign up for Square Online every day — so they can quickly and easily set up their online stores, and start selling in more ways.
Now — for developers — there’s the new Snippets API that lets you seamlessly add HTML, CSS and JAVASCRIPT into a sellers website.
...Like that.
This means you can build customized add-ons for Square Online sellers, making their online store better.
You could help sellers …
Boost customer loyalty with chatbots
Grow email lists with marketing pop-ups.
Increase trust with live social proof, and…
Showcase reviews from top platforms.
Then, integrate your app and publish to the Square App Marketplace — sellers can install with the click of a button.
Start building today with Square.
developer.squareup.com
keyword: SNIPPETS Square | INTRODUCING SNIPPETS API](https://i.ytimg.com/vi/JbytzNibk54/mqdefault.jpg)








