Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions code/API_definitions/kyc-match.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ info:

* To prevent fraud, wrong or imprecise information, and/or facilitate the onboarding of a mobile phone user to a 3rd party service.

The API supports a multi-level hierarchy of property validation. In addition to the initial verification of the `phoneNumber`, an additional `idDocument` validation may occur based on different Operator requirements. This means that, in those cases, if the value of `idDocument` is not provided or it does not match the one bound to the specific phone number in the Operator systems, the operation will return an error.

The following figure is the generic high-level flows of this API.

<img width="848" alt="KYC_Match_flow" src="https://raw.githubusercontent.com/camaraproject/KnowYourCustomerMatch/r1.2/documentation/API_documentation/assets/kyc-match_flow.png">
Expand Down Expand Up @@ -94,10 +92,6 @@ paths:
description: |-
Verify matching of a number of attributes related to a customer identity against the verified data bound to their phone number in the Operator systems. Regardless of whether the `phoneNumber` is explicitly stated in the request body, at least one of the other fields must be provided, otherwise a `HTTP 400 - KNOW_YOUR_CUSTOMER.INVALID_PARAM_COMBINATION` error will be returned.

In order to proceed with the match check, some Operators may have the requirement to perform an additional level of validation based on the `idDocument` property. This means that, in those cases, the `idDocument` is required and the provided value needs to match the one stored in the Operator system associated with the indicated `phoneNumber`. This validation will be done before proceeding with the match check of the rest of the properties. The following two rules apply only in the cases where the Operator have the requirement to validate the `idDocument`:
- If no `idDocument` is provided, then a `HTTP 403 - KNOW_YOUR_CUSTOMER.ID_DOCUMENT_REQUIRED` error will be returned.
- If the provided `idDocument` does not match the one stored in the Operator systems, then a `HTTP 403 - KNOW_YOUR_CUSTOMER.ID_DOCUMENT_MISMATCH` error will be returned.

The API will return the result of the matching process for each requested attribute. This means that the response will **only** contain the attributes for which validation has been requested. Possible values are:
- **true**: the attribute provided matches with the one in the Operator systems, which is equal to a `match_score` of 100.
- **false**: the attribute provided does not match with the one in the Operator systems.
Expand Down Expand Up @@ -621,8 +615,6 @@ components:
enum:
- PERMISSION_DENIED
- INVALID_TOKEN_CONTEXT
- KNOW_YOUR_CUSTOMER.ID_DOCUMENT_REQUIRED
- KNOW_YOUR_CUSTOMER.ID_DOCUMENT_MISMATCH
examples:
GENERIC_403_PERMISSION_DENIED:
description: Permission denied. OAuth2 token access does not have the required scope or when the user fails operational security
Expand All @@ -636,18 +628,6 @@ components:
status: 403
code: INVALID_TOKEN_CONTEXT
message: "phoneNumber is not consistent with access token."
KNOW_YOUR_CUSTOMER.ID_DOCUMENT_REQUIRED:
description: The idDocument is required by the implementation
value:
status: 403
code: KNOW_YOUR_CUSTOMER.ID_DOCUMENT_REQUIRED
message: The idDocument is required to perform the properties validation
KNOW_YOUR_CUSTOMER.ID_DOCUMENT_MISMATCH:
description: idDocument mismatch
value:
status: 403
code: KNOW_YOUR_CUSTOMER.ID_DOCUMENT_MISMATCH
message: The idDocument needs to match the one associated with the provided phoneNumber

Generic404:
description: Not found
Expand Down
22 changes: 0 additions & 22 deletions code/Test_definitions/kyc-match.feature
Original file line number Diff line number Diff line change
Expand Up @@ -279,28 +279,6 @@ Feature: CAMARA Know Your Customer Match API, v0.4.0 - Operation KYC_Match
And the response property "$.message" contains a user friendly text
And the response property "$.status" is 403

@KYC_Match_12_idDocument_required
# Note: This test scenario is optional, as idDocument parameter and Second Level Validation is optional to network operators/ API providers.
Scenario: Error 403 when body does not contain idDocument when this is required
Given a valid testing phone number supported by the service, identified by the access token or provided in the request body
And the request body is set to a valid parameter combination without property "$.idDocument"
When the request "KYC_Match" is sent
Then the response status code is 403
And the response property "$.code" is "KNOW_YOUR_CUSTOMER.ID_DOCUMENT_REQUIRED"
And the response property "$.message" contains a user friendly text
And the response property "$.status" is 403

@KYC_Match_13_idDocument_mismatch_when_idDocument_is_required
# Note: This test scenario is optional, as idDocument parameter and Second Level Validation is optional to network operators/ API providers.
Scenario: Error 403 when the idDocument included in the request does not match the one saved in the MNO system when the idDocument is required
Given a valid testing phone number supported by the service, identified by the access token or provided in the request body
And the request body property "$.idDocument" is set to a valid idDocument that is not associated with the identified phone number
When the request "KYC_Match" is sent
Then the response status code is 403
And the response property "$.code" is "KNOW_YOUR_CUSTOMER.ID_DOCUMENT_MISMATCH"
And the response property "$.message" contains a user friendly text
And the response property "$.status" is 403

# Error scenarios for management of input parameter phoneNumber

@KYC_Match_C02.01_phone_number_not_schema_compliant
Expand Down