Base Endpoint (agent appends dynamic params)
Agent must add: &amount=...¤cy=...&ref=...&title=...&desc=...&mode=redirect&provider=paypal_standard
GPT-Ready Snippet (agent fills values at runtime)
// Replace with runtime values:
const params = new URLSearchParams({
provider: "paypal_standard",
business: "you@example.com", // ← replaced by generator
amount: "19.99",
currency: "USD",
ref: "TX12345",
title: "Pro Plan",
desc: "Autonomous upgrade",
mode: "redirect"
});
const url = "ORIGIN_AND_PATH?" + params.toString(); // this same file
// Open and listen for callback:
const win = window.open(url, "_blank");
window.addEventListener("message", (e) => {
if (e?.data?.status === "paid") {
console.log("✅ Paid:", e.data.ref);
// continue agent flow…
}
});
Example URL (for quick manual test ONLY)
Production: the agent sets all dynamic values.