Created Order in Sandbox

Where can I see my orders of sandbox?
I am creating an order through this endpoint “https://connect.squareupsandbox.com/v2/locations/{{location_id}}/orders”. I am getting 200K status code and a valid response. But in sandbox’s dashboard I’m not seeing any order created.

Hey @imusman welcome to the forums!

For an order to be seen in Dashboard, it must have a fulfillments field, plus be paid for. Are those two requirements being done?

1 Like

@sjosey Thanks for your response
Yes, I have a fulfillments field. But what do you mean by “be paid for”?
Do you mean order should be paid? If yes, how can I pay for the order? Which endpoint I would use?

Yes, you have to pay for the order. You can use CreatePayment and pass the order_id in the request.

1 Like

As some feedback to Square, you need to highlight this in the developer docs as it’s pretty crazy that an order can be created and fully available in the API but not show up in the Dashboard. Personally, I’d consider this a huge bug but I understand the thought process that went into it.

I made a quick gist to demo the process:

2 Likes

@sjosey @ColinLongworth does it need to be paid and have fulfillment details for an order to be seen in the sandbox dashboard or on the merchant’s dashboard or both?
Is it possible to send an order that has been paid in advance and not through Square payment processor?

thank you <3
This is super helpful. To create an order outside of sandbox, should I follow this same structure?

If yes, what do you replace this with?
//In the sandbox, you can use this demo source.
$body_sourceId = ‘ccof:customer-card-id-ok’;
$body_idempotencyKey = uniqid();
$body_amountMoney = new \Square\Models\Money;
$body_amountMoney->setAmount($order->getTotalMoney()->getAmount());
$body_amountMoney->setCurrency(\Square\Models\Currency::CAD);
$body = new \Square\Models\CreatePaymentRequest(
$body_sourceId,
$body_idempotencyKey,
$body_amountMoney
);

It must be paid to be seen anywhere including the dashboard or Square POS. If it’s not paid by Square, you cannot complete it so it will not show up. Yes, production will work the same; you just need to update your credentials and host domain (so use connect.squareup.com instead of connect.squareupsandbox.com).

Thank you @sjosey.
Is there a workaround for placing an order via the Order API for people who want to redeem online a bundle that they had bought in cash?

Basically, people paid 10 coffees beforehand in cash and I want that they can order those 10 coffees from my app without having to pay. I wanted that the shop can receive that order as well.

Reply from Stephen on slack: 1. Technically, yes, you are able to pay for an order that has a total of $0. You will want to use the PayOrder endpoint and simply do not pass any payment_ids along with it.