SonaCORE

Referência / Quadra Command API

Pix

22 operações em Quadra Command API 0.2.0.

POST/v1/pix/keys

Register a Pix key via the sponsor's DICT access

Register a Pix key (EMAIL/PHONE/CPF/CNPJ, or sponsor-minted EVP) for a CUSTOMER account. A sponsor rejection still returns 201 with the key row in REGISTRATION_FAILED — portability starts from that row.

Requires an Idempotency-Key header.

Parâmetros

NomeTipoDetalhe
Idempotency-Keystringheaderobrigatório

Corpo da requisição

PixKeyRegisterRequest — obrigatório. Os campos estão listados em Esquemas, abaixo.

Respostas

StatusCorpoDetalhe
201Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve.
422HTTPValidationErrorErro de validação
DELETE/v1/pix/keys/{key_id}

Exclude a Pix key from the DICT

Exclude an ACTIVE key (idempotent: re-DELETE of an EXCLUDED key returns 200). The ledger identity row is released — the same normalized key can be registered again on a fresh key row.

Parâmetros

NomeTipoDetalhe
key_idstringpathobrigatório

Respostas

StatusCorpoDetalhe
200Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve.
422HTTPValidationErrorErro de validação
POST/v1/pix/keys/{key_id}/portability/cancel

Cancel the key's active claim

Cancel the active claim on this key (either role).

Parâmetros

NomeTipoDetalhe
key_idstringpathobrigatório

Respostas

StatusCorpoDetalhe
200Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve.
422HTTPValidationErrorErro de validação
POST/v1/pix/keys/{key_id}/portability/claim

Open a portability claim (we are the claimer)

Start portability for a key whose registration failed because the key is owned elsewhere (REGISTRATION_FAILED row). Requires Idempotency-Key.

Parâmetros

NomeTipoDetalhe
key_idstringpathobrigatório
Idempotency-Keystringheaderobrigatório

Respostas

StatusCorpoDetalhe
201Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve.
422HTTPValidationErrorErro de validação
POST/v1/pix/keys/{key_id}/portability/confirm

Confirm the key's active claim

Confirm the active claim on this key. Serves both roles — as DONOR it lets the claim proceed; the record's role field disambiguates.

Parâmetros

NomeTipoDetalhe
key_idstringpathobrigatório

Respostas

StatusCorpoDetalhe
200Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve.
422HTTPValidationErrorErro de validação
POST/v1/pix/keys/eventsDescontinuado

Sponsor DICT key-event ingest (deprecated alias)

**Deprecated — use `POST /v1/pix/keys/events/{provider_id}`.**

Kept live through the LaaS-39 rollout; resolves the incumbent provider (`PIX_SPONSOR_ID`). Removed when LaaS-43 lands. Note that the *signature scheme* changed here even on this path. The old `X-Sim-Signature` header is no longer accepted; it carried no timestamp, so it bounded replay by nothing at all.

Parâmetros

NomeTipoDetalhe
X-Webhook-Timestampstringheaderobrigatório Unix epoch seconds, integer string. Sent by providers bound to the `timestamped_hmac_v1` strategy (the default).
X-Webhook-Signaturestringheaderobrigatório `v1=<hex(HMAC_SHA256(secret, timestamp + '.' + raw_body))>`, verified inside a freshness window. This is the `timestamped_hmac_v1` strategy; a provider bound to another strategy sends that strategy's headers instead, and the binding for `{provider_id}` decides which applies.
X-Webhook-Delivery-Idstringheader Provider delivery handle; becomes the derived idempotency key when present, else the key is derived from the body bytes.

Respostas

StatusCorpoDetalhe
200Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve.
POST/v1/pix/keys/events/{provider_id}

Sponsor DICT key-event ingest

Ingest provider key events (KEY_* / CLAIM_*). Authenticated by the verification strategy the `{provider_id}` binding selects, against that provider's own secret (LaaS-39 D4 — this route previously used a static body HMAC with no timestamp and therefore no replay bound at all). Redelivery-idempotent via a DEDUPE# row; out-of-order events no-op on the state guards (AC4).

