cloud-li

Sandbox

Sandbox user manual for our PSD2 APIs.

Sandbox

This page describes the test environment that de Volksbank offers for testing its PSD2 Open Banking APIs inside a ‘sandbox’ environment. The production environment that enables the PSD2 Open Banking functionality is complex. It consists of many different systems in which each system takes care of a portion of the business logic.

The Sandbox looks identical to the production environment, but instead of returning live data (or live error responses) it returns static data. This does not mean that it always returns exactly the same data for each invocation: based on the given input, in particular the consentId or paymentId, a different response (including error responses) may be returned.

The Sandbox environment enables you to develop and test your application:

    • It simulates all interactions with the Open Banking APIs of de Volksbank, similar to the production environment;
    • It allows you to fully test the OAuth2 process without needing an actual de Volksbank account. This includes the interaction with our production API Gateway, which requires a valid client certificate (see API overview);
    • It simulates specific error scenarios.
The Sandbox flows mimic the production flows, which are described in detail in the documentation files ‘API AIS’, ‘API PIS’ and ‘API CAF’ on our documentation page. For more information about the calls, like the required fields, please have a look at the documentation presented there.

You can find the cURL scripts for the Sandbox flows below:

Account Information Services (AIS)

De Volksbank has implemented a new version of the AIS Consent API (initiate consent, get consent, get consent status, and delete consent). The v2 endpoints can be recognized by /v2 in the URL, and are referred to as account access consent endpoints. They will replace the v1 endpoints. We highly recommend to implement the v2 flow since the v1 endpoints will be removed.

[Deprecated] Initiate Consent

            
            curl -X POST https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v1/consents \
            --cert-type P12 \
            --cert ${certP12File}:'${password}' \
            -H "Authorization: ${clientID}" \
            -H "X-Request-ID: ${UUID}" \
            -H "Content-Type: application/json" \
            -d '{
            "access": {
            "accounts": [],
            "balances": [],
            "transactions": []
            },
            "recurringIndicator": false,
            "validUntil": "${dateTimeUTC}",
            "frequencyPerDay": 1,
            "combinedServiceIndicator": false
            }'
            
        


Initiate Account Access Consent (Global)

            
            curl -X POST https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v2/consents/account-access \
            --cert-type P12 \
            --cert ${certP12File}:'${password}' \
            -H "Authorization: ${clientID}" \
            -H "X-Request-ID: ${UUID}" \
            -H "Content-Type: application/json" \
            -H "Psu-Ip-Address: ${ipAddress}" \
            -H "Tpp-Redirect-Uri: ${yourRedirectUri}" \
            -d '{
              "access": {
                "payments": [
                  {
                    "rights": [
                      "ais",
                      "ownerName"
                    ]
                  }
                ]
              },
              "consentType": "global",
              "frequencyPerDay": 1,
              "recurringIndicator": false,
              "validTo": "${dateTimeUTC}"
            }'
            
        


Initiate Account Access Consent (Detailed)

            
            curl -X POST https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v2/consents/account-access \
            --cert-type P12 \
            --cert ${certP12File}:'${password}' \
            -H "Authorization: ${clientID}" \
            -H "X-Request-ID: ${UUID}" \
            -H "Content-Type: application/json" \
            -H "Psu-Ip-Address: ${ipAddress}" \
            -H "Tpp-Redirect-Uri: ${yourRedirectUri}" \
            -d '{
              "access": {
                "payments": [
                  {
                    "account": {
                      "iban": "NL86SNSB0230010733"
                    },
                    "rights": [
                      "accountList",
                      "balances",
                      "transactions",
                      "ownerName"
                    ]
                  }
                ]
              },
              "consentType": "detailed",
              "frequencyPerDay": 1,
              "recurringIndicator": false,
              "validTo": "${dateTimeUTC}"
            }'
            
        


Authorize Consent

            
            curl -i -G -X GET https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v1/authorize \
            -d consentId=${consentId} \
            -d scope=AIS \
            -d response_type=code \
            -d state=123456 \
            -d redirect_uri=${yourRedirectUri} \
            -d client_id=${yourClientId}
            
        
Use the consentId returned in the previous step. The response of this call contains a Location header with a link that you can paste in your browser. You will get the following screen:

permission screen
Just click on the button "Geef toestemming". The browser opens your redirect URL, which contains a code value. Copy this value for the Access Token call.

