Top Up With Card Mpp
top_up_with_card_mppCreate a payment link that adds Porkbun account credit by card when a purchase fails for insufficient funds. Get the payUrl, then pay it with an MPP-capable wallet to apply the credit.
Instructions
Get a payment link that adds account credit when paid with the user's CARD over MPP (Machine Payments Protocol), using a Stripe Shared Payment Token from their agent wallet (Stripe's Link Agent Wallet). Use it when a purchase failed with INSUFFICIENT_FUNDS and no card is saved at Porkbun. Nothing is charged by this call. Pay the returned payUrl with an MPP-capable wallet tool, for example Stripe's Link CLI or its MCP server (link-cli mpp pay <payUrl> -X POST --context "..."). Link rejects a --context shorter than 100 characters, and the payment fails without it: write one or two full sentences the user will read when approving, saying what it is for and the dollar amount (e.g. "Adding $20.00 of prepaid credit to my Porkbun account so my AI assistant can register the domains I asked for."). Word it freshly for each payment; Link can refuse a repeat of an identical request. The link answers 402 with the terms, the wallet asks the user to approve the amount, and the credit is added immediately (the response shows the new balance). Tell the user the dollar amount first. The link is single-use, valid 15 minutes. amount_cents is integer US cents, $5 to $500; same limits as card top-ups. Not available on sandbox keys (use sandbox_topup). If you cannot pay MPP links, top_up_with_usdc or the user adding credit at porkbun.com are the alternatives.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | If true, check eligibility and limits only; creates no link. | |
| amount_cents | Yes | Credit to add, in integer US cents (500 = $5.00). Integer US cents: 803 means $8.03, not $803. |