Another Square

Flutter package for Square REST Apis.

Square APIs

Feature Supported URL
Payments Y
Terminal Y
Order Y
Subscription Y
Invoice Y
Catalog Y
Inventory Y
Customer Y
Loyalty Y
Gift Cards Y
Bookings Y
Business Y
Team Y
Financial Y
Online Y
Token Y


In order to interact with Square you'll need a developer account and the clientId and clientSecret

final squareClient = SquareClient(
    applicationId: applicationId,
    clientId: clientId,
    clientSecret: clientSecret,
    environmentType: EnvironmentType.Sandbox);
// Initialize the client.        
await squareClient.initialize();

// Use this to prompt the user to authorize your app
var authUrl = squareClient.getAuthorizationPageUrl(
        scopes: [Scope.CustomerWrite,Scope.CustomerRead,],         
        redirectUrl: <your redirect url>, 
        state: "state123")

// On authorization success use the params to get the access token.
var autoToken = squareClient.getAuthToken(
        code: <code from redirect url>,
        redirectUrl: <redirect url>);
// Note: The token can be refreshed when it expires using the refreshToken
String token = (await squareClient.refreshToken(
        refreshToken: autoToken.refresh_token

Bother Hackathon

Feel free to use any of my GitHub repositories in your apps. You should also consider attending the free Brother Hackathon happening this year. You get a free Brother QL-1110NWB, a PT-P910BT, and possibly an awesome DS-940DW mobile scanner. Visit for more information. I will be teaching workshops, and they are free. You can ask me any questions. Thank you.