Skip to content
TCGPlaytestdocsDashboard
Documentation API reference
API reference

Create a cart

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

POST /v1/carts

POST/v1/carts

Idempotency-Key is required: 1–200 visible ASCII characters (0x21–0x7E), with no spaces. For example, store-order-1042-rev1. Use one value per order revision; retry identical instructions with the same value. Keys are scoped to partner and test/live mode.

Field / limitDescription
itemsRequired array of 1–1000 items. The sum of all quantities must also be at most 1000.
items[].image_urlRequired front-image HTTPS URL: an API-issued image_url after successful upload, or your existing public image URL.
items[].quantityRequired positive integer. Maximum 1000, subject to the cart-wide total.
items[].back_image_urlOptional back-image HTTPS URL. An item-specific back overrides the shared back. If both are omitted, TCGPlaytest supplies its default card back. Send the matching reverse face for double-sided cards.
items[].sha256 / back_sha256Optional 64-character hexadecimal SHA-256 of exact front/back file bytes, case-insensitive. Omit or use null for server-computed hashes. A mismatch fails that item/side.
back_image_url / back_sha256Optional shared back URL and hash. Used only for items without an item-specific back URL; an item-specific back uses its own back_sha256.
card_stockOptional; only "standard" is supported, and is the default.
retail_amount_centsRequired only for Connect: whole-cart card-sale subtotal, USD cents (50–5000000), excluding shipping/tax. Must cover printing; fees reduce earnings.
settlementOptional: "hosted" (default), "connect" or "prepaid". Connect requires onboarding and retail_amount_cents; it never spends printing credit. Prepaid requires a key matching the platform Stripe mode and an enabled credit account; once artwork is open, quote, reserve credit and submit an order through the prepaid endpoints. Prepaid carts never expose checkout_url.
external_refOptional string of at most 200 UTF-16 code units (200 ordinary characters); no format restriction. Omitted/empty input becomes null. Returned for your reference; does not enforce uniqueness or idempotency.
return_urlOptional HTTPS URL on the exact registered website origin (scheme, hostname and port). Omit to use the registered website URL. A different subdomain is a different origin.

Unknown request fields are rejected. Do not send certification, affiliate_code, artwork-library IDs or partner-terms fields. The server copies the authenticated partner's accepted terms version and timestamp onto each new cart.

Create cart request JSON
{
  "external_ref": "store-order-1042",
  "return_url": "https://shop.example/order-complete",
  "items": [
    {
      "image_url": "https://images.example/front.png",
      "back_image_url": "https://images.example/back.jpg",
      "quantity": 3
    }
  ]
}

Example response: HTTP 202 with Retry-After: 3. The example timestamps are illustrative; your actual expires_at is authoritative.

202 validating cart response
{
  "id": "cart_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "status": "validating",
  "external_ref": "store-order-1042",
  "card_count": 3,
  "card_stock": "standard",
  "affiliate_code": null,
  "progress": {
    "done": 0,
    "total": 2
  },
  "errors": [],
  "warnings": [],
  "partner_terms_version": "2026-10-04-partner-v2",
  "mode": "test",
  "order_id": null,
  "expires_at": "2026-10-13T12:00:00.000Z",
  "created_at": "2026-10-06T12:00:00.000Z"
}

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.