Create a Refund

You can use this call to create a refund for a payment made with an iDEAL transaction.

Request

POST https://api.pay.cm.com/api/v1/paymentmethods/ideal/v1/transactions/{transactionId}/refunds
{
  "amount": 1200,
  "reason": "Refund required by customer."
}

Optional parameters

ParameterTypeDescriptionConstraints
amountInt(1...99999999)Denomination in the smallest currency subunit (e.g. eurocents). If empty, the refund amount will be the remaining available amount of the transaction (e.g. total payment amount minus already refunded amounts minus the amounts of the pending refund requests).Must be lower than or equal to the original transaction amount.
reasonString(255)The description for the refund.

Response

If refund has been successfully created then the response is the Get Transaction response with an updated refunds.refundedAmount and refunds.refundedPendingAmount.

Response codes

HTTP statusDescription
201Refund successfully created.
4XXClient error response (See message for details). This response is given when the User input was incorrect or something illegal was attempted (eg. using a service without having that service configured for the user, or not being authorized).
5XXServer error response (See message for details).