CheckoutAPI : Retrieve order/payment status when using the setRedirectUrl

Hello,
I am migrating from deprecated connect-php-sdk to square-php-sdk. I use CheckoutApi t benefit from the hosted form. I have set a redirect url so I can check the result of the transaction.
I used to work with the “TransactionId” and the retrieveTransaction method to be able to double-check the status (‘CAPTURED’, ‘AUTHORIZED’). However, TransactionsApi is deprecated.

I can see the referenceId, orderId, the transactionId and the checkoutId. However, I don’t seem to be able to get the status of the payment from there…

Anyone has any tip on how to achieve the same as I did with TransactionsAPI?

Hey @Maestrel welcome to the forums!

The transactionId is now equivalent to an orderId. So you can actually pass the transactionId to BatchRetrieveOrders to look up the order and see the items, payment information, etc. Let me know if that doesn’t work for you.