# Decode Pix code (/en/docs/conta-digital/endpoints/pix/post_pix_decode)

## POST /transactions/pix/decode

`POST https://api.hub.payzu.com.br/api/v1/transactions/pix/decode`

Scope: `PIX_DICT_READ`. Extracts the data in a Pix copy-and-paste code, such as key and amount, without querying the bank. It does not count towards the request limit, does not identify the holder and does not pay anything. For a dynamic code, `pixKey` is `null` and only `url` is filled.

### Body params

| Field | Type | Required | Details |
| --- | --- | --- | --- |
| `brCode` | string | yes | Pix copy-and-paste code. — minLength: 8; maxLength: 1024 |

### Responses

**200** Decoded code.

| Field | Type | Required | Details |
| --- | --- | --- | --- |
| `pixKey` | string | null | yes | Pix key carried by the code, in full. `null` for a dynamic code. |
| `url` | string | null | yes | URL with the data of a dynamic code. `null` for a static code. |
| `amount` | integer | null | yes | Amount fixed in the code. `null` when the payer chooses. In cents. |
| `merchantName` | string | null | yes | Name written by whoever generated the code. Not verified. |
| `merchantCity` | string | null | yes | City written by whoever generated the code. Not verified. |
| `txid` | string | null | yes | Identifier the recipient put in the code. |
| `isDynamic` | boolean | yes | `true` when the code is single use. |
| `isAmountFixed` | boolean | yes | `true` when `amount` is not `null`. |

**400** Invalid request.

| Field | Type | Required | Details |
| --- | --- | --- | --- |
| `message` | string | yes | Description in Portuguese, ready to display. It may change at any time. |
| `code` | string | yes | Stable error code. Your system decides what to do based on it. |
| `details` | object | no | Structured error context, when available. |

**401** Missing, invalid or expired credential.

| Field | Type | Required | Details |
| --- | --- | --- | --- |
| `message` | string | yes | Description in Portuguese, ready to display. It may change at any time. |
| `code` | string | yes | Stable error code. Your system decides what to do based on it. |
| `details` | object | no | Structured error context, when available. |

**403** Not allowed: scope, IP or disabled operation.

| Field | Type | Required | Details |
| --- | --- | --- | --- |
| `message` | string | yes | Description in Portuguese, ready to display. It may change at any time. |
| `code` | string | yes | Stable error code. Your system decides what to do based on it. |
| `details` | object | no | Structured error context, when available. |