Skip to main content

Pix out

Generated HTTP reference for the 1 operation the published OpenAPI document describes under pix-devolutions.

2 min read
View MarkdownEdit on GitHub

Pix out

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/devolutions/{devolutionId}

GEThttps://api.codespar.dev/v1/consumers/{consumerId}/pix/devolutions/{devolutionId}

A Pix devolution's state

Path parameters

NameTypeRequiredDescription
consumerIdstringyes
devolutionIdstringyes

Responses

StatusBodyDescription
200objectOK
404objectNot a known devolution for this consumer. The same opaque answer for a truly unknown id and for another tenant's.
500objectThe devolution status could not be read.

Response 200

FieldTypeRequiredDescription
amount_minorintegeryes
charge_idstring,nullyes
client_codestringyesThe server-minted idempotency correlation sent upstream.
created_atstring (date-time)yes
currency"BRL"yes
devolution_idstringyes
end_to_end_idstringyes
failure_reasonstring,nullyes
idempotent_replaybooleanyesAlways false on this read. The field is meaningful on the create, not here.
original_payment_idstring,nullyes
payment_direction"inbound" | "outbound"yesWhich side of the rail the ORIGINAL payment was on. inbound: the consumer received it and the money goes back to its payer. outbound: the consumer sent it and the money returns to the consumer.
provider_truth"statement" | "unavailable" | "not_checked"yesWhere the state above came from. not_checked: the row is already terminal. statement: the consumer's own account statement was read and settled the row if it showed the reversal. unavailable: the statement could not be fetched, so the recorded state is returned unchanged. A statement failure degrades this field; it never turns the read into an error.
reasonstringyesThe Pix return code.
return_identificationstring,nullyes
settled_atstring,null (date-time)yes
status"pending" | "accepted" | "settled" | "failed" | "uncertain"yesThe five values the table's CHECK constraint admits.
status_messagestringyes
wallet_idstring,nullyes
Example request
curl -X GET https://api.codespar.dev/v1/consumers/{consumerId}/pix/devolutions/{devolutionId} \
  -H "Authorization: Bearer $CODESPAR_API_KEY"
const res = await fetch("https://api.codespar.dev/v1/consumers/{consumerId}/pix/devolutions/{devolutionId}", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.CODESPAR_API_KEY}`,
  },
});

const data = await res.json();
Example response 200
application/json
{
  "devolution_id": "devolution_0000000000000000",
  "status": "pending",
  "payment_direction": "inbound",
  "end_to_end_id": "endtoend_0000000000000000",
  "amount_minor": 1000,
  "currency": "BRL",
  "reason": "string",
  "client_code": "string",
  "created_at": "2026-01-15T12:00:00.000Z",
  "idempotent_replay": true,
  "status_message": "string",
  "provider_truth": "statement"
}
Pix out | CodeSpar