Malaleem API
POST /api/v1/payments/codes

Create a payment code

Mint a signed Malaleem Pay Token for the caller to show as a QR code or present over NFC. A `request` code means "pay me": it lasts 15 minutes and can be scanned many times, because every payer confirms their own payment. A `charge` code means "you may take up to `amount` from me": it lasts 2 minutes, works once, and cannot be used for more than its cap. Answers `{data: {kind, token, expires_in, max_amount?}}`.

Parameters

kind string · required

request | charge.

amount integer

For request: the amount to ask for (leave out to let the payer type it). For charge: required, the most the merchant may take.

currency string

Defaults to USD.

curl https://malaleem.com/api/v1/payments/codes \
  -H "Authorization: Bearer {token}" \
  -d kind=charge -d amount=2500