1
votes

I am not finding how wide the transaction_Id string is when returned. I need to store that in a database and need to know how wide to set the column. I am not finding it in their documentation.

https://docs.connect.squareup.com/api/connect/v2/#endpoint-charge

https://docs.connect.squareup.com/api/connect/v2/#type-tendercashdetails

1
Based on the Sandbox sample I got working the transaction_id is 36 characters (like a GUID). Is that what I should plan on? - awilbourn
As of this very moment, I'm looking at a Square Connect v2 Transaction ID that is 56 characters long. - Spencer Williams

1 Answers

0
votes

Currently most transaction_ids are 26 characters long, but there is no guarantee about how long, or what format an id would be. Some of Square's ids are 36 character GUIDs and that is probably a reasonable upper limit. My advice is to make your column at least 36 characters wide, and include logic in your app to check if a longer id is received that would be truncated in your table.