Create invoice payment link
create_invoice_payment_linkGenerate a non-expiring, secure payment link for a specific invoice so the customer can pay without logging in. The link is tied to the owning client and invoice.
Instructions
Produce a customer-facing URL that lets the invoice be paid without logging in. Uses Invoices.createPayHash(client_id, invoice_id) then Encryption.systemEncrypt to build the sid token, exactly like Blesta's own payment reminder emails: {install}/client/pay/method/{invoice_id}/?sid=... . The link is tied to this client and invoice and does not expire. Only hand it to the invoice's own customer. Refuses if the invoice does not belong to client_id. On IonCube-encoded installs this call fails with 'Failed to retrieve the default value' unless BLESTA_SYSTEM_KEY is configured.
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": {
"client_id": "<client_id>",
"invoice_id": "<invoice_id>"
},
"name": "create_invoice_payment_link"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| client_id | Yes | Numeric client ID that owns the invoice | |
| invoice_id | Yes | Numeric invoice ID to pay |