Skip to content
TCGPlaytestdocsDashboard
Documentation Build your integration
Build your integration

Embedded checkout

Keep delivery details and artwork confirmation inside your own website.

Keep checkout on your website

The widget now opens delivery details, saved partner branding, quality warnings and image-rights confirmation inside your current page. Uploading cards does not navigate customers to the TCGPlaytest website. Only the payment step opens Stripe; verified payment then returns to your registered success URL.

The registered website is allowed to embed checkout automatically. Add additional exact HTTPS origins under Dashboard → Widget websites. These embedding permissions do not change the separate origin restriction on return_url. No new API key, database migration or environment variable is needed.

For a server API integration, keep creating and polling carts on your server. Load the widget script with data-auto-button="false" and the configured data-checkout-origin, then pass the open cart to the browser helper:

Open checkout inside your partner page
// Run after the widget script loads. cart comes from your own server.
// Never send the partner API secret to the browser.
if (cart.status === "open") TCGPlaytest.checkout(cart);
// Do not navigate window.location to cart.checkout_url for this flow.

The helper validates the checkout URL and opens a protected frame on the partner page. Closing it keeps the submitted cart available to resume. Test carts show an Open simulated checkout button that opens a full-page sandbox. For an intentional full-page handoff, add data-checkout-display="redirect" to the script; embedded checkout is the default.

Existing API clients that explicitly redirect to checkout_url must replace that redirect with the helper above. The API cannot control navigation already performed by a partner's browser code.

If checkout is blocked

Test previews do not exercise the live checkout frame. Save the exact HTTPS origin of the page opening checkout under Dashboard → Widget websites; www.example.com and example.com are different origins. Use a fresh live cart whose status is open. An expired, already-used or unvalidated cart cannot open checkout.

Use the helper above instead of framing the raw checkout_url. The helper opens /embed/partner-checkout/<token>?parent_origin=<origin>. Ordinary checkout pages intentionally send X-Frame-Options: DENY. Embedded checkout checks the cart and saved origins before allowing the frame; Stripe payment still opens at the top level.

If it still fails, open browser DevTools → Network, select the failed embed document and copy only its X-TCGP-Checkout-Request-Id response header. Send support that reference, the time and your website origin. Do not post the private checkout URL, cookies, tokens or API keys. Support can match the reference to the specific rejection reason in both applications' logs. If the header is absent, report that too; an older deployment or a hosting/firewall response may have handled the request.

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.