Pix in
Generated HTTP reference for the 2 operations the published OpenAPI document describes under pix-status.
4 min read
Pix in
This page is generated from the published OpenAPI document. It is complete with respect to that document and says nothing about surfaces the document does not describe yet. See what is generated here for what that means.
Base URL: https://api.codespar.dev
Every operation below requires a Bearer token. See Authentication.
GET /v1/consumers/{consumerId}/pix/charges/{reference}
GET
https://api.codespar.dev/v1/consumers/{consumerId}/pix/charges/{reference}A minted Pix charge's state
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
consumerId | string | yes | — |
reference | string | yes | The charge id, the mint's transaction id, or its client request id. Up to 128 characters of letters, digits, _ and -. |
Responses
| Status | Body | Description |
|---|---|---|
200 | object | OK |
400 | object | reference does not look like any of the three identifiers this route resolves. |
404 | object | No Pix charge with this reference. Deliberately the same answer for a charge another organization holds. |
409 | object | The reference matches more than one charge, because one value can sit in one row's transaction id and another row's client request id. Query by the charge id instead. |
500 | object | The charge status could not be read. |
502 | object | The provider consult did not answer, or it answered for a DIFFERENT cob than this charge and was refused rather than reported as this charge's state. Nothing about the charge was changed; retry later. details.reason names which of the two it was. |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
amount_minor | integer | yes | — |
charge_id | string | yes | — |
client_request_id | string,null | yes | Null for a static cob. |
created_at | string (date-time) | yes | — |
currency | string | yes | — |
provider | object,null | yes | Null when the provider was not consulted: the charge is already terminal on our books, or it is a static cob carrying no identifier the consult accepts. |
settled_at | string,null (date-time) | yes | — |
status | string | yes | Our books: pending, settled or expired. Left open rather than enumerated because the value is carried as a plain string end to end. |
status_message | string | yes | Prose written for the caller, explaining what the combination above does and does not prove. |
transaction_id | string,null | yes | The provider transaction id recorded at mint. |
wallet_id | string | yes | — |
Example request
curl -X GET https://api.codespar.dev/v1/consumers/{consumerId}/pix/charges/{reference} \
-H "Authorization: Bearer $CODESPAR_API_KEY"const res = await fetch("https://api.codespar.dev/v1/consumers/{consumerId}/pix/charges/{reference}", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.CODESPAR_API_KEY}`,
},
});
const data = await res.json();Example response 200
{
"charge_id": "charge_0000000000000000",
"status": "string",
"amount_minor": 1000,
"currency": "BRL",
"wallet_id": "wlt_0000000000000000",
"created_at": "2026-01-15T12:00:00.000Z",
"provider": {
"result": "ok",
"identity_verified": true
},
"status_message": "string"
}GET /v1/consumers/{consumerId}/pix/receivements/{endToEndId}
GET
https://api.codespar.dev/v1/consumers/{consumerId}/pix/receivements/{endToEndId}Did this specific Pix land on this consumer's account
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
consumerId | string | yes | — |
endToEndId | string | yes | The payment's end-to-end id, the reference the payer's receipt carries. 16 to 64 alphanumeric characters. |
Responses
| Status | Body | Description |
|---|---|---|
200 | object | OK |
400 | object | endToEndId does not have the shape of an end-to-end id. |
404 | object | No receivement with this end-to-end id on this consumer's account. Also the answer when the movement exists but belongs to another account, which is what keeps a bearer identifier from probing across tenants. |
409 | object | The consumer has no active Pix funding source, so there is no account to bind the answer to. Checked BEFORE the provider is queried, so an unbindable consumer never causes a lookup on a bearer identifier. |
500 | object | The receivement status could not be read. |
502 | object | The provider consult did not answer, or answered in a shape this backend cannot tenant-bind or cannot classify. Fail-closed in all three cases; details.reason names which. |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
amount_minor | integer,null | yes | Minor-unit truth from OUR charge row. Null when uncorrelated. |
charge_id | string,null | yes | — |
charge_status | string,null | yes | — |
correlation | "charge_matched" | "no_correlator_returned" | "no_charge_matched" | "charge_ambiguous" | "not_attempted" | yes | How this receivement was tied to a charge on our books. None of the empty outcomes proves a credit is not coming: the reconciler matches the account STATEMENT on a field this consult never returns. |
devolutions | array of object | yes | Our devolution rows keyed on this end-to-end id, whatever the movement type is. |
end_to_end_id | string | yes | — |
initiation_type | string,null | yes | — |
provider_amount | — | no | The provider's own representation of the amount, passed through unconverted. |
provider_transaction_id | string,null | yes | — |
provider_transaction_type | string | yes | The provider's discriminator, verbatim. |
received | boolean | yes | True only when the provider classifies the movement as the homologated inbound type. A movement of another type on the same account (a reversal of a Pix the consumer SENT, for one) answers false with the type named below. |
status_message | string | yes | — |
transaction_id_brcode | string,null | yes | — |
transaction_identification | string,null | yes | — |
wallet_credited | boolean | yes | — |
wallet_id | string,null | yes | — |
Example request
curl -X GET https://api.codespar.dev/v1/consumers/{consumerId}/pix/receivements/{endToEndId} \
-H "Authorization: Bearer $CODESPAR_API_KEY"const res = await fetch("https://api.codespar.dev/v1/consumers/{consumerId}/pix/receivements/{endToEndId}", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.CODESPAR_API_KEY}`,
},
});
const data = await res.json();Example response 200
{
"end_to_end_id": "endtoend_0000000000000000",
"received": true,
"provider_transaction_type": "string",
"correlation": "charge_matched",
"wallet_credited": true,
"devolutions": [
{
"devolution_id": "devolution_0000000000000000",
"status": "string",
"amount_minor": 1000
}
],
"status_message": "string"
}