Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.remlo.xyz/llms.txt

Use this file to discover all available pages before exploring further.

Triggers a formal batch distribution through the PayrollBatcher pulling funds directly from the employer Treasury. Endpoint POST /api/mpp/payroll/execute Pricing $1.00 per call — Represents a high-value state-changing transaction acting as a massive operational shortcut. Payment type Single charge — A dedicated endpoint to trigger one massive distribution event for the entire employee registry. Request
{
  "employerId": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
  "recipients": ["0xEmployeeWallet1"],
  "amounts": ["1000000000000000000000"],
  "memos": ["0x70616963..."]
}
Response
{
  "success": true,
  "txHash": "0xabc123...",
  "receipt": "L402-Receipt-Payload...",
  "employeeCount": 1
}
Example
curl -X POST https://remlo.xyz/api/mpp/payroll/execute \
  -H "Authorization: L402 <YOUR_TX_HASH>" \
  -H "Content-Type: application/json" \
  -d '{"employerId":"e3b0c442...","recipients":["0x..."],"amounts":["1000..."],"memos":["0x..."]}'
Notes If the treasury availableBalance is less than the requested total_amount, the execution will fail and revert, but the $1.00 API access charge is still settled due to processing costs. Ensure preflight checks on treasury health before execution.

Authorization

Caller must be the employer that owns the payroll run, proven by either:
  • Privy bearer tokenAuthorization: Bearer <privy_jwt> whose sub matches employers.owner_user_id.
  • Tier 1 agentX-Agent-Identifier + X-Agent-Timestamp + X-Agent-Signature (HMAC).
  • Tier 2 agentX-Agent-Identifier: erc8004:tempo:<agentId> + signed canonical message.
Without principal proof, the request is rejected even if payment was paid. See Authentication and Agent registration.

Side effects

After the on-chain transaction is broadcast, three async actions fire (fire-and-forget; handler latency is not extended):
  1. Employer notification — a payroll_finalized row is inserted into notifications for the dashboard bell.
  2. Employer emailPayrollFinalizedEmail template fires once per run to the employer’s billing email, summarizing recipient count, total, chain, tx hash.
  3. Per-employee receipts — for each payment_item in the run that has an email on file, a PaymentReceivedEmail fires to the employee. The receipt includes the amount, settlement timestamp, chain, tx hash, payslip link, and an off-ramp hint. Idempotency keys are scoped to (run_id, employee_id) so retried executions don’t double-send. Recipients on the suppression list (prior bounce or complaint) are filtered out.
The same per-employee receipt logic runs whether the payroll was triggered through this MPP-paid endpoint or through the dashboard’s /api/employers/{id}/payroll/{runId}/execute (Privy-authed) variant.