Install
openclaw skills install postalform-agent-mailingClawHub Security found sensitive or high-impact capabilities. Review the scan results before using.
Send real postal mail through PostalForm using machine payments: prepare/validate print-and-mail payloads, submit `POST /api/machine/orders`, settle x402 payment with any compatible wallet client (purl or custom), and poll fulfillment through completion. Use when an agent must autonomously mail a real physical letter/document with strong first-pass correctness and idempotent retry behavior.
openclaw skills install postalform-agent-mailingUse this workflow when an agent needs to send real postal mail (a physical print-and-mail order) reliably on the first attempt.
Require these inputs:
buyer_name, buyer_emailsender_name, recipient_nameupload_token, { download_url, file_id }, data URL, or allowed https URL)double_sided, color, mail_class, certified)For each party (sender, recipient), choose exactly one strategy:
*_address_type: "Manual" + *_address_manual*_address_type: "Address" + *_address_id + *_address_textDo not mix manual + Loqate for the same party.
Generate a UUID request_id once and keep payload bytes stable across retries.
Set buyer_email every time (required for Stripe receipt routing).
For manual addresses:
line1, city, state, zipline2 only when it has a non-empty string valuenullUse the tested template in references/payload_templates.md.
Call:
POST https://postalform.com/api/machine/orders/validateIf response is 200, confirm:
quote.page_count matches expected page countquote.price_usd and options are acceptableIf response is 422, fix payload before paying.
Endpoint:
POST https://postalform.com/api/machine/ordersFlow:
402 with PAYMENT-REQUIRED.PAYMENT-SIGNATURE.202 and settlement metadata.Payment client options:
purl CLI (fastest path when available)@x402/core, @x402/evm, or equivalent custom signer flow)If using purl:
--password from secure runtime input--max-amount--network to PAYMENT-REQUIRED networkCall:
GET https://postalform.com/api/machine/orders/:request_idTreat this as complete when:
is_paid = truecurrent_step has advanced through processing (commonly to email_sent)order_complete_url is a real URLHandle transitional state:
status: "settled_pending_webhook" can persist briefly after on-chain settlementrequest_idrequest_id constant for retries of the same logical order.402.buyer_email always.PAYMENT-REQUIRED; do not hardcode network.422 invalid_type on manual line2:
null.line2 unless non-empty string.settled_pending_webhook):
5xx, retry without changing request_id or payload.409 request_id_mismatch:
request_id reused with modified payload.max amount) to avoid accidental overpayment.Return these values after execution:
request_id / order_idpage_count)network, pay_to, settlement_tx, settled_at)is_paid, current_step)order_complete_url when availableReference examples and command snippets:
references/payload_templates.md