Skip to main content
The fastest path to revenue: define what you sell, hand a customer a link, and let Macropay clear the payment for you. Because Macropay is your merchant of record, that same call also makes us the legal seller — we calculate and remit sales tax and VAT worldwide, keep you out of PCI scope, and own the dispute process. You write code; we carry the compliance. By the end of this guide you’ll have a live product, a working checkout, a completed test sale, and a signed webhook landing in your app.

What you’ll need

Run everything in the Sandbox environment. Sandbox mirrors production but never moves real money or touches a real card.
1

Authenticate with an access token

Macropay authenticates server-side requests with an Organization Access Token (OAT) — a long-lived key scoped to one organization.
  1. Open your organization Settings in the dashboard
  2. Go to Access Tokens
  3. Click Create Token and copy the value (you’ll only see it once)
2

Create a product

In Macropay, everything you sell is a product — one-time or recurring, same API. Here we’ll stand up a monthly “Indie tier” subscription at $12/month (price_amount is in cents).
Result: a product.id in the response. Hold onto it — the next step needs it.
3

Generate a checkout link

A checkout turns a product into a hosted, PCI-compliant payment page. Card data is tokenized in our PCI DSS Level 1 vault — it never reaches your server, so you stay out of PCI scope entirely.
Result: open the returned url in a browser and you’ll see the live checkout. Share it as a link, drop it in an email, or embed it in your app.
4

Run a test sale

Sandbox accepts canonical test cards. Use these to simulate a successful payment:Finish the form and Macropay redirects you to your success_url. Behind the scenes, the sale is recorded, tax is computed for the buyer’s region, and a customer record is created — no extra calls from you.
5

Receive a signed webhook

Webhooks are how your backend learns that money moved. Register an endpoint and subscribe to the events you care about.
curl
No public URL yet? Expose your local server with a tunnel like ngrok, or skip the tunnel entirely with our local webhook testing CLI.
When the test sale clears, you’ll receive an order.paid payload:
In production, always verify the webhook signature before trusting a payload. Macropay signs every delivery using the Standard Webhooks spec.

You just shipped a billable product

In a handful of calls you created a product, took a payment, and got a verified server-side event — with tax, PCI, and dispute handling folded in for free. The same primitives scale well past a single subscription. A few directions worth exploring:
  • Billing AI and agents by what they do. Macropay can meter usage, activity, or outcomes — bill an agent for the revenue it generated or the time it saved, and watch its margin against AI cost.
  • Drop in an OpenAI-compatible proxy. Point your LLM calls at /ai/v1/chat/completions and Macropay captures token cost per request automatically.
  • Let customers self-serve. The hosted customer portal handles upgrades, cancellations, and invoices without you building a settings page.

Pricing models

Fixed, free, pay-what-you-want, usage-based, and seat-based pricing

Webhook events

Every event type you can subscribe to

Customer portal

Self-serve upgrades, invoices, and cancellations

SDKs

TypeScript, Python, PHP, and Go libraries