Skip to content

Environments

The FluxiQ NPC API is available in three distinct environments, each with specific characteristics for different phases of the development cycle.

Overview

EnvironmentBase URLAPI KeyDescription
Localhttp://localhost:4000/api/v1/centralpk_test_*Development with simulator
Sandboxhttps://sandbox.pixconnect.com.br/api/v1/centralpk_test_*Testing and staging
Productionhttps://api.pixconnect.com.br/api/v1/centralpk_live_*Real production environment

Local Environment

The local environment allows you to develop and test your integration using the Nuclea Simulator, which simulates all Nuclea infrastructure services without external dependencies.

Requirements

RequirementSpecification
DockerVersion 20.10 or higher
Docker ComposeVersion 2.0 or higher
RAMMinimum 4GB available
Ports4000-4010 available
SystemLinux, macOS or Windows (WSL2)

Installation

Clone the repository and start the development environment:

bash
# Clone the repository
git clone https://github.com/playersbet/pixconnect-nuclea.git
cd pixconnect-nuclea

# Start all services
docker-compose up -d

# Verify services are running
docker-compose ps

Available Services

The local environment runs the following services:

ServicePortURLDescription
Backend API4000http://localhost:4000Main FluxiQ NPC API
PCR Simulator4001http://localhost:4001Simulates the Centralized Receivables Platform
Webhook Receiver4002http://localhost:4002Receives webhooks for testing
FTP Server4003ftp://localhost:4003Simulates Nuclea FTP for ACMP615 files
Orchestrator4005http://localhost:4005Orchestrates test scenarios
Control Panel4010http://localhost:4010Simulator web interface

Test Scenarios

The Nuclea Simulator allows simulating various test scenarios through the Orchestrator:

Simulate Boleto Payment

bash
# Simulates payment of a specific boleto
curl -X POST "http://localhost:4005/scenarios/payment" \
  -H "Content-Type: application/json" \
  -d '{
    "boleto_id": "boleto-uuid",
    "valor_pago": 15000,
    "data_pagamento": "2026-02-03"
  }'

Trigger Settlement Cycle

bash
# Manually triggers a settlement cycle
curl -X POST "http://localhost:4005/scenarios/settlement" \
  -H "Content-Type: application/json" \
  -d '{
    "cycle_type": "morning",
    "boleto_ids": ["uuid-1", "uuid-2"]
  }'

Simulate PCR Error

bash
# Simulates a communication failure with PCR
curl -X POST "http://localhost:4005/scenarios/pcr-error" \
  -H "Content-Type: application/json" \
  -d '{
    "error_type": "timeout",
    "duration_seconds": 30
  }'

Control Panel

Access http://localhost:4010 to view:

  • Status of all services
  • Boletos registered in the simulator
  • History of simulated payments
  • PCR/FTP communication logs
  • Manual triggers for test scenarios

Local Development

The local environment is ideal for development and debugging. Use it to test new features before validating in Sandbox.

Sandbox Environment

Sandbox is a staging environment that replicates production behavior, but with test data and no real financial impact.

Characteristics

  • Isolated data: Boletos and transactions are independent from production
  • Same API: Endpoints identical to production environment
  • Real webhooks: Notifications sent to your test URL
  • Scheduled cycles: Simulated settlement at the same times (08:30 and 16:30)
  • Free: Requests do not incur charges

Limitations

ResourceLimitation
Requests per minute100 RPM
Active boletosMaximum 1,000 simultaneous
Data retention30 days
Maximum boleto valueR$ 10,000.00 (1,000,000 cents)
WebhooksMaximum 3 retries

Test Data

In Sandbox, use the following data for testing:

json
{
  "pagador": {
    "nome": "Sandbox Test User",
    "documento": "00000000000",
    "tipo_documento": "cpf"
  },
  "valor": 15000,
  "vencimento": "2026-03-15"
}

Fictitious Data

Never use real customer data in the Sandbox environment. Use only fictitious data for testing.

Sandbox Access

  1. Request sandbox credentials through the FluxiQ Portal
  2. Receive your API Key with prefix pk_test_
  3. Configure your application to use the Sandbox URL
  4. Start testing!

Production Environment

The production environment processes real financial transactions and is connected to the official Nuclea infrastructure.

Characteristics

  • Real transactions: Boletos officially registered in PCR
  • High availability: 99.9% SLA
  • Security: mTLS connection with Nuclea certificates
  • Monitoring: Real-time alerts and metrics
  • Support: Priority assistance

Pre-Production Checklist

Before migrating to production, make sure to complete all items:

Integration

  • [ ] Complete testing in Sandbox environment
  • [ ] Handling of all error codes
  • [ ] Implementation of retries with exponential backoff
  • [ ] HMAC signature validation for webhooks

Security

  • [ ] Production API Key stored securely
  • [ ] HTTPS required for all communications
  • [ ] Logs without exposed sensitive data
  • [ ] Webhook endpoint configured with HTTPS

Operational

  • [ ] Error monitoring configured
  • [ ] Alerts for integration failures
  • [ ] Key rotation process documented
  • [ ] Technical support contact defined

Compliance

  • [ ] Privacy policy updated
  • [ ] Terms of use reviewed
  • [ ] LGPD compliance verified

Request Access

To obtain access to the production environment:

  1. Complete staging in Sandbox
  2. Fill out the production form on the FluxiQ Portal
  3. Wait for team review (up to 5 business days)
  4. Receive your production API Key (pk_live_*)
  5. Configure the production webhook
  6. Start operating!

Critical Environment

The production environment processes real financial transactions. Test thoroughly in Sandbox before migrating.

Environment Comparison

CharacteristicLocalSandboxProduction
DataSimulatedTestReal
Nuclea PCRSimulatorStagingProduction
AvailabilityLocal dev99%99.9%
Rate LimitUnlimited100 RPM1000 RPM
WebhookslocalhostPublic URLsPublic URLs + HTTPS
SupportDocumentationEmailPriority
CostFreeFreePer transaction

Next Steps

Documentação da API FluxiQ NPC