Parâmetros

NomeTipoDetalhe
provider_idstringpathobrigatório
X-Webhook-Timestampstringheaderobrigatório Unix epoch seconds, integer string. Sent by providers bound to the `timestamped_hmac_v1` strategy (the default).
X-Webhook-Signaturestringheaderobrigatório `v1=<hex(HMAC_SHA256(secret, timestamp + '.' + raw_body))>`, verified inside a freshness window. This is the `timestamped_hmac_v1` strategy; a provider bound to another strategy sends that strategy's headers instead, and the binding for `{provider_id}` decides which applies.
X-Webhook-Delivery-Idstringheader Provider delivery handle; becomes the derived idempotency key when present, else the key is derived from the body bytes.

Respostas

StatusCorpoDetalhe
200Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve.
422HTTPValidationErrorErro de validação
GET/v1/pix/keys/lookup

Pre-payment DICT lookup

Look up a Pix key in the DICT via the sponsor: recipient display name, masked tax id, participant, and fraud markers (D8). Persists nothing — no database dependency at all; sponsor unreachable or unset → 503 (a directory read has no meaningful stub).

Parâmetros

NomeTipoDetalhe
keystringqueryobrigatório

Respostas

StatusCorpoDetalhe
200Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve.
422HTTPValidationErrorErro de validação
POST/v1/pix/mandates/{mandate_id}/authorize

Authorize a Pix Automático mandate (relayed to the sponsor)

Parâmetros

NomeTipoDetalhe
mandate_idstringpathobrigatório

Respostas

StatusCorpoDetalhe
200Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve.
422HTTPValidationErrorErro de validação
POST/v1/pix/mandates/{mandate_id}/charges/{charge_id}/cancel

Cancel a pending mandate charge pre-debit (relayed to the sponsor)

Parâmetros

NomeTipoDetalhe
mandate_idstringpathobrigatório
charge_idstringpathobrigatório

Respostas

StatusCorpoDetalhe
200Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve.
422HTTPValidationErrorErro de validação
POST/v1/pix/mandates/{mandate_id}/reject

Reject a pending Pix Automático mandate

Parâmetros

NomeTipoDetalhe
mandate_idstringpathobrigatório

Respostas

StatusCorpoDetalhe
200Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve.
422HTTPValidationErrorErro de validação
POST/v1/pix/mandates/{mandate_id}/revoke

Revoke an ACTIVE mandate (releases holds, cancels pending charges)

Parâmetros

NomeTipoDetalhe
mandate_idstringpathobrigatório

Respostas

StatusCorpoDetalhe
200Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve.
422HTTPValidationErrorErro de validação
POST/v1/pix/mandates/eventsDescontinuado

Sponsor Pix Automático event ingest (deprecated alias)

**Deprecated — use `POST /v1/pix/mandates/events/{provider_id}`.**

Kept live through the LaaS-39 rollout; resolves the incumbent provider (`PIX_SPONSOR_ID`). Removed when LaaS-43 lands. As with the key-event receiver, the *signature scheme* changed here too. The old `X-Sim-Signature` header is no longer accepted; it carried no timestamp and therefore no replay window.

Parâmetros

NomeTipoDetalhe
X-Webhook-Timestampstringheaderobrigatório Unix epoch seconds, integer string. Sent by providers bound to the `timestamped_hmac_v1` strategy (the default).
X-Webhook-Signaturestringheaderobrigatório `v1=<hex(HMAC_SHA256(secret, timestamp + '.' + raw_body))>`, verified inside a freshness window. This is the `timestamped_hmac_v1` strategy; a provider bound to another strategy sends that strategy's headers instead, and the binding for `{provider_id}` decides which applies.
X-Webhook-Delivery-Idstringheader Provider delivery handle; becomes the derived idempotency key when present, else the key is derived from the body bytes.

