Guides
Journeys

Smart PIX

The player authorizes once at the bank and later deposits are charged straight from the enrollment, within its limits.

In Smart PIX the first deposit is a journey: the player authorizes at the bank and pays. The authorization creates a bank enrollment with limits; later deposits are charged straight from that enrollment, without the player leaving your app.

1. Create the journey

bash
curl --request POST \
  --url https://okto.mimicr.dev/smart/deposit/journey \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "taxId": "617.750.603-81",
    "name": "Bruno Matos",
    "amount": 2000
  }'
json
{
  "id": "562533c1-2752-4164-8d07-d97268cf7c7d",
  "url": "https://okto.mimicr.dev/mimicr/smart/562533c1-2752-4164-8d07-d97268cf7c7d",
  "created": "2026-10-21T19:09:19.661000+00:00",
  "tags": [],
  "bankAccounts": []
}

taxId (2001), name (2009) and amount (2003) are required.

2. The player authorizes

Open the url for the player; on the hosted page they choose "Autorizar e pagar" (authorize and pay) or "Recusar" (refuse). Through the control API:

bash
npx mimicr action okto player.step step=smart:approve id=562533c1-2752-4164-8d07-d97268cf7c7d
DecisionOutcome
Authorizes, regular CPFauthorized enrollment created (or reused) and journey paid
Authorizes, CPF rejected by the testsJourney failed with the code, no enrollment
Refuses (smart:reject)Journey failed with 4448

Follow it with Get journey status:

json
{
  "id": "562533c1-2752-4164-8d07-d97268cf7c7d",
  "amount": 2000,
  "status": "paid",
  "errorList": [],
  "transactionInfo": { "name": "Bruno Matos", "taxId": "617.750.603-81", "endToEndId": "E60701190202610211909RAUd8SQphH8" }
}

Smart PIX sends no notifications in Mimicr: check the journey and payment statuses. Waiting on the object works too: npx mimicr wait okto object id=<journey-id> status=paid.

3. Charge through the enrollment

List bank enrollments returns the CPF's enrollments, with debtor (the player's account), creditor (the operator's) and configuration:

json
{
  "bankEnrollments": [
    {
      "id": "urn:mimicr:13d1216c-359a-4d7c-9882-68444a65a571",
      "status": "authorized",
      "configuration": { "totalAllowedAmount": 500000, "transactionLimit": 100000 }
    }
  ]
}
bash
curl --request POST \
  --url https://okto.mimicr.dev/smart/deposit/payment \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "bankEnrollmentId": "urn:mimicr:13d1216c-359a-4d7c-9882-68444a65a571",
    "amount": 1500
  }'

The response is 201 with status: "paid" (or failed, with the CPF's or chaos code). Check it with Get payment status.

RuleError
Unknown enrollment4138
Enrollment not authorized4137
More than R$ 1,000.00 (100000) per payment4104
Sum of the enrollment's payments above R$ 5,000.00 (500000)4134

The limits, the urn:mimicr: prefix of enrollment ids and the creditor data are Mimicr's.