Create Keys

Overview

This endpoint creates a new BreB Key by submitting the request to the Visionamos - Passport Bre-B Node. It registers a linkage between a Customer, its Account, and a specific payment key (e.g., email, phone, alphanumeric) for use in QR code generation and payment routing.

Endpoint Details

DefinitionDescription
Endpointhttps://bre-b-sandbox.api.visionamos.passportfintech.com/v1/paas/entities/customers/accounts/keys
MethodPOST
HeadersContent-Type: application/json, Authorization
AuthenticationAccess Token (Bearer Token)

A Key can only be created after the Customer has been onboarded (refer to Create Customer) and has an Account with the Sponsor Bank.

Request Body

ParameterTypeConstraintsRequiredDescription
account_idstringUUIDYesUnique identifier of the account to associate the key with.
key_typestringENUM: NRIC, M, E, O, BYes

Type of key. Accepted values:

NRIC : Document Number - up to 18 alphanumeric characters, no hyphens (-), spaces, or special characters allowed.

M: Mobile Phone Number - 10 digits, must start with 3.

E: Email - up to 92 characters, must have an @ before the domain, with a maximum of 30 characters before the @ and 61 after.

O: Alphanumeric Number - between 6 and 21 characters, must include letters, numbers, and start with an @.

B: Commercial Entity Number - 10 numeric characters, starting with 00.

key_valuestringVaries by key_typeYesThe actual key to be registered.

Example Request

JSON
Copy

Response Body

  • HTTP Status Code: 200 OK.
  • The response will contain the key details along with its unique identifier.

Example of Response

JSON
Copy

Common Errors and Handling

HTTP Status CodeMeaningDescription
400 Bad RequestInvalid DataRequired fields are missing or contain incorrect values.
401 UnauthorizedExpired TokenThe access token is invalid or has expired.
403 ForbiddenAccess DeniedThe request is not authorized to create an Key.
500 Internal Server ErrorServer ErrorAn unexpected error occurred while creating the Key.

Best Practices

  • Use appropriate key types: Make sure the key type matches the format of the value (e.g., E for emails).
  • Avoid duplicate keys across accounts: Keys must be unique per user in the system (an account may have multiple keys associated with).
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard