initiate_pix
Initiates a PIX payment through Open Finance Brasil with an authorized consent. Uses an idempotency key to avoid duplicate charges.
Instructions
Initiates a PIX payment via Open Finance Brasil. Requires an active payment consent. The idempotency_key field prevents duplicate charges on retries.
Outside environment='mock', requires an AUTHORISED payment
consent for this subject/bank, obtained beforehand via
start_payment_consent + complete_payment_consent
(tools/payments.py) - a data-sharing consent alone is not
sufficient. In mock mode this check is skipped entirely, since the
mock adapter has no payment-consent resource to check against.
Args:
subject_id: Payer's CPF.
bank: Identifier of the participating bank.
amount: Canonical amount in BRL (e.g. "150.00").
creditor_key: PIX key of the recipient.
creditor_key_type: Type of the recipient's key.
debtor_account_id: ID of the account to debit, returned by
list_accounts.
idempotency_key: Client-generated UUID to prevent duplicates.
ctx: MCP request context, providing access to shared adapters
and the persistent idempotency store.
description: Payment description/reason (max 140 chars).
consent_id: Payment consent returned by
start_payment_consent. Required outside mock mode.
Returns: Status of the initiated (or previously cached) payment.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bank | Yes | ||
| amount | Yes | BRL amount serialized with exactly two decimal places. | |
| consent_id | No | ||
| subject_id | Yes | ||
| description | No | ||
| creditor_key | Yes | ||
| idempotency_key | Yes | ||
| creditor_key_type | Yes | ||
| debtor_account_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bank | Yes | ||
| payment | Yes |