Respostas

StatusCorpoDetalhe
200Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve.
POST/v1/pix/mandates/events/{provider_id}

Sponsor Pix Automático mandate/charge event ingest

Ingest provider mandate events (MANDATE_* / CHARGE_*). Authenticated by the verification strategy the `{provider_id}` binding selects, against that provider's own secret (LaaS-39 D4 — this route previously used a static body HMAC with no timestamp and therefore no replay bound at all). Redelivery-idempotent via a DEDUPE# row; out-of-order events no-op on the state guards.

Parâmetros

NomeTipoDetalhe
provider_idstringpathobrigatório
X-Webhook-Timestampstringheaderobrigatório Unix epoch seconds, integer string. Sent by providers bound to the `timestamped_hmac_v1` strategy (the default).
X-Webhook-Signaturestringheaderobrigatório `v1=<hex(HMAC_SHA256(secret, timestamp + '.' + raw_body))>`, verified inside a freshness window. This is the `timestamped_hmac_v1` strategy; a provider bound to another strategy sends that strategy's headers instead, and the binding for `{provider_id}` decides which applies.
X-Webhook-Delivery-Idstringheader Provider delivery handle; becomes the derived idempotency key when present, else the key is derived from the body bytes.

Respostas

StatusCorpoDetalhe
200Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve.
422HTTPValidationErrorErro de validação
POST/v1/pix/med/cases

File a MED infraction with the sponsor

Open an OUTBOUND MED case for our customer's claim and file it with the sponsor synchronously (LaaS-16 D10). A sponsor timeout leaves the case FILING and returns 503 — the Idempotency-Key retry re-files the same case_id, which the sponsor dedupes.

Parâmetros

NomeTipoDetalhe
Idempotency-Keystringheaderobrigatório

Corpo da requisição

MedCaseCreateRequest — obrigatório. Os campos estão listados em Esquemas, abaixo.

Respostas

StatusCorpoDetalhe
201Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve.
422HTTPValidationErrorErro de validação
POST/v1/pix/med/cases/{case_id}/resolve

Resolve a MED case (RETURN or RELEASE)

RETURN executes the devolução: the block is captured to the clearing account and the capture obligation rides the deferred-dispatch lifecycle to the sponsor's return API (D8). RELEASE answers the sponsor and lifts the block. Single-shot per block — concurrent resolvers lose with 409.

Parâmetros

NomeTipoDetalhe
case_idstringpathobrigatório

Corpo da requisição

MedCaseResolveRequest — obrigatório. Os campos estão listados em Esquemas, abaixo.

Respostas

StatusCorpoDetalhe
200Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve.
422HTTPValidationErrorErro de validação
POST/v1/pix/med/eventsDescontinuado

Sponsor MED case-event receiver (deprecated alias)

**Deprecated — use `POST /v1/pix/med/events/{provider_id}`.**

Kept live through the LaaS-39 rollout so a provider already posting here is not cut off mid-flight. It resolves the incumbent provider (`PIX_SPONSOR_ID`) and behaves identically in every other respect. Removed when LaaS-43 lands.

Parâmetros

NomeTipoDetalhe
X-Webhook-Timestampstringheaderobrigatório Unix epoch seconds, integer string. Sent by providers bound to the `timestamped_hmac_v1` strategy (the default).
X-Webhook-Signaturestringheaderobrigatório `v1=<hex(HMAC_SHA256(secret, timestamp + '.' + raw_body))>`, verified inside a freshness window. This is the `timestamped_hmac_v1` strategy; a provider bound to another strategy sends that strategy's headers instead, and the binding for `{provider_id}` decides which applies.
X-Webhook-Delivery-Idstringheader Provider delivery handle; becomes the derived idempotency key when present, else the key is derived from the body bytes.

Respostas

StatusCorpoDetalhe
200Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve.
POST/v1/pix/med/events/{provider_id}

Sponsor MED case-event receiver (infractions)

Authenticated receiver for provider MED infraction/case notifications (LaaS-16 D2; per-provider since LaaS-39). Case events are NOT evidence — an infraction moves nothing at ingest — so they land here instead of the evidence pipe. Authenticated by the verification strategy the `{provider_id}` binding selects, against that provider's own secret; 2xx-on-applied.

Parâmetros

NomeTipoDetalhe
provider_idstringpathobrigatório
X-Webhook-Timestampstringheaderobrigatório Unix epoch seconds, integer string. Sent by providers bound to the `timestamped_hmac_v1` strategy (the default).
X-Webhook-Signaturestringheaderobrigatório `v1=<hex(HMAC_SHA256(secret, timestamp + '.' + raw_body))>`, verified inside a freshness window. This is the `timestamped_hmac_v1` strategy; a provider bound to another strategy sends that strategy's headers instead, and the binding for `{provider_id}` decides which applies.
X-Webhook-Delivery-Idstringheader Provider delivery handle; becomes the derived idempotency key when present, else the key is derived from the body bytes.

Respostas

StatusCorpoDetalhe
200Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve.
422HTTPValidationErrorErro de validação
POST/v1/pix/qr/{account_id}/dynamic

Create a dynamic Pix QR (sponsor-hosted single-use charge)

Create a single-use dynamic charge: Core mints the txid, the sponsor creates + hosts the JWS location document, Core persists the PIXQR# row and composes the EMV envelope locally (D3). Requires an ACTIVE Ticket-14 key owned by the account (defaulted when there is exactly one).

Requires an Idempotency-Key header.

Parâmetros

NomeTipoDetalhe
account_idstringpathobrigatório
Idempotency-Keystringheaderobrigatório

Corpo da requisição

PixQrDynamicCreateRequest — obrigatório. Os campos estão listados em Esquemas, abaixo.

Respostas

StatusCorpoDetalhe
201Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve.
422HTTPValidationErrorErro de validação
POST/v1/pix/qr/decode

Decode a scanned BR Code payload

Parse + validate any scanned BR Code locally (TLV + CRC); dynamic payloads are resolved through the sponsor — Core never fetches scanned URLs (D7). Persists nothing; malformed input -> 422 INVALID_BRCODE with a structured reason.

Corpo da requisição

PixQrDecodeRequest — obrigatório. Os campos estão listados em Esquemas, abaixo.

Respostas

StatusCorpoDetalhe
200Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve.
422HTTPValidationErrorErro de validação
POST/v1/pix/return

Initiate a devolução of a received Pix credit

Return (part of) a Pix credit this account received (LaaS-16 D4): a new counter-obligation on the deferred-dispatch lifecycle, referencing the original's E2EID. Partial and multiple returns are allowed, cumulatively capped at the original amount. Requires an Idempotency-Key header.

Parâmetros

NomeTipoDetalhe
Idempotency-Keystringheaderobrigatório

Corpo da requisição

PixReturnRequest — obrigatório. Os campos estão listados em Esquemas, abaixo.

Respostas

StatusCorpoDetalhe
201Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve.
422HTTPValidationErrorErro de validação
POST/v1/pix/webhooks/{provider_id}

Sponsor Pix inbound webhook receiver

Authenticated receiver for provider Pix webhooks (LaaS-12; per-provider since LaaS-39).

Unauthenticated at the API Gateway (authorization_type=NONE — providers cannot do Cognito client-credentials); authenticated in-handler by the verification strategy the `{provider_id}` binding selects, against that provider's own secret. The default strategy is `timestamped_hmac_v1` — LaaS-12's D6 contract, unchanged — inside a ±300 s freshness window. Routes the raw provider payload through the same in-process pipeline as ``POST /v1/evidence`` and returns a minimal ack; obligation internals never leak to the provider, and a rejection never says which check failed.

Parâmetros

NomeTipoDetalhe
provider_idstringpathobrigatório
X-Webhook-Timestampstringheaderobrigatório Unix epoch seconds, integer string. Sent by providers bound to the `timestamped_hmac_v1` strategy (the default).
X-Webhook-Signaturestringheaderobrigatório `v1=<hex(HMAC_SHA256(secret, timestamp + '.' + raw_body))>`, verified inside a freshness window. This is the `timestamped_hmac_v1` strategy; a provider bound to another strategy sends that strategy's headers instead, and the binding for `{provider_id}` decides which applies.
X-Webhook-Delivery-Idstringheader Provider delivery handle; becomes the derived idempotency key when present, else the key is derived from the body bytes.

Respostas

StatusCorpoDetalhe
200Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve.
422HTTPValidationErrorErro de validação

Esquemas

Os modelos que as operações acima aceitam e devolvem. Campos opcionais estão marcados como tal; um campo tipado como outro modelo está documentado sob o nome dele.

HTTPValidationError

CampoTipoDetalhe
detailarray de ValidationError

MedAmountModel

CampoTipoDetalhe
currencystringobrigatórioISO 4217 currency code (BRL only)
valueintegerobrigatórioAmount in centavos

MedCaseCreateRequest

POST /v1/pix/med/cases — file an infraction with the sponsor for our customer's claim about a payment they SENT (direction=OUTBOUND).

CampoTipoDetalhe
actorstringobrigatórioOperator identity
amountMedAmountModel, opcionalDisputed amount (defaults to the original amount)
original_end_to_end_idstring, opcionalE2EID of the disputed outbound payment
original_obligation_idstring, opcionalLogical obligation id (obl_*) of the disputed outbound payment
reason_codestring, opcionalInfraction reason code

MedCaseResolveRequest

POST /v1/pix/med/cases/{case_id}/resolve.

CampoTipoDetalhe
actionstringobrigatórioRETURN | RELEASE
actorstringobrigatórioOperator identity
amountMedAmountModel, opcionalRETURN only: partial capture amount (defaults to the full block)
reasonstring, opcionalFree-text resolution reason

PixKeyRegisterRequest

CampoTipoDetalhe
account_idstringobrigatório
key_type"EMAIL" | "PHONE" | "CPF" | "CNPJ" | "EVP"obrigatório
key_valuestring, opcionalRequired for EMAIL/PHONE/CPF/CNPJ; must be absent for EVP — the sponsor mints the value

PixQrDecodeRequest

CampoTipoDetalhe
brcodestringobrigatórioScanned BR Code (EMV-MPM) payload

PixQrDynamicCreateRequest

CampoTipoDetalhe
amount_centsintegerobrigatórioCharge amount in centavos
descriptionstring, opcional
expires_in_secondsintegerCharge validity window; expiry is enforced at payment time sponsor-side (D8) — stored here as data, never a timerPadrão 3600
key_idstring, opcionalReceiving key (must be ACTIVE and owned by the account). Defaulted when the account has exactly one ACTIVE key; ambiguous -> 422 KEY_AMBIGUOUS
payer_requeststring, opcionalOptional free-text prompt shown to the payer (rides the sponsor's JWS location document, not the EMV envelope)

PixReturnAmount

CampoTipoDetalhe
currencystringobrigatórioISO 4217 currency code (BRL only)
valueintegerobrigatórioAmount in centavos

PixReturnRequest

POST /v1/pix/return body. One of original_obligation_id / original_end_to_end_id identifies the credit being returned.

CampoTipoDetalhe
account_idstringobrigatórioThe account that received the original credit
amountPixReturnAmountobrigatório
original_end_to_end_idstring, opcionalE2EID of the original credit
original_obligation_idstring, opcionalLogical obligation id (obl_*) of the original credit
reason_codestring, opcionalPix return reason code (e.g. MD06)

ValidationError

CampoTipoDetalhe
ctxobject
inputnão declarado
locarray de string ou integerobrigatório
msgstringobrigatório
typestringobrigatório