Skip to main content

Cancel a credit transfer

Cancel SEPA Credit Transfers, Instant SEPA Credit Transfers, and Swan Internal Credit Transfers with the API.

Upcoming transfers only

Only transfers with the status Upcoming can be canceled. If your transaction has any other status, including Pending, you can request a recall.

Guide​

  1. Call the cancelTransaction mutation.
  2. Add your transaction ID.
  3. Add the payload and rejection.

Mutation​

🔎 Open the mutation in API Explorer

mutation CancelTransfer {
cancelTransaction(input: { transactionId: "$YOUR_TRANSACTION_ID" }) {
... on CancelTransactionSuccessPayload {
__typename
message
}
... on ForbiddenRejection {
__typename
message
}
}
}

Payload​

The payload shows the credit transfer canceled (line 5).

{
"data": {
"cancelTransaction": {
"__typename": "CancelTransactionSuccessPayload",
"message": "TransactionCanceled"
}
}
}