Pendencies API — Functional Documentation
Table of contents
- Overview
- Actors and context
- Supported pendencies
- End-to-end onboarding flow
- Operations
- data_grid attribute catalog
- Business rules and constraints
- Error meanings
Overview
Using this API, a partner can:
- Query a merchant's open pendencies and their current status.
- Submit or update registration data.
- Request and validate contact-channel verification codes (SMS / email / WhatsApp).
- Upload required documents (as Base64 content).
- Accept documents and terms.
- Download generated documents when available.
snake_case, dates are ISO-8601 UTC, and the content type is
application/json.Actors and context
| Field | Description |
|---|---|
partnerId | Unique identifier of the partner application. |
merchantId | Identifier of the merchant whose onboarding is being managed. |
Both identifiers appear in the path of every endpoint:
person_type:natural_person— the merchant's legal document is a CPF (individual).company— the merchant's legal document is a CNPJ (legal entity).
The person type determines which registration attributes apply (see data_grid attribute catalog).
Supported pendencies
Only the pendencies below are exposed to partners. Any other pendency the platform tracks internally is never returned.
| Pendency | Meaning | Resolved via |
|---|---|---|
cell_phone_validation | Cell phone ownership must be verified | token request + validation |
email_validation | Email ownership must be verified | token request + validation |
data_grid | Registration attributes must be provided/updated | PUT /data-grid |
selfie_upload | Selfie must be uploaded | POST /upload-document |
identification_document_upload | Identification document must be uploaded | POST /upload-document |
social_contract_upload | Social contract must be uploaded | POST /upload-document |
letter_of_attorney_upload | Power of attorney must be uploaded | POST /upload-document |
order_summary | Order summary must be accepted | PUT /acceptance-document |
terms_and_conditions | Terms and conditions must be accepted | PUT /acceptance-document |
privacy_policy | Privacy policy must be accepted | PUT /acceptance-document |
pendencies: []).data_grid pendency is returned, its grid_info field lists exactly which registration
attributes must be submitted.End-to-end onboarding flow
A partner first queries the merchant's pendencies, then resolves each one respecting the ordering rules below. Only pendencies that are actually open for that merchant need to be resolved.
- Contact validation comes first. A verification code can only be requested after the matching
email/cell_phonevalue already exists in the registration. Submit thosedata_gridattributes before requesting/validating a token for that channel. - Identification document after the selfie, when the selfie is required.
- Social contract before power of attorney. The merchant provides the social contract or the power of attorney depending on their situation.
Operations
/api/v1/partner/{partnerId}/merchant/{merchantId}/pendencies/swagger-ui.html; the OpenAPI spec at /api-docs.1. Query pendencies
GET (base path)person_type and overall situations. When a pendency is of type data_grid, grid_info
tells the partner which attributes must be resolved.- Merchant not found / not accessible →
404. - No applicable pendencies →
200with an empty list.
2002. Request validation code
POST /token-requestRequests a one-time verification code to be sent to the merchant through a contact channel.
| Field | Required | Description |
|---|---|---|
type | yes | Contact channel: cell_phone, email (WhatsApp also supported as a channel). |
value | yes | The channel value (e.g. email@email.com or a phone number). |
The code is dispatched asynchronously to the merchant.
202 (accepted / dispatched)3. Validate code
POST /token-validationSubmits the code the merchant received to confirm ownership of the contact channel.
| Field | Required | Description |
|---|---|---|
token | yes | The one-time code received by the merchant. |
type | no | Contact channel the code was sent to. |
value | no | The channel value. |
device_fingerprint | no | Device fingerprint for fraud prevention. |
200 (channel ownership confirmed)4. Resolve data_grid
PUT /data-griddata_grid pendency. The body carries a pendencies
envelope; only data_grid is accepted, and each grid_info item is discriminated by its
attribute:{
"pendencies": [
{
"name": "data_grid",
"grid_info": [
{ "attribute": "email", "email": "teste@email.com" },
{ "attribute": "cell_phone", "cell_phone": "51992547923" }
]
}
]
}{
"pendencies": [
{
"name": "data_grid",
"grid_info": [
{ "attribute": "email", "email": "teste@email.com" },
{ "attribute": "cell_phone", "cell_phone": "51992547923" }
]
}
]
}- The merchant must have an active
data_gridpendency (status pending); otherwise the request is rejected with422. - Only attributes in the attribute catalog are accepted; any other
attribute, an unknown field, an empty body, or a malformed value →
400.
204 (no content)5. Upload document
POST /upload-documentUploads a required document as Base64 content. Returns the current situation (status and last-update date) of the uploaded document.
| Field | Required | Description |
|---|---|---|
document_type | yes | e.g. social_contract, identification_document, selfie. |
side | yes | Image side, e.g. front, back. |
file_type | yes | File format, e.g. pdf, jpg, png. |
file_base64 | yes | Base64-encoded file content (must be valid Base64). |
device_fingerprint | no | Device fingerprint. |
400.2006. Accept document
PUT /acceptance-documentAccepts a document or terms. The body carries a pendencies envelope; the response returns the name and current situation of the accepted pendency.
{
"pendencies": [
{
"name": "privacy_policy",
"device_fingerprint": "abc123",
"situation": { "status": "..." }
}
]
}{
"pendencies": [
{
"name": "privacy_policy",
"device_fingerprint": "abc123",
"situation": { "status": "..." }
}
]
}2007. Download document
GET /download-document/{documentType}documentType must be one of
terms_and_conditions or order_summary; any other value → 400.200 (returns the document_type and its Base64 content)data_grid attribute catalog
data_grid pendency is returned, grid_info lists the attributes that must be submitted.
The applicable set depends on the merchant's person type.Natural Person (PF)
country_of_birth, cell_phone, email, gross_monthly_income, net_worth,
residential_address, merchant_category_code, commercial_address, business_addressCompany (PJ)
merchant_category_code and business_address, plus the legal
representative's data:legal_representative.email, legal_representative.cell_phone,
legal_representative.country_of_birth, legal_representative.residential_address,
legal_representative.gross_monthly_income, legal_representative.net_worthValue rules per attribute
| Attribute | Value shape | Rule |
|---|---|---|
email / legal_representative.email | email | Valid email address, not blank. |
cell_phone / legal_representative.cell_phone | cell_phone | 10 to 13 digits. |
country_of_birth / legal_representative.country_of_birth | country | ISO 3166-1 alpha-2 (e.g. BR). |
residential_address, business_address, commercial_address (and legal_representative.residential_address) | address | See address fields below. |
merchant_category_code | merchant_category_code + economic_activity_classification_code, or acquirer_merchant_category_code | Provide the MCC pair (MCC = 4 digits, CNAE = 1–7 digits) or the acquirer MCC. |
gross_monthly_income / legal_representative.gross_monthly_income | gross_monthly_income | Whole integer amount in BRL (reais, not cents). |
net_worth / legal_representative.net_worth | net_worth | Whole integer amount in BRL (reais, not cents). |
street (required), number (blank is treated as "0"), district
(required), city, state, postal_code (required, digits only), country (required, ISO alpha-2).Business rules and constraints
- Only open pendencies can be resolved. Resolving
data_gridrequires an active (pending)data_gridpendency; otherwise422. - Selective exposure. Only the supported pendencies are returned; internal pendency types are never exposed.
- Strict input. Partner request bodies reject unknown fields (
400), and empty bodies ({}/[]) are rejected. - Documents must contain valid Base64 content.
- Contact validation ordering. A verification code can only be sent to an
email/cell_phonevalue that already exists in the registration. - Person type is derived from the merchant's legal document: CPF →
natural_person, CNPJ →company. - No open pendencies returns an empty list.
- Sensitive data must be transmitted over HTTPS, and all requests require authentication.
Error meanings
| HTTP | Meaning |
|---|---|
200 | Success |
202 | Accepted (validation code dispatched) |
204 | Success, no content returned |
400 | Invalid request (malformed body, unknown field, invalid value, unsupported channel/document type) |
401 | Missing or invalid authentication |
403 | Authenticated caller not allowed to access the resource |
404 | Merchant not found or not accessible by the partner |
422 | Business rule violation (e.g. no active data_grid pendency to resolve) |
500 | Unexpected error |
504 | Request timed out |
Error responses share a common shape:
{ "status_code": 422, "message": "No active data_grid pendency to resolve for this merchant.", "details": [] }{ "status_code": 422, "message": "No active data_grid pendency to resolve for this merchant.", "details": [] }En esta página