Skip to content
This repository has been archived by the owner on Apr 14, 2024. It is now read-only.

SquareUp

Yuri Schimke edited this page Jul 18, 2018 · 5 revisions

SquareUp

Authentication

Either use an existing granted token, or visit Square Connect and select an app. The Personal Access Token can be used to skip the authorisation flow. Otherwise enter the Application ID and Secret.

$ okurl --authorize squareup
Authorising SquareUp API
SquareUp Application Id [sqxxxx-XXXXXXXXXXXX]: 
SquareUp Application Secret: 

$ okurl --authorize squareup --token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Bash Completion

$ okurl https://connect.squareup.com/v2/locations<tab>
//connect.squareup.com/v2/locations
//connect.squareup.com/v2/locations/9999999999999/refunds
//connect.squareup.com/v2/locations/9999999999999/transactions
//connect.squareup.com/v2/locations/9999999999999/transactions/{transaction_id}
//connect.squareup.com/v2/locations/9999999999999/transactions/{transaction_id}/capture
//connect.squareup.com/v2/locations/9999999999999/transactions/{transaction_id}/refund
//connect.squareup.com/v2/locations/9999999999999/transactions/{transaction_id}/void
//connect.squareup.com/v2/locations/{location}/refunds
//connect.squareup.com/v2/locations/{location}/transactions
//connect.squareup.com/v2/locations/{location}/transactions/{transaction_id}
//connect.squareup.com/v2/locations/{location}/transactions/{transaction_id}/capture
//connect.squareup.com/v2/locations/{location}/transactions/{transaction_id}/refund
//connect.squareup.com/v2/locations/{location}/transactions/{transaction_id}/void

Queries

$ squareapi /v1/me/payments | jq -r '[.[] | .net_total_money.amount, .net_total_money.currency_code, .tender[0].receipt_url] | @csv'
97,"USD","https://squareup.com/receipt/preview/xxxxxxxxx"
Clone this wiki locally