v1

latestOpenAPI 3.1.0Payrails GmbH2026-07-2614905.7 MB
Actions

Cancel a payment

Request a payment cancelation during a workflow execution.

post/merchant/workflows/{workflowCode}/executions/{executionId}/cancel

Path parameters

workflowCodestring required

Machine-friendly code of Workflow.

Path parameter to specify the workflow code.

executionIdstring uuid required

Identifier of the resource in Payrails.

Headers

x-idempotency-keystring uuid required

Idempotency key to be used. Sending again the same key would return the same result without re-executing the update.

Request body

reason'BetterPrice' | 'CustomerDontNeed' | 'DamagedProduct' | 'Duplicate' | 'FraudulentProduct' | 'LateDelivery' | 'NoReason' | 'ProductMismatchDescription' | 'WrongProduct' | 'WrongProductSpecification'

Reason for invoking the operation or action.

reasonDescriptionstring

An optional field to include any necessary information for the capture action.

Example request

{
  "reasonDescription": "Customer's automatic subscription."
}

Response

The payment cancelation was requested.

name'cancel' required

Performed action name.

actionIdstring uuid required

Unique identifier for this action execution. If its processing is done asynchronously, you will receive a notification with the same actionId.

workspaceIdstring uuid

Unique identifier of a workspace in Payrails.

executedAtstring date-time required

Date and time when execution of the Action was started.

reason'BetterPrice' | 'CustomerDontNeed' | 'DamagedProduct' | 'Duplicate' | 'FraudulentProduct' | 'LateDelivery' | 'NoReason' | 'ProductMismatchDescription' | 'WrongProduct' | 'WrongProductSpecification'

Reason for invoking the operation or action.

reasonDescriptionstring

An optional field to include any necessary information for the cancel action.

Example response

{
  "reasonDescription": "Customer's order expired."
}