Skip to main content
This is the shortest partner flow that creates a customer, creates an operation, uploads documents, and reads the final analysis posture. All partner API calls use signed headers:

1. Create or update a customer

POST /v1/customers

2. Create the operation

POST /v1/operations
declaredBeneficiaryName, declaredEconomicOwnerName, and buyerCountry are nullable for legacy compatibility, but the guided trust-v2 flow requires all three. PayFi does not infer the economic owner from the customer or importer name. The two-letter ISO buyer country controls country-specific validation such as CNPJ; an absent country never causes PayFi to assume Brazil.
PayFi then prepares the required document list. Wait for operation.requirements.ready before collecting files for the operation.

3. Register each document

After the requirement list is approved, register each document before uploading bytes. POST /v1/operations/{operationId}/documents

4. Upload and complete

Upload the file bytes directly to uploadUrl:
Then complete the upload: POST /v1/upload-sessions/{token}/documents/{documentId}/complete

5. Read status and analysis posture

Use GET /v1/operations/{operationId} for partner reconciliation:
Partners should also subscribe to signed webhooks for asynchronous updates. The API Reference includes endpoint-level examples for the ACTION_REQUIRED path where a required document type is still missing after analysis.