Skip to content
TCGPlaytestdocsDashboard
Documentation API reference
API reference

Webhooks

Receive signed order updates on your server.

Webhook setup and payloads

  1. Open Dashboard → 2. Order webhooks.
  2. Select Test or Live. Enter an HTTPS endpoint on the exact origin of your registered website, for example https://shop.example/webhooks/tcgplaytest.
  3. Select Save webhook and store the displayed whsec_ signing secret on your server. It is shown once. Saving again rotates that mode's secret; update your receiver.

Test and live settings are separate. Test carts can produce cart.expired after expiry and worker processing. Hosted and Connect simulator carts emit order.paid on completion. The test events API can then emit order.in_production, order.shipped or order.cancelled. These events include data.mode: "test" and data.simulated: true and go only to the Test webhook. They never start real fulfillment. Prepaid sandbox events retain their existing flow.

Live order events are order.paid, order.in_production, order.shipped and order.cancelled. Their envelope is {id, type, created_at, data}. Deduplicate by the top-level id; data.id is the order ID. Each lifecycle transition has its own event ID; retries preserve it.

Order shipped webhook payload
{
  "id": "evt_cccccccccccccccccccccccccccccccc",
  "type": "order.shipped",
  "created_at": "2026-10-08T15:00:00.000Z",
  "data": {
    "id": "00000000-0000-4000-a000-000000000042",
    "cart_id": "cart_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "external_ref": "store-order-1042",
    "status": "shipped",
    "shipment": {
      "carrier": "Example carrier",
      "tracking_number": "TRACK-1042",
      "tracking_url": "https://shipping.example/track/TRACK-1042"
    }
  }
}

All order.* events use these data fields: id, cart_id, nullable external_ref, status and nullable shipment. Shipment has the same shape as in the order response. For cart.expired, data.id is the cart ID; there is no cart_id, shipment or order ID field:

Cart expired webhook payload
{
  "id": "evt_dddddddddddddddddddddddddddddddd",
  "type": "cart.expired",
  "created_at": "2026-10-13T12:00:01.000Z",
  "data": {
    "id": "cart_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "external_ref": "store-order-1042",
    "status": "expired"
  }
}

created_at is an RFC 3339 timestamp with timezone. The envelope does not contain a mode field; select your test/live verifier using the webhook endpoint and its signing secret. No cart.open, cart.failed or order.blocked event is currently emitted; use cart polling and order reconciliation for those states.

Verify TCGP-Signature as t=unix_seconds,v1=hex_hmac: compute HMAC-SHA256 over the exact timestamp + "." + rawBody, using your signing secret. Do not parse and reserialize JSON before verification. Compare signatures in constant time and reject timestamps outside a five-minute (±300 seconds) tolerance.

After verification, durably store or enqueue the event and return any 2xx response within 15 seconds. Redirects are not followed. Failed deliveries retry up to 12 total attempts with increasing delays starting at 30 seconds and capped at one day; worker scheduling can delay attempts. Delivery is asynchronous, can repeat and has no ordering guarantee. Use order GET to reconcile the current state; contact support if deliveries are exhausted.

24 topics

Get startedOverview

Everything you need to turn artwork into printed cards.

Get startedFirst order in 10 minutes

A runnable sandbox example from test key to verified webhook delivery.

Get startedOrder with AI · MCP

Connect ChatGPT, Claude, Gemini or your developer tools, preview your cards and check out without a TCGPlaytest account or customer API key.

Get startedTest checkout & events

Simulate checkout, verify the order, return to your store and trigger signed test events.

Get startedQuickstart & authentication

Set up your account, protect your API key and make your first integration.

Get startedHow checkout works

Create a cart, wait for artwork validation and open checkout on your website.

Get startedCode examples

Working server examples in your preferred language.

Build your integrationCheckout widget

Connect finished images to a ready-made review and checkout experience.

Build your integrationEmbedded checkout

Keep delivery details and artwork confirmation inside your own website.

Build your integrationCheckout branding

Make checkout feel like your store with saved branding and style presets.

Build your integrationCustom success page

Return customers to your registered website after verified payment.

Build your integrationStripe Connect payouts

Set your card selling price and receive earnings, with a 5% reserve for 15 days.

Build your integrationPrinting credits

Use your balance for printing, with customer shipping and tax paid through Stripe.

API referenceUpload artwork

Request a temporary upload URL. Send file bytes directly to private storage.

API referenceCreate a cart

Submit finished artwork, quantities and your success URL for validation.

API referenceRetrieve a cart

Read validation progress, quality warnings and checkout availability.

API referenceRetrieve an order

Track a funded manufacturing order from payment to shipment.

API referenceWebhooks

Receive signed order updates on your server.

ResourcesArtwork & API limits

File specifications, card limits and request allowances for this deployment.

ResourcesErrors & retries

Understand failures and retry safely without creating duplicate carts.

ResourcesGoing live

Partner launch checklist: verified orders, allowed origins and live checkout.

ResourcesAffiliate codes

Apply your approved affiliate preference to new carts.

ResourcesExpiry & retention

Understand cart lifetimes, artwork storage and cleanup.

ResourcesTerms & image rights

Know your responsibilities and the customer acceptance requirements.