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)

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
            }'
            
        


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. The URL also 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 previous step for the authCode. The result 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 new access token call when the access_token is expired. This refreshToken was given in the previous Access Token step. The result contains an access_token and a refreshToken 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 access token returned in the Access Token call and the consentId returned in the Initiate Consent call. The result 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 in this step.

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 this step.

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).



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 in this step.

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


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 in this step.

Payment Initiation Services (PIS)

Authorize Payment

The following steps should be used for all payment types, in order to obtain the access token necessary for executing the steps following the first POST/create call.
                        
                    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 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. The URL also 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 previous step for the authCode. The result contains an access_token and a refresh_token which you use in the next steps.

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 from the previous Access Token step. The result 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"
                    }'
                        
                    
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 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 accessToken and the paymentId from the previous steps.

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 paymentId of the previous Create Deferred Payment Authorisation step.

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 accessToken and the paymentId from the previous steps.

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 accessToken, and the paymentId of the previous Create Deferred Payment Authorisation step. 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 accessToken, paymentId and paymentInitiationId from the previous steps.

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 accessToken, paymentId and paymentInitiationId from the previous steps.

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 accessToken and the paymentId of the previous steps.

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"
                    }'
                        
                    
You can use the returned PaymentId in the following One Time Payment steps. Two One Time Payment types exists:
  • One-off payment -> Don't use the field "requestedExecutionDate".
  • Future dated payment -> Use the field "requestedExecutionDate".
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 accessToken and paymentId from the previous steps.

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 your clientId and the paymentId from the previous Initiate One Time Payment step.

Delete the 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 accessToken and paymentId from the previous steps.

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"
                    }'
                        
                    
Remember your paymentId which you will get in the result. 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 your paymentId from the previous Initiate Periodic Payment step.

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.

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 your clientId and the paymentId from the previous Initiate Bulk Payment step.

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 your clientId and the paymentId from the previous Initiate Bulk Payment step.

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.

Remember your paymentId which you will get in the result. 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 your clientId and the paymentId from the previous Initiate Sepa Direct Debit Payment step.

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 accessToken and paymentId from the previous steps. 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. The URL also 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 previous step for the authCode. The result 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 new access token call when the access_token is expired. This refreshToken was given in the previous Access Token step. The result 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 in this step.

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 in this step.

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 in this step.

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 in this step.