---
updatedAt: 2026-04-23T13:43:44.000Z
agentTools:
  projectIndex: https://docs.br-dge.io/llms.txt
---

# Register with an open banking account

Create an account with an open banking provider

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "BR-DGE Payment Instrument REST API",
    "description": "REST API that deals with everything related to payment instrument tokenization\n",
    "version": "v1.0.0",
    "contact": {
      "name": "Customer Support",
      "url": "https://comcarde.atlassian.net/servicedesk/customer/portals"
    },
    "license": {
      "name": "MIT",
      "url": "https://docs.br-dge.io/docs/openapi-license"
    }
  },
  "servers": [
    {
      "url": "https://sandbox.comcarde.com/v1",
      "description": "Sandbox subdomain for testing your integration works as expected, using mock payment instruments only.\n"
    },
    {
      "url": "https://secure.comcarde.com/v1",
      "description": "Use this subdomain for processing live payments in the EU region."
    },
    {
      "url": "https://secure-amer-01.api.br-dge.io/v1",
      "description": "Use this subdomain for processing live payments in the NA region."
    }
  ],
  "tags": [
    {
      "name": "Payment Instrument Registration",
      "description": "Registers an account with an Open Banking PSP.\n"
    }
  ],
  "externalDocs": {
    "url": "https://docs.br-dge.io"
  },
  "paths": {
    "/payment-instrument-registrations": {
      "post": {
        "tags": [
          "Payment Instrument Registration"
        ],
        "summary": "Register with an open banking account",
        "description": "Create an account with an open banking provider",
        "operationId": "paymentInstrumentRegistrationUsingPOST",
        "security": [
          {
            "ServerApiKey": []
          }
        ],
        "requestBody": {
          "description": "Create an account using open banking",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegistrationRequest"
              },
              "examples": {
                "regular": {
                  "summary": "Register an account with Trustly Open Banking",
                  "value": {
                    "type": "trustly",
                    "customer": {
                      "customerId": "123123",
                      "firstName": "Steve",
                      "lastName": "Smith",
                      "country": "SE",
                      "postcode": "SE-11253",
                      "town": "Stockholm",
                      "addressLine1": "Main Street 1",
                      "addressLine2": "Main Street 2",
                      "phoneNumber": "+46709876543",
                      "documentId": "900219-1234",
                      "email": "test@brdge.co.uk",
                      "dateOfBirth": "1990-02-19"
                    },
                    "bank": {
                      "bankNumber": "6112",
                      "clearingHouse": "SWEDEN",
                      "accountNumber": "69706212"
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successfully registered an account at an Open Banking provider",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegistrationResponse"
                },
                "example": {
                  "type": "trustly",
                  "code": "1004",
                  "message": "Request succeeded",
                  "id": "67bdef06273ab98eccd9df27227f922f",
                  "paymentInstrumentRegistrationId": "81f7baee-2955-4fee-8d6f-289f8579b360",
                  "accountId": "7653385737",
                  "clearingHouse": "SWEDEN",
                  "bank": "Handelsbanken",
                  "descriptor": "**706212"
                }
              }
            }
          },
          "400": {
            "description": "Payment instrument registration request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "code": "4200",
                  "message": "Request Failed",
                  "id": "6813767c9823bbfb21d9244c46d7c0d3"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/UnknownServerError"
          }
        },
        "callbacks": {
          "Payment Instrument Registration Event": {
            "$ref": "#/components/callbacks/PaymentInstrumentRegistrationEvent"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorResponse": {
        "title": "ErrorResponse",
        "type": "object",
        "properties": {
          "additionalErrorDetails": {
            "type": "string",
            "description": "Additional information that may sometimes be returned about the reason an error occurred."
          },
          "code": {
            "$ref": "#/components/schemas/Code"
          },
          "id": {
            "$ref": "#/components/schemas/RequestId"
          },
          "message": {
            "$ref": "#/components/schemas/Message"
          },
          "validationErrors": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "An object that contains validation errors"
          }
        }
      },
      "CountryIsoCode": {
        "type": "string",
        "description": "ISO 3166 Alpha-2 Country code",
        "example": "GB",
        "minLength": 2,
        "maxLength": 2,
        "pattern": "^[A-Z]+$"
      },
      "Message": {
        "type": "string",
        "description": "A description of the outcome of the request."
      },
      "RequestId": {
        "type": "string",
        "description": "The ID of this request. If you can include these when querying the outcome of individual requests, we can track down the root cause faster.\n",
        "example": "a7f45953-1e8b-4f33-87b0-3293f4f6972f"
      },
      "TrustlyRegistrationRequest": {
        "type": "object",
        "required": [
          "type",
          "customer",
          "bank"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "Discriminator field. Please see the discriminator mapping for the RegistrationRequest schema.",
            "example": "trustly"
          },
          "customer": {
            "$ref": "#/components/schemas/TrustlyRegistrationCustomerDetails"
          },
          "bank": {
            "$ref": "#/components/schemas/TrustlyRegistrationBankDetails"
          }
        }
      },
      "TrustlyRegistrationCustomerDetails": {
        "description": "The details of the customer who this account is being created for",
        "type": "object",
        "required": [
          "customerId",
          "firstName",
          "lastName"
        ],
        "properties": {
          "customerId": {
            "type": "string",
            "description": "Customer's customer ID.",
            "maxLength": 100,
            "example": "def456"
          },
          "firstName": {
            "type": "string",
            "example": "John",
            "description": "Customer's first name.",
            "maxLength": 255
          },
          "lastName": {
            "type": "string",
            "example": "Smith",
            "description": "Customer's last name.",
            "maxLength": 255
          },
          "country": {
            "$ref": "#/components/schemas/CountryIsoCode"
          },
          "postcode": {
            "type": "string",
            "description": "The post code of the customer's home address.",
            "example": "EH12 5JB"
          },
          "town": {
            "type": "string",
            "description": "The town of the customer's home address.",
            "example": "Edinburgh"
          },
          "addressLine1": {
            "type": "string",
            "description": "The first line of the customer's home address.",
            "example": "Stanhope House"
          },
          "addressLine2": {
            "type": "string",
            "description": "The second line of the customer's home address.",
            "example": "Address Line 2"
          },
          "phoneNumber": {
            "maxLength": 255,
            "pattern": "^$|^[+]?[(0-9][0-9 ()-]*[0-9]$",
            "type": "string",
            "description": "Customer's telephone number.\nPlease use only numbers, spaces and an optional leading +.",
            "example": "+44 123 1110000"
          },
          "dateOfBirth": {
            "type": "string",
            "format": "date",
            "description": "Customer's date of birth. ISO Format (YYYY-MM-DD)",
            "example": "2000-01-01"
          },
          "documentId": {
            "maxLength": 255,
            "type": "string",
            "description": "Customer's social security number / personal number / birth number / etc.\n\nUsed by some countries (currently only Sweden) to perform additional verification when logging into a bank account.\n",
            "example": "ABC-123456"
          },
          "email": {
            "type": "string",
            "example": "a.b@example.com",
            "description": "Customer's email.",
            "format": "email"
          }
        }
      },
      "TrustlyRegistrationBankDetails": {
        "description": "The details of the bank account being registered.",
        "type": "object",
        "required": [
          "clearingHouse",
          "accountNumber"
        ],
        "properties": {
          "bankNumber": {
            "type": "string",
            "description": "The bank number identifying the customer's bank.\n",
            "example": "6112"
          },
          "clearingHouse": {
            "type": "string",
            "description": "The clearing house of the end-user's bank account. Typically the name of a country in uppercase letters.\n",
            "example": "SWEDEN"
          },
          "accountNumber": {
            "type": "string",
            "description": "The account number identifying the customer's account in the bank.\n",
            "example": "123123"
          }
        }
      },
      "RegistrationRequest": {
        "description": "Schema that contains customer details bank account details to be registered\nat an Open Banking provider.\n",
        "oneOf": [
          {
            "$ref": "#/components/schemas/TrustlyRegistrationRequest"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "trustly": "#/components/schemas/TrustlyRegistrationRequest"
          }
        }
      },
      "RegistrationResponse": {
        "description": "Successfully registered a new payment instrument account",
        "oneOf": [
          {
            "$ref": "#/components/schemas/TrustlySuccessfulRegistrationResult"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "trustly": "#/components/schemas/TrustlySuccessfulRegistrationResult"
          }
        }
      },
      "BaseSuccessfulRegistrationResponse": {
        "type": "object",
        "required": [
          "code",
          "message",
          "id",
          "paymentInstrumentRegistrationId"
        ],
        "properties": {
          "code": {
            "$ref": "#/components/schemas/Code"
          },
          "message": {
            "$ref": "#/components/schemas/Message"
          },
          "id": {
            "$ref": "#/components/schemas/RequestId"
          },
          "paymentInstrumentRegistrationId": {
            "type": "string",
            "description": "The ID of the registration record.\n",
            "example": "9450a0b0-c62a-457f-9eb0-39c36d883557"
          }
        }
      },
      "TrustlySuccessfulRegistrationResult": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseSuccessfulRegistrationResponse"
          },
          {
            "type": "object",
            "required": [
              "type",
              "accountId",
              "clearingHouse",
              "bank",
              "descriptor"
            ],
            "properties": {
              "type": {
                "type": "string",
                "description": "Discriminator field. Please see the discriminator mapping for the RegistrationResponse schema.",
                "example": "trustly"
              },
              "accountId": {
                "type": "string",
                "description": "The returned account ID from the trustly registration request"
              },
              "clearingHouse": {
                "type": "string",
                "description": "The clearing house of the end-user's bank account. Typically the name of a country in uppercase letters.\n",
                "example": "SWEDEN"
              },
              "bank": {
                "type": "string",
                "description": "The name of the bank which is tied to the account"
              },
              "descriptor": {
                "type": "string",
                "description": "A descriptor for this account that is safe to show to the end user."
              }
            }
          }
        ]
      },
      "PspName": {
        "description": "Name of Payment Service Provider (PSPs).\n\nPlease see [PSP Integrations] for a list of possible PSPs.\n\n[PSP Integrations]: https://docs.br-dge.io/docs/psp-integrations\n",
        "type": "string",
        "pattern": "^[A-Za-z0-9\\- ().]*$",
        "maxLength": 50,
        "example": "Checkout.com"
      },
      "Code": {
        "type": "string",
        "description": "[Response Code](https://docs.br-dge.io/docs/response-codes) signifying the outcome of the request.",
        "example": "1000"
      },
      "BaseCallback": {
        "type": "object",
        "required": [
          "type",
          "merchantAccountId",
          "code",
          "message",
          "hashCode"
        ],
        "properties": {
          "type": {
            "type": "string"
          },
          "merchantAccountId": {
            "type": "string",
            "description": "Identifier of the merchant account associated with the payment\n",
            "example": "00000000-0000-0000-0000-000000000000"
          },
          "code": {
            "$ref": "#/components/schemas/Code"
          },
          "message": {
            "type": "string",
            "description": "A description of the outcome"
          },
          "hashCode": {
            "type": "string",
            "description": "Hash Code of select fields of the payload, used for authenticity checks.\n\nThe value in this field is a hashCode that can be used to verify that key fields in the notification message payload has not been tampered with and also to confirm that it has been sent from the BR-DGE platform.\n\nDetails can be found in [Notification Hashing] documentation.\n\n[Notification Hashing]: https://docs.br-dge.io/docs/notification-hashing\n"
          }
        }
      },
      "BasePspInfo": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "$ref": "#/components/schemas/PspName"
          },
          "message": {
            "type": "string",
            "description": "Original message provided by PSP if applicable."
          }
        }
      },
      "TrustlyAccountInfo": {
        "type": "object",
        "required": [
          "type",
          "accountId",
          "bank",
          "town",
          "name",
          "address",
          "postcode",
          "descriptor",
          "clearingHouse"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "Type of account",
            "example": "trustly"
          },
          "accountId": {
            "type": "string",
            "description": "The globally unique AccountID the account was assigned in the Trustly system.",
            "example": "2568457620"
          },
          "bank": {
            "type": "string",
            "description": "The name of the bank for this account.",
            "example": "Handelsbanken"
          },
          "town": {
            "type": "string",
            "description": "The town for this account.",
            "example": "Stockholm"
          },
          "name": {
            "type": "string",
            "description": "First and last name of the account holder",
            "example": "Steve Smith"
          },
          "address": {
            "type": "string",
            "description": "The address for this account.",
            "example": "Main street 1, Main street 2"
          },
          "postcode": {
            "type": "string",
            "description": "The postcode for this account.",
            "example": "SE-11253"
          },
          "descriptor": {
            "type": "string",
            "description": "A descriptor for this account that is safe to show to the end user.",
            "example": "**706212"
          },
          "lastDigits": {
            "type": "string",
            "description": "The last digits of the bank account number.",
            "example": "888133"
          },
          "clearingHouse": {
            "type": "string",
            "description": "The clearing house of the end-user's bank account. Typically the name of a country in uppercase letters.",
            "example": "SWEDEN"
          },
          "verified": {
            "type": "boolean",
            "description": "Whether the account is verified or not.",
            "example": true
          }
        }
      },
      "PaymentInstrumentAccountInfo": {
        "type": "object",
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "trustly": "#/components/schemas/TrustlyAccountInfo"
          }
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/TrustlyAccountInfo"
          }
        ]
      },
      "PaymentInstrumentCallback": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseCallback"
          },
          {
            "type": "object",
            "required": [
              "id",
              "psp",
              "customerId",
              "source",
              "account"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "For the `/payment-instrument-verifications` endpoint this value will match\n`verificationId` that the API returns.\n\nFor the `/payment-instrument-registrations` endpoint this value will match\n`paymentInstrumentRegistrationId` that the API returns.\n",
                "example": "b0e8c6b3-e59e-4e8b-83f4-4efaa7320528"
              },
              "psp": {
                "$ref": "#/components/schemas/BasePspInfo"
              },
              "customerId": {
                "type": "string",
                "description": "The `customer.customerId` value supplied in the API request.",
                "example": "123123"
              },
              "source": {
                "type": "string",
                "description": "The event that has triggered this notification.",
                "example": "REGISTRATION",
                "enum": [
                  "VERIFICATION",
                  "REGISTRATION"
                ]
              },
              "account": {
                "$ref": "#/components/schemas/PaymentInstrumentAccountInfo"
              }
            }
          }
        ]
      }
    },
    "responses": {
      "UnknownServerError": {
        "description": "An internal server error occurred upstream while processing the request.\n\nIf you have any questions about why you are receiving these responses, please raise a ticket with support on the BR-DGE Support Portal at <https://comcarde.atlassian.net/servicedesk/customer/portals> with the `id` from the response so we track down the individual requests on our end.\n",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "Internal server error": {
                "description": "This example shows the [5001 error code]\n\nA full list of possible response codes is available [here].\n\n[5001 error code]: https://docs.br-dge.io/docs/response-codes#5001\n[here]: https://docs.br-dge.io/docs/response-codes\n",
                "value": {
                  "code": "5001",
                  "message": "Unexpected error",
                  "id": "4fad8e2e06a15656"
                }
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "ServerApiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Operations intended for use by Merchant servers.\n\n**IMPORTANT** This key allows you to perform sensitive operations such as authorizing payments and refunds.\n\n**Production Server API keys must not be accessible outside your organization.**\n"
      }
    },
    "callbacks": {
      "PaymentInstrumentRegistrationEvent": {
        "https://example.com/BR-DGE/ as defined in your retail channel config": {
          "post": {
            "description": "BR-DGE has registered a Payment Instrument in PSP system.",
            "requestBody": {
              "required": true,
              "content": {
                "application/json": {
                  "schema": {
                    "$ref": "#/components/schemas/PaymentInstrumentCallback"
                  },
                  "example": {
                    "type": "paymentInstrument.accountRegistration",
                    "merchantAccountId": "aadf8010-4df3-49c6-96c0-9f175f60ef36",
                    "id": "b0e8c6b3-e59e-4e8b-83f4-4efaa7320528",
                    "code": "1004",
                    "message": "Account has been registered.",
                    "psp": {
                      "name": "Trustly",
                      "message": "Raw response from Open Banking PSP"
                    },
                    "hashCode": "4y2Uz8adaQduo3C8v/39Oo1aQhbdnf/iKHTTGygx60k=",
                    "customerId": "123123",
                    "source": "REGISTRATION",
                    "account": {
                      "accountId": "2568457620",
                      "bank": "Handelsbanken",
                      "town": "Stockholm",
                      "name": "Steve Smith",
                      "address": "Main street 1, Main street 2",
                      "postcode": "SE-11253",
                      "descriptor": "**706212",
                      "clearingHouse": "SWEDEN",
                      "type": "trustly"
                    }
                  }
                }
              }
            },
            "responses": {
              "200": {
                "description": "Your server returns this code if it accepts the callback"
              }
            }
          }
        }
      }
    }
  }
}
```