Processing a card payment (other languages)

After the SqPaymentForm generates a card nonce and you submit it to your server, you finish processing the payment by sending a request to the Charge endpoint with the details of the transaction.

Square provides client libraries in several languages for communicating with eCommerce API endpoints.

  • If you're using PHP or Ruby, see the documentation article that describes using the client library for that language.
  • If you're using another programming language, eCommerce code samples are available for a selection of languages on Github. See Sample Apps for more information.

Learn about OAuth

Your personal access token gives you full access to your own business' data. If you are developing an application for other businesses to use as well, you use the OAuth API to generate access tokens for those businesses.

The OAuth flow in Connect v2 is identical to the flow in v1. Learn more about the OAuth flow. Code samples for the OAuth flow are available on Github.

Important: In order for your app to process payments on behalf of another merchant, the merchant must authorize your application with the PAYMENTS_WRITE OAuth permission.

Ask for help on Stack Overflow or join our Slack channel