# Creating orders

**URL:** <https://developer.squareup.com/forums/t/creating-orders/6928>\
**Category:** Questions\
**Created:** [August 31, 2022, 10:22am UTC](https://developer.squareup.com/forums/t/creating-orders/6928 "2022-08-31T10:22:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulcooper](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@paulcooper](https://developer.squareup.com/forums/u/paulcooper)\
**Post date:** [August 31, 2022, 10:22am UTC](https://developer.squareup.com/forums/t/creating-orders/6928/1 "2022-08-31T10:22:53Z")

</div>

Hi, I want to create orders (primarily via the Checkout API) and I see you can create an order with Square catalogue line items and you can create an order with ad hoc line items - my question is can you create an order that contains a mixture of catalogue line items and ad hoc line items?

Secondary question: item\_variation\_id is a string - what is the default/max length?

---

<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:** [August 31, 2022, 4:37pm UTC](https://developer.squareup.com/forums/t/creating-orders/6928/2 "2022-08-31T16:37:16Z")

</div>

👋 Yes, you can add ad hoc items and catalogue line items in the same order.

With Square object IDs can have a max character limit of 255. At this time they aren’t that large but that’s the max limit. 🙂

---

<div class="post-metadata">

**Author:** ![paulcooper](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@paulcooper](https://developer.squareup.com/forums/u/paulcooper)\
**Post date:** [September 1, 2022, 3:01pm UTC](https://developer.squareup.com/forums/t/creating-orders/6928/3 "2022-09-01T15:01:03Z")

</div>

Thanks for that Bryan.

I have everything working now using the Checkout API but I am using createCheckout and I see it is now recommended to use createPaymentLink.

I have updated the code but the PHP SDK is missing \Models\CreatePaymentLinkRequest. I can see there is a new version of the SDK and Square recommend updating it ([https://developer.squareup.com/docs/sdks/php/stay-current-with-sdk-version](https://developer.squareup.com/docs/sdks/php/stay-current-with-sdk-version)) but how do you actually go about doing this?

---

<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:** [September 1, 2022, 6:15pm UTC](https://developer.squareup.com/forums/t/creating-orders/6928/4 "2022-09-01T18:15:42Z")

</div>

Are you using Composer or is it manually configured? You need to update the versions similarly to when you initially configured the SDK in your application. 🙂

---

<div class="post-metadata">

**Author:** ![paulcooper](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@paulcooper](https://developer.squareup.com/forums/u/paulcooper)\
**Post date:** [September 2, 2022, 8:32am UTC](https://developer.squareup.com/forums/t/creating-orders/6928/5 "2022-09-02T08:32:06Z")

</div>

Composer. So basically, download and install again?

---

<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:** [September 2, 2022, 5:26pm UTC](https://developer.squareup.com/forums/t/creating-orders/6928/6 "2022-09-02T17:26:11Z")

</div>

Yeah, that will pull in the latest version. 🙂
