{"section":"known-issues","requestedLocale":"en","requestedSlug":"refunds-of-the-same-operation-sent-to-the-connector-with-the-same-requestid","locale":"en","slug":"refunds-of-the-same-operation-sent-to-the-connector-with-the-same-requestid","path":"docs/en/known-issues/Payments/refunds-of-the-same-operation-sent-to-the-connector-with-the-same-requestid.md","branch":"main","content":"## Summary\n\nThe gateway reuses the operation's `requestId` in every refund it sends to the connector. When one operation generates more than one refund on the same payment, the connector receives different refunds with the same `paymentId` and `requestId`. If the connector deduplicates by `requestId`, it returns the first refund's result for the others, and the gateway marks them as completed without the amount being refunded at the provider.\n\n## Simulation\n\n1. Use a Payment Provider Protocol connector with `postPurchaseOperationMode: Total`, where the connector captures the payment on its side.\n2. Place an order (e.g. 100.00) and let the connector capture it.\n3. Capture part of the amount through the VTEX API (e.g. 30.00).\n4. Cancel the transaction in full.\n5. Observe that the connector receives two `POST /payments/{paymentId}/refunds` with the same `paymentId` and `requestId`: one for the amount captured through the API and one for the remainder (e.g. 30.00 and 70.00). If the API capture is half of the order amount, both requests are identical.\n\n## Workaround\n\nNo workaround available at this time.\nThe connector can reduce the impact by rejecting refunds whose total exceeds the captured amount. This does not cover two refunds with the same value."}