Create a refund for a payment
POST/v1/payments/:paymentId/refunds
Issue a refund against the given payment. If amount is omitted, the full remaining amount of the payment is refunded. When the payment is unsettled and the full amount is being refunded, the payment is canceled and the returned object is a Payment with status of CANCELED; otherwise a Refund is returned. Discriminate on the entity field.
Request
Responses
- 201
- 400
- 401
- 403
- 404
Refund created or payment canceled
Bad Request - Invalid input or refund total exceeds payment amount
Unauthorized - Invalid or missing token
Forbidden - payment:write scope required
Payment not found