Skip to main content

Request a refund

Request a refund for a SEPA Direct Debit transaction with the API.

Prerequisites
  1. You're an account member with the canInitiatePayments membership permission.
  2. You're authenticating with a user access token.

Guide​

  1. Call the returnTransaction mutation.
  2. Add the transactionId and consentRedirectUrl.
  3. Add the ReturnTransactionSuccessPayload, including the consentUrl and id.
  4. Add rejections (not shown).

Mutation​

🔎 Open the mutation in API Explorer

mutation RefundTransaction {
returnTransaction(
input: {
transactionId: "$TRANSACTION_ID"
consentRedirectUrl: "$REDIRECT_URL"
}
) {
... on ReturnTransactionSuccessPayload {
__typename
consent {
consentUrl
id
}
}
... on ReturnTransactionRejection {
__typename
message
}
... on ReturnTransactionNotFound {
__typename
message
}

Payload​

{
"data": {
"returnTransaction": {
"__typename": "ReturnTransactionSuccessPayload",
"consent": {
"consentUrl": "$CONSENT_URL",
"id": "$CONSENT_ID"
}
}
}
}