Skip to content

Billing

Purpose

Sell credit packages via Stripe and grant wallet credits only after payment is verified.

How it works

Stripe Checkout creates a pending Purchase. Credits are granted only after a verified webhook (or the development complete endpoint when Stripe keys are absent).

Never trust the browser success redirect alone.

Live prototype

Log in first (csorenson@mkpworks.com / Summer2026!). Starting checkout creates a real purchase session. Without Stripe keys, development completion is used.

Buy credits (starter package)

Uses MKP.billing.openCheckout('starter')POST /api/v1/billing/checkout-sessions/.

Code to paste

<script src="https://YOUR_PLATFORM/sdk/v1/mkp.js"></script>
<script>
  MKP.init({ baseUrl: "https://YOUR_PLATFORM", siteKey: "pk_..." });
</script>
<button data-mkp="buy-credits" data-package="starter">Buy starter</button>