On this page
DocsGet started

Testing in the sandbox

Sandbox keys (jp_test_…) run the real flow — checks, charges, events, webhooks — but nothing is printed, shipped or charged to a card.

The sandbox#

  • Orders are checked for real: we download the artwork and measure it.
  • Charges are simulated and always succeed.
  • Webhooks are real: sandbox events go to your sandbox endpoints, signed.
  • Sandbox orders never reach our shop floor. You move them forward yourself (below).

Test artwork#

Use these URLs as items[].artwork.url to get each result on purpose. They’re generated on our side, so they work offline and never change. They’re sandbox only: live orders that use them get 422 artwork_url_invalid.

URLSizeResult
https://test-artwork.jigsawpress.com/good.jpg6000 × 4286Passes.
https://test-artwork.jigsawpress.com/soft.jpg2400 × 1714Soft: passes with a warning, or is rejected (artwork_low_resolution) if your account setting is "reject".
https://test-artwork.jigsawpress.com/low.jpg1200 × 857Rejected as artwork_low_resolution.
https://test-artwork.jigsawpress.com/portrait.jpg4286 × 6000Passes as a portrait puzzle.
https://test-artwork.jigsawpress.com/unreachable.jpg—Rejected as artwork_unreachable.
https://test-artwork.jigsawpress.com/invalid.jpg—Rejected as artwork_invalid.

Simulate the next steps#

POST /v1/orders/:id/simulate moves a sandbox order forward, firing the same events and webhooks as the real thing. Send status (and stage with in_production):

BodyMoves it to
{"status":"paid"}paid — via a simulated charge
{"status":"in_production","stage":"printing"}in_production · printing (or cutting, packing)
{"status":"shipped"}shipped, with a fake tracking number
{"status":"delivered"}delivered
{"status":"exception"}exception — a delivery problem (after shipped)

It walks through every step in between, so {"status":"delivered"} on a paid order sends printing, cutting, packing, shipped and delivered events in order. It only moves forward. The dashboard has the same buttons on each sandbox order.

POST/v1/orders/:id/simulate
curl https://jigsawpress.com/v1/orders/ord_k4Mn8Pq3xY2aBc/simulate \  -H "Authorization: Bearer $CORNERPIECE_KEY" \  -H "Content-Type: application/json" \  -d '{  "status": "shipped"}'
403 ForbiddenWith a live key
{  "error": {    "type": "permission_error",    "code": "sandbox_only",    "message": "Simulation only works with sandbox keys.",    "param": null,    "request_id": "req_Xb4Nq8Lm2Rt7Vw"  }}

Simulated charges#

Call POST /v1/charges with a sandbox key (or click Pay now) to charge every sandbox order in awaiting_payment. You get a charge with simulated: true, a charge.succeeded event and order.paid for each order. See Billing.

Test addresses#

Any real-looking US address works. ZIPs must be 5 digits (or ZIP+4) and states 2 letters. We don’t ship sandbox orders, so it doesn’t need to exist.

Before you go live#

  1. Create orders with good.jpg, soft.jpg and low.jpg; handle awaiting_payment, warnings and rejected.
  2. Send every request with an Idempotency-Key, and retry safely on network errors and 5xx.
  3. Verify webhook signatures and dedupe by event.id.
  4. Simulate an order to delivered and one to exception; make sure your system shows both.
  5. Cancel an order and check you handle order.canceled.
  6. Add a card and request live access.
Questions while integrating? Email developers@jigsawpress.com or call (609) 831-2826.