Create a Refund

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

Request

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

Parameters

ParameterTypeDescriptionConstraints
amountInt(1...99999999)Refund amount. Denomination in the smallest currency subunit (e.g. eurocents).Must be lower than or equal to the original transaction amount.
reasonString(255)The description for the refund.

Response

{
  "id": "637ad600-dc6e-4b21-b563-f6584a14978a",
  "transactionId": "e2421986-7f3c-497f-bf3e-483498f7cfd0",
  "amount": 6000,
  "reason": "Refund required by customer.",
  "created": "2024-11-11T16:42:02Z",
  "updated": "2024-11-11T16:42:02Z"
}

Parameters

ParameterTypeDescriptionConstraints
idString(36)Refund unique identifier.
transactionIdString(36)Unique identifier of the transaction related to this refund.
amountInt(1...99999999)Refund amount. Denomination in the smallest currency subunit (e.g. eurocents).Specified in the request.
reasonString(255)The description for the refund.Specified in the request.
createdString(RFC3339)Creation time.ISO 8601 date and time.
updatedString(RFC3339)Updated time.ISO 8601 date and time.

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).