Create a print order for an uploaded PDF, at the size you choose (size, from formats[].sizes in get_catalog; without it, the size the pages match exactly, else size_required). The file is never refused for its content: it is checked against the order after payment by our print team, who fit it to the size ordered and contact the buyer if they cannot. A storybook needs a page count we price. Returns { order, order_token } — the order object has order_id, status, amount, and payment_url (the Razorpay link, present while awaiting_payment). Give payment_url to the human to pay by the method chosen in pay_with (UPI or netbanking by default, which adds the 2% Razorpay fee; card adds 3%). SAVE order_token — it is shown only once and is required for get_order and cancel_order. The order confirms automatically after payment; unpaid orders expire after 72 hours. An order may carry a coupon code, which gives it the enterprise price.
View input schema
{
"type": "object",
"properties": {
"upload_id": {
"type": "string",
"description": "upload_id of an uploaded PDF (any PDF the PUT accepted)."
},
"size": {
"type": "string",
"description": "The size to print, as an id from formats[].sizes in get_catalog, e.g. \"a4\" for a sticker, \"8x8\" for a storybook, \"a5-folded\" for a folded-card. Optional: without it the order takes the size the PDF pages match (within 2 mm), and fails with size_required when they match none. An id the format is not sold in fails with unknown_size. sticker-a3 and greeting-card-a5 come in one size and ignore it. We print the file at this size, scaling it when its pages are larger or smaller."
},
"format": {
"type": "string",
"enum": [
"paperback",
"hardcover",
"sticker",
"flat-card",
"folded-card",
"sticker-a3",
"greeting-card-a5"
],
"description": "paperback (staple-pinned) / hardcover (perfect bound): storybook, 24-64 pages including the 4-page 300gsm cover (page 1 front cover, page 2 inside front, last two pages inside back and back). sticker: custom-cut stickers, a one-page PDF at A3, A4 or A5 (portrait or landscape) with the artwork on a white or transparent background; we cut around the artwork. flat-card: a flat greeting card at A4, A5, A6, 8×8 in, 7×5 in or 6×4 in; page 1 front, page 2 back (optional). folded-card: a greeting card folded once, A4, A5 or A6 folded; the PDF page is the open spread (A3, A4 or A5 landscape), page 1 outside (back left, front right), page 2 inside (optional). sticker-a3: an A3 wall chart, an A3 print mounted on foam board, for platforms (exactly 1 page and 1 copy, 842×1191 pt). greeting-card-a5: one personalised folded A5 card for platforms, one A4-landscape sheet printed duplex (exactly 2 pages, 859×612 pt incl. 3 mm bleed)."
},
"finish": {
"type": "string",
"enum": [
"gloss",
"matte"
],
"description": "paperback/hardcover: the lamination, gloss (the default) or matte. flat-card/folded-card: matte (the default) or gloss, the coating of standard card or the lamination of laminated card. Ignored for other formats."
},
"paper": {
"type": "string",
"enum": [
"170gsm",
"300gsm",
"standard",
"laminated"
],
"description": "paperback/hardcover: inside-page paper, 170gsm (standard, the default) or 300gsm (thick, costs more); every cover is 300gsm card; see price_table.paper_prices in get_catalog. flat-card/folded-card: standard (300 GSM coated card, the default) or laminated. Ignored for other formats."
},
"copies": {
"type": "integer",
"minimum": 1,
"maximum": 10000,
"default": 1,
"description": "Required for sticker (500 to 10,000 pieces, cheaper per piece from 1,000) and for flat-card/folded-card (10 to 5,000 cards, cheaper per card from 50, 250 and 500). Books and greeting-card-a5 take 1 to 20, sticker-a3 exactly 1, every copy the same price, and only they may leave it out for 1 copy."
},
"email": {
"type": "string",
"format": "email",
"description": "Buyer email, e.g. priya@example.com; receives the Razorpay payment notification."
},
"coupon": {
"type": "string",
"description": "A coupon code (optional), e.g. \"FRIEND25\", for any product. It takes its percentage (discount_pct) off the retail price of that product, never below making cost (the enterprise price), and the amount and payment link reflect it. A coupon is for one product or for every product. Codes are 4 to 24 letters and digits, case does not matter. Check one first with GET /v1/coupons/{code}. Enterprise (invoiced) accounts already pay the enterprise price and cannot use coupons. A code that does not apply fails with coupon_not_found, coupon_expired, coupon_used_up, coupon_wrong_product or coupon_not_for_enterprise."
},
"pay_with": {
"type": "string",
"enum": [
"bank",
"card"
],
"default": "bank",
"description": "How the buyer will pay the Razorpay link (optional, default \"bank\"). \"bank\" is UPI or netbanking and adds Razorpay's 2% fee; \"card\" is cards, wallets, EMI or Pay Later and adds 3%. The payment link offers only those methods, and order.amount shows price_paise, payment_fee_paise and total_paise. get_catalog's online_payment lists the live fees. Invoiced (enterprise) orders ignore it."
},
"client_reference": {
"type": "string",
"minLength": 1,
"maxLength": 120,
"description": "Your own order id, e.g. \"shop-order-48213\" (optional). For callers sending an API key it makes create_order idempotent: replaying the same reference returns the original order instead of printing a second copy (order_token is then null, it was shown at the original creation). A canceled, refunded or expired order releases its reference. Stored but not enforced for keyless callers."
},
"address": {
"type": "object",
"description": "India shipping address (V1 ships within India only).",
"properties": {
"name": {
"type": "string",
"description": "Recipient name as the courier should read it, e.g. \"Priya Raman\"."
},
"line1": {
"type": "string",
"description": "Street address: flat or house, building, street, e.g. \"12B, Lakeview Apartments, 4th Cross\"."
},
"line2": {
"type": "string",
"description": "Area or landmark (optional), e.g. \"Indiranagar, near Metro station\"."
},
"city": {
"type": "string",
"description": "City or town, e.g. \"Bengaluru\"."
},
"state": {
"type": "string",
"description": "Indian state or union territory, e.g. \"Karnataka\"."
},
"pincode": {
"type": "string",
"description": "6-digit India PIN code"
},
"phone": {
"type": "string",
"description": "India mobile, 10 digits, optional +91 prefix"
}
},
"required": [
"name",
"line1",
"city",
"state",
"pincode",
"phone"
],
"additionalProperties": false
}
},
"required": [
"upload_id",
"format",
"email",
"address"
],
"additionalProperties": false
}