Web Payment SDK Required?


I can’t tell from the documentation. I want to use Square Payment APIs only (as in without Web Payment SDK) to send the payment (Call CreatePayment) to the Square-hosted checkout page (call CheckoutPaymentLink), but it looks like SDK is required.

I am completely new to building apps and using APIs, so some guidance in this area would be great.

Thank you.

If your going to use the Payments API you’ll have to use the Web Payments SDK. That’s the only way to generate the source_id that’s passed to the CreatePayment request. If your going to use the payment links from CreatePaymentLink you won’t call CreatePayment. The generated link will take the customer to the Square hosted page where the payment will be processed. :slightly_smiling_face:


See, I got the two different methods mixed up. Thank you for clarifying. I will need to try this out.

I now would like to confirm something. Square Docs says the CreatePaymentLink specifies the order. Am I correct to take that as meaning I do not have to call CreateOrder?

@Cinji18 Hello,

If you want to use Square Payment APIs without the Web Payment SDK, you can still achieve your goal of sending the payment to the Square-hosted checkout page. Here’s a general outline of the process:

  1. Set up your Square developer account: Start by creating a Square developer account and accessing the Developer Dashboard.
  2. Generate API credentials: In the Developer Dashboard, navigate to the “Applications” section and create a new application. This will generate your API credentials, including an Access Token, which you will use to authenticate your API calls.
  3. Make a CreatePayment API call: Use the CreatePayment endpoint to create a payment object. Include the necessary details such as the amount, currency, and other relevant information. This API call will initiate the payment process.
  4. Retrieve the checkout URL: After successfully creating the payment, you can retrieve the checkout URL using the response from the CreatePayment API call. The checkout URL will direct the customer to the Square-hosted checkout page.
  5. Redirect the customer to the checkout page: Once you have the checkout URL, you can redirect the customer to that page using a server-side redirect or by providing the URL to the customer for manual redirection.

Note that this process requires understanding and implementation of API integration techniques. It’s recommended to refer to the official Square Payment API documentation and examples to get detailed instructions and code snippets that demonstrate how to make API calls and handle responses.

If you’re new to building apps and using APIs, it might be helpful to consult with a developer or seek resources that provide step-by-step guidance on API integration. Square also offers developer support and resources to assist you in the integration process.

Good luck with your app development journey, and don’t hesitate to ask if you have any further questions!

@Cinji18 Yes, you don’t need to call CreateOrder with the Payment Links. You’ll build the order and and pass it in as part of the CreateCheckoutLink API call. :slightly_smiling_face:

@emmawade, We really appreciate your contribution to the community. However your post is a little miss leading. With the Square generated links that redirects customer to a Square hosted page to checkout there are no API calls to the Payments API CreatePayment. There is only one API
call to the CreatePaymentLink that generates the link for checkout. :slightly_smiling_face:

Great! I think I did this because I am able to arrive to the Square-hosted checkout test page/panel.

Just to be certain, if this is done correctly, I should be able to see the transactions in the regular Square dashboard in squareup.com (not in Square Developer), correct?

Great! Yes, any completed payments will be visible in the Seller Dashboard. :slightly_smiling_face: