Guides
Notifications
Where each notification goes, the shape of the bodies, the headers and the retries.
When an operation changes status because of something your application doesn't control (the player paid, the bank refused, a deadline passed), Mimicr makes a POST with JSON to the URL the operator set for that product, as Okto does.
Set the URLs
curl --request PUT \
--url https://okto.mimicr.dev/operator \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"depositUrl": "https://sua-app.dev/webhooks/okto/deposit",
"withdrawUrl": "https://sua-app.dev/webhooks/okto/withdraw",
"automaticDepositUrl": "https://sua-app.dev/webhooks/okto/automatic",
"biometricDepositUrl": "https://sua-app.dev/webhooks/okto/biometric",
"pixDirectPaymentUrl": "https://sua-app.dev/webhooks/okto/direct",
"faceMatchUrl": "https://sua-app.dev/webhooks/okto/face-match",
"kycUrl": "https://sua-app.dev/webhooks/okto/kyc",
"payAndPlayV2DepositUrl": "https://sua-app.dev/webhooks/okto/pay-and-play",
"notificationToken": "meu-token-de-notificacao"
}'Only the fields you send change; null or "" clears a URL. pixDirectPaymentUrl is saved and returned as directDepositUrl. Remove notification URLs clears every URL and the notificationToken.
Which URL receives what
| URL | Body root | Statuses announced |
|---|---|---|
depositUrl | Invoice (classic Pix) | paid, failed, expired, reviewing, reversed |
depositUrl | pixByKeyDeposit (Pix by Key) | paid, failed, reviewing, reversed |
withdrawUrl | Transfer | success, failed |
automaticDepositUrl | AutomaticRecurrenceAuthorization | AUTHORIZED, REJECTED, CANCELLED, FAILED, EXPIRED |
automaticDepositUrl | AutomaticPixDepositPayment | paid, failed |
biometricDepositUrl | BiometricEnrollment | enrolled, revoked |
biometricDepositUrl | BiometricDepositPayment | paid, failed |
biometricDepositUrl | BiometricDepositJourney | paid, failed, expired |
directDepositUrl | DirectDepositPayment | paid, failed |
payAndPlayV2DepositUrl | PayAndPlayDepositJourney | paid, failed, expired |
faceMatchUrl | FaceMatchJourney | success, rejected, failed, expired |
kycUrl | the lookup result, no root | APPROVED, REPROVED |
Smart PIX sends no notifications: poll Get journey status. Each journey guide describes its bodies in detail.
Example
{
"Transfer": {
"id": "1486334408408923",
"externalId": "saque-2001",
"amount": 1500,
"originalAmount": 1500,
"status": "success",
"tags": [],
"errorList": [],
"transactionInfo": {
"name": "Bruno Matos",
"taxId": "617.750.603-81",
"bankInfo": { "name": "ITAÚ UNIBANCO S.A.", "spiCode": "60701190", "strCode": "341", "displayName": "ITAÚ" },
"branchCode": "1",
"endToEndId": "E60701190202610211909RAUd8SQphH8",
"accountType": "checking",
"accountNumber": "6177506031"
}
}
}A KYC lookup arrives at kycUrl like this:
{
"id": "dc4e6e65-4dc1-48bd-a50e-177e04f195ff",
"cpf": "60418443734",
"status": "APPROVED",
"addresses": {
"statusCode": "01",
"data": {
"addresses": [
{
"street": "Rua Haddock Lobo",
"number": "55",
"complement": "",
"neighborhood": "Cerqueira César",
"city": "São Paulo",
"state": "SP",
"zipCode": "01414-001",
"country": "BR",
"completeAddress": "Rua Haddock Lobo, 55, Cerqueira César, São Paulo - SP, 01414-001"
}
]
}
},
"errorList": []
}Headers
| Header | Value |
|---|---|
Content-Type | application/json |
Gaming-Operator-Token | The operator's notificationToken or, if there is none, the access token |
X-Payload-Signature | RSA signature of the body, base64. See Verify the signature |
Response and retries
Answer 2xx within 10 seconds. Any other status, a network error or a timeout counts as a failure, and Mimicr tries again with the same body and the same signature:
| Attempt | When |
|---|---|
| 1 | Right away |
| 2 | 1 minute later |
| 3 | 5 minutes later |
| 4 | 15 minutes later |
| 5 | 1 hour later |
| 6 | 3 hours later |
Okto doesn't publish its interval; this table is Mimicr's. Redirects are not followed. If the product's URL isn't set, the notification is recorded as skipped and not sent; setting the URL later doesn't resend old ones, but you can resend any of them through the control API.
The same notification can arrive more than once (retries, manual resend or the webhookDuplicateRate chaos). Use id and status to process each change only once.
Inspect and resend
curl --url 'https://api.mimicr.dev/v1/okto/deliveries?transaction_id=1268321722477579' \ --header 'Authorization: Bearer mk_...'
Each delivery carries kind, event, url, status (pending, success, failed or skipped), attempts, your application's last response, signature and body. POST /v1/okto/deliveries/{id}/resend makes a new attempt right away. To get a sample notification without touching the balance:
npx mimicr action okto notification.test kind=deposit
See Sandbox control.