Skip to main content

Stripe Mpp

@magistr/stripe-mppv2026.08.19.1· 9d agoMODELSSKILLS
01README

Stripe Machine Payments Protocol (MPP) — agent buyer (probe/mint/pay over HTTP-402 Payment auth), consumer buyer (grant a Shared Payment Token from a Link wallet via link-cli, spend by reference), and full seller API (challenge/verify/charge/receipt/reconcile/refund) for fiat Shared Payment Tokens, built on mppx and the Stripe preview SDK

02Models1
@magistr/stripe-mppv2026.08.19.1extensions/models/stripe_mpp.ts

Global Arguments

ArgumentTypeDescription
secretKeystringStripe secret key (sk_test_... / sk_live_...). Use a vault reference:
serverSecret?stringSeller-side HMAC secret (>=32 chars) binding challenge ids
networkId?stringStripe Business Network Profile id (profile_test_... / profile_...).
realmstringProtection-space identifier advertised in seller challenges (RFC 9110).
stripeVersionstringStripe-Version header. SPT endpoints need the preview channel.
testModebooleanGates test helpers (createTestGrantedToken). Must match the key mode.
allowInsecurebooleanTest-fixture escape: permit plain http:// to loopback, allow private/
timeoutMsnumberPer-request timeout for resource fetches and Stripe calls.
paymentMethodTypesarrayPayment method types advertised in seller challenges.
linkCliPath?stringABSOLUTE path to the installed @stripe/link-cli binary (a non-writable
linkCliVersionstringPinned link-cli version. The MCP initialize serverInfo.version is
allowLiveGrantsbooleanConsumer-grant live-money opt-in. Default false forces link-cli test
fn probe()
Request a resource WITHOUT paying and record the parsed payment
fn mintToken(paymentMethodId: string, maxAmount: string, currency: string, expiresAt?: number, sellerNetworkId?: string, externalId?: string)
Mint a fiat Shared Payment Token from an existing payment method
ArgumentTypeDescription
paymentMethodIdstringExisting payment method (pm_...). Raw-PAN creation is PCI-gated in
maxAmountstringUsage-limit ceiling, minor units string.
currencystringUsage-limit currency (ISO, lowercase).
expiresAt?numberUnix timestamp for usage_limits.expires_at.
sellerNetworkId?stringSeller network profile the token is granted to (defaults to networkId).
externalId?stringCorrelation id; also drives the Idempotency-Key.
fn pay(sptId: string, maxAmount: string, currency: string, expectedNetworkId?: string, expectedRealm?: string, externalId?: string)
Pay for a resource end-to-end: request it, parse the 402 stripe
ArgumentTypeDescription
sptIdstringShared Payment Token (spt_...) to present.
maxAmountstringSpend ceiling, minor units string. The challenge amount must not
currencystringExpected challenge currency. Mismatch blocks the payment.
expectedNetworkId?stringPin the payee: the Stripe Business Network Profile (profile_...) the
expectedRealm?stringPin the challenge realm (issuing authority); mismatch blocks the payment.
externalId?stringCorrelation id.
fn getIssuedToken(sptId: string)
Retrieve an issued Shared Payment Token
ArgumentTypeDescription
sptIdstringShared Payment Token id (spt_...).
fn revokeToken(sptId: string)
Revoke an issued Shared Payment Token
ArgumentTypeDescription
sptIdstringShared Payment Token id (spt_...).
fn createChallenge(amount: string, currency: string, description?: string, externalId?: string, expiresInSeconds?: number, networkId?: string, scope?: string)
Produce seller challenge material for a payment-gated resource:
ArgumentTypeDescription
amountstringAmount demanded, minor units string.
currencystringCurrency (ISO, lowercase).
description?string
externalId?string
expiresInSeconds?numberChallenge validity window; recommended to keep challenges short-lived.
networkId?stringOverride the global networkId.
scope?stringBind the challenge to a specific resource/route. Carried inside the
fn verifyCredential(authorizationHeader: string, expectedAmount?: string, expectedCurrency?: string, expectedScope?: string)
Verify a received Authorization: Payment credential — HMAC-bound
ArgumentTypeDescription
authorizationHeaderstringThe received Authorization value ("Payment <base64url>").
expectedAmount?string
expectedCurrency?string
expectedScope?stringRequire the credential's challenge `opaque` to equal this route scope
fn chargeToken(sptId?: string, amount?: string, currency?: string, authorizationHeader?: string, expectedScope?: string, description?: string, externalId?: string)
Settle a granted Shared Payment Token via a confirmed
ArgumentTypeDescription
sptId?stringGranted token to settle (or pass authorizationHeader).
amount?stringMinor units string.
currency?string
authorizationHeader?stringFull received credential; verified (HMAC + expiry) before settling.
expectedScope?stringWhen settling from an authorizationHeader, require the challenge
description?string
externalId?string
fn issueReceipt(chargeId: string, externalId?: string)
Produce the Payment-Receipt header value for a SETTLED charge
ArgumentTypeDescription
chargeIdstringSettled PaymentIntent id (pi_...).
externalId?string
fn getCharge(chargeId: string)
Retrieve a charge (GET /v1/payment_intents/{id}).
ArgumentTypeDescription
chargeIdstringPaymentIntent id (pi_...).
fn listCharges(externalId?: string, createdGte?: number, createdLte?: number, maxResults: number, pageSize: number)
Reconciliation fan-out: list charges by created range
ArgumentTypeDescription
externalId?stringFilter by metadata externalId (uses /v1/payment_intents/search).
createdGte?numberUnix lower bound.
createdLte?numberUnix upper bound.
maxResultsnumber
pageSizenumber
fn refundCharge(chargeId: string, amount: string, reason?: enum, externalId?: string)
Refund a settled charge (POST /v1/refunds) with
ArgumentTypeDescription
chargeIdstringPaymentIntent id (pi_...) to refund.
amountstringRefund amount, minor units string. Must not exceed the remaining
reason?enum
externalId?string
fn getGrantedToken(sptId: string)
Retrieve a granted Shared Payment Token (seller view). Card
ArgumentTypeDescription
sptIdstringShared Payment Token id (spt_...).
fn createTestGrantedToken(maxAmount: string, currency: string, paymentMethodId: string, expiresAt?: number)
TEST MODE ONLY: fabricate a granted Shared Payment Token via
ArgumentTypeDescription
maxAmountstringUsage-limit ceiling, minor units string.
currencystringUsage-limit currency.
paymentMethodIdstringPayment method the fabricated granted token draws on (required by the
expiresAt?number
fn listConsumerPaymentMethods()
List the consumer's Link wallet payment methods (csmrpd_). Fan-out:
fn getSpendRequest(id: string)
Retrieve a consumer spend request by lsrq_ (single-shot; interval 0).
ArgumentTypeDescription
idstringSpend request id (lsrq_...).
fn cancelSpendRequest(id: string)
Cancel a PENDING consumer spend request (read-before-cancel). Note:
ArgumentTypeDescription
idstringSpend request id (lsrq_...).
fn createSpendRequest(amount: string, currency: string, context: string, networkId?: string, paymentMethodId?: string, externalId?: string)
Create a consumer Link spend request — the PRIMARY (binding) guard
ArgumentTypeDescription
amountstringAmount to authorise, minor-units STRING (e.g. "500" = $5.00).
currencystringCurrency (ISO, lowercase). US-only Link; default usd.
contextstringPurchase description + rationale the consumer READS when approving.
networkId?stringPayee Business Network Profile (profile_...). Defaults to the global
paymentMethodId?stringConsumer Link payment method (csmrpd_...). Omit to let the consumer pick
externalId?stringCorrelation id; also anchors the deterministic intent key persisted on
fn paySpendRequest(id: string, maxAmount: string, currency: string, expectedNetworkId?: string, expectedRealm?: string, externalId?: string)
Spend an APPROVED consumer grant against an MPP-protected URL, by
ArgumentTypeDescription
idstringApproved spend request id (lsrq_...) to spend.
maxAmountstringADVISORY pre-flight ceiling (minor units). NOTE: the binding cap is the
currencystringExpected challenge currency (advisory).
expectedNetworkId?stringAdvisory payee pin for the pre-flight challenge.
expectedRealm?stringAdvisory realm pin.
externalId?stringCorrelation id.

Resources

challenge(infinite)— Probe result: HTTP status + parsed payment challenges.
payment(infinite)— Buyer payment attempt — written on EVERY pay outcome (audit trail).
issuedToken(infinite)— Issued Shared Payment Token (buyer view).
challengeSpec(infinite)— Seller challenge material: WWW-Authenticate value + problem+json body.
credential(infinite)— Seller-side credential verification verdict.
charge(infinite)— Seller charge (PaymentIntent) state.
receipt(infinite)— Issued Payment-Receipt header value for a settled charge.
refund(infinite)— Refund outcome — written on every refundCharge attempt (audit trail).
grantedToken(infinite)— Granted Shared Payment Token (seller view; card details trimmed).
summary(infinite)— Fan-out listing summary.
spendRequest(infinite)— Consumer Link spend-request lifecycle — written on EVERY outcome
consumerPaymentMethod(infinite)— Consumer Link payment method (csmrpd_; display as link-cli returns
03Skills1
stripe-mpp2 files
04Previous Versions1
2026.08.19.1
05Stats
A
100 / 100
Downloads
0
Archive size
244.4 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
06Platforms
07Labels