Audience:
Developers
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
- Mandate declaration: A SEPA Direct Debit mandate must have been previously declared using the
addSepaDirectDebitPaymentMandatemutation. - 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.
- Call the
paymentMandatequery. - Add your payment mandate ID (line 2). Include the
SEPAPaymentDirectDebitMandatefragment with the fields you need (line 3). - Under
SEPAPaymentDirectDebitMandate, check the boxes forid,nameandmandateDocumentUrl(lines 4-6).mandateDocumentUrlallows you to receive a download URL in the payload.
Query
Open in API Explorerquery GetMandate {
paymentMandate(id: "$YOUR_MANDATE_ID") {
... on SEPAPaymentDirectDebitMandate {
id
name
mandateDocumentUrl
}
}
}
Payload
- The response includes a mandate name (line 5), and the download URL (line 6).
- 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"
}
}
}