Create refund
Issues a refund against an order. The order must be completed, have no open dispute, and fall within the 30-day refund window. Requires the REFUNDS_WRITE scope.
POST
https://api.pandabase.io/v2/core/stores/{storeId}/refunds/orders/{orderId} Authentication
Requires a bearer token (sk_…) or an API key in the header Authorization.
Path parameters
storeId string required (length 12–48)
orderId string required (length 12–48)
Header parameters
idempotency-key string (length 8–32)
Body parameters
reason enum No description.
Response 200
Default Response
ok enum required (one of true)
data object required No description.
Response 400
Default Response
ok enum required (one of false)
error string required No description.
Response 404
Default Response
ok enum required (one of false)
error string required No description.
Request
curl -X POST https://api.pandabase.io/v2/core/stores/:storeId/refunds/orders/:orderId \ -H "Content-Type: application/json" \ -d '{"reason":"DUPLICATE"}'Response
{ "ok": true, "data": { "id": "rfd_3kx9p2vqwm5j8h0r1n4tzcbf", "amount": 2900, "status": "COMPLETED", "reason": "REQUESTED_BY_CUSTOMER", "createdAt": "2026-05-14T12:34:56.000Z", "updatedAt": "2026-05-14T12:35:10.000Z", "order": { "id": "ord_p2v8q1mzj0kxw5h7n4tr3bcf", "orderNumber": "cs_abcdef0123456789", "status": "REFUNDED", "amount": 2900, "currency": "USD", "customer": { "id": "cus_j8h0r1n4tzcbfp2v8q1mzwx5", "email": "buyer@example.com", "firstName": "Alex", "lastName": "Doe" } } }}