Skip to content
Fourohtwo

Date Math

date-math.datemath.workers.dev/v1/subscription

Date Math: Subscription and contract date math: current billing period, next renewal, upcoming renewals, cancel-by date for a notice period, free-trial start, and day-based proration of a price. Month-end anchors stay at month end (Jan 31, Feb 28, Mar 31). Use for SaaS billing, renewals, cancellation deadlines and refunds.

BaseAnswering
POSThttps://date-math.datemath.workers.dev/v1/subscription

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://date-math.datemath.workers.dev/v1/subscription", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"amount":30,"as_of":"2026-03-10","interval":"month","notice_days":7,"start":"2026-01-31"}),
});
console.log(await res.json());

Example input

{
  "amount": 30,
  "as_of": "2026-03-10",
  "interval": "month",
  "notice_days": 7,
  "start": "2026-01-31"
}

More from Date Math