Access Token

            
                curl -X POST https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v1/token \
                --cert-type P12 \
                --cert ${certP12File}:'${password}'  \
                -H "Content-Type: application/x-www-form-urlencoded" \
                -H "X-Request-ID: ${UUID}" \
                -H "Authorization: Basic ${base64Encoded(ClientId:ClientSecret)}" \
                -d code=${authCode} \
                -d grant_type=authorization_code \
                -d redirect_uri=${yourRedirectUri}
            
        
Use the code of the Authorize step for the authCode. The result of the Access Token call contains an access_token and a refresh_token. The access_token will be used in the next steps. For retrieving a new access_token (i.e. when it is expired), you should use the Refresh Token call.

New Access Token (Refresh Token)

            
                curl -X POST https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v1/token \
                --cert-type P12 \
                --cert ${certP12File}:'${password}'  \
                -H "X-Request-ID: ${UUID}" \
                -H "Authorization: Basic ${base64Encoded(ClientId:ClientSecret)}" \
                -H "Content-Type: application/x-www-form-urlencoded" \
                -d grant_type=refresh_token \
                -d refresh_token=${refreshToken}
            
        
Use the Refresh Token call when the access_token is expired. This refresh_token was given in the previous Access Token step. The result of the Refresh Token call contains an access_token and a refresh_token which you use in the next steps.

Read Account List

            
                curl -G -X GET https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v1.1/accounts \
                --cert-type P12 \
                --cert ${certP12File}:'${password}'  \
                -H "Authorization: Bearer ${accessToken}" \
                -H "X-Request-ID: ${UUID}" \
                -H "Consent-ID: ${consentId}"
            
        
Use the previously obtained accessToken and consentId. The result of the Read Account List call contains a resourceId. Use this in the Read Balance and Read Transaction List steps.

Read Balance

            
                curl -G -X GET https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v1.1/accounts/${resourceId}/balances \
                --cert-type P12 \
                --cert ${certP12File}:'${password}'  \
                -H "Authorization: Bearer ${accessToken}" \
                -H "X-Request-ID: ${UUID}" \
                -H "Consent-ID: ${consentId}"
            
        
Use the previously obtained accessToken, consentId and resourceId.

Read Transaction List

            
                curl -G -X GET https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v1.1/accounts/${resourceId}/transactions?bookingStatus=booked \
                --cert-type P12 \
                --cert ${certP12File}:'${password}'  \
                -H "Authorization: Bearer ${accessToken}" \
                -H "X-Request-ID: ${UUID}" \
                -H "Consent-ID: ${consentId}"
            
        
Use the previously obtained accessToken, consentId and resourceId.

In production, de Volksbank uses a default limit of 1000 transactions for the Read Transaction List response (when no limit query parameter is provided by the TPP). When a search yields more results than the limit, the results will be presented in the form of a ‘page’ (result set) with the most recent results and a link to the next page, where the remainder of the results will be present.

In the Sandbox, we simulate this situation by presenting a next href in the response of the Read Transaction List call. You can use this href, which leads to the following call:
            
                curl -G -X GET https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v1.1/accounts/${resourceId}/transactions \
                --cert-type P12 \
                --cert ${certP12File}:'${password}'  \
                -H "Authorization: Bearer ${accessToken}" \
                -H "X-Request-ID: ${UUID}" \
                -H "Consent-ID: ${consentId}"
                -d bookingStatus=booked \
                -d nextPageKey=${nextPageKey}
            
        

This response simulates a situation where no additional transactions are available (indicated by the absence of a next page link).



[Deprecated] Get Consent

            
                curl -X GET https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v1/consents/${consentId} \
                --cert-type P12 \
                --cert ${certP12File}:'${password}'  \
                -H "Authorization: Bearer ${accessToken}" \
                -H "X-Request-ID: ${UUID}"
            
        
Use the previously obtained accessToken and consentId.

Get Account Access Consent

            
                curl -X GET https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v2/consents/account-access/${consentId} \
                --cert-type P12 \
                --cert ${certP12File}:'${password}' \
                -H "Authorization: Bearer ${accessToken}" \
                -H "X-Request-ID: ${UUID}" \
            
        
Use the previously obtained accessToken and consentId.

