Company
All pay-in and pay-out transactions within Attrus must be associated with a customer, either a person or a company. This ensures that their internal ID, called subject_id, can be used as a reference for future transactions.
Required information for company registration
The following endpoint is used to register company customers, regardless of nationality. If a document number has been previously registered, the company details will be updated. As soon as you send the request to register a company, you will receive a response with their subject_id.
curl -X POST "https://api.facilitapay.com/api/v1/subject/companies" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9...." \
-d '{
"company": {
"document_number": "45215604065562",
"document_type": "cnpj",
"social_name": "Company Social Name LTDA",
"company_name": "Company Fantasy Name",
"email": "[email protected]",
"website": "https://www.companywebsite.com",
"phone_country_code": "55",
"phone_area_code": "18",
"phone_number": "99812-1212",
"creation_date": "2015-04-01",
"address_street": "Rua Barão do Rio Branco",
"address_number": "310",
"address_complement": "",
"address_postal_code": "16201220",
"address_city": "Birigui",
"address_state": "SP",
"address_country": "BR",
"fiscal_country": "Brasil",
"net_monthly_average_income": "4000",
"net_value": "10000",
"main_activity": "8599603 - Treinamento em informática",
"activity_type": "other",
"company_type": "ltda",
"documents": [
{
"file_type": "application/pdf",
"file_url": "http://somedomain.com/document-x.pdf",
"labels": [
"social-contract"
]
}
],
"partners": [
{
"document_number": "92331064322",
"document_type": "CPF/CNPJ/TAXID",
"kind": "person",
"name": "Manoel Silvares",
"percentage_share": "50",
"address_country": "BR"
}
]
}
}'
HTTP Request
POST /subject/companies
Body Parameters
| Parameter | Description | Type | Required | Required For |
|---|---|---|---|---|
company | An object containing all the required values | object | true | |
document_number | Company's national document number | string | true | All transactions |
document_type | Company's type of document | string | true | All transactions |
social_name | Company's social name | string | true | All transactions |
fiscal_country | Name of country where the company is registered Ex.: Brasil, Colombia, Chile, Mexico | string | true | All transactions |
email | Company's e-mail address | string | false | Cards, PSE and boleto transactions |
website | Company's website | string | false | |
phone_country_code | Country phones code (2 digits: BR +55; MX +52; COP +57; CL +52) | string | false | Cards transactions in MXN and for PSE |
phone_area_code | Internal country area code | string | false | PSE transactions |
phone_number | Company's phone number | string | false | Cards and PSE transactions |
creation_date | Company's creation date (yyyy-mm-dd format) | string | false | |
net_monthly_average_income | Company's net monthly average income | string | ||
address_street | Company's street name | string | false | Cards, PSE and boleto transactions |
address_number | Company's address number | string | false | Cards, PSE and boleto transactions |
address_complement | Company's complement | string | false | |
address_neighborhood | Company's neighborhood/district | string | false | Cards, PSE and boleto transactions |
address_postal_code | Postal/ZIP code | string | false | Cards, PSE and boleto transactions |
address_city | Company's city name | string | false | Cards, PSE and boleto transactions |
address_state | Company's state of residence | string | false | Cards, PSE and boleto transactions |
address_country | An ISO 3166-1 alpha-2 country code of the company's address country | string | false | |
main_activity | Company's segment, main market | string | false | |
activity_type | Activity type | string | false | |
net_value | Company's net value | number | false | |
company_type | Company's type | string | false | All transactions |
partners | An array of objects containing the following values, each one: | array | false | |
partners.document_number | Document number | string | false | When sending partners field |
partners.document_type | Type of document² of the partner | string | false | When sending partners field |
partners.kind | Partner type | string | false | When sending partners field |
partners.name | Partner Name | string | false | When sending partners field |
partners.percentage_share | Partner percentage of shares in the company | string | false | When sending partners field |
partners.address_country | An ISO 3166-1 alpha-2 country code of the address country | string | false | When sending partners field |
documents | An array of documents related to the customer (Cutomers who operate above a threshold value per month or exceed a cumulative limit in the last 12 months of operation must have the following associated documents: rg-number, cpf-number, rg-photo, address-proof, revenue-tax-declaration). | array | false | Customer who exceeds 20k USD annually in their amount of transactions |
documents.labels | Keywords that may help identify the document in the company registration tab. | array | false | When sending documents field |
documents.file_type | Document file MIME type. Must match the document type. | string | false | When sending documents field |
documents.file_data | Document file encoded in Base64. | string | false | When sending documents and using the file_data |
documents.file_name | The name of the file to be stored. Any file extension is accepted, but the extension must be included. Ex: document.pdf, document.docx, report.xls | string | false | When sending documents field and using the file_data |
documents.file_url | Public URL pointing to the document. Note that it must start with http:// or https:// | string | false | When sending documents and using a URL |
Brazilian Company Registration
curl -X POST "https://api.facilitapay.com/api/v1/subject/companies" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9...." \
-d '{
"company": {
"document_number": "45215604065562",
"document_type": "cnpj",
"social_name": "Company Social Name LTDA",
"company_name": "Company Fantasy Name",
"email": "[email protected]",
"fiscal_country": "Brasil",
"partners": [
{
"document_number": "92331064322",
"document_type": "CPF/CNPJ/TAXID",
"kind": "person",
"name": "Manoel Silvares",
"percentage_share": "50",
"address_country": "BR"
}
]
}
}'
In Brazil, the document_type for companies is the CNPJ (a 14 digit-number), below you can check a payload sample for registration of a person in Brazil. For other requirements depending on payment methods, check the table in section Information needed for registration (Companies).
HTTP Request
POST /subject/companies
Body Parameters
Mexican Company Registration
curl -X POST "https://api.facilitapay.com/api/v1/subject/companies" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9...." \
-d '{
"company": {
"document_number": "GUJ970202BG4",
"document_type": "rfc",
"social_name": "Company name",
"fiscal_country": "Mexico"
}
}'
In Mexico the document_type is going to be rfc (12-digit). Below you can check a payload with initial required information. For other requirements depending on payment methods, check the table in section Information needed for registration (Companies)
HTTP Request
POST /subject/companies
Body Parameters
Colombian Company Registration
curl -X POST "https://api.facilitapay.com/api/v1/subject/companies" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9...." \
-d '{
"company": {
"document_number": "8001972684",
"document_type": "nit",
"social_name": "Company name",
"fiscal_country": "Colombia"
}
}'
In Colombia the document_type is going to be nit (10-digit). Below you can check a payload with initial required information. For other requirements depending on payment methods, check the table in section Required information for company registration
HTTP Request
POST /subject/companies
Body Parameters
Chilean Company Resgitration
curl -X POST "https://api.facilitapay.com/api/v1/subject/companies" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9...." \
-d '{
"company": {
"document_number": "265874694",
"document_type": "rut",
"social_name": "Company name",
"fiscal_country": "Chile"
}
}'
In Chile the document_type is going to be rut (9-digit). Below you can check a payload with initial required information. For other requirements depending on payment methods, check the table in section Required information for company registration
HTTP Request
POST /subject/companies
Body Parameters
Company List
curl -X GET "https://api.facilitapay.com/api/v1/subject/companies" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9...."
You can use the following endpoint to list all the registered companies and associated partners and owners:
HTTP Request
GET /subject/companies
Path Parameters
| Parameter | Description | Type | Required |
|---|---|---|---|
last_id | Last company UUID for pagination | string | false |
Company Update
curl -X PUT "https://api.facilitapay.com/api/v1/subject/companies/5fd0aa81-b427-4a29-9968-6491d1d7f8b0" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9...." \
-d '{
"person": {
"net_monthly_average_income": "2000"
}
}'
Common mistakes
It is not possible to update the document_number and document_type.
To update a company's information, you can use the endpoint below:
Note: You can update all fields except for document_number and document_type.
HTTP Request
PUT /subject/companies/:id
Path Parameters
| Parameter | Description | Type | Required |
|---|---|---|---|
id | Company UUID | string | true |
Body Parameters
Company Details
curl -X GET "https://api.facilitapay.com/api/v1/subject/companies/577ff176-cbc4-4490-ad70-9a8d1a1d4006" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9...."
To check a company's information, you can use the following endpoint:
HTTP Request
GET /subject/companies/:id
Path Parameters
| Parameter | Description | Type | Required |
|---|---|---|---|
id | Company UUID | string | true |