Comunidade
/cancel API not working for refund
21 hours ago by Jakub
Hello, I am trying to integrate with PagBanks Sandbox API. Order creation and capture seems to be working fine but I observed an issue with /cancel (https://developer.pagbank.com.br/reference/cancelar-pagamento). For unpaid charges API works great, however if a charge was already PAID then refunding returns error most of the time.
Steps to reproduce:
- Create an order without capture.
- Capture the order
- Try to refund captured charge
Outcome:
HTTP 400:
{
"error_messages": [
{
"code": "40008",
"message": "refund_temporarily_unavailable",
"description": "Transaction is not found.",
"error": "refund_temporarily_unavailable"
}
]
}
Sometimes refund works right away, sometimes it works after some retries. Why is this flow so non-deterministic? Is there something on my side that I can do? Thanks in advance.