[Deprecated] Get Consent Status

            
                curl -X GET https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v1/consents/${consentId}/status \
                --cert-type P12 \
                --cert ${certP12File}:'${password}'  \
                -H "Authorization: ${clientID}" \
                -H "X-Request-ID: ${UUID}"
            
        

To get different status responses for a GetConsentStatus call, you can use different consentIds. These are not extensive, and serve to give an impression of the format of the response.

consentId status
0ddb9b6c-6355-4aee-a5f1-d5493b70cc2d valid (standard response)
0ddb9b6c-6355-4aee-a5f1-d5493b70cc2e revokedByPsu
0ddb9b6c-6355-4aee-a5f1-d5493b70cc2f expired
0ddb9b6c-6355-4aee-a5f1-d5493b70cc2c terminatedByTpp


Get Account Access Consent Status

            
                curl -X GET https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v2/consents/account-access/${consentId}/status \
                --cert-type P12 \
                --cert ${certP12File}:'${password}' \
                -H "Authorization: ${clientId}" \
                -H "X-Request-ID: ${UUID}" \
            
        
Use the previously obtained consentId.

[Deprecated] Delete Consent

            
                curl -i -X DELETE https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v1/consents/${consentId} \
                --cert-type P12 \
                --cert ${certP12File}:'${password}'  \
                -H "Authorization: Bearer ${accessToken}" \
                -H "X-Request-ID: ${UUID}"
            
        
Use the previously obtained accessToken and consentId.

Delete Account Access Consent

            
                curl -i -X DELETE https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v2/consents/account-access/${consentId} \
                --cert-type P12 \
                --cert ${certP12File}:'${password}'  \
                -H "Authorization: Bearer ${accessToken}" \
                -H "X-Request-ID: ${UUID}" \
            
        
Use the previously obtained accessToken and consentId.

Payment Initiation Services (PIS)

General steps for all payment types

The following steps should be used for all payment types, in order to obtain the access token necessary for the calls following the first POST/create call. Note that you should perform the the POST/create call first, and then perform these general steps.

Authorize Payment

                        
                    curl -i -G -X GET https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v1/authorize \
                    -d paymentId=${paymentId} \
                    -d scope=PIS \
                    -d response_type=code \
                    -d state=123456 \
                    -d redirect_uri=${yourRedirectUri} \
                    -d client_id=${clientID}
                        
                    
Use the paymentId returned in the response of the first POST/create call. The response of this Authorize call contains a Location header with a link that you can paste in your browser. You will get the following screen:

permission screen
Just click on the button "Geef toestemming". The browser opens your redirect URL, which contains a code value. Copy this value for the Access Token call.


Access Token

                        
                    curl -X POST https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v1/token \
                    --cert-type P12 \
                    --cert ${certP12File}:'${password}'  \
                    -H "Content-Type: application/x-www-form-urlencoded" \
                    -H "X-Request-ID: ${UUID}" \
                    -H "Authorization: Basic ${base64Encoded(ClientId:ClientSecret)}" \
                    -d code=${authCode} \
                    -d grant_type=authorization_code \
                    -d redirect_uri=${yourRedirectUri}
                        
                    
Use the code of the Authorize step for the authCode. The result of the Access Token call contains an access_token and a refresh_token. The access_token will be used in the next steps. For retrieving a new access_token (i.e. when it is expired), you should use the Refresh Token call.

New Access Token (Refresh Token)

                            
                    curl -X POST https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v1/token \
                    --cert-type P12 \
                    --cert ${certP12File}:'${password}'  \
                    -H "Content-Type: application/x-www-form-urlencoded" \
                    -H "X-Request-ID: ${UUID}" \
                    -H "Authorization: Basic ${base64Encoded(ClientId:ClientSecret)}" \
                    -H "Accept: application/json" \
                    -d grant_type=refresh_token \
                    -d refresh_token=${refreshToken}
                        
                        
Use the Refresh Token call when the access_token is expired. This refresh_token was given in the previous Access Token step. The result of the Refresh Token call contains an access_token and a refresh_token which you use in the next steps.

Deferred Payment

