Pix out
Generated HTTP reference for the 1 operation the published OpenAPI document describes under pix-devolutions.
2 min read
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}
GET
https://api.codespar.dev/v1/consumers/{consumerId}/pix/devolutions/{devolutionId}A Pix devolution's state
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
consumerId | string | yes | — |
devolutionId | string | yes | — |
Responses
| Status | Body | Description |
|---|---|---|
200 | object | OK |
404 | object | Not a known devolution for this consumer. The same opaque answer for a truly unknown id and for another tenant's. |
500 | object | The devolution status could not be read. |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
amount_minor | integer | yes | — |
charge_id | string,null | yes | — |
client_code | string | yes | The server-minted idempotency correlation sent upstream. |
created_at | string (date-time) | yes | — |
currency | "BRL" | yes | — |
devolution_id | string | yes | — |
end_to_end_id | string | yes | — |
failure_reason | string,null | yes | — |
idempotent_replay | boolean | yes | Always false on this read. The field is meaningful on the create, not here. |
original_payment_id | string,null | yes | — |
payment_direction | "inbound" | "outbound" | yes | Which 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" | yes | Where 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. |
reason | string | yes | The Pix return code. |
return_identification | string,null | yes | — |
settled_at | string,null (date-time) | yes | — |
status | "pending" | "accepted" | "settled" | "failed" | "uncertain" | yes | The five values the table's CHECK constraint admits. |
status_message | string | yes | — |
wallet_id | string,null | yes | — |
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
{
"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"
}