Payments

Payment Links

Accept payments without writing code. Share a link in a bio, a WhatsApp chat, an email or an invoice — or print its QR code.

A payment link is a reusable, static checkout at /pay/l/{slug}. Every visit creates a fresh payment intent on the server, with its own reference key and expiry, and then shows hosted checkout. Each payment is tracked, verified and webhooked exactly like an API-created one (source: "payment_link").

Payment linkAPI payment intent
Created byDashboard or API, onceYour server, per order
AmountFixed, or chosen by the customer within min/maxSet per payment
Best forProducts, tips, donations, events, invoicesCarts, subscriptions, dynamic orders

In the dashboard: Payments → Payment links → New link. Or through the API:

ts
const link = await muny.paymentLinks.create({
  name: "Lifetime Course",
  description: "Access to the course",
  amount: "500",            // omit for "customer chooses"
  collect_email: true,
  success_url: "https://creatorhub.io/welcome",
  metadata: { product: "course_lifetime" },
});

console.log(link.url); // https://muny.io/pay/l/lifetimecourse

Customer-chosen amount, with bounds:

ts
await muny.paymentLinks.create({
  name: "Support a creator",
  min_amount: "5",
  max_amount: "10000",
});
  • For fixed-price links the price is always taken from the link on the server; a modified client request can't change it.
  • Optional: collect_email, collect_name, expires_at, success_url, metadata (copied onto every payment).
ts
await muny.paymentLinks.update(link.id, { amount: "450" });
await muny.paymentLinks.disable(link.id);   // visitors see "no longer active"
await muny.paymentLinks.enable(link.id);
const copy = await muny.paymentLinks.duplicate(link.id);

// Payments made through a link
const { data } = await muny.payments.list({ payment_link_id: link.id });

Each link reports stats.payments and stats.volume. In the dashboard you can copy the link, download its QR code, disable it, duplicate it and see its payments.

Request a payment#

For one-off requests (an in-person sale, an invoice), use Payments → Request payment in the dashboard: enter an amount and a description and Muny generates a payment intent with a QR code and a shareable checkout URL.

Endpoints#

  • POST /v1/payment-links · GET /v1/payment-links · GET /v1/payment-links/:id · PATCH /v1/payment-links/:id
  • POST /v1/payment-links/:id/disable · /enable · /duplicate
  • Public: GET /v1/checkout/links/:slug and POST /v1/checkout/links/:slug (starts a checkout). See Hosted Checkout.