Skip to main content

Get mandate URL

After a SEPA Direct Debit (SDD) mandate has been declared, you may need to retrieve the mandate information. You can retrieve a specific mandate using the payment mandate ID.

Prerequisites
  1. Mandate declaration: A SEPA Direct Debit mandate must have been previously declared using the addSepaDirectDebitPaymentMandate mutation.
  2. Mandate ID: You must know the unique payment mandate ID of the mandate you want to retrieve.

API​

Queries are customizable. This guide focuses solely on using the paymentMandate query to get the mandate URL.

  1. Call the paymentMandate query.
  2. Add your payment mandate ID (line 2). Include the SEPAPaymentDirectDebitMandate fragment with the fields you need (line 3).
  3. Under SEPAPaymentDirectDebitMandate, check the boxes for id, name and mandateDocumentUrl (lines 4-6).
    • mandateDocumentUrl allows you to receive a download URL in the payload.

Query​

Open in API Explorer
query GetMandate {
paymentMandate(id: "$YOUR_MANDATE_ID") {
... on SEPAPaymentDirectDebitMandate {
id
name
mandateDocumentUrl
}
}
}

Payload​

  1. The response includes a mandate name (line 5), and the download URL (line 6).
  2. Paste the URL into your browser, then press enter. This triggers the download of your PDF.
{
"data": {
"paymentMandate": {
"id": "$YOUR_MANDATE_ID",
"name": "B2B/Core SEPA Direct Debit Mandate",
"mandateDocumentUrl": "$YOUR_MANDATE_URL"
}
}
}