# Checkout not redirecting to redirect URL

**URL:** <https://developer.squareup.com/forums/t/checkout-not-redirecting-to-redirect-url/9194>\
**Category:** Questions\
**Tags:** checkout-api\
**Created:** [April 13, 2023, 8:42pm UTC](https://developer.squareup.com/forums/t/checkout-not-redirecting-to-redirect-url/9194 "2023-04-13T20:42:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ilikethatsite](https://avatars.discourse-cdn.com/v4/letter/i/9e8a1a/32.png) [@ilikethatsite](https://developer.squareup.com/forums/u/ilikethatsite)\
**Post date:** [April 13, 2023, 8:42pm UTC](https://developer.squareup.com/forums/t/checkout-not-redirecting-to-redirect-url/9194/1 "2023-04-13T20:42:02Z")

</div>

I am using the online-checkout/payment-links option to allow a person to checkout from a link on a website. I can see in the post that I am making to square that there is a URL in the redirect\_URL field and it is correct. However, when someone pays successfully it is just displaying the square thank you page and not sending them back to the site. I have another checkout page that uses the same code, but for a different square account and it works as expected. Is there something I may be missing? Thanks in advance

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [April 13, 2023, 8:46pm UTC](https://developer.squareup.com/forums/t/checkout-not-redirecting-to-redirect-url/9194/2 "2023-04-13T20:46:38Z")

</div>

What’s the application ID? Also is the `redirect_url` in the API response? 🙂

---

<div class="post-metadata">

**Author:** ![ilikethatsite](https://avatars.discourse-cdn.com/v4/letter/i/9e8a1a/32.png) [@ilikethatsite](https://developer.squareup.com/forums/u/ilikethatsite)\
**Post date:** [April 13, 2023, 10:46pm UTC](https://developer.squareup.com/forums/t/checkout-not-redirecting-to-redirect-url/9194/3 "2023-04-13T22:46:13Z")

</div>

Bryan- Thanks for the quick reply. I don’t have the app id handy at the moment. I have included what I am sending and response back below. I have X’d out some information. I am sending redirect URL over, but I am not getting it in the response.

**Sent**  
{ “idempotency\_key”: “2-DD0A6D33-F733-B68E-C75C2BB7BB9EC7A3”, “pre\_populated\_data”: { “buyer\_address”: { “first\_name”: “XXXXXX”, “last\_name”: “XXXXXX”, “postal\_code”: “80104” }, “buyer\_email”: “XXXXXX” }, “payment\_note”: “XXXXXX”, “checkout\_options”: {}, “merchant\_support\_email”: “XXXXXX”, “redirect\_url”: “[https://cox-education.com/XXXX.cfm](https://cox-education.com/XXXX.cfm)”, “description”: “Cox Education Class Registration”, “order”: { “location\_id”: “XXXXXX”, “line\_items”: [{ “quantity”: “1”, “base\_price\_money”: { “amount”: 100, “currency”: “USD” }, “item\_type”: “ITEM”, “name”: "GJARA TEST CLASS ", “note”: "GJARA TEST CLASS " }] } }

**Response**  
{“payment\_link”:{“id”:“EQEKFW6MY6GYMDWJ”,“version”:1,“description”:“Cox Education Class Registration”,“order\_id”:“FHWsOunFG7U0yHXPEbbS0CnZs7IZY”,“checkout\_options”:{},“pre\_populated\_data”:{“buyer\_email”:“XXXXXX”,“buyer\_address”:{“postal\_code”:“80104”,“first\_name”:“XXXXXX”,“last\_name”:“XXXXXX”}},“url”:“[https://square.link/u/QtNocHMG",“created\_at”:“2023-04-13T22:27:37Z”,“payment\_note”:“XXXXXX”},“related\_resources”:{“orders”:[{“id”:“FHWsOunFG7U0yHXPEbbS0CnZs7IZY”,“location\_id”:“XXXXXX”,“source”:{“name”:“Education”},“line\_items”:[{“uid”:“kmsz8lhDsDspWgeptpcHnB”,“name”:"GJARA](https://square.link/u/QtNocHMG%22,%22created_at%22:%222023-04-13T22:27:37Z%22,%22payment_note%22:%22XXXXXX%22%7D,%22related_resources%22:%7B%22orders%22:%5B%7B%22id%22:%22FHWsOunFG7U0yHXPEbbS0CnZs7IZY%22,%22location_id%22:%22XXXXXX%22,%22source%22:%7B%22name%22:%22Education%22%7D,%22line_items%22:%5B%7B%22uid%22:%22kmsz8lhDsDspWgeptpcHnB%22,%22name%22:%22GJARA) TEST CLASS on 4/13/25”,“quantity”:“1”,“note”:“GJARA TEST CLASS”,“item\_type”:“ITEM”,“base\_price\_money”:{“amount”:100,“currency”:“USD”},“variation\_total\_price\_money”:{“amount”:100,“currency”:“USD”},“gross\_sales\_money”:{“amount”:100,“currency”:“USD”},“total\_tax\_money”:{“amount”:0,“currency”:“USD”},“total\_discount\_money”:{“amount”:0,“currency”:“USD”},“total\_money”:{“amount”:100,“currency”:“USD”},“total\_service\_charge\_money”:{“amount”:0,“currency”:“USD”}}],“fulfillments”:[{“uid”:“TFFLylgtcei3eXtC9rudDC”,“type”:“DIGITAL”,“state”:“PROPOSED”}],“net\_amounts”:{“total\_money”:{“amount”:100,“currency”:“USD”},“tax\_money”:{“amount”:0,“currency”:“USD”},“discount\_money”:{“amount”:0,“currency”:“USD”},“tip\_money”:{“amount”:0,“currency”:“USD”},“service\_charge\_money”:{“amount”:0,“currency”:“USD”}},“created\_at”:“2023-04-13T22:27:37.243Z”,“updated\_at”:“2023-04-13T22:27:37.243Z”,“state”:“DRAFT”,“version”:1,“total\_money”:{“amount”:100,“currency”:“USD”},“total\_tax\_money”:{“amount”:0,“currency”:“USD”},“total\_discount\_money”:{“amount”:0,“currency”:“USD”},“total\_tip\_money”:{“amount”:0,“currency”:“USD”},“total\_service\_charge\_money”:{“amount”:0,“currency”:“USD”},“net\_amount\_due\_money”:{“amount”:100,“currency”:“USD”}}]}}

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [April 13, 2023, 11:03pm UTC](https://developer.squareup.com/forums/t/checkout-not-redirecting-to-redirect-url/9194/4 "2023-04-13T23:03:01Z")

</div>

Thanks for providing the request. The reason the `redirect_url` isn’t working is cause your `checkout_options` is empty and the `redirect_url` isn’t nested in the options. You have

> “checkout\_options”: {},

If you set it like the following it will redirect correctly:

```auto
"checkout_options": {
            "merchant_support_email": "XXXXXX", 
            "redirect_url": "https://cox-education.com/XXXX.cfm"
        }

```

🙂

---

<div class="post-metadata">

**Author:** ![ilikethatsite](https://avatars.discourse-cdn.com/v4/letter/i/9e8a1a/32.png) [@ilikethatsite](https://developer.squareup.com/forums/u/ilikethatsite)\
**Post date:** [April 14, 2023, 1:02pm UTC](https://developer.squareup.com/forums/t/checkout-not-redirecting-to-redirect-url/9194/5 "2023-04-14T13:02:34Z")

</div>

Thank you! You are correct. I am sorry I missed that. Have a good day!
