- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
BatchRetreiveOrders in sandbox
Is it possible to use BatchRetrieveOrders in Sandbox?
this is the code I'm using:
$body = new \SquareConnect\Model\BatchRetrieveOrdersRequest();
$body->setOrderIds(['CBASEO0b4bbWpum1aleKACATKzg']);
$result = $client->batchRetrieveOrders($location_id, $body);
var_dump($result);
I get this response:
object(SquareConnect\Model\BatchRetrieveOrdersResponse)#9 (2) { ["orders":protected]=> NULL ["errors":protected]=> NULL }
The order id I'm using came from an order placed in sandbox, from the URL on the redirect URL:
checkoutId=CBASEO0b4bbWpum1aleKACATKzg&session_id=123&transactionId=CMzyOm702NumugckHC1J63UjDb4F
I'm expecting to get an Order model back, but get NULL instead.
Suggestions?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Hi @ourgourmetlife! Welcome to the Community.
I reached out to someone on our API team with your inquiry and this was their response:
After searching our internal logs, the order id they provided (CBASEO0b4bbWpum1aleKACATKzg) isn’t an order id - it’s a checkout id. Since they’re using create checkout, the checkout should have an order object with an id on it. In this case the order is actually CMzyOm702NumugckHC1J63UjDb4F1 for that checkout.
Hope this helps!
Community Moderator, Square
Sign in and click Mark as Best Answer if my reply answers your question.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report