PagSafe MCP by usefulapi
v1.6.1Create Pix charges, check and refund payments, and manage Pix subscriptions in PagSafe.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
pagsafe_create_pix_charge Create a Pix charge
Create a one-time Pix charge. Returns the id, status PENDING, and pix.payload (the copy and paste code to show the buyer). The charge is paid only when the PagSafe webhook reports AUTHORIZED: do not treat the reply as paid. A retry with the same external_id, amount and customer.document returns the same pending Pix within 6 hours (reused: true). Writes a real charge. Uses POST /v2/transactions.
| Parameter | Type | Description |
|---|---|---|
amount * | number | Total in reais, decimal, for example 149.9 for R$ 149,90. Never send centavos. Minimum 5.00. |
customer * | object | |
external_id * | string | Your order id. On a retry of the same order, send the same external_id, amount and customer.document: PagSafe returns the same pending Pix if it was created within the last 6 hours. |
ip * | The buyer's real IP address, IPv4 or IPv6. PagSafe uses it for fraud checks. | |
items * | array | The order items. |
tracking | object | Optional UTM tags for the sale. They come back in the transaction. |
pagsafe_get_transaction Get a transaction
Get the current status of a transaction created through this API: PENDING, AUTHORIZED (paid), FAILED, REFUNDED, IN_DISPUTE or CHARGEBACK. Use it to check a payment or to recover a lost webhook; prefer the webhook for live updates. Uses GET /v2/transactions/{transaction_id}.
| Parameter | Type | Description |
|---|---|---|
transaction_id * | string | The PagSafe transaction id (for example tr_8f2c1a), from the create call. |
pagsafe_refund_transaction Refund a transaction
Refund the full amount of a transaction back to the buyer. The transaction must be AUTHORIZED, created through this API, and have enough balance in every split account. A refund cannot be undone. Uses POST /v2/transactions/{transaction_id}/refund.
| Parameter | Type | Description |
|---|---|---|
transaction_id * | string | The PagSafe transaction id (for example tr_8f2c1a), from the create call. |
pagsafe_create_pix_subscription Create a Pix Automático subscription
Create a recurring Pix Automático subscription. Returns status PENDING_AUTHORIZATION and pix.qr_code or pix.payment_link: show one to the buyer, who must authorize it once. After authorization the status becomes ACTIVE and later cycles are charged on their own. For Pix, the cycles are SEMANAL, MENSAL and ANUAL only. If the call fails with HTTP 500, check PagSafe for an existing subscription before you retry. Writes a real subscription. Uses POST /v2/subscriptions.
| Parameter | Type | Description |
|---|---|---|
amount * | number | Amount charged in every cycle, in reais (not the total). Minimum 5.00. |
customer * | object | |
external_id * | string | Your id for this subscription. The retry reuse rule is documented for one-time Pix charges only. |
ip * | The buyer's real IP address, IPv4 or IPv6. PagSafe uses it for fraud checks. | |
items * | array | The order items. |
membership_period * | string | Billing cycle: SEMANAL (weekly), MENSAL (monthly) or ANUAL (yearly). |
pagsafe_get_subscription Get a subscription
Get a subscription's status (PENDING_AUTHORIZATION, ACTIVE, LATE, PAUSED or CANCELED), amount, cycle, and the dates of the last and next charge. Uses GET /v2/subscriptions/{subscription_id}.
| Parameter | Type | Description |
|---|---|---|
subscription_id * | string | The PagSafe subscription id (for example sub_5a90c2), from the create call. |
pagsafe_cancel_pix_subscription Cancel a PagSafe subscription
Cancel a PagSafe customer subscription so no further cycles are charged. The buyer keeps access until the cycle already paid ends. This cancels a subscription of YOUR customer, not a UsefulAPI plan. Uses POST /v2/subscriptions/{subscription_id}/cancel.
| Parameter | Type | Description |
|---|---|---|
subscription_id * | string | The PagSafe subscription id (for example sub_5a90c2), from the create call. |