Create Deferred Payment Authorisation

                        
                    curl -X POST https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v2/deferred-payments/sepa-credit-transfers \
                    --cert-type P12 \
                    --cert ${certP12File}:'${password}' \
                    -H "Authorization: ${clientId}" \
                    -H "X-Request-ID: ${UUID}" \
                    -H "tpp-redirect-uri: ${yourRedirectUri}" \
                    -H "PSU-IP-Address: ${ipAddress}" \
                    -H "Content-Type: application/json" \
                    -d '{
                    "instructedAmount": {
                    "amount": 0.02,
                    "currency": "EUR"
                    },
                    "debtorAccount": {
                    "iban": "NL26SNSB0927952033"
                    },
                    "creditorAccount": {
                    "iban": "NL22INGB0002590300"
                    },
                    "creditor": {
                    "name": "creditorName"
                    },
                    "creditorAgent": {
                    "financialInstitutionId": {
                    "bicfi": "INGBNL2A"
                    }
                    },
                    "remittanceInformationUnstructured": "Testing Initiate Deferred Payment",
                    "ultimateCreditor": {
                    "name": "bol.com",
                    "identification": {
                    "organisationId": {
                    "lei": "724500PI68UVLK7E3S11"
                    }
                    }
                    },
                    "paymentIdentification": {
                    "endToEndId": "endToEnd1234",
                    "instructionId": "instruction1234"
                    },
                    "endDate": "2025-09-22"
                    }'
                        
                    
Use the paymentId in this response for the next steps. For further actions for this payment it is necessary to authorize this payment and get an access token. See: Authorize Payment

Get Deferred Payment Authorisation

                        
                    curl -X GET https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v2/deferred-payments/sepa-credit-transfers/${paymentId}  \
                    --cert-type P12 \
                    --cert ${certP12File}:'${password}' \
                    -H "Authorization: Bearer ${accessToken}" \
                    -H "X-Request-ID: ${UUID}" \
                    -H "Content-Type: application/json"
                        
                    
Use the previously obtained accessToken and paymentId.

Get Deferred Payment Authorisation Status

                        
                    curl -X GET https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v2.1/deferred-payments/sepa-credit-transfers/${paymentId}/status  \
                    --cert-type P12 \
                    --cert ${certP12File}:'${password}' \
                    -H "Authorization: ${clientId}" \
                    -H "X-Request-ID: ${UUID}" \
                    -H "Content-Type: application/json"
                        
                    
Use the previously obtained paymentId.

Create Deferred Payment Initiation

                        
                    curl -X POST https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v2/deferred-payments/sepa-credit-transfers/${paymentId}/initiations \
                    --cert-type P12 \
                    --cert ${certP12File}:'${password}' \
                    -H "X-Request-ID: ${UUID}" \
                    -H "Authorization: Bearer ${accessToken}" \
                    -H "Content-Type: application/json"
                        
                    
Use the previously obtained accessToken and paymentId.

Get Deferred Payment Initiations

                        
                    curl -X GET https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v2/deferred-payments/sepa-credit-transfers/${paymentId}/initiations  \
                    --cert-type P12 \
                    --cert ${certP12File}:'${password}' \
                    -H "Authorization: Bearer ${accessToken}" \
                    -H "X-Request-ID: ${UUID}" \
                    -H "Content-Type: application/json"
                        
                    
Use the previously obtained accessToken and paymentId. The response of this call contains a paymentInitiationId, which you need in the next steps.

Get Deferred Payment Initiation

                        
                    curl -X GET https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v2/deferred-payments/sepa-credit-transfers/${paymentId}/initiations/${paymentInitiationId}  \
                    --cert-type P12 \
                    --cert ${certP12File}:'${password}' \
                    -H "Authorization: Bearer ${accessToken}" \
                    -H "X-Request-ID: ${UUID}" \
                    -H "Content-Type: application/json"
                        
                    
Use the previously obtained accessToken, paymentId and paymentInitiationId.

Get Deferred Payment Initiation Status

                        
                    curl -X GET https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v2.1/deferred-payments/sepa-credit-transfers/${paymentId}/initiations/${paymentInitiationId}/status \
                    --cert-type P12 \
                    --cert ${certP12File}:'${password}' \
                    -H "Authorization: ${clientId}" \
                    -H "X-Request-ID: ${UUID}" \
                    -H "Content-Type: application/json"
                        
                    
Use the previously obtained accessToken, paymentId and paymentInitiationId.

Delete Deferred Payment Authorisation

                        
                    curl -i -X DELETE https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v2/deferred-payments/sepa-credit-transfers/${paymentId} \
                    --cert-type P12 \
                    --cert ${certP12File}:'${password}' \
                    -H "Authorization: Bearer ${accessToken}" \
                    -H "X-Request-ID: ${UUID}" \
                    -H "Content-Type: application/json"
                        
                    
