Support is issuing refunds by hand in the processor dashboard. Merchants want to do it from their own integration, including partial refunds.
POST /api/payments/{id}/refunds
refunded_total
GET /api/payments/{id}/refunds
The payments router is mounted with ApiKeyAuth, so request.auth is the calling merchant.
ApiKeyAuth
request.auth
Added a test for the happy path. Tried a 10.00 refund on a sandbox payment.
9f5f110
9e5f0f7
Why
Support is issuing refunds by hand in the processor dashboard. Merchants want to do it from their own integration, including partial refunds.
What
POST /api/payments/{id}/refundscreates a refund and bumpsrefunded_totalon the paymentGET /api/payments/{id}/refundslists refunds for a paymentThe payments router is mounted with
ApiKeyAuth, sorequest.authis the calling merchant.Testing
Added a test for the happy path. Tried a 10.00 refund on a sandbox payment.