diff --git a/docs/topics/merchants/online/sdd/guide-get-mandate.mdx b/docs/topics/merchants/online/sdd/guide-get-mandate.mdx new file mode 100644 index 0000000000..cbef315a0b --- /dev/null +++ b/docs/topics/merchants/online/sdd/guide-get-mandate.mdx @@ -0,0 +1,53 @@ +--- +title: Get mandate URL +--- + +After a SEPA Direct Debit (SDD) B2B mandate has been declared, you may need to retrieve the mandate information. +You can retrieve a specific mandate using the **payment mandate ID**. + +:::tip Prerequisites +1. **Mandate declaration:** A SEPA Direct Debit mandate must have been previously declared using the `addSepaDirectDebitPaymentMandate` mutation. +1. **Mandate ID:** You must know the **unique payment mandate ID** of the mandate you want to retrieve. +::: + +## API {#api} + +Queries are highly customizable. This guide focuses solely on using the `paymentMandate` query to get the mandate URL. + +1. Call the `paymentMandate` query. +2. Check the boxes for `id` (line 2) and `SEPAPaymentDirectDebitMandate` (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 {#query} + +Open in API Explorer + +```graphql {2,3,4-6} showLineNumbers +query GetMandate { + paymentMandate(id: "$YOUR_MANDATE_ID") { + ... on SEPAPaymentDirectDebitMandate { + id + name + mandateDocumentUrl + } + } +} +``` + +### Payload {#payload} + +1. The response includes a mandate name (line 5), and the download URL (line 6). +1. Paste the URL into your browser, then press enter. This triggers the download of your PDF. + +```json {5,6} showLineNumbers +{ + "data": { + "paymentMandate": { + "id": "$YOUR_MANDATE_ID", + "name": "B2B/Core SEPA Direct Debit Mandate", + "mandateDocumentUrl": "$YOUR_MANDATE_URL" + } + } +} +``` \ No newline at end of file diff --git a/docs/topics/merchants/online/sdd/index.mdx b/docs/topics/merchants/online/sdd/index.mdx index b4e0595af3..43c3008a4b 100644 --- a/docs/topics/merchants/online/sdd/index.mdx +++ b/docs/topics/merchants/online/sdd/index.mdx @@ -280,6 +280,7 @@ They can investigate the reason for return and take whatever action is necessary - [Accept payments with SEPA Direct Debit (step-by-step)](./guide-sdd.mdx) - [Request SEPA Direct Debit payment method](./guide-request.mdx) - [Declare a payment mandate](./guide-declare.mdx) +- [Get SEPA Direct Debit mandate URL](./guide-get-mandate.mdx) - [Initiate a SEPA Direct Debit transaction](./guide-initiate.mdx) - [Update SEPA Direct Debit payment method](./guide-update.mdx) - [Sandbox](./sandbox.mdx) \ No newline at end of file diff --git a/sidebars.js b/sidebars.js index 8c1dee1306..82a56628b0 100644 --- a/sidebars.js +++ b/sidebars.js @@ -321,6 +321,7 @@ module.exports = { "topics/merchants/online/sdd/guide-sdd", "topics/merchants/online/sdd/guide-request", "topics/merchants/online/sdd/guide-declare", + "topics/merchants/online/sdd/guide-get-mandate", "topics/merchants/online/sdd/guide-initiate", "topics/merchants/online/sdd/guide-update", "topics/merchants/online/sdd/guide-create-link",