Use the previously obtained accessToken and paymentId.

One Time Payment

Initiate One Time Payment

                        
                    curl -X POST https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v2/payments/sepa-credit-transfers \
                    --cert-type P12 \
                    --cert ${certP12File}:'${password}' \
                    -H "Authorization: ${clientId}" \
                    -H "X-Request-ID: ${UUID}" \
                    -H "tpp-redirect-uri: ${yourRedirectUri}" \
                    -H "PSU-IP-Address: ${ipAddress}" \
                    -H "Content-Type: application/json" \
                    -d '{
                    "instructedAmount": {
                    "amount": 0.02,
                    "currency": "EUR"
                    },
                    "debtorAccount": {
                    "iban": "NL26SNSB0927952033"
                    },
                    "creditorAccount": {
                    "iban": "NL22INGB0002590300"
                    },
                    "creditor": {
                    "name": "creditorName"
                    },
                    "creditorAgent": {
                    "financialInstitutionId": {
                    "bicfi": "INGBNL2A"
                    }
                    },
                    "remittanceInformationUnstructured": "Testing Initiate One Time Payment",
                    "ultimateCreditor": {
                    "name": "bol.com",
                    "identification": {
                    "organisationId": {
                    "lei": "724500PI68UVLK7E3S11"
                    }
                    }
                    },
                    "paymentIdentification": {
                    "endToEndId": "endToEnd1234",
                    "instructionId": "instruction1234"
                    },
                    "requestedExecutionDate": "2025-10-08"
                    }'
                        
                    
Two One Time Payment types exist:
  • One-off payment: Don't use the field "requestedExecutionDate".
  • Future dated payment: Use the field "requestedExecutionDate".
Use the paymentId in this response for the next steps. For further actions for this payment it is necessary to authorize this payment and get an access token. See: Authorize Payment

Get One Time Payment Authorisation

                        
                    curl -X GET https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v2/payments/sepa-credit-transfers/${paymentId}  \
                    --cert-type P12 \
                    --cert ${certP12File}:'${password}' \
                    -H "Authorization: Bearer ${accessToken}" \
                    -H "X-Request-ID: ${UUID}" \
                    -H "Content-Type: application/json"
                        
                    
Use the previously obtained accessToken and paymentId.

Get One Time Payment Authorisation Status

                        
                    curl -X GET https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v2.1/payments/sepa-credit-transfers/${paymentId}/status  \
                    --cert-type P12 \
                    --cert ${certP12File}:'${password}' \
                    -H "Authorization: ${clientId}" \
                    -H "X-Request-ID: ${UUID}" \
                    -H "Content-Type: application/json"
                        
                    
Use the previously obtained paymentId.

Delete One Time Payment

                        
                    curl -i -X DELETE https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v2/payments/sepa-credit-transfers/${paymentId} \
                    --cert-type P12 \
                    --cert ${certP12File}:'${password}' \
                    -H "Authorization: Bearer ${accessToken}" \
                    -H "X-Request-ID: ${UUID}" \
                    -H "Content-Type: application/json"
                        
                    
Use the previously obtained accessToken and paymentId.

Periodic Payment

Initiate Periodic Payment

                        
                    curl -X POST https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v1/periodic-payments/sepa-credit-transfers \
                    --cert-type P12 \
                    --cert ${certP12File}:'${password}' \
                    -H "Authorization: ${clientId}" \
                    -H "X-Request-ID: ${UUID}" \
                    -H "tpp-redirect-uri: ${yourRedirectUri}" \
                    -H "Content-Type: application/json" \
                    -H "PSU-IP-Address: ${ipAddress}" \
                    -d '{
                    "endToEndIdentification": "ID234567",
                    "debtorAccount": {"iban": "NL86SNSB0230010733", "currency": "EUR"},
                    "instructedAmount": {"currency": "EUR", "amount": "11.30"},
                    "creditorAccount": {"iban": "NL46SNSB0937648957", "currency": "EUR"},
                    "creditorName": "Adyen",
                    "ultimateCreditor": "Bloembollen N.V.",
                    "remittanceInformationUnstructured": "Ter voorbeeld voor PSD-II",
                    "remittanceInformationStructured": "1234 5678 1234 5678",
                    "issuerSRI": "CUR",
                    "endDate": "2028-12-01",
                    "startDate": "2025-12-01",
                    "frequency": "Weekly"
                    }'
                        
                    
