Skip to main content

Resume a payment mandate

Resume the previous status for a SEPA Direct Debit received payment mandates with the API. This mutation returns the received payment mandate to its most recent status before being suspended.

  • For SEPA Direct Debit Core mandates, resume the Enabled status.
  • For SEPA Direct Debit B2B mandates, resume either the ConsentPending or Enabled status.
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 enableReceivedDirectDebitMandate mutation.
  2. Add the ID for the mandate you're resuming.
  3. If you're resuming a B2B mandate, add your consent redirect URL.
  4. Add the EnableReceivedDirectDebitMandateSuccessPayload (include the consentUrl for B2B).
  5. Add rejections (not shown).

Mutation​

🔎 Open the mutation in API Explorer

mutation ResumeMandate {
enableReceivedDirectDebitMandate(
input: {
receivedDirectDebitMandateId: "$YOUR_MANDATE_ID"
consentRedirectUrl: "$YOUR_REDIRECT_URL"
}
) {
... on EnableReceivedDirectDebitMandateSuccessPayload {
__typename
receivedDirectDebitMandate {
statusInfo {
status
... on ReceivedDirectDebitMandateStatusInfoEnabled {
__typename
enabledAt
}
... on ReceivedDirectDebitMandateStatusInfoConsentPending {
__typename
consent {
consentUrl
}
}
}
}
}
}
}

Payload​

The payload shows the mandate status returned to ConsentPending, and provides the consentUrl (line 10).

Make sure to send the consentUrl to your user so they can provide consent for the mandate.

{
"data": {
"enableReceivedDirectDebitMandate": {
"__typename": "EnableReceivedDirectDebitMandateSuccessPayload",
"receivedDirectDebitMandate": {
"statusInfo": {
"status": "ConsentPending",
"__typename": "ReceivedDirectDebitMandateStatusInfoConsentPending",
"consent": {
"consentUrl": "https://identity.swan.io/consent?consentId=$YOUR_CONSENT_ID&env=Sandbox"
}
}
}
}
}
}