API simulator for UK Open Banking AIS (Account Information Services) and PIS (Payment Initiation Services) consent flows with SaltEdge.
# 1. Install dependencies
npm install
# 2. Configure
cp env.example .env
# Edit .env: set OB_SOFTWARE_ID and OB_PRIVATE_KEY_PATH
# 3. Add private key
cp /path/to/your/key.pem ./private_key.pem
# 4. Start
npm startServer runs on http://localhost:8080
docker build -t bb-tpp-api-simulator:latest .All configuration is provided via environment variables:
docker run -d \
-p 8080:8080 \
-e OB_SOFTWARE_ID=your-software-id \
-e OB_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\nYOUR_KEY_CONTENT\n-----END PRIVATE KEY-----" \
-e OB_PROVIDER_CODE=backbase_dev_uk \
-e PRIORA_URL=priora.saltedge.com \
-e PROTOCOL=https \
-e REDIRECT_URI=https://backbase-dev.com/callback \
-e PORT=8080 \
--name bb-tpp-simulator \
bb-tpp-api-simulator:latestNote: The OB_PRIVATE_KEY environment variable supports Azure Key Vault format (single-line with spaces) and will be automatically converted to proper PEM format.
Base URL Placeholder: {BASE_URL}
- Local:
http://localhost:8080
UK API version: UK AIS and PIS consent API calls in this simulator target Open Banking v3.1.11.
Replace {BASE_URL} with the appropriate URL in all examples below.
Check if the service is running.
curl {BASE_URL}/api/healthResponse:
{
"status": "ok",
"timestamp": "2025-11-06T08:49:11.608Z",
"version": "1.0.0",
"service": "bb-tpp-api-simulator"
}Get list of all available endpoints.
curl {BASE_URL}/Create an Account Information Services consent and get the authorization URL.
curl -X POST {BASE_URL}/api/uk/ais/consent \
-H "Content-Type: application/json" \
-d '{}'Request Body (all fields optional):
| Field | Type | Description | Default |
|---|---|---|---|
providerCode |
string | Open Banking provider code | backbase_dev_uk (from env) |
redirectUri |
string | OAuth callback URL | Value from env REDIRECT_URI |
permissions |
array | List of AIS permissions | All 14 standard permissions |
expirationDateTime |
string | ISO 8601 date when consent expires | 30 days from now |
Note: For UK AIS v3.1.11, Salt Edge requires a Risk object in the upstream consent payload.
The simulator automatically sends Risk: {} when creating AIS consents.
Example with custom parameters:
curl -X POST {BASE_URL}/api/uk/ais/consent \
-H "Content-Type: application/json" \
-d '{
"providerCode": "backbase_dev_uk",
"redirectUri": "https://your-app.com/callback",
"permissions": ["ReadAccountsBasic", "ReadBalances", "ReadTransactionsBasic"],
"expirationDateTime": "2025-12-31T23:59:59Z"
}'Response:
{
"consentId": "urn-backbase_dev_uk-intent-12345",
"authorizationUrl": "https://business-universal.dev.oblm.azure.backbaseservices.com/...",
"status": "Pending"
}➡️ Open authorizationUrl in a browser to authorize the consent.
Retrieve details of an existing AIS consent by ID.
curl "{BASE_URL}/api/uk/ais/consent/{CONSENT_ID}"Path Parameters:
| Parameter | Type | Description | Required |
|---|---|---|---|
consentId |
string | The consent ID returned from create consent | Yes |
Query Parameters (optional):
| Parameter | Type | Description | Default |
|---|---|---|---|
providerCode |
string | Open Banking provider code | backbase_dev_uk (from env) |
Example:
curl "{BASE_URL}/api/uk/ais/consent/urn-backbase_dev_uk-intent-12345?providerCode=backbase_dev_uk"Response:
{
"success": true,
"data": {
"Data": {
"ConsentId": "urn-backbase_dev_uk-intent-12345",
"Status": "AwaitingAuthorisation",
"Permissions": ["ReadAccountsBasic", "ReadBalances", ...],
"ExpirationDateTime": "2025-12-06T08:49:11Z"
}
}
}Revoke/Delete an existing AIS consent by ID. This permanently removes the consent and prevents further use.
curl -X DELETE "{BASE_URL}/api/uk/ais/consent/{CONSENT_ID}"Path Parameters:
| Parameter | Type | Description | Required |
|---|---|---|---|
consentId |
string | The consent ID to revoke | Yes |
Query Parameters (optional):
| Parameter | Type | Description | Default |
|---|---|---|---|
providerCode |
string | Open Banking provider code | backbase_dev_uk (from env) |
Example:
curl -X DELETE "{BASE_URL}/api/uk/ais/consent/urn-backbase_dev_uk-intent-12345?providerCode=backbase_dev_uk"Response:
{
"success": true,
"message": "Consent revoked successfully",
"consentId": "urn-backbase_dev_uk-intent-12345"
}Create a Payment Initiation Services consent and get the authorization URL.
curl -X POST {BASE_URL}/api/uk/pis/consent \
-H "Content-Type: application/json" \
-d '{}'Request Body (all fields optional):
| Field | Type | Description | Default |
|---|---|---|---|
providerCode |
string | Open Banking provider code | backbase_dev_uk (from env) |
redirectUri |
string | OAuth callback URL | Value from env REDIRECT_URI |
paymentProduct |
string | Payment product type | domestic-payment-consents |
initiation |
object | Payment initiation data | Default UK FPS payment structure |
authorisation |
object | Authorisation data (not used for scheduled payments) | Default authorisation structure |
scaSupportData |
object | SCA support data | Default SCA support structure |
risk |
object | Risk data | Default risk structure |
permission |
string | Permission for scheduled payments | Create (auto-set for scheduled) |
Default Payment Initiation Structure:
The default initiation includes:
LocalInstrument:UK.OBIE.FPSInstructedAmount:20.00 GBPDebtorAccount: UK sort code account formatCreditorAccount: UK sort code account format- Full creditor postal address
- Remittance information
Example: Immediate Domestic Payment
curl -X POST {BASE_URL}/api/uk/pis/consent \
-H "Content-Type: application/json" \
-d '{
"providerCode": "backbase_dev_uk",
"redirectUri": "https://your-app.com/callback",
"paymentProduct": "domestic-payment-consents",
"initiation": {
"InstructionIdentification": "PAY001",
"EndToEndIdentification": "E2E-12345",
"LocalInstrument": "UK.OBIE.FPS",
"InstructedAmount": {
"Amount": "100.00",
"Currency": "GBP"
},
"DebtorAccount": {
"SchemeName": "UK.OBIE.SortCodeAccountNumber",
"Identification": "11280001234567",
"Name": "John Doe"
},
"CreditorAccount": {
"SchemeName": "UK.OBIE.SortCodeAccountNumber",
"Identification": "08080021325698",
"Name": "Jane Smith"
}
}
}'Example: Scheduled Domestic Payment
curl -X POST {BASE_URL}/api/uk/pis/consent \
-H "Content-Type: application/json" \
-d '{
"providerCode": "backbase_dev_uk",
"redirectUri": "https://your-app.com/callback",
"paymentProduct": "domestic-scheduled-payment-consents",
"initiation": {
"InstructionIdentification": "SCHD001",
"EndToEndIdentification": "SCHEDULED-12345",
"LocalInstrument": "UK.OBIE.FPS",
"RequestedExecutionDateTime": "2026-02-15T09:00:00+00:00",
"InstructedAmount": {
"Amount": "100.00",
"Currency": "GBP"
},
"DebtorAccount": {
"SchemeName": "UK.OBIE.SortCodeAccountNumber",
"Identification": "11280001234567",
"Name": "John Doe"
},
"CreditorAccount": {
"SchemeName": "UK.OBIE.SortCodeAccountNumber",
"Identification": "08080021325698",
"Name": "Jane Smith"
},
"RemittanceInformation": {
"Reference": "Monthly payment",
"Unstructured": "Scheduled transfer"
}
}
}'Note: For scheduled payments:
RequestedExecutionDateTimeis required in the initiation (future date/time)permissiondefaults to"Create"automatically- Do NOT include
authorisationin the request body
Example: Domestic Standing Order
curl -X POST {BASE_URL}/api/uk/pis/consent \
-H "Content-Type: application/json" \
-d '{
"providerCode": "backbase_dev_uk",
"redirectUri": "https://your-app.com/callback",
"paymentProduct": "domestic-standing-order-consents",
"permission": "Create",
"initiation": {
"Frequency": "EvryDay",
"Reference": "Monthly rent payment",
"FirstPaymentDateTime": "2026-02-01T09:00:00+00:00",
"FirstPaymentAmount": {
"Amount": "500.00",
"Currency": "GBP"
},
"RecurringPaymentAmount": {
"Amount": "500.00",
"Currency": "GBP"
},
"FinalPaymentDateTime": "2027-01-31T09:00:00+00:00",
"FinalPaymentAmount": {
"Amount": "500.00",
"Currency": "GBP"
},
"DebtorAccount": {
"SchemeName": "UK.OBIE.SortCodeAccountNumber",
"Identification": "11280001234567",
"Name": "John Doe"
},
"CreditorAccount": {
"SchemeName": "UK.OBIE.SortCodeAccountNumber",
"Identification": "08080021325698",
"Name": "Landlord Ltd"
}
}
}'Note: For standing orders:
paymentProductmust be"domestic-standing-order-consents"Frequencyis required (e.g.,EvryDay,EvryWorkgDay,IntrvlWkDay:01:03for every 3rd day)FirstPaymentDateTime,RecurringPaymentAmountare requiredFinalPaymentDateTimeandFinalPaymentAmountare optional (omit for indefinite standing order)permissionfield is automatically set to"Create"
Response:
{
"consentId": "urn-backbase_dev_uk-intent-12345",
"authorizationUrl": "https://business-universal.dev.oblm.azure.backbaseservices.com/...",
"status": "AwaitingAuthorisation"
}➡️ Open authorizationUrl in a browser to authorize the payment consent.
Retrieve details of an existing PIS consent by ID.
curl "{BASE_URL}/api/uk/pis/consent/{CONSENT_ID}"Path Parameters:
| Parameter | Type | Description | Required |
|---|---|---|---|
consentId |
string | The consent ID returned from create consent | Yes |
Query Parameters (optional):
| Parameter | Type | Description | Default |
|---|---|---|---|
providerCode |
string | Open Banking provider code | backbase_dev_uk (from env) |
paymentProduct |
string | Payment product type | domestic-payment-consents |
Example:
curl "{BASE_URL}/api/uk/pis/consent/urn-backbase_dev_uk-intent-12345?providerCode=backbase_dev_uk&paymentProduct=domestic-payment-consents"Response:
{
"success": true,
"data": {
"Data": {
"ConsentId": "urn-backbase_dev_uk-intent-12345",
"Status": "AwaitingAuthorisation",
"Initiation": {
"InstructionIdentification": "ANSM023",
"EndToEndIdentification": "FRESCO.21302.GFX.37",
"LocalInstrument": "UK.OBIE.FPS",
"InstructedAmount": {
"Amount": "20.00",
"Currency": "GBP"
},
...
},
"Risk": {
"PaymentContextCode": "EcommerceGoods",
...
}
}
}
}# Required
OB_SOFTWARE_ID=your-software-id
OB_PRIVATE_KEY_PATH=./private_key.pem
# Optional
OB_PROVIDER_CODE=backbase_dev_uk
REDIRECT_URI=https://backbase-dev.com/callback
PRIORA_URL=priora.saltedge.com
PORT=8080