Use the paymentId in this response for the next steps. For further actions for this payment it is necessary to authorize this payment and get an access token. See: Authorize Payment

Get Periodic Payment

                        
                    curl -X GET https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v1/periodic-payments/sepa-credit-transfers/${paymentId} \
                    --cert-type P12 \
                    --cert ${certP12File}:'${password}' \
                    -H "Authorization: Bearer ${accessToken}" \
                    -H "X-Request-ID: ${UUID}" \
                    -H "Content-Type: application/json"
                        
                    
Use the previously obtained accessToken and paymentId.

Bulk Payment SEPA Credit Transfer (SCT)

Initiate Bulk Payment

                        
                    curl -X POST https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v1/bulk-payments/pain.001-sepa-credit-transfers \
                    --cert-type P12 \
                    --cert ${certP12File}:'${password}' \
                    -H "Authorization: ${clientId}" \
                    -H "X-Request-ID: ${UUID}" \
                    -H "Content-Type: application/xml" \
                    -H "tpp-redirect-uri: ${yourRedirectUri}" \
                    -H "PSU-IP-Address: ${ipAddress}" \
                    -d "@pain001.xml"
                    '
                        
                    
Example pain001 XML file: pain001.xml.

Use the paymentId in this response for the next steps. For further actions for this payment it is necessary to authorize this payment and get an access token. See: Authorize Payment

Get Bulk Payment Status

                        
                    curl -X GET https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v1.1/bulk-payments/pain.001-sepa-credit-transfer/${paymentId}/status \
                    --cert-type P12 \
                    --cert ${certP12File}:'${password}' \
                    -H "Authorization: ${clientId}" \
                    -H "X-Request-ID: ${UUID}" \
                    -H "Content-Type: application/json"
                        
                    
Use the previously obtained paymentId.

Cancel Bulk Payment

                        
                    curl -i -X DELETE https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v1/bulk-payments/pain.001-sepa-credit-transfer/${paymentId} \
                    --cert-type P12 \
                    --cert ${certP12File}:'${password}' \
                    -H "Authorization: ${clientId}" \
                    -H "X-Request-ID: ${UUID}" \
                    -H "PSU-IP-Address: ${ipAddress}" \
                    -H "Content-Type: application/json"
                        
                    
Use the previously obtained paymentId.

Sepa Direct Debit Payment

Initiate Sepa Direct Debit Payment

                        
                    curl -X POST https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v1/bulk-payments/pain.008-sepa-direct-debits \
                    --cert-type P12 \
                    --cert ${certP12File}:'${password}' \
                    -H "Authorization: ${clientId}" \
                    -H "X-Request-ID: ${UUID}" \
                    -H "Content-Type: application/xml" \
                    -H "tpp-redirect-uri: ${yourRedirectUri}" \
                    -H "PSU-IP-Address: ${ipAddress}" \
                    -d "@pain008.xml"
                        
                    
Example pain008 XML file: pain008.xml.

Use the paymentId in this response for the next steps. For further actions for this payment it is necessary to authorize this payment and get an access token. See: Authorize Payment

Get Sepa Direct Debit Payment Status

                        
                    curl -X GET https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v1/bulk-payments/pain.008-sepa-direct-debits/${paymentId}/status \
                    --cert-type P12 \
                    --cert ${certP12File}:'${password}' \
                    -H "Authorization: ${clientId}" \
                    -H "X-Request-ID: ${UUID}" \
                    -H "Content-Type: application/json"
                        
                    
Use the previously obtained paymentId.

Get Sepa Direct Debit Payment Status Report

                        
                    curl -X GET https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v1/bulk-payments/pain.008-sepa-direct-debits/${paymentId}/payment-status-reports/${paymentStatusReportId} \
                    --cert-type P12 \
                    --cert ${certP12File}:'${password}' \
                    -H "Authorization: Bearer ${accessToken}" \
                    -H "X-Request-ID: ${UUID}" \
                    -H "Content-Type: application/json"
                        
                    
Use the previously obtained accessToken and paymentId. You can use paymentStatusReportId 10d62c6e-469c-429f-ab8f-e8865b0aa62. In a production environment, you can obtain this paymentStatusReportId from the response of the status call, in situations where a (partial or complete) rejection of the SDD has taken place.

