Skip to main content
Migo Docs

AI agent guide

A self-contained guide you hand to the coding assistant you use so it integrates Migo payments — one-time and subscriptions — through the hosted webview. It is written in a deterministic, step-by-step format designed for a model to execute without ambiguity.

How to use it​

  1. Download the Markdown file (button below).
  2. Hand it to the coding assistant on the platform where you're building: attach it to the project or paste it into the chat.
  3. Start the conversation with this prompt:
Integrate Migo payments into this project following the file migo-subscriptions-agent-guide.md
(your single source of truth). Work in sandbox, step by step, and pause to ask me for the values the
guide marks as inputs. Start by establishing context: environment, whether this is from-scratch or an
existing app, and whether we're building one-time payments, subscriptions, or both.

Who it's for​

The AI agent building the integration — not a person. You provide the guide plus your account details; the guide tells the agent what to verify before advancing.

Human input required​

  1. Provide your account values (merchant token, client slug, plan uid, callback URL and secret) and confirm your callback configuration with Migo.
  2. Complete one test payment in the sandbox checkout once, for the end-to-end validation.

The agent executes the remaining steps.

What's inside​

  • Operating instructions for the agent (work step by step, verify before advancing).
  • POST /transactions to create the transaction; subscriptions carry the plan in customKeys.plan.uid (one-time omits it).
  • An idempotent callback handler (subsCallback) with replay payloads for self-testing without waiting for real webhooks.
  • Per-step verification gates, an error map, and an acceptance checklist.
  • Sandbox data and a go-live section for production.
The subscription contract is verified against migo-api

Creation via customKeys.plan.uid, the first-charge amount, and the callback mechanism were confirmed in code. The callback's exact payload and auth header are per-account configuration you agree with Migo — the guide explains this in detail.