All URIs are relative to https://connect.squareup.com
Method | HTTP request | Description |
---|---|---|
cancelTerminalCheckout | POST /v2/terminals/checkouts/{checkout_id}/cancel | CancelTerminalCheckout |
createTerminalCheckout | POST /v2/terminals/checkouts | CreateTerminalCheckout |
getTerminalCheckout | GET /v2/terminals/checkouts/{checkout_id} | GetTerminalCheckout |
searchTerminalCheckouts | POST /v2/terminals/checkouts/search | SearchTerminalCheckouts |
Note: This endpoint is in beta.
CancelTerminalCheckoutResponse cancelTerminalCheckout(checkoutId)
CancelTerminalCheckout
Cancels a Terminal checkout request, if the status of the request permits it.
var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new SquareConnect.TerminalApi();
var checkoutId = "checkoutId_example"; // String | Unique ID for the desired `TerminalCheckout`
apiInstance.cancelTerminalCheckout(checkoutId).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
checkoutId | String | Unique ID for the desired `TerminalCheckout` |
CancelTerminalCheckoutResponse
- Content-Type: application/json
- Accept: application/json
Note: This endpoint is in beta.
CreateTerminalCheckoutResponse createTerminalCheckout(body)
CreateTerminalCheckout
Creates a new Terminal checkout request and sends it to the specified device to take a payment for the requested amount.
var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new SquareConnect.TerminalApi();
var body = new SquareConnect.CreateTerminalCheckoutRequest(); // CreateTerminalCheckoutRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
apiInstance.createTerminalCheckout(body).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
body | CreateTerminalCheckoutRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
CreateTerminalCheckoutResponse
- Content-Type: application/json
- Accept: application/json
Note: This endpoint is in beta.
GetTerminalCheckoutResponse getTerminalCheckout(checkoutId)
GetTerminalCheckout
Retrieves a Terminal checkout request by checkout_id.
var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new SquareConnect.TerminalApi();
var checkoutId = "checkoutId_example"; // String | Unique ID for the desired `TerminalCheckout`
apiInstance.getTerminalCheckout(checkoutId).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
checkoutId | String | Unique ID for the desired `TerminalCheckout` |
- Content-Type: application/json
- Accept: application/json
Note: This endpoint is in beta.
SearchTerminalCheckoutsResponse searchTerminalCheckouts(body)
SearchTerminalCheckouts
Retrieves a filtered list of Terminal checkout requests created by the account making the request.
var SquareConnect = require('square-connect');
var defaultClient = SquareConnect.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new SquareConnect.TerminalApi();
var body = new SquareConnect.SearchTerminalCheckoutsRequest(); // SearchTerminalCheckoutsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
apiInstance.searchTerminalCheckouts(body).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
body | SearchTerminalCheckoutsRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
SearchTerminalCheckoutsResponse
- Content-Type: application/json
- Accept: application/json