Square

FREE
By community
Updated 5 months ago
Finance
-/10
Popularity Score
-
Latency
-
Success Rate

Square API Documentation

Sell on the Go. Accept credit cards and run your business on an iPhone, iPad, or Android device. As a Square merchant, you can retrieve activity reports for your processed payments, refunds, and deposits with the Square Connect API. Pull these reports into your own custom-made applications to help you manage your business.

View API Details
GETRetrieve your payment history
GETRetrieve your payment history
Authorization:

description

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
AuthorizationHEADER
REQUIREDShould be of the format "Bearer [PERSONAL_ACCESS_TOKEN]". Please check https://connect.squareup.com/docs/getting-started
Code Snippet
unirest.get("https://community-square.p.rapidapi.com/me/payments")
.header("X-RapidAPI-Host", "community-square.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://community-square.p.rapidapi.com/me/payments
Request Method: GET
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.get("https://community-square.p.rapidapi.com/me/payments")
.header("X-RapidAPI-Host", "community-square.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication