Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Brazilian standard require idNumber, back document and email fo… #85

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
36 changes: 35 additions & 1 deletion fiatconnect-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2148,7 +2148,8 @@ An enum listing the KYC schema types recognized by the FiatConnect specification

```
[
`PersonalDataAndDocuments`
`PersonalDataAndDocuments`,
`PersonalDataAndDocumentsWithBack`
]
```

Expand Down Expand Up @@ -2233,6 +2234,39 @@ A KYC schema containing personal data about a user, as well as documents such as

The `selfieDocument` and `identificationDocument` fields should be base64 encoded binary blobs representing images.

#### 9.3.1.2. `PersonalDataAndDocumentsWithBack`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this schema name is misleading because it sounds more general than it actually is. Currently the constraints on document type, phone number and ID make this specific to Brazilian KYC checks.


A KYC schema containing personal data about a user, as well as documents such as an ID, photo and selfie.
The accepted documents are [RG](https://en.wikipedia.org/wiki/Brazilian_identity_card), [CNH](https://en.wikipedia.org/wiki/Driving_licence_in_Brazil) and [RNM](https://en.wikipedia.org/wiki/Registro_Nacional_de_Estrangeiros)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all 3 of these documents have CPF on them, which the image would presumably include. Does idNumber still need to be its own field? Seems like it could be redundant, though I don't know the details of how you're doing KYC checks..

Copy link
Contributor

@cajubelt cajubelt Jan 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you can drop the idNumber field, or clarify that it needs to be CPF specifically for the case where some new field like documentType is equal to RG, CNH, or RNM, then you could potentially make this schema more general / reusable across regions

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which could be helpful for other providers and consumers of the FC API


```
{
fullName: `string`,
dateOfBirth: {
day: `string`,
month: `string`,
year: `string`
},
address: {
address1: `string`,
address2?: `string`,
isoCountryCode: `string`,
isoRegionCode: `string`,
city: `string`,
postalCode?: `string`
},
phoneNumber: `string`,
email: `string`,
selfieDocument: `string`,
identificationDocumentFront: `string`,
identificationDocumentBack: `string`,
Comment on lines +2261 to +2262
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what kind of identity document is accepted? Any? Or just CPF cards? The description of the schema should probably go into this-- we're currently running into trouble with another KYC schema due to the ambiguity there on what document types are acceptable.

If it's CPF only, the schema should probably also be renamed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cajubelt the docs are those accepted as an official identification document in Brazil: RG, CNH, RNM

}
```

`email` MUST be a [valid email](https://en.wikipedia.org/wiki/Email_address#Syntax).
`phoneNumber` MUST be an 11-digit [Brazilian mobile phone number](https://en.wikipedia.org/wiki/Telephone_numbers_in_Brazil) including area code. The string MUST match the regex `/[0-9]{11}/`.
The `selfieDocument`, `identificationDocument` and `identificationDocumentBack` fields should be base64 encoded binary blobs representing images.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you provide some more detailed information on the fields required in this schema? (For example, how phoneNumber should be formatted, what the idNumber represents and how it should be formatted, etc.) It might seem a bit pedantic but it's important that we document the exact syntax of these fields.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok @jophish , I will do that.


### 9.3.2. Fiat Account Schemas

All Fiat Account Schemas supported by FiatConnect MUST contain the `accountName`, `institutionName`, and `fiatAccountType` fields. `accountName` is a friendly, user-definable name for the account.
Expand Down
1 change: 1 addition & 0 deletions swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ definitions:
- NameAndAddress
- IdAndSelfie
- PersonalDataAndDocuments
- PersonalDataAndDocumentsWithBack
FiatType:
type: "string"
enum: &FiatType
Expand Down