x

CREATE ORDER in Sandbox mode

This is regarding taking ONLINE PAYMENTS usinf the Square API v2.

I've finished a website to accept credit cards online, everything works ok, the problem is when I go to see the transactions in my Dashboard of course the order doesn't contain any item, or quantity ordered and I have no idea what are the order details. Later on I read about the CATALOG and ORDER API's, the problem is the CATALOG API is not supported on SANDBOX, of course I can get my catalog from my production items and create an ORDER to use the ORDER_ID with the CHARGE API but when I try to place CHARGE using the create order of course it sayd the ORDER_ID does not exist. Well of course is does not. Is there any way to test CATALOG, CREATE ORDER and CHARGE all together in SANDBOX?

2,836 Views
Message 1 of 7
Report
6 REPLIES 6
Alumni

Just responded to your other post, but checking in here as well. I'm reaching out to our Developer Support team to get an answer for these issues. Thanks for your patience!

2,815 Views
Message 2 of 7
Report

Hello @GloriousSauces

 

Sandbox mode lets you test out API endpoints in a non-production environment. Transactions created in the sandbox are not sent through to card networks, and cards are never charged. We have a widget in our docs to test out Square's API (https://docs.connect.squareup.com/articles/using-sandbox). Any payments taken in sandbox mode will not viewable in the Dashboard.

 

Currently Order creation is supported in sandbox mode for adhoc items only and not Catalog items. The Square Catalog API is not supported in sandbox mode at this time.

 

Please let me know if you have any other questions.

2,803 Views
Message 3 of 7
Report

Hi there!

Thanks for response related to above queries. Well i have a query once i created order with v2 api and it's successfully return response with all order details as mentioned in order API section in 

 

https://docs.connect.squareup.com/api/connect/v2#endpoint-createorder

 

 

but when i try to retrive orders with https://connect.squareup.com/v2/locations/{locatiod_id}/orders/batch-retrieve

 

with this endpoints and mentioned all correct details accordingly but it's return a empty curly braket {} like this

2,778 Views
Message 4 of 7
Report
Admin

Thanks for your post @cherrywilson! Our Developer Support team is looking into this for you. As soon as I have an update I'll let you know here. 

️ Helen
Seller Community Manager

Did you find help in the Seller Community? Mark a Best Answer to help others.
2,764 Views
Message 5 of 7
Report

Thanks for your response we still waiting for technical reply.

 

How we can check out order itemization that place from sandbox api ?

 

Thanks 

2,750 Views
Message 6 of 7
Report
Admin


@cherrywilson Thanks for your patience! 

 

In order to lookup orders you’ve created, you must  charge the order to get a response. (This can be seen here: https://docs.connect.squareup.com/api/connect/v2#endpoint-batchretrieveorders.) 

 

This means that after you create the order, use the Transactions API (which is accessible in Sandbox - https://docs.connect.squareup.com/api/connect/v2#endpoint-charge) to charge the order, based on the order_id in the response when you create the order.

 

Note that Sandbox provides fake card_nonces such as “fake-card-nonce-ok” so you don’t have to use real payment methods. After you charge the order, the BatchRetrieveOrders will be able to return a full response when provided with the order_id you just charged.

️ Helen
Seller Community Manager

Did you find help in the Seller Community? Mark a Best Answer to help others.
2,725 Views
Message 7 of 7
Report