Moltpost
Send real physical postcards anywhere in the world. Pay with x402 (USDC on Base), Stripe, or manual USDC transfer. No signup, no API key — just one API call.
Send real physical postcards anywhere in the world. Pay with x402 (USDC on Base), Stripe, or manual USDC transfer. No signup, no API key — just one API call.
Real data. Real impact.
Growing
Developers
Per week
Open source
Skills give you superpowers. Install in 30 seconds.
Send real physical postcards anywhere in the world through a single API call. No registration. No API key. No account. Just compose, pay, and a printed postcard arrives in the mail.
Base URL:
https://api.moltpost.io/v1
| File | URL |
|---|---|
| SKILL.md (this file) | https://moltpost.io/skill.md |
| HEARTBEAT.md | https://moltpost.io/heartbeat.md |
Moltpost supports three payment methods:
The x402 protocol lets agents pay with USDC directly via HTTP — no gas fees, no wallet management, no two-step flow. If your agent has a crypto wallet, always use x402.
POST /v1/postcards/x402 with recipient address and content (no payment header)X-PAYMENT (v1) or PAYMENT-SIGNATURE (v2) header containing the signed payloadNo gas fees. No separate confirmation step. One round-trip after signing.
Base Sepolia (testnet) payments use mock fulfillment — the postcard is marked "sent" but not printed. Use Base mainnet for real postcards.
POST /v1/postcards with recipient address and contentThe human must approve and pay. Never attempt to complete payment on behalf of the owner. Always present the payment link and let them decide.
POST /v1/postcards with "payment_method": "usdc" and "usdc_chain": "base-sepolia" (or "base" for mainnet)usdc_payment object with the recipient wallet, exact USDC amount, token contract, and deadlinePOST /v1/postcards/{id}/confirm-payment with the transaction hashNote: Base Sepolia (testnet) payments use mock fulfillment — the postcard is marked as "sent" but not actually printed. Use
"base" for real postcards on mainnet.
Agent decision guide: If you have a crypto wallet → use x402. If you don't → use Stripe and present the payment link to your owner.
idempotency_key to avoid duplicate postcards.POST /v1/postcards
curl -X POST https://api.moltpost.io/v1/postcards \ -H "Content-Type: application/json" \ -d '{ "to": { "name": "Jane Doe", "address_line1": "123 Main St", "city": "San Francisco", "province_or_state": "CA", "postal_or_zip": "94105", "country_code": "US" }, "front_html": "<div style=\"width:6.25in;height:4.25in;margin:0;padding:0;overflow:hidden;background:#2d3436;display:flex;align-items:center;justify-content:center;\"><div style=\"font-family:Georgia,serif;font-size:36px;font-weight:bold;color:white;\">Hello from the Future!</div></div>", "back_message": "Wish you were here. The AI sends its regards.", "size": "6x4", "currency": "usd" }'
| Field | Type | Required | Description |
|---|---|---|---|
| object | Yes | Recipient address |
| string | Yes | Recipient name (1-255 chars) |
| string | Yes | Street address (1-255 chars) |
| string | No | Apt, suite, unit, etc. |
| string | Yes | City (1-255 chars) |
| string | No | State, province, or region |
| string | No | Postal or ZIP code |
| string | Yes | ISO 3166-1 alpha-2 (e.g. , , , ) |
| object | No | Return address (same fields as ) |
| string | Yes | HTML for the front of the postcard (max 100,000 chars) |
| string | Exactly one of or | HTML for the back of the postcard (max 100,000 chars) |
| string | Exactly one of or | Plain text message for the back (max 5,000 chars). Auto-wrapped in styled HTML. |
| string | No | (default), , or (inches) |
| string | No | (default), , , , , , , , , |
| string | No | (default) or . USDC payments are always priced in USD. For x402 payments, use the endpoint instead. |
| string | No | (default) or . Only used when is . |
| string | No | Unique key to prevent duplicate submissions |
| string | No | Share code from another postcard. If valid, the referred user gets $1 off. |
| boolean | No | (default). Postcards are public by default and may appear in Moltpost promotional materials or on the website. Set to opt out. Note: this only controls visibility on Moltpost — postcards are physically unsealed and visible to anyone who handles them in transit. |
Stripe response:
{ "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "status": "pending", "size": "6x4", "currency": "usd", "amount_cents": 399, "discount_cents": 100, "payment_method": "stripe", "payment_url": "https://checkout.stripe.com/c/pay/cs_...", "share_url": "https://moltpost.io/?ref=Ab3kX9mZ", "expires_at": "2026-02-05T00:00:00Z", "created_at": "2026-02-04T00:00:00Z" }
USDC response (when
payment_method is usdc):
{ "id": "88e34641-70c1-4840-aed3-d8f55c19e879", "status": "pending", "size": "6x4", "currency": "usd", "amount_cents": 499, "discount_cents": 0, "payment_method": "usdc", "payment_url": null, "usdc_payment": { "recipient_address": "0x2e5875730483d0fd1986ce1260e18e4d0b50178b", "amount_usdc": "4.990065", "amount_raw": 4990065, "chain": "base-sepolia", "chain_id": 84532, "token_contract": "0x036cbd53842c5426634e7929541ec2318f3dcf7e", "deadline": "2026-02-08T07:57:30Z" }, "share_url": "https://moltpost.io/?ref=cGX0NGNi", "expires_at": "2026-02-08T07:57:30Z", "created_at": "2026-02-07T07:57:30Z" }
Stripe: Present the
payment_url to your owner. The postcard is not printed until they pay.
USDC: Use
usdc_payment to send the exact amount_raw of USDC (6 decimals) to recipient_address on the specified chain. Then confirm with the tx hash (see below).
GET /v1/postcards/{id}
curl https://api.moltpost.io/v1/postcards/a1b2c3d4-e5f6-7890-abcd-ef1234567890
{ "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "status": "sent", "size": "6x4", "currency": "usd", "amount_cents": 499, "created_at": "2026-02-04T00:00:00Z", "updated_at": "2026-02-04T00:05:00Z", "paid_at": "2026-02-04T00:03:00Z", "sent_at": "2026-02-04T00:05:00Z" }
| Status | Meaning |
|---|---|
| Awaiting payment (24-hour window) |
| Payment received, submitting to print |
| Postcard submitted for printing and mailing |
| Print submission failed after payment |
| Payment window expired (24 hours) |
POST /v1/postcards/{id}/confirm-payment
After sending USDC onchain, call this endpoint with the transaction hash. Moltpost verifies the transfer onchain (correct recipient, correct amount, sufficient confirmations) and fulfills the postcard if valid.
curl -X POST https://api.moltpost.io/v1/postcards/88e34641-70c1-4840-aed3-d8f55c19e879/confirm-payment \ -H "Content-Type: application/json" \ -d '{"tx_hash": "0xabc123..."}'
| Field | Type | Required | Description |
|---|---|---|---|
| string | Yes | The onchain transaction hash (66 chars, + 64 hex). Must be a valid Base transaction. |
{ "id": "88e34641-70c1-4840-aed3-d8f55c19e879", "status": "sent", "verified": true, "message": "Payment verified and postcard submitted" }
If verification fails (wrong amount, wrong recipient, tx not found):
{ "id": "88e34641-70c1-4840-aed3-d8f55c19e879", "status": "pending", "verified": false, "message": "No matching USDC transfer found" }
The postcard stays
pending on failed verification — you can retry with a different tx hash.
amount_raw value. Each postcard gets a unique micro-amount (base price + a 0-99 nonce). Sending the wrong amount will fail verification.base-sepolia) use mock fulfillment — the postcard is marked "sent" but not printed. Use base for real postcards.POST /v1/postcards/x402
The x402 endpoint uses HTTP-native payment — no separate confirmation step. The payment is handled entirely via HTTP headers using the x402 protocol (EIP-3009 transferWithAuthorization, gasless for the client).
Send the postcard body without an
X-PAYMENT header:
curl -X POST https://api.moltpost.io/v1/postcards/x402 \ -H "Content-Type: application/json" \ -d '{ "to": { "name": "Jane Doe", "address_line1": "123 Main St", "city": "San Francisco", "province_or_state": "CA", "postal_or_zip": "94105", "country_code": "US" }, "front_html": "<div style=\"width:6.25in;height:4.25in;background:#2d3436;display:flex;align-items:center;justify-content:center;\"><div style=\"font-family:Georgia,serif;font-size:36px;color:white;\">Hello World</div></div>", "back_message": "Sent via x402.", "size": "6x4" }'
The 402 response includes both a JSON body and a
PAYMENT-REQUIRED header (base64-encoded, per x402 v2 spec).
{ "x402Version": 1, "accepts": [ { "scheme": "exact", "network": "base-sepolia", "maxAmountRequired": "4300000", "resource": "/v1/postcards/x402", "payTo": "0x...", "asset": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", "maxTimeoutSeconds": 60, "description": "6\"x4\" postcard to San Francisco, US via Moltpost", "mimeType": "application/json", "extra": {"name": "USDC", "version": "2"} }, { "scheme": "exact", "network": "eip155:84532", "maxAmountRequired": "4300000", "resource": "/v1/postcards/x402", "payTo": "0x...", "asset": "0x036CbD53842c5426634e7929541eC2318f3dCF7e", "maxTimeoutSeconds": 60, "description": "6\"x4\" postcard to San Francisco, US via Moltpost", "mimeType": "application/json", "extra": {"name": "USDC", "version": "2"} } ], "error": "X-PAYMENT header is required" }
The
accepts array contains two entries with different network formats — v1 (base-sepolia) and v2 CAIP-2 (eip155:84532). Pick the entry matching your x402 client version.
The
extra field contains EIP-712 domain parameters for the USDC token contract, required for signing. Base Sepolia uses "name": "USDC", Base mainnet uses "name": "USD Coin".
The
maxAmountRequired is in USDC base units (6 decimals). 4300000 = $4.30 USDC.
Using your wallet, sign an EIP-712
transferWithAuthorization message for the amount and recipient in the 402 response. Base64-encode the signed payload and resend the same request with either X-PAYMENT (v1) or PAYMENT-SIGNATURE (v2) header:
curl -X POST https://api.moltpost.io/v1/postcards/x402 \ -H "Content-Type: application/json" \ -H "X-PAYMENT: eyJ4NDAyVmVyc2lvbiI6MSw..." \ -d '{ ... same body as step 1 ... }'
Both
X-PAYMENT and PAYMENT-SIGNATURE headers are accepted. The response includes a PAYMENT-RESPONSE header (base64-encoded settlement details, per x402 v2 spec).
{ "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "status": "sent", "size": "6x4", "currency": "usd", "amount_cents": 430, "discount_cents": 69, "payment_method": "x402", "share_url": "https://moltpost.io/?ref=Ab3kX9mZ", "tx_hash": "0xabc123...", "created_at": "2026-02-08T00:00:00Z" }
The postcard is created, paid, and fulfilled in a single request. On testnet, status is immediately
"sent" (mock fulfillment). On mainnet, it's submitted to print.
The payment header (
X-PAYMENT or PAYMENT-SIGNATURE) is a base64-encoded JSON object:
{ "x402Version": 1, "scheme": "exact", "network": "base-sepolia", "payload": { "signature": "0x...", "authorization": { "from": "0xYourWallet", "to": "0xMoltpostWallet", "value": "4300000", "validAfter": "0", "validBefore": "1740672154", "nonce": "0x..." } } }
The
network field must match one of the entries from the 402 response's accepts array — either v1 format (base-sepolia, base) or CAIP-2 format (eip155:84532, eip155:8453). Use whichever format your x402 client supports.
The authorization is an EIP-3009
transferWithAuthorization — the facilitator submits it on-chain. No gas fees for the sender.
All prices include printing, postage, and worldwide delivery.
| Size | USD | EUR | GBP | CAD | AUD |
|---|---|---|---|---|---|
| 6x4 | $4.99 | 4.64 | 3.99 | $6.84 | $7.73 |
| 9x6 | $5.99 | 5.57 | 4.79 | $8.21 | $9.28 |
| 11x6 | $6.99 | 6.50 | 5.59 | $9.58 | $10.83 |
Also supports: CHF, SEK, NOK, DKK, NZD.
Pay with USDC (via x402 or manual transfer) and save $0.69 on every postcard (no credit card processing fees).
| Size | USDC Price | You Save |
|---|---|---|
| 6x4 | $4.30 | $0.69 |
| 9x6 | $5.30 | $0.69 |
| 11x6 | $6.30 | $0.69 |
The discount is applied automatically for both x402 and manual USDC payments. It stacks with referral discounts — with a referral code, a 6x4 postcard drops to $3.30 USDC ($1.69 total savings).
The HTML you provide is rendered to print at 300 DPI on 100lb glossy cardstock, full color, double-sided.
Design your HTML to these dimensions (include 0.125" bleed on each side):
| Size | Trim | Bleed (design to this) | Safe Zone (keep text here) |
|---|---|---|---|
| 6x4 | 6" × 4" | 6.25" × 4.25" | 5.75" × 3.75" |
| 9x6 | 9" × 6" | 9.25" × 6.25" | 8.75" × 5.75" |
| 11x6 | 11" × 6" | 11.25" × 6.25" | 10.75" × 5.75" |
Visual guidelines — front and back diagrams for each size:
front_html)This is the picture side — full creative freedom. Set your outer container to the bleed dimensions (e.g.,
width:6.25in; height:4.25in for 6x4). The entire front is yours; there are no reserved zones.
0.25in margin on the inner content containerHere are two approaches:
CSS-only design (no external images — always works):
<div style="width:6.25in; height:4.25in; margin:0; padding:0; overflow:hidden; background:#fdf6e3; display:flex; align-items:center; justify-content:center;"> <div style="width:5.75in; height:3.75in; border:2px solid #b58863; display:flex; align-items:center; justify-content:center;"> <div style="text-align:center; color:#5c3d2e; padding:20px;"> <div style="font-size:14px; font-family:Georgia,serif; letter-spacing:8px; text-transform:uppercase; margin-bottom:12px; color:#b58863;"> With Love </div> <div style="font-size:44px; font-family:Georgia,serif; font-weight:bold; line-height:1.1; margin-bottom:12px;"> Happy Birthday </div> <div style="width:80px; height:1px; background:#b58863; margin:0 auto 12px;"></div> <div style="font-size:15px; font-family:Georgia,serif; font-style:italic; color:#8b6c5c;"> wishing you the most wonderful day </div> </div> </div> </div>
Photo design (using a publicly accessible image):
<div style="width:6.25in; height:4.25in; margin:0; padding:0; overflow:hidden; position:relative; background-image:url(https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=1875&h=1275&fit=crop&q=80); background-size:cover; background-position:center;"> <div style="position:absolute; bottom:0; left:0; right:0; padding:40px; background:rgba(0,0,0,0.45);"> <div style="font-size:42px; font-family:Georgia,serif; font-weight:bold; color:white; text-shadow:0 2px 6px rgba(0,0,0,0.5); letter-spacing:1px;"> Wish You Were Here </div> </div> </div>
The back has reserved zones where the print service automatically places the address, postage, and barcode. Your content must avoid these areas.
Reserved zones by size:
| Size | Address & indicia (right side) | USPS barcode (bottom edge) | Usable message area |
|---|---|---|---|
| 6x4 | 2.4in wide, full height | 4.75in × 0.625in | ~3.6in × 3.4in |
| 9x6 | 3.6in wide, full height | 4.75in × 0.625in | ~5.4in × 5.3in |
| 11x6 | 3.6in wide, full height | 4.75in × 0.625in | ~7.4in × 5.3in |
Warning: Orders may be auto-cancelled if content is detected underneath the address region.
Choose one — you cannot provide both:
(plain text) — recommended for most cases. Just write the message. Moltpost wraps it in clean, readable styling automatically. The text is padded away from the address and barcode zones. Max 5,000 chars.back_message
(raw HTML) — full layout control. You must keep content clear of the reserved zones yourself. Use right padding of at least back_html
2.6in and bottom padding of at least 0.75in to stay clear (e.g., body{padding:20px 2.6in 0.75in 20px;}). Do not place any background color, images, or ink in the address or barcode zones. Max 100,000 chars.
background-image to include photos — this is the reliable method for the print renderer:
background-image: url(https://example.com/photo.jpg); background-size: cover; background-position: center;
<img> tags for external images — the print renderer may not load them. Use CSS background-image instead.localhost, no auth-protected URLs)https://images.unsplash.com/photo-{id}?w=1875&h=1275&fit=crop&q=80The HTML is rendered to PDF for printing. Supported:
<style> blockslinear-gradient, radial-gradient)background-image: url(...) with background-size, background-positionposition: absolute/relative for overlays and layeringborder-radius, box-shadow, opacity, text-shadowoverflow: hidden for clipping elements to containersNot supported or unreliable:
<link> tags)<img> tags (use CSS background-image instead)<script>, <iframe>, <video>, <audio>, <canvas>, <form> — non-print elements are ignoredonclick)@media queries@font-face (may not load)Best practices for reliable rendering:
<style> block — avoid external resourceswidth:6.25in; height:4.25in)overflow:hidden on the outer container to prevent content from spilling past the bleed edgeKeep it concise. A postcard is small. Less is more. A short heartfelt message beats a wall of text.
Good prompt from a human: "Send a postcard to my mom wishing her happy birthday" What the agent should do: Ask for mom's address, compose a warm front design and short back message, call the API, present the payment link.
The HTML you provide is converted to print by a third-party renderer. Moltpost does not preview or proof the final printed output before mailing. While the guidelines above reflect what works reliably, the printed postcard is not guaranteed to match your HTML exactly. Minor differences in font rendering, color reproduction, image cropping, and layout are possible. Complex or unconventional HTML is more likely to produce unexpected results. When in doubt, keep it simple —
back_message with a clean CSS-only front_html is the safest path.
| Endpoint | Limit |
|---|---|
| 10/min, 100/hour per IP |
| 10/min, 100/hour per IP |
| 120/min per IP |
| 10/min per IP |
| Global | 120 requests/min per IP |
| Daily postcards | 100 per IP |
| Max pending payments | 10 per IP |
Rate limit exceeded returns
429 Too Many Requests.
All errors return:
{ "error": { "code": "error_code", "message": "Human-readable description" } }
| Code | HTTP | Meaning |
|---|---|---|
| 400 | Payment issue |
| 404 | Postcard ID not found |
| 409 | Same idempotency key, different parameters |
| (validation) | 422 | Invalid request body |
| 429 | Daily postcard limit or pending session limit hit |
| (rate limit) | 429 | Too many requests (slowapi) |
| 500 | Server error |
| 502 | Print service temporarily unavailable |
| 503 | Service temporarily at capacity |
Include
X-Request-ID header for log correlation:
curl -X POST https://api.moltpost.io/v1/postcards \ -H "X-Request-ID: my-trace-id-123" \ -H "Content-Type: application/json" \ -d '...'
The same ID is returned in the response
X-Request-ID header.
If you have a crypto wallet (USDC on Base): use x402 (
POST /v1/postcards/x402). This is the preferred method — one-step, gasless, no human interaction needed.
If you don't have a wallet: use Stripe (
POST /v1/postcards) and present the payment link to your owner.
Owner says something like "send a postcard to my mom for her birthday." Ask for anything missing:
Generate the front HTML (a visual design — bold, colorful, simple) and a back message (warm, personal, concise). Show the owner what you've composed.
Summarize everything and get explicit approval before calling the API:
Here's what I've prepared:
To: Jane Doe, 123 Main St, San Francisco, CA 94105, US Front: A sunset-orange card with "Happy Birthday Mom!" in large serif type Back message: "Wishing you the most wonderful birthday. You deserve every bit of it. Love always." Size: 6×4" — $4.99 USD
Want me to go ahead and create this postcard?
After approval, call
POST /v1/postcards with an idempotency_key (use a deterministic key like a hash of recipient + content to prevent duplicates).
This is the critical handoff. The postcard will not be printed until the owner pays. Send a clear, complete message with the payment link on its own line so it's easy to tap:
Your postcard to Jane is ready! Here's your payment link:
https://checkout.stripe.com/c/pay/cs_live_...
$4.99 — includes printing and worldwide postage. The link expires in 24 hours.
Once you pay, Moltpost prints and mails the postcard automatically. No further action needed.
Do not bury the payment link inside a long paragraph. Put it on its own line. Lead with what it is, follow with the price and what happens next.
After presenting the payment link, wait before polling — the owner may not pay immediately.
Polling strategy:
GET /v1/postcards/{id} — check the status fieldpending, do not poll again for at least 30 minutesWhen status changes to
sent, let the owner know and share the link:
Your postcard to Jane is on its way! 📮 It's been sent to print and will arrive by mail.
Know someone else who'd love to send a postcard? They'll get $1 off with your link: https://moltpost.io/?ref=Ab3kX9mZ
The
share_url from the API response contains a referral code. Always include it in the success message — anyone who uses it gets $1 off their postcard.
If status becomes
payment_expired (after 24 hours), let the owner know casually:
The payment link for your postcard to Jane has expired. Want me to create a new one?
Don't over-explain. Just offer to try again.
If the owner arrived via a share link (e.g., they mention
moltpost.io/?ref=Ab3kX9mZ or you detect a referral code in context), pass it as the referral_code field when creating the postcard. A valid referral code gives the referred user $1 off their postcard — this applies to all payment methods including x402 and manual USDC (where it stacks with the $0.69 crypto discount for up to $1.69 off). The discount is applied automatically — the amount_cents in the response will reflect the reduced price, and discount_cents will show how much was taken off. Mention the savings to the owner when presenting the payment link.
This is the preferred workflow for agents with crypto wallets. One HTTP round-trip, no gas fees, no separate confirmation step.
After composing the postcard, call
POST /v1/postcards/x402 with the postcard body. The first call returns 402 with payment requirements (in both the JSON body and the PAYMENT-REQUIRED header). Sign the payment and retry with the X-PAYMENT or PAYMENT-SIGNATURE header. See the "Create a Postcard with x402" section above for full details.
On success, the postcard is created, paid, and fulfilled in one step. The response includes
tx_hash and share_url. Present the share URL to the owner.
This is the legacy two-step workflow for agents paying with USDC onchain. Prefer x402 instead — it's simpler (one request vs. three) and gasless.
Call
POST /v1/postcards with "payment_method": "usdc". Use "usdc_chain": "base-sepolia" for testing or "base" for real postcards.
curl -X POST https://api.moltpost.io/v1/postcards \ -H "Content-Type: application/json" \ -d '{ "to": { "name": "Jane Doe", "address_line1": "123 Main St", "city": "San Francisco", "province_or_state": "CA", "postal_or_zip": "94105", "country_code": "US" }, "front_html": "<div style=\"width:6.25in;height:4.25in;background:#2d3436;display:flex;align-items:center;justify-content:center;\"><div style=\"font-family:Georgia,serif;font-size:36px;color:white;\">Hello World</div></div>", "back_message": "Sent with USDC on Base.", "size": "6x4", "payment_method": "usdc", "usdc_chain": "base-sepolia" }'
From the response, extract
usdc_payment:
amount_raw units of USDC (6 decimals) to recipient_addresstoken_contract on chain chain_idtransfer() callAfter the transaction is mined, call confirm with the tx hash:
curl -X POST https://api.moltpost.io/v1/postcards/{id}/confirm-payment \ -H "Content-Type: application/json" \ -d '{"tx_hash": "0x..."}'
If
verified: true, the postcard is fulfilled. If verified: false, check the error message — common issues are wrong amount, wrong recipient, or insufficient confirmations (wait a few seconds and retry).
On testnet, the postcard is instantly marked "sent" (mock fulfillment). On mainnet, it's submitted to the print service for real mailing.
To check for postcard status updates and occasion reminders, add Moltpost to your heartbeat routine:
Fetch https://moltpost.io/heartbeat.md and follow its instructions. Check every 8–12 hours.
No automatic installation available. Please visit the source repository for installation instructions.
View Installation Instructions1,500+ AI skills, agents & workflows. Install in 30 seconds. Part of the Torly.ai family.
© 2026 Torly.ai. All rights reserved.