# SEPA Direct Debit (Beta)

The SEPA Direct Debit API allows you to initiate EUR-denominated collections directly from your customer's bank account in the Netherlands by submitting debit instructions in JSON format, from which an ISO 20022 pain.008 file is generated and sent to the debtor's bank under a valid mandate.

> Requests to the SEPA Direct Debit API require an [access token](get_access_token.md) with `scope` set to `paymentinitiation` `corporate`. 

:::megaphone

This API is in **beta** and access is currently restricted as part of ongoing testing. The specification and behavior described here is subject to change in the future.

:::

##

### 1. Create Consent

The first step is to create and authorise a [consent](consent_and_ais.md#1-create-consent) by including an `X-Consent-Type` header set to `sepaDirectDebit`. The resulting consent is long-lived, granting you access to initiate SEPA Direct Debit collections on behalf of the PSU without requiring repeated re-authentication (until revoked by the PSU, or until it expires due to regulatory or account-related conditions).

### 2. Create Payment

Then, submit the SEPA Direct Debit instructions, including debtor details and mandate information, to create a pending collection. 

#### Endpoint

```http
POST /iso/beta/payments/sepa-direct-debit
```

#### Request Headers

| Name               | Type         | Description                                                                                                       |
| ------------------ | ------------ | ----------------------------------------------------------------------------------------------------------------- |
| `X-Request-ID`     | string(uuid) | The ID of the request, unique to the call, as determined by the initiating party.                                 |
| `X-BicFi`          | string       | The BIC of the bank to which the request is addressed.                                                            |
| `PSU-ID`           | string       | The ID used to identify the PSU at the bank. Typically a local social security number or another unique login ID. |
| `PSU-Corporate-ID` | string       | The Corporate ID of the PSU when acting on behalf of an organisation, e.g. Org. nummer for SE, KVK for NL.        |
| `PSU-IP-Address`   | string(ipv4) | The IP address of the PSU from the HTTP request between the PSU and the TPP.                                      |
| `PSU-User-Agent`   | string       | The Agent header of the PSU from the HTTP request between the PSU and the TPP.                                    | 

#### Request Body

| Name                                     | Type         | Description                                                                                 |
| ---------------------------------------- | ------------ | ------------------------------------------------------------------------------------------- |
| `instructedAmount`                       | object       | The amount and currency of the money to be transferred.                                     |
| `creditorAccount`                        | object       | The account to which the payment will be credited.                                          |
| `creditorName`                           | string       | The full name of the payment recipient.                                                     |
| `creditorId`                             | string       | The ID assigned to the creditor authorising them to initiate SEPA Direct Debit collections. |
| `creditorAddress`                        | object       | The address of the payment recipient.                                                       |
| `creditorAgent`                          | string       | The BIC of the payment recipient's bank.                                                    |
| `creditorAgentName`                      | string       | The name of the payment recipient's bank.                                                   |
| `debtorAccount`                          | object       | The account from which the payment will be debited.                                         |
| `debtorName`                             | string       | The full name of the payer.                                                                 |
| `debtorAgent`                            | string       | The BIC of the payer's bank.                                                                | 
| `debtorAgentName`                        | string       | The name of the payer's bank.                                                               | 
| `debtorAddress`                          | string       | The address of the payer.                                                                   |  
| `localInstrumentCode`                    | string(enum) | The local instrument code. Only `CORE` is currently supported.                              |
| `sequenceType`                           | string(enum) | The sequeence type for the SEPA Direct Debit collection.                                    |
| `mandateRelatedInformation`              | object       | The mandate information that authorises the SEPA Direct Debit collection.                   |
| `requestedExecutionDate`                 | string(date) | The date when the payment is scheduled to be executed in ISO 8601 format, e.g. 2025-10-31.  |
| `remittanceInformationUnstructuredArray` | array        | A free-text field for remittance information on the payment.                                |

```bash
curl -X POST "https://api.openbankingplatform.com/iso/beta/payments/sepa-direct-debit" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -H "X-Request-ID: 99bf3688-b82b-4eaf-b1e4-d4ca5ddf697c" \
  -H "X-BicFi: INGBNL2A" \
  -H "PSU-ID: 123456782" \
  -H "PSU-Corporate-ID: 12345678" \
  -H "PSU-IP-Address: 152.120.171.187" \
  -H "PSU-User-Agent: mozilla/5.0" \
  -d '{
        "instructedAmount": {
          "currency": "EUR",
          "amount": "130.00"
        },
        "creditorAccount": {
          "iban": "NL20INGB0001234567",
          "currency": "EUR"
        },
        "creditorName": "Acme B.V.",
        "creditorId": "NL02ZZZ123456780000",
        "creditorAddress": {
          "street": "Example Street",
          "buildingNumber": "5",
          "city": "Amsterdam",
          "postalCode": "1012 AB",
          "country": "NL"
        },
        "creditorAgent": "INGBNL2A",
        "creditorAgentName": "ING Bank N.V.",
        "debtorAccount": {
          "iban": "FI2112345600000785",
          "currency": "EUR"
        },
        "debtorName": "Customer Oy",
        "debtorAgent": "NDEAFIHH",
        "debtorAgentName": "Nordea Bank Abp",
        "debtorAddress": {
          "street": "Example Street",
          "buildingNumber": "5",
          "city": "Helsinki",
          "postalCode": "00160",
          "country": "FI"
        },
        "localInstrumentCode": "CORE",
        "sequenceType": "RCUR",
        "mandateRelatedInformation": {
          "mandateId": "MANDATE-12345",
          "dateOfSignature": "2026-03-15"
        },
        "requestedExecutionDate": "2026-05-19",
        "remittanceInformationUnstructuredArray": [
            "Ref Number Merchant"
        ]
      }'
```

#### Response 

```json
{
  "transactionStatus": "RCVD",
  "paymentId": "ef20b0a6-a7d1-4bf5-8e12-0cbc9138e4fd",
  "_links": {
    "confirmPayment": {
      "href": "/iso/payments/confirm"
    },
    "self": {
      "href": "/iso/payments/ef20b0a6-a7d1-4bf5-8e12-0cbc9138e4fd"
    }
  }
}
```

### 3. Confirm Payment 

Once the SEPA Direct Debit payment is created, confirm the collection to generate and upload a pain.008 file to the debtor's bank. The bank processes the request and debits the debtor's account on the request execution date, subject to mandate validation and scheme rules.

#### Endpoint 

```http
PUT /iso/payments/confirm
```

#### Request Headers

| Name               | Type         | Description                                                                                                       |
| ------------------ | ------------ | ----------------------------------------------------------------------------------------------------------------- |
| `X-Request-ID`     | string(uuid) | The ID of the request, unique to the call, as determined by the initiating party.                                 |
| `Consent-ID`       | string(uuid) | The ID of the related SEPA Direct Debit consent.                                                                  |
| `X-BicFi`          | string       | The BIC of the bank to which the request is addressed.                                                            |
| `PSU-ID`           | string       | The ID used to identify the PSU at the bank. Typically a local social security number or another unique login ID. |
| `PSU-Corporate-ID` | string       | The Corporate ID of the PSU when acting on behalf of an organisation, e.g. Org. nummer for SE, KVK for NL.        |
| `PSU-IP-Address`   | string(ipv4) | The IP address of the PSU from the HTTP request between the PSU and the TPP.                                      |
| `PSU-User-Agent`   | string       | The Agent header of the PSU from the HTTP request between the PSU and the TPP.                                    |           

#### Request Body

| Name         | Type  | Description                                             |
| ------------ | ----- | ------------------------------------------------------- |
| `paymentIds` | array | The IDs of the payments to include in the confirmation. |

```bash
curl -X PUT "https://api.openbankingplatform.com/iso/payments/confirm" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -H "X-Request-ID: b745ade5-82b6-4af2-83e1-36a80b926dac" \
  -H "X-BicFi: INGBNL2A" \
  -H "Consent-ID: 9029c72d-b6f5-43e3-8fdf-dd6770503adf" \
  -H "PSU-ID: 123456782" \
  -H "PSU-Corporate-ID: 12345678" \
  -H "PSU-IP-Address: 152.120.171.187" \
  -H "PSU-User-Agent: mozilla/5.0" \
  -d '{
        "paymentIds": [
          "ef20b0a6-a7d1-4bf5-8e12-0cbc9138e4fd"
        ]
      }'
```

#### Response

```json
{
  "tppMessages": [
    {
      "category": "INFORMATION",
      "code": "FILE_UPLOADED",
      "text": "OPE20250609T1057016350301Z"
    }
  ]
}
```

### 4. Get Payment

Lastly, make the following request to check the status of the SEPA Direct Debit payment.

#### Endpoint

```http
GET /iso/payments/{paymentId}
```

#### Path Parameters

| Name        | Type   | Description                             |
| ----------- | ------ | --------------------------------------- |
| `paymentId` | string | The ID of the payment that was created. |

#### Request Headers

| Name               | Type         | Description                                                                                                       |
| ------------------ | ------------ | ----------------------------------------------------------------------------------------------------------------- |
| `X-Request-ID`     | string(uuid) | The ID of the request, unique to the call, as determined by the initiating party.                                 |
| `X-BicFi`          | string       | The BIC of the bank to which the request is addressed.                                                            |
| `PSU-ID`           | string       | The ID used to identify the PSU at the bank. Typically a local social security number or another unique login ID. |
| `PSU-Corporate-ID` | string       | The Corporate ID of the PSU when acting on behalf of an organisation, e.g. Org. nummer for SE, KVK for NL.        |
| `PSU-IP-Address`   | string(ipv4) | The IP address of the PSU from the HTTP request between the PSU and the TPP.                                      |
| `PSU-User-Agent`   | string       | The Agent header of the PSU from the HTTP request between the PSU and the TPP.                                    |   

```bash
curl -X GET "https://api.openbankingplatform.com/iso/payments/ef20b0a6-a7d1-4bf5-8e12-0cbc9138e4fd" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -H "X-Request-ID: fee41da5-eff2-44e1-9f31-82be0a056ed4" \
  -H "X-BicFi: INGBNL2A" \
  -H "PSU-ID: 123456782" \
  -H "PSU-Corporate-ID: 12345678" \
  -H "PSU-IP-Address: 152.120.171.187" \
  -H "PSU-User-Agent: mozilla/5.0"
```

#### Response

```json 
{
  "transactionStatus": "ACSC",
  "instructedAmount": {
    "currency": "EUR",
    "amount": "130.00"
  },
  "creditorAccount": {
    "iban": "NL20INGB0001234567",
    "currency": "EUR"
  },
  "creditorName": "Acme B.V.",
  "creditorId": "NL02ZZZ123456780000",
  "creditorAddress": {
    "street": "Example Street",
    "buildingNumber": "5",
    "city": "Amsterdam",
    "postalCode": "1012 AB",
    "country": "NL"
  },
  "creditorAddress": "INGBNL2A",
  "creditorAgentName": "ING Bank N.V.",
  "debtorAccount": {
    "iban": "FI2112345600000785",
    "currency": "EUR"
  },
  "debtorName": "Customer Oy",
  "debtorAgent": "NDEAFIHH",
  "debtorAgentName": "Nordea Bank Abp",
  "debtorAddress": {
    "street": "Example Street",
    "buildingNumber": "5",
    "city": "Helsinki",
    "postalCode": "00160",
    "country": "FI"
  },
  "localInstrumentCode": "CORE",
  "sequenceType": "RCUR",
  "mandateRelatedInformation": {
    "mandateId": "MANDATE-12345",
    "dateOfSignature": "2026-05-19"
  },
  "requestedExecutionDate": "2026-05-19",
  "remittanceInformationUnstructuredArray": [
    "Ref Number Merchant"
  ]
}
```

Payments can have a number of different [statuses](enums.md#transactionstatus-1). Here, you want to check if the payment was rejected, in which case `transactionStatus` would have the value `RJCT`. If not, then you are done. 