Can you create a transaction with an Item SKU using the connectV2 API?

I have scoured through all of the documentation I can find, but I have not found a way to do this as of yet.

 

I have succesfully integrated with the Connect API v2 endpoints (Transaction/Location so far) and have been able to succesfully create a Charge in sanbox mode.  I am setting the "amount_money" property in the request and a charge is created for that amount - so far so good.

 

We recently took the time to create Items (through the Square dashboard) so that we can better track sales and inventory.  So much better than just creating one-time charges with an amount!  Thus I am hoping to do the same for the online store, and ensure that the transactions that occur in the online store can be tracked alongside the PoS transactions.  So I'm looking for a way to submit charges with Item SKUs rather than just a dollar amount, but so far I have not seen a way to do this.

 

Any help or guidance would be greatly appreciated, thanks for your time!

2,227 Views
Message 1 of 4
Report
3 REPLIES 3
Alumni

Hi!

At this time you can't pass items into the charge endpoint directly, however we are working on this feature (ecommerce itemizations) and you can read more about it here.

 

You would probably want to do a workflow like this

Display the items on your site (list items) 

Retreive an item during checkout to get the price, taxes, etc. 

charge for the item,

update the inventory for the item. 

 

does that make sense? 

2,213 Views
Message 2 of 4
Report

Hi Tristan!

 

Thanks for the link to the article (well written!), eCommerce Itemization is exactly the feature I'm looking for and the ability to generate on-the-fly items could allow for some really cool functionality, please let me know if there is any way to sign up for the beta, I'd be happy to participate.  I also like the catalog concept, looking forward to the changes to come!

 

As to your solution - that absolutely makes sense.  I didn't realize the v1 API had so much more depth to it, and was pounding my head against the wall looking through the v2 docs.  Now that I see the inventory management capabilities your workflow seems fairly simple to achieve.  If I understand correctly it would look something like:

 

GET /v1/{my_location}/items/{square_item_id_from_my_db} // retrieve item details by key
POST /v2/locations/{my_location}/transactions // charge by dollar amount
POST /v1/{my_location}/inventory/{square_item_variation_id} // use the variation_id from the item in step 1 to update inventory

 

 

Please let me know if there's anything I'm missing, and thanks for your time!

 

2,207 Views
Message 3 of 4
Report
Alumni

Yeah, I think you've got the general idea, and you can always ask more questions if you get stuck. 

 

Another thing to look into might be Square Checkout that we quietly released a couple days ago. It might be better for your use case. 

2,197 Views
Message 4 of 4
Report