PARTNER API v1.0

Partner
Integration API

Create custom print sessions where your users can design and order personalized products. Simple REST API with webhooks for real-time order updates.

How It Works

From API call to delivered product in 6 simple steps

1

Create a Session

Your Server

Make a POST request to our API with the design image URL, successUrl, failedUrl, and your webhook endpoint. You'll get back a unique redirect URL.

POST /api/v1/partner-session
2

Redirect the User

Your App

Send your user to the redirect URL. They'll start as a guest — no sign-up or login needed.

Link valid for 24 hours
3

User Chooses Product

Printora

Your user picks a product (t-shirt, mug, poster, etc.), selects sizes and colors, then positions their design on Printora's editor.

Full design editor experience
4

User Checks Out

Printora

The user completes guest checkout through Printora's secure payment via Stripe or NOWPayments (crypto). An account is created automatically, and the user is redirected to your successUrl (or failedUrl if cancelled).

Stripe & NOWPayments supported
5

You Get Notified

Webhook

We send a webhook to your endpoint with the order details — created, paid, shipped, delivered. Signed with HMAC for security.

Real-time event notifications
6

Track & Manage Orders

Your Server

Use the API to retrieve order details, check fulfillment status, and get tracking numbers. Show your users their order progress.

GET /api/v1/partners/orders

API Capabilities

Everything you need to integrate print-on-demand into your platform

Session Management

Create print sessions with design images and customer data. Guest checkout — no login required.

24-hour session lifetime
Guest checkout flow
Idempotency key support

Order Management

Retrieve and track all orders with pagination and status filtering.

Paginated order listing
Filter by order status
Shipping & tracking info

Webhooks

Real-time HMAC-signed notifications for order lifecycle events.

4 event types
Auto-retry with exponential backoff
Manual resend & retry

Authentication

Secure Bearer token authentication with separate test and live API keys.

Test mode (pk_test_...)
Live mode (pk_live_...)
Webhook signature verification

Rate Limiting

Generous rate limits with transparent headers in every response.

100 requests/minute
1,000 requests/hour burst
Rate limit headers included

Webhook Logs

Full visibility into webhook delivery status with filtering and pagination.

Filter by status & event
Delivery attempt tracking
Debug failed deliveries

API Endpoints

All available endpoints for the Partner Integration API

POST/api/v1/partner-session

Create a new partner session with design image, customer data, and redirect URLs

Session Management
GET/api/v1/partner-session/:sessionId

Get session details, status, and linked order info

Session Management
GET/api/v1/partners/orders

List all orders with pagination and status filtering

Order Management
GET/api/v1/partners/webhook-logs

View webhook delivery logs with filtering by status and event type

Webhook Management
POST/api/v1/partners/webhooks/resend

Resend a webhook by sessionId or orderId and event type

Webhook Management
POST/api/v1/partners/webhook-logs/:webhookLogId/retry

Retry a specific failed webhook delivery

Webhook Management

Quick Start

Get started in minutes with these examples

1. Create Partner Session
// Create a partner session
const response = await fetch('https://printora-be-prod.vercel.app/api/v1/partner-session', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer pk_live_your_api_key_here',
    'Content-Type': 'application/json',
    'Idempotency-Key': crypto.randomUUID()
  },
  body: JSON.stringify({
    imageUrl: 'https://example.com/user-design.png',
    userData: {
      email: 'customer@example.com',
      firstName: 'John',
      lastName: 'Doe'
    },
    successUrl: 'https://yourapp.com/order/success',
    failedUrl: 'https://yourapp.com/order/failed'
  })
});

const { data } = await response.json();
// Redirect customer to design & checkout (guest flow)
window.location.href = data.redirectUrl;

Webhook Events

Stay informed with real-time order lifecycle notifications

order.created

Immediately after order created at checkout

order.paid

After successful payment with full order details

order.shipped

When shipped with tracking number and carrier info

order.delivered

When carrier confirms delivery

Automatic Retry with Exponential Backoff

Failed webhooks are automatically retried up to 5 times with increasing intervals:

Retry 1: ImmediateRetry 2: 1 minRetry 3: 5 minRetry 4: 30 minRetry 5: 2 hours

Webhook Response Format

Your webhook endpoint should respond with these formats:

Success Response (200 OK)

{
  "received": true,
  "duplicate": false
}

Duplicate Event Response (200 OK)

{
  "received": true,
  "duplicate": true
}

An event is considered duplicate if the same sessionId + event combination has already been processed.

Error Responses

These error codes may be returned when webhook validation fails:

StatusErrorDescription
401Invalid webhook signatureSignature verification failed
400Invalid webhook payloadJSON parsing failed
400Invalid webhook payload: missing required fieldsRequired fields are missing
405Method not allowedNon-POST request

Environment Variables

Configure these environment variables for your integration:

PRINTORA_API_KEY

API key for Printora API

Example: sk_test_your_api_key_here

PRINTORA_API_URL

Base URL for Printora API

Example: https://api-staging.printora.ai

PRINTORA_WEBHOOK_SECRET

Secret for webhook signature verification

Example: webhook_secret_abc123...

Session Lifecycle

Every session goes through a series of states from creation to completion

Normal Flow

1
pendingSession Created

You call the API to create a session with successUrl and failedUrl for redirects. A redirect URL is generated for your user. The URL is valid for 24 hours.

24 hours to use the link
2
activeUser Chooses Product

The user clicked the link and chooses a product, selects sizes and colors, then positions their design as a guest — no login required. The session stays active for 24 hours.

24 hours to complete
3
completedOrder Placed

The user completed guest checkout and placed their order. You'll receive a webhook notification with the order details. The user is redirected to your successUrl.

What Can Go Wrong

expiredSession Timed Out

The user didn't click the redirect link within 24 hours, or didn't complete checkout within the session lifetime. You'll need to create a new session.

cancelledSession Cancelled

The session was manually cancelled via the API before the user completed their order. No charges are made.

Ready to Integrate?

Start integrating print-on-demand into your platform today. Get your API key and go live in hours.

Test & live API keys
Staging environment
Postman collection ready
Example integration on GitHub

Need help? Contact us at support@printora.ai