Billing

Create Upgrade Link

Changed on

Create a new-subscription checkout URL for a user-chosen plan, or omit plan to get the existing Stripe customer's billing portal (returns 400 otherwise). Passing plan for an active existing subscription can change its plan and charge a prorated payment immediately; obtain explicit approval for that charge. The returned URL may be a checkout, hosted invoice, confirmation, or billing portal URL and alone does not confirm payment. Requires API key with billing:write permission.

post/v1/billing/upgrade-link

Request

  • Base URL
    https://api.migma.ai
  • URL
    https://api.migma.ai/v1/billing/upgrade-link
  • Auth
    API key in header Authorization

Request body

plan'basic' | 'premium' | 'business' | 'basic_annual' | 'premium_annual' | 'business_annual'

User-chosen plan for new subscription checkout. Omit for an existing Stripe customer's billing portal. Passing plan for an active existing subscription can change it and charge immediately; requires explicit charge approval.

Response

Billing link created

successboolean required
errorstring nullable

Changes