Create and pay for a letter order
create_letter_orderCreates a letter order and immediately debits the customer's balance to pay for it - this spends real money and cannot be undone. Call it WITHOUT confirmed:true first: it will only return the price, without charging or creating anything. Only after the price has been shown to the human and they've agreed to it, call it again with confirmed: true and expectedTotalPence set to the exact totalPence you were quoted. If the recomputed price no longer matches expectedTotalPence, the order is rejected so you cannot accidentally confirm a stale price.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"serviceClass": "<serviceClass>",
"recipientName": "<recipientName>",
"recipientLine1": "<recipientLine1>",
"recipientCity": "<recipientCity>",
"recipientPostcode": "<recipientPostcode>"
},
"name": "create_letter_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pages | No | Number of content pages, excluding the address page. | |
| colour | No | ||
| content | No | Plain-text letter body, required unless contentUploadPath is supplied. | |
| confirmed | No | Only true after the customer explicitly agrees to the price. | |
| senderName | No | ||
| doubleSided | No | ||
| senderLine1 | No | ||
| serviceClass | Yes | ||
| recipientCity | Yes | ||
| recipientName | Yes | ||
| recipientLine1 | Yes | ||
| recipientLine2 | No | ||
| senderPostcode | No | ||
| recipientCountry | No | ISO 3166-1 alpha-2 country code, e.g. GB, US, FR. | GB |
| contentUploadPath | No | Verified path from POST /api/v1/uploads/request-url. Files cannot be uploaded through agent messages. | |
| recipientPostcode | Yes | ||
| expectedTotalPence | No | Exact quoted total in pence, required to place an order. |