Creating orders

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?

:wave: 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. :slightly_smiling_face:

1 Like

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 ( but how do you actually go about doing this?

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. :slightly_smiling_face:

Composer. So basically, download and install again?

Yeah, that will pull in the latest version. :slightly_smiling_face: