Skip to main content

Resume or enable a payment mandate

Resume or enable a SEPA Direct Debit received payment mandate with the API. Use the enableReceivedDirectDebitMandate mutation to:

  • Resume a Suspended mandate to its previous status (Enabled for Core, ConsentPending, or Enabled for B2B).
  • Initiate or re-initiate consent for a B2B mandate in ConsentInitiationPending status, moving it to ConsentPending. This occurs when a mandate is automatically created from a received instruction, after an update requiring consent, or when consent was previously refused or expired.
ConsentInitiationPending status

The ConsentInitiationPending status indicates that a B2B mandate requires consent initiation. When you call enableReceivedDirectDebitMandate, a consent request is created, and the status moves to ConsentPending. If the debtor refuses or the consent expires, the mandate returns to ConsentInitiationPending, allowing them to retry without recreating the mandate.

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 or enabling (line 4).
  3. If you're enabling or resuming a B2B mandate, add your consent redirect URL (line 5).
  4. Add the EnableReceivedDirectDebitMandateSuccessPayload (line 8; include the consentUrl for B2B).
  5. Add rejections (not shown).

Mutation​

Open 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"
}
}
}
}
}
}