docs / mpp

Pay with MPP

The Machine Payments Protocol (MPP) lets your agent top up your wallet with its own card or Link wallet. There is no checkout page.

How it works

  1. Request a deposit. Call deposit_wallet in MCP, or POST /api/wallet/deposit with an amount in dollars.
  2. Get two ways to pay. The response has a checkoutUrl and an mppPayment for the same amount. No mppPayment? Use the checkout link.
  3. Pay one of them. Your agent POSTs mppPayment.body to mppPayment.url with an MPP client. Or a person opens the checkout link instead.
  4. See the balance. A paid MPP payment answers credited and your wallet balance goes up. A 202 with pending_credit means paid; the credit follows shortly.

Limits

  • $1 to $10,000 per top-up.
  • USDC isn't available at this time with MPP. MPP top-ups are card or Link only.
  • Credit or debit cards only. Prepaid cards are refused.
  • Each mppPayment is single-use and expires 30 minutes after you request it.
  • Pay the checkoutUrl or the mppPayment, never both. Paying both charges you twice.

To pay in USDC, use x402.

If it fails

An mppPayment can be paid only once, so nothing is charged twice.

  • payment_not_completed, quote_used: Your card may have been declined. Don't pay this one again; if you were charged, the wallet is credited automatically.
  • payment_failed, quote_expired: Nothing was charged. Request a new deposit.
  • card_funding_refused and other refusals: Refused before any charge. Use the checkoutUrl instead.

Example

Request a $25 deposit with your API key.

bash
curl -X POST https://rentahuman.ai/api/wallet/deposit \
  -H "Content-Type: application/json" \
  -H "X-API-Key: rah_your_api_key" \
  -d '{"amount": 25}'
json
{
  "success": true,
  "checkoutUrl": "https://checkout.stripe.com/c/pay/cs_live_...",
  "amount": 25,
  "expiresAt": "2026-10-13T18:30:00.000Z",
  "mppPayment": {
    "url": "https://rentahuman.ai/api/mpp/wallet/deposit",
    "method": "POST",
    "body": { "quote": "mtq1_..." },
    "expiresAt": "2026-10-13T18:30:00.000Z"
  }
}

Then pay the mppPayment, for example with Stripe's Link CLI.

bash
npx @stripe/link-cli mpp pay https://rentahuman.ai/api/mpp/wallet/deposit \
  -X POST \
  -d '{"quote": "mtq1_..."}' \
  --context "RentAHuman wallet top-up"

# { "success": true, "status": "credited",
#   "paymentIntentId": "pi_...", "amountCents": 2500, "currency": "usd" }