Skip to main content

Pix in

Generated HTTP reference for the 2 operations the published OpenAPI document describes under pix-status.

4 min read
View MarkdownEdit on GitHub

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}

GEThttps://api.codespar.dev/v1/consumers/{consumerId}/pix/charges/{reference}

A minted Pix charge's state

Path parameters

NameTypeRequiredDescription
consumerIdstringyes
referencestringyesThe charge id, the mint's transaction id, or its client request id. Up to 128 characters of letters, digits, _ and -.

Responses

StatusBodyDescription
200objectOK
400objectreference does not look like any of the three identifiers this route resolves.
404objectNo Pix charge with this reference. Deliberately the same answer for a charge another organization holds.
409objectThe 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.
500objectThe charge status could not be read.
502objectThe 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

FieldTypeRequiredDescription
amount_minorintegeryes
charge_idstringyes
client_request_idstring,nullyesNull for a static cob.
created_atstring (date-time)yes
currencystringyes
providerobject,nullyesNull 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_atstring,null (date-time)yes
statusstringyesOur books: pending, settled or expired. Left open rather than enumerated because the value is carried as a plain string end to end.
status_messagestringyesProse written for the caller, explaining what the combination above does and does not prove.
transaction_idstring,nullyesThe provider transaction id recorded at mint.
wallet_idstringyes
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
application/json
{
  "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}

GEThttps://api.codespar.dev/v1/consumers/{consumerId}/pix/receivements/{endToEndId}

Did this specific Pix land on this consumer's account

Path parameters

NameTypeRequiredDescription
consumerIdstringyes
endToEndIdstringyesThe payment's end-to-end id, the reference the payer's receipt carries. 16 to 64 alphanumeric characters.

Responses

StatusBodyDescription
200objectOK
400objectendToEndId does not have the shape of an end-to-end id.
404objectNo 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.
409objectThe 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.
500objectThe receivement status could not be read.
502objectThe 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

FieldTypeRequiredDescription
amount_minorinteger,nullyesMinor-unit truth from OUR charge row. Null when uncorrelated.
charge_idstring,nullyes
charge_statusstring,nullyes
correlation"charge_matched" | "no_correlator_returned" | "no_charge_matched" | "charge_ambiguous" | "not_attempted"yesHow 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.
devolutionsarray of objectyesOur devolution rows keyed on this end-to-end id, whatever the movement type is.
end_to_end_idstringyes
initiation_typestring,nullyes
provider_amountnoThe provider's own representation of the amount, passed through unconverted.
provider_transaction_idstring,nullyes
provider_transaction_typestringyesThe provider's discriminator, verbatim.
receivedbooleanyesTrue 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_messagestringyes
transaction_id_brcodestring,nullyes
transaction_identificationstring,nullyes
wallet_creditedbooleanyes
wallet_idstring,nullyes
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
application/json
{
  "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"
}
Pix in | CodeSpar