Skip to main content
Migo Docs

Paylink — Embeddable Payment Link Widget

Besides the Payment Link Quick Start path (your backend calls the API), Migo offers paylink: a ready-made widget you embed by <iframe> in any site — your CRM, your ERP, a partner's panel, an internal support tool. It requires no backend code and no user account of any kind on your side: it authenticates with a single per-merchant secret.

Who this is for

If your team already integrates the API (the Payment Link Quick Start flow), you don't need this widget. It's built for the opposite case: a support, sales, or operations team that needs to generate and share payment links without a developer writing an integration — they just paste an <iframe> into the tool they already use.

What the widget does​

Inside the widget, whoever uses it can:

  • Generate a payment link by entering an amount and an identifier for the end customer (phone, email, or other).
  • Choose installments, add extra charges, and fill in additional fields — if your account has them enabled.
  • Sell via subscription links, if your account uses Migo's Subscriptions product.
  • Browse the history of generated links and cancel one that hasn't been paid yet.

The resulting link opens the exact same hosted webview you already know — the payer sees no difference based on how the link was generated.

How you embed it​

https://paylink.migopayments.com/?secret=<your-secret>&channel=wa&created_by=agent@yourcompany.com

The embedding host controls three query parameters:

ParameterRequiredWhat it is
secretYesYour merchant's credential — identifies your account without you having to send any other client data
channelYesWhich channel is generating the link (wa, email, fb, or any value that makes sense for your operation) — recorded on the transaction for your reporting
created_byYesWho generated the link (the agent, user, or process) — besides being recorded on the transaction, it filters the history inside the widget

If any of the three is missing, the widget shows an error message without attempting to load anything.

Embedding example​

<iframe
src="https://paylink.migopayments.com/?secret=YOUR_SECRET&channel=wa&created_by=agent@yourcompany.com"
width="100%"
height="720"
style="border: none; max-width: 480px;"
title="Payment link widget"
></iframe>

The widget measures the width of the container you give it, not the browser window — use width="100%" (or your column's width) instead of a fixed value, so it adapts equally well on desktop and mobile. height is a fixed value you control; 720px covers the full form without an internal scroll in most cases.

Treat the secret as a credential

Any origin that has the secret can embed the widget for your merchant — there is no domain allow-list at the infrastructure level yet. Don't publish the secret in public repositories, shared documentation, or indexable pages. If you believe it was exposed, contact Migo to rotate it.

How you get your secret​

Onboarding and configuring the widget is done by the Migo team — it isn't self-service yet. Contact your account manager or Migo support to enable the widget for your merchant; they'll confirm which capabilities (installments, extra charges, additional fields, subscriptions, history) are turned on for your account and hand you the secret once.

If you'd rather build your own UI​

The widget also exposes its API directly, authenticated with the same secret — useful if you want to build your own interface instead of embedding ours.

MethodRouteWhat it does
GET/plugin/config?secret=<secret>Returns your merchant's identity, which capabilities are enabled, and the data you need to build the form (processors, additional fields, allowed amount range)
POST/plugin/linksCreates a payment link. Supports the Idempotency-Key header: retrying within 60 seconds returns the same link instead of creating a new one
GET/plugin/linksLists already-generated links, optionally filtered by created_by, paginated
DELETE/plugin/links/{uid}Cancels a link that hasn't been paid yet
GET/plugin/plansLists your account's subscription plans, if that module is enabled

All of them are called against the same base as the rest of Middleware:

EnvironmentBase URL
Sandbox / QAhttps://sb-mw.migopayments.com/v1/plugins
Productionhttps://mw.migopayments.com/v1/plugins

An invalid secret, a disabled merchant, or a capability you don't have enabled all respond with the same generic 404 — so no endpoint can be used to guess valid secrets by trial and error. See the live spec at /api-reference/migo-api for the full detail of every field.