x

Getting Order ID From Transaction [PHP API]

Hello,

 

We are looking for a little help in trying to get the order ID from a transaction, or a transaction list using the PHP API. Our transactional response comes back but the order id is empty. also attempting to use ->getId() on a transaction ended up being a bust.

 

Any help is appreciated,

Thanks!

2,727 Views
Message 1 of 4
Report
3 REPLIES 3
Admin

Hello @devstcs!

 

I escalated this to our API team for you and they confirmed that the order_id will only be present if you explicitly pass an order_id to the Charge endpoint, or if you use Checkout API.

 

If you're looking for itemization from POS transactions, you should use v1's Payment API.

 

But if you're referreing to online transactions, then take a look at this itemize transactions documentation.

 

If you have any other questions please let me know! 

️ Helen
Seller Community Manager

2,707 Views
Message 2 of 4
Report

Helen,

 

Thank you!  Essentially we are trying to get orders that were run from our Square POS, so I'm not sure if sure what Checkout API that actually uses.

 

Just to confirm there is no way to get the the items from the V2 API?  We will take a look at the V1 Paypment API.

 

Thank you again!

 

 

2,702 Views
Message 3 of 4
Report
Admin

Hi again! I checked back with the team and yep, if you only need POS payments then you will need to use V1 Payments. It's not possible retrieve the items in V2 for a POS payment at this time. The only way to retrieve items in V2 is for an online transaction, not for a POS transaction.

 

Hope this helps clarify but don't hesitate to post again if any other questions come up! 

️ Helen
Seller Community Manager

2,698 Views
Message 4 of 4
Report