# Create Payment Link page Returns 404, 422 errors?

**URL:** <https://developer.squareup.com/forums/t/create-payment-link-page-returns-404-422-errors/17044>\
**Category:** Questions\
**Tags:** payments-api\
**Created:** [June 4, 2024, 9:44pm UTC](https://developer.squareup.com/forums/t/create-payment-link-page-returns-404-422-errors/17044 "2024-06-04T21:44:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Conway](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@Conway](https://developer.squareup.com/forums/u/Conway)\
**Post date:** [June 4, 2024, 9:44pm UTC](https://developer.squareup.com/forums/t/create-payment-link-page-returns-404-422-errors/17044/1 "2024-06-04T21:44:54Z")

</div>

Hi I have been trying to use the self hosted Create payments link page, I’ve successfully posted JSON data to the page, the correct information is being displayed.

When I go to pay it even does a verification with the bank depending on the card; however then it doesn’t do anything a loading icon on the button then it goes away.

Because this is self hosted on square I don’t get any feedback on why this isn’t working. except when I look at the console in chrome I see this? Also see image attached:

Failed to load resource: the server responded with a status of 404 ()  
Failed to load resource: the server responded with a status of 422 ()

![image](https://global.discourse-cdn.com/square/original/2X/5/5e1e037c2068b909c23a3f7165d58e9ec65b8398.png)

Here is the link: [https://checkout.square.site/merchant/MLGX7WV5TY71X/order/ZFOl34di2SOYVgueSwr02TgibwfZY](https://checkout.square.site/merchant/MLGX7WV5TY71X/order/ZFOl34di2SOYVgueSwr02TgibwfZY)

Thanks

---

<div class="post-metadata">

**Author:** ![Square-Dev-AI](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/square-dev-ai/32/2513_2.png) [@Square-Dev-AI](https://developer.squareup.com/forums/u/Square-Dev-AI)\
**Post date:** [June 4, 2024, 9:45pm UTC](https://developer.squareup.com/forums/t/create-payment-link-page-returns-404-422-errors/17044/2 "2024-06-04T21:45:10Z")

</div>

👋 I’m Square Dev AI, here to help answer your question!  
Based on the information you’ve provided, the following documentation will help answer your question:

> **[Make your First API Call](https://developer.squareup.com/docs/get-started/make-api-request)**
>
> Learn how to get started and make a Square API request.

> **[Verify the Payment](https://developer.squareup.com/docs/get-started/verify-transaction-in-seller-dashboard)**
>
> Learn how to view Square transactions in the Sandbox Seller Dashboard.

> **Additional Documentation**
>
> [Checkout API](https://developer.squareup.com/docs/checkout-api)  
> [Checkout API](https://developer.squareup.com/docs/checkout-api-overview)  
> [Get Started](https://developer.squareup.com/docs/square-get-started)

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.  
Otherwise one of our Developer Advocates will provide additional assistance shortly.

---

<div class="post-metadata">

**Author:** ![Lance-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/lance-square/32/2704_2.png) [@Lance-Square](https://developer.squareup.com/forums/u/Lance-Square)\
**Post date:** [June 4, 2024, 10:42pm UTC](https://developer.squareup.com/forums/t/create-payment-link-page-returns-404-422-errors/17044/3 "2024-06-04T22:42:38Z")

</div>

Hi Conway,

Thanks for the example checkout link.

I’ve checked out the [API Logs](https://developer.squareup.com/docs/devtools/api-logs) to get your [CreatePaymentLink](https://developer.squareup.com/explorer/square/checkout-api/create-payment-link) request body, and was able to reproduce the error.

I also tried creating my own request body from scratch, and I got a same error when I didn’t fill out the whole checkout forum. But when I did fill out the checkout, I was able to successfully take a payment in production on my own account.

My guess is that there is an issue with the request body, but the payment link is still getting created. But once a payment is attempt, you run into that error.

You’ll need to try tinkering with your request body and see what field and value might be causing the issue. For example, I see `order → line_items[x] → "customer_id": "CUS"` which is problematic, since Square orders will be expecting a real customer id.  
Start by testing your order object. Try seeing if you can form the order via a [CreateOrder](https://developer.squareup.com/reference/square/orders-api/create-order). Then keep tinkering with the other request body keys and values.

See if you can avoid some empty values like:

```auto
    "shipping_fee": {
      "name": "Delivery",
      "charge": {
        "currency": "GBP",
        "amount": 0
      }
    }

```

or:  
`"pre_populated_data": {}`

Let me know if you can find what part of your original request value for this payment link is causing an issue. You can find your API call in the [API Logs](https://developer.squareup.com/docs/devtools/api-logs).
