Skip to content

Reference

Square

Set up Square OAuth for payment processing and commerce management

Connect your users to Square for payment processing, inventory management, order tracking, and customer data.

PropertyValue
Provider IDsquare
CategoryPayments
PKCESupported
Token refreshAutomatic
Redirect URIShown in Developer Portal

Go to the Square Developer Portal

Navigate to developer.squareup.com/apps and sign in.

Create a new application

Click Create your first application (or + to add another), enter the app name, and click Save.

Configure the redirect URI

Under OAuth, add the Alter callback URL from the Developer Portal to the Redirect URL field.

Get credentials

Copy the Application ID (Client ID) and Application Secret (Client Secret) from the Credentials tab.

Open the Developer Portal

Go to portal.alterauth.com and navigate to the application.

Add Square provider

Go to OAuth Providers > Add Provider > Square.

Enter credentials

  • Client ID: Paste your Square Application ID
  • Client Secret: Paste your Square Application Secret

Select scopes

Choose the scopes the application needs.

Save

Click Save. The provider is now active.

ScopeDescription
MERCHANT_PROFILE_READRead merchant profile information
PAYMENTS_READRead payment records
PAYMENTS_WRITECreate and update payments
ORDERS_READRead order records
ORDERS_WRITECreate and update orders
ITEMS_READRead catalog item records
ITEMS_WRITECreate and update catalog items
CUSTOMERS_READRead customer records
CUSTOMERS_WRITECreate and update customer records
  • Square has separate sandbox and production environments. Use sandbox credentials during development.
  • See the Square OAuth API documentation for more details.

Alter policy rules can target these attested operations and families for operation-level and parameter-aware controls.

Operation IDFamiliesMethodProvider path
CreatePaymentpaymentPOST/v2/payments
GetPaymentreadGET/v2/payments/{payment_id}
CancelPaymentpaymentPOST/v2/payments/{payment_id}/cancel
CompletePaymentpaymentPOST/v2/payments/{payment_id}/complete
RefundPaymentpaymentPOST/v2/refunds
GetPaymentRefundreadGET/v2/refunds/{refund_id}
ListPaymentRefundsreadGET/v2/refunds
CreateOrderwritePOST/v2/orders
SearchOrdersreadPOST/v2/orders/search
PayOrderpaymentPOST/v2/orders/{order_id}/pay
CreateInvoicewritePOST/v2/invoices
ListInvoicesreadGET/v2/invoices
UpdateInvoicewritePUT/v2/invoices/{invoice_id}
PublishInvoicesendPOST/v2/invoices/{invoice_id}/publish
CancelInvoicewritePOST/v2/invoices/{invoice_id}/cancel
DeleteInvoicedeleteDELETE/v2/invoices/{invoice_id}
CreateCustomerwritePOST/v2/customers
ListCustomersreadGET/v2/customers
SearchCustomersreadPOST/v2/customers/search
DeleteCustomerdeleteDELETE/v2/customers/{customer_id}
ListLocationsreadGET/v2/locations
ListCatalogreadGET/v2/catalog/list
UpsertCatalogObjectwritePOST/v2/catalog/object
DeleteCatalogObjectdeleteDELETE/v2/catalog/object/{object_id}
RetrieveInventoryCountreadGET/v2/inventory/{catalog_object_id}
BatchRetrieveInventoryCountsreadPOST/v2/inventory/counts/batch-retrieve

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.