Canceling a transaction
About transaction cancellation#
Cancellation is only possible for transactions in authorized state (authorized and awaiting capture). Already captured transactions cannot be canceled — in that case, use refund.
Cancellation immediately releases the reservation in the customer's wallet, preventing any subsequent charge.
info
The deadline to cancel an authorized transaction is up to 6 days from the authorization date. After this period, the transaction automatically moves to EXPIRED.
Endpoint#
Request example#
Body parameters#
| Field | Type | Required | Description |
|---|---|---|---|
transaction_id | string | Yes* | Transaction identifier generated by PicPay at the time of the charge |
reference_id | string | Yes* | Unique transaction identifier generated by the partner |
*At least one of the two identifiers must be provided. When both are sent, both will be validated.
Response example#
The transaction moves from AUTHORIZED to CANCELLED.
Possible errors#
business_code | HTTP | Description |
|---|---|---|
TRANSACTION_CANT_BE_CANCELLED | 409 | Current status does not allow cancellation |
TRANSACTION_NOT_FOUND | 404 | Transaction not found |