Search code examples
phpsquaresquare-connect

passing items & categories to Square (SquareUp) when using SquareConnect


I'm charging a card using the following example:

$transaction_api = new \SquareConnect\Api\TransactionApi();

$request_body = array (
  "card_nonce" => $nonce,
  "amount_money" => array (
    "amount" => 100,
    "currency" => "USD"
  ),

  "idempotency_key" => uniqid()
);

I've noticed that these transactions come as "uncategorized". Is there a way to break down the amounts and assign items & categories so that I know which items were sold in the Square Dashboard?


Solution

  • You can use the Orders endpoints to itemize your e-commerce transactions: https://medium.com/square-corner-blog/building-for-an-omni-channel-business-with-squares-apis-has-never-been-easier-3b5e0977741a