agents.writerslogic.com/api/v1/booking-change-penalty
Given a booking start, the moment of change, the booking amount and a tiered policy whose deadlines are either elapsed hours before start ('48 hours') or local calendar days at a local time ('18:00 the day before' in the venue's zone, DST-correct), returns the applicable tier, its deadline instants, the penalty in minor units under your stated rounding, and when the next tier begins; checks an ass
POST
https://agents.writerslogic.com/api/v1/booking-change-penaltyUptime100% 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
// npm install fourohtwo
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://agents.writerslogic.com/api/v1/booking-change-penalty", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"tiers":[{"name":"50% from 3 days before 18:00 local","daysBefore":3,"penaltyBps":5000,"atLocalTime":"18:00"},{"name":"100% within 24h","penaltyBps":10000,"hoursBefore":24}],"startAt":"2026-12-10T19:00:00Z","changeAt":"2026-12-08T18:30:00Z","currency":"EUR","rounding":"half-up","timeZone":"Europe/Paris","amountMinor":45000}),
});
console.log(await res.json());Example input
{
"tiers": [
{
"name": "50% from 3 days before 18:00 local",
"daysBefore": 3,
"penaltyBps": 5000,
"atLocalTime": "18:00"
},
{
"name": "100% within 24h",
"penaltyBps": 10000,
"hoursBefore": 24
}
],
"startAt": "2026-12-10T19:00:00Z",
"changeAt": "2026-12-08T18:30:00Z",
"currency": "EUR",
"rounding": "half-up",
"timeZone": "Europe/Paris",
"amountMinor": 45000
}