Request a payment
request_paymentInitiates a mobile money payment to a known recipient and checks it against your spending policy, returning allowed, held for approval, or denied.
Instructions
Ask to pay a known recipient by mobile money. Spend Guard checks the request against your spending policy and answers allowed (it's paid out), held (a person must approve it first) or denied. Amounts are in minor units: GHS 120.50 is 12050. The recipient must be an id from your allowed list (see get_my_limits). Always pass an idempotency_key tied to the thing being paid, like 'invoice-88', and reuse it if you retry: the same key never pays twice. If the answer is held or denied, don't retry, split the amount or switch recipient; tell the user.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | No | Why you're paying. Shown to a human approver; it doesn't change the decision. | |
| currency | Yes | ||
| recipient | Yes | A recipient id from your allowed list, e.g. supplier:kofi-hardware | |
| reference | Yes | What it's for, shown to the recipient and the approver, e.g. Invoice 88 | |
| amount_minor | Yes | Amount in minor units (pesewas for GHS). GHS 120.50 is 12050. | |
| idempotency_key | Yes | Stable key for this payment, e.g. invoice-88. Reuse it on retry. |