MED webhooks (optional)
Safefy now notifies you by webhook when a MED opens and when it ends:dispute.opened, dispute.won,
dispute.lost and the new dispute.cancelled (case cancelled or expired). Each notice carries the category, the
disputed amount, the hold state on your balance, the MED fee and the payment data.What to do: nothing is required. To receive them, create or edit a webhook in the dashboard (Webhooks) and
select the events in the Dispute group. Format and best practices in
MED webhooks.Settlement groups in the API (optional)
The balance can be split into settlement groups, the same “Group 1”, “Group 2” shown in the dashboard. The API now shows them and lets you choose the group:GET /v1/balancereturnsbalance.settlementGroups(id and available amount of each group) andbalance.availableTotal(sum of the groups).POST /v1/cashoutsacceptssettlementGroupIdto withdraw from a specific group, andpayoutAccountIdto withdraw to a cashout account already registered in the dashboard.
available,
withdrawNowAvailable and total did not change. Node SDK 1.3.0 and MCP Server 1.2.0 already include the new fields.MCP Server 1.1.0 (action required if you configured through the chat)
Version 1.1.0 of@safefypay/safefy-mcp hardens security for
anyone using Safefy through AI agents:- Keys now go in the
SAFEFY_PAYMENT_PUBLIC_KEYandSAFEFY_PAYMENT_SECRET_KEYenvironment variables. The tool that accepted the Secret Key through the chat is disabled by default. - The token is only sent to the Safefy API.
- The agent never receives the card number or CVV.
- Payouts only go to an account already registered in the dashboard, with user confirmation in the conversation.
env block of the MCP configuration. Examples per platform in MCP Server (AI).Node SDK 1.2.0
New version of@safefypay/safefy-sdk-node:authMode: "v2": sends credentials in the headers of every request, with no token step. See Authentication.verifyWebhookSignature: validates the newX-Safefy-Signature-V2webhook header.- Logs mask keys, card data and CPF/CNPJ.
authMode: "v1". To upgrade: npm install @safefypay/safefy-sdk-node@latest.New webhook signature (action required by 2026-10-29)
Callbacks sent to thecallbackUrl of charges and payouts now carry two new headers:X-Safefy-Timestamp: send time, in Unix seconds.X-Safefy-Signature-V2:t={timestamp},v1={HMAC-SHA256(secret, "{timestamp}.{body}")}.
X-Safefy-Signature) used the payment or payout ID as the key, and the
payer knows that ID. With the account secret, only Safefy can sign a valid callback. The timestamp in the signature
blocks replays of old callbacks.What to do:- Get the secret from the dashboard and store it on your server.
- Validate
X-Safefy-Signature-V2over the raw request body. - Reject callbacks with an invalid signature or older than 5 minutes.
- When in doubt, confirm the status through the API before releasing the order.
X-Safefy-Signature header stops being sent on 2026-10-29. Until then both are sent.Step by step and examples in Node.js, Python, PHP and C#: Webhooks → Signature.