Confirmation of the Availability of Funds (CAF)

This allows you to request for a confirmation of the availability of funds on a chosen payment account.

Initiate CAF Consent

            
                    curl -X POST https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v1/consents \
                    --cert-type P12 \
                    --cert ${certP12File}:'${password}' \
                    -H "Content-Type: application/json" \
                    -H "Authorization: ${clientID}" \
                    -H "X-Request-ID: ${UUID}" \
                    -d '{
                    "access": {
                    "funds": []
                    },
                    "recurringIndicator": true,
                    "validUntil": "2027-08-27",
                    "frequencyPerDay": 1,
                    "combinedServiceIndicator": false
                    }'
            
        


Authorize CAF Consent

            
                    curl -i -G -X GET https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v1/authorize \
                    -d consentId=${consentId} \
                    -d scope=AIS \
                    -d response_type=code \
                    -d state=123456 \
                    -d redirect_uri=${yourRedirectUri} \
                    -d client_id=${yourClientId}
            
        
Use the consentId returned in the previous step. The response of this call contains a Location header with a link that you can paste in your browser. You will get the following screen:

permission screen
Just click on the button "Geef toestemming". The browser opens your redirect URL, which contains a code value. Copy this value for the Access Token Call.

Access Token

            
                    curl -X POST https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v1/token \
                    --cert-type P12 \
                    --cert ${certP12File}:'${password}'  \
                    -H "Content-Type: application/x-www-form-urlencoded" \
                    -H "X-Request-ID: ${UUID}" \
                    -H "Authorization: Basic ${base64Encoded(ClientId:ClientSecret)}" \
                    -d code=${authCode} \
                    -d grant_type=authorization_code \
                    -d redirect_uri=${yourRedirectUri}
            
        
Use the code of the Authorize step for the authCode. The result of the Access Token call contains an access_token and a refresh_token. The access_token will be used in the next steps. For retrieving a new access_token (i.e. when it is expired), you should use the Refresh Token call.

New Access Token (Refresh Token)

            
                    curl -X POST https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v1/token \
                    --cert-type P12 \
                    --cert ${certP12File}:'${password}'  \
                    -H "X-Request-ID: ${UUID}" \
                    -H "Authorization: Basic ${base64Encoded(ClientId:ClientSecret)}" \
                    -H "Content-Type: application/x-www-form-urlencoded" \
                    -d grant_type=refresh_token \
                    -d refresh_token=${refreshToken}
            
        
Use the Refresh Token call when the access_token is expired. This refresh_token was given in the previous Access Token step. The result of the Refresh Token call contains an access_token and a refresh_token which you use in the next steps.

Get CAF ConsentStatus

            
                    curl -X GET https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v1/consents/${consentId}/status \
                    --cert-type P12 \
                    --cert ${certP12File}:'${password}'  \
                    -H "Authorization: ${clientID}" \
                    -H "X-Request-ID: ${UUID}"
            
        
Use the previously obtained consentId.

Get CAF Consent

            
                    curl -X GET https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v1/consents/${consentId} \
                    --cert-type P12 \
                    --cert ${certP12File}:'${password}'  \
                    -H "Authorization: Bearer ${accessToken}" \
                    -H "X-Request-ID: ${UUID}"
            
        
Use the previously obtained accessToken and consentId.

Post Funds Confirmations

            
                    curl -X POST  https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v1/funds-confirmations \
                    --cert-type P12 \
                    --cert ${certP12File}:'${password}'  \
                    -H "Authorization: Bearer ${accessToken}" \
                    -H "X-Request-ID: ${UUID}" \
                    -H "Content-Type: application/json" \
                    -H "Consent-ID: ${consentId}" \
                    -d '{
                    "instructedAmount": {
                    "amount": "22"
                    },
                    "account": {
                    "iban": "NL26SNSB0927952033"
                    }
                    }'
            
        
Use the previously obtained accessToken and consentId.

Delete CAF Consent

            
                    curl -i -X DELETE https://psd.bancairediensten.nl/psd2/snsbank/sandbox/v1/consents/${consentId} \
                    --cert-type P12 \
                    --cert ${certP12File}:'${password}'  \
                    -H "Authorization: Bearer ${accessToken}" \
                    -H "X-Request-ID: ${UUID}"
            
        
Use the previously obtained accessToken and consentId.