Online Checkout redirect

Hi, just started using square after time using PayPal where I would have used a smart button on my page which captured the payment and redirected the user to my website confirmation page. I’m trying to replicate that. I understand the purchaser has to leave the page for the transaction to be captured and processed when using the online checkout. However, how do I add a custom redirect. I note the help doc states:

Note that, the application can optionally provide a redirect URL in the request. If not provided, Square redirects the buyer to a Square-provided confirmation page.

But I can’t figure out how to add a redirect url, any help would be appreciated, thanks.

:wave: The redirect_url is configured in the checkout_options in the API request to create the payment link. For example:

   "checkout_options": {
      "redirect_url": ""
      "name":"Auto Detailing",


Hi, thanks for the reply. I should have been clearer I think, I am using the Checkout Link buy now button which I just copy and paste into my website. When I used paypal previously, it generated the javascript code for the button with the payment amount and I was able to alter their code to add my custom redirect, not forgetting it was great that the customer remained on my site during the payment processing, which isn’t a huge issue but the redirect is important to me. While I created my website myself, I have no experience of working adding a fully integrated solution using an api so was looking a nice and easy solution, am I right in saying therefore using the button I can’t redirect? apologies if I sound unclear but it’s down to my lack of knowledge, thanks

Okay, when you create the link in the Advanced settings you’ll configure the redirect URL. :slightly_smiling_face:

Hi, thanks for the reply, I don’t seem to have advanced settings showing, either in creating the pay button or when created and trying to edit it?

Just to confirm, I am following these steps:

  1. From the online Square Dashboard, select Add button to website.
  2. Select the Link purpose: Collect a payment, Sell an Item or Accept donations.
  3. Add a Title, Button text, amount and adjust the Frequency of the payment.
  4. Add an optional Image.
  5. Adjust the Advance settings if needed.
  6. Click Continue. Adjust the style that will be applied to all of your buttons
    a. Select a custom font in the Font dropdown menu
    b. Select a standard colour or enter your brand HEX code colour in the Colour field
    c. Select from three button shapes
    d. Display the image, title or price
  7. Select, copy and paste the embed code on your existing website

Apologies for the hassle, hopefully I am missing something obvious.

Hi, I’d really love to get this problem solved, can you please look at my previous post and confirm where the advanced settings should show? Thanks

Hmm, I think this has to do with the location of your Square account. Since this is the Checkout Links that are configured in the Seller Dashboard I’d recommend reaching out to our Customer Success team. This Forum is mainly for developer related questions. :slightly_smiling_face:

1 Like