Test mode
Calls made with a test key (pgod_test_…) run in test mode:
- your real catalog and NET prices, real shipping and tax: a test quote or order is priced exactly like a live one;
- test orders are never charged, made or shipped;
- test ids start with
test_(test_odo_…,test_odq_…); - a test order is
acceptedstraight away; it has no shipments and no invoice; - test webhooks go only to your test endpoints, and live webhooks only to live endpoints.
Test and live data never mix: a test key cannot see live orders, and a live key cannot see test orders.
What to test
Work through this list with your test key before you ask for live access:
- Get a token, cache it, and refresh it when you get
401 token_expired. - Read your catalog and map each of your store's products to our SKUs (or your own SKUs).
- Place an order with an
Idempotency-Key. Send the same request again with the same key: you get the same order back withIdempotent-Replayed: true, not a second order. - Send an order with a SKU that is not yours, or a bad address, and show the error to your team (
422 validation_failed, witherrors[].detail). - Look an order up by your order number with
GET /orders/by-external-id/{external_id}. - Cancel a test order with
POST /orders/{id}/cancel. - Add a webhook endpoint, press Send test event (or
POST /webhook-endpoints/{id}/test), and check that your server verifies the signature. See Webhooks. - Handle
429 rate_limitedby waiting theRetry-Afterseconds.
Going live
When your test orders work, ask your account manager for live access. We:
- switch on live API access for your account;
- issue your live key (
pgod_live_…), with the scopes you need.
Then point your store at the live key and add your live webhook endpoint.
A new live key starts on probation: in its first 24 hours it can place up to 3 orders or $500.00 in total. This protects you if a new integration misbehaves. Ask us to end probation early if you need to.
Live orders
With a live key, POST /orders places a real order, exactly like the New order page:
- Card on file: we charge your card when we accept the order. A declined card returns
402and no order is created. - Invoice terms: the order is invoiced to your account.
Your order limits (maximum order value and orders per day) apply; see GET /account.