> This page is for BaaS.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://en.docs.api.corpx.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://en.docs.api.corpx.com/_mcp/server.

# Decode a Pix QR Code (EMV)

POST https://tenant.api.corpx.com/v1/accounts/{accountId}/pix/out/qr-code/decode
Content-Type: application/json

Decodes a PIX QR Code EMV string and returns the beneficiary details without executing payment.

Use this endpoint to display QR Code information to the user before confirming payment.
The decoded data includes beneficiary name, document, bank info, amount, and PIX key.

After reviewing the decoded data, use
`POST /v1/accounts/{accountId}/pix/out/qr-code/async` to execute the payment
(the synchronous `/pix/out/qr-code` is deprecated).

Reference: https://en.docs.api.corpx.com/baas/referencia/pix/decode-pix-qr-code

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `accountId` (string, required) — Account identifier.

### Headers

- `X-Tenant-Id` (string, required) — Tenant context used for authorization and routing.
- `Idempotency-Key` (string, optional) — Optional client-generated idempotency token (recommended for safe retries).

### Body (application/json)

This endpoint expects an object.

- `emv` (string, required) — The EMV string from the QR Code (copy and paste content).

## Response

### 200

QR Code decoded successfully.

- `key` (string, optional) — PIX key of the beneficiary (email, phone, CPF/CNPJ, or EVP).
- `amount` (double, optional) — Payment amount in BRL. May be `0` for static QR Codes without a predefined value. For `dynamic-due-date`, this is the **final value** to pay (`originalAmount - discount - deduction + interest + penalty`).
- `originalAmount` (double, optional) — Original face value of the QR before discount/interest/penalty are applied. For `static` and `dynamic-immediate` this equals `amount`.
- `identifier` (string, optional) — Reusable decode identifier. Same value as `decodeId`. Can be sent as `decodeId` in `POST /v1/accounts/{accountId}/pix/out/qr-code/async` (or the deprecated sync `/pix/out/qr-code`) to skip a second decode round-trip.
- `decodeId` (string, optional) — Alias of `identifier`, preserved for backward compatibility.
- `qrCodeType` (enum, optional) — Variant of the QR. Determines which optional fields are populated.
  - Allowed values: `static`, `dynamic-immediate`, `dynamic-due-date`
- `qrCodeTypeId` (integer, optional) — Numeric type id returned by the partner (kept for parity with raw payloads).
- `allowChange` (boolean, optional) — Whether the payer can modify the payment amount (`dynamic-immediate` only). Always present; `false` for variants where the partner does not return it.
- `description` (string, optional) — Free-text payment message embedded in the QR (when present).
- `payeeName` (string, optional) — Full legal name of the beneficiary.
- `payeeTradeName` (string, optional) — Trade / fantasy name of the beneficiary (typically populated for `dynamic-due-date` invoices).
- `payeeDocument` (string, optional) — CPF or CNPJ of the beneficiary.
- `bankIspb` (string, optional) — ISPB code of the beneficiary's bank.
- `bankBranch` (string, optional) — Bank branch of the beneficiary.
- `bankAccount` (string, optional) — Bank account number of the beneficiary.
- `accountType` (enum, optional) — Canonicalised account type of the beneficiary. Other values may appear in upper snake-case if the partner introduces new types.
  - Allowed values: `CHECKING`, `SAVINGS`, `PAYMENT`, `SALARY`
- `discount` (double, optional) — Discount amount to subtract from `originalAmount` (only `dynamic-due-date`).
- `deduction` (double, optional) — Deduction amount to subtract from `originalAmount` (only `dynamic-due-date`).
- `interest` (double, optional) — Interest amount to add to `originalAmount` (only `dynamic-due-date`).
- `penalty` (double, optional) — Late-payment penalty amount to add to `originalAmount` (only `dynamic-due-date`).
- `dueDate` (string, optional) — Due date of the charge in ISO 8601 / RFC 3339 (`YYYY-MM-DD` or full datetime, only `dynamic-due-date`).
- `paymentDeadline` (string, optional) — Last accepted payment date (grace period after `dueDate`). Only `dynamic-due-date`.

## Errors

### 400 Bad Request Error

Invalid request (missing or malformed EMV).

- `errorCode` (string, required) — Stable machine-readable code. See `ErrorCode` for the known values.
- `message` (string, required) — Human-readable explanation (pt-BR). Presentation only; may change.
- `docs` (string, optional) — Link to this code in the public error catalogue.
- `requestId` (string, optional) — Gateway request id. Quote it when contacting support.
- `details` (map from string to any, optional) — Optional machine-readable context for the specific `errorCode` (for example `kind` on `identity_verification_monthly_limit_exceeded`, `maxBytes` on `payload_too_large`, `attemptsRemaining` on `facetec_attempts_exhausted`). Keys are documented per operation; absent when the code carries no extra context.
- `partner` (ErrorResponsePartner, optional) — Raw error from the settlement bank, when the failure came from it. Diagnostic only.

### 422 Unprocessable Entity Error

QR code rejected or invalid according to partner validation.

- `errorCode` (string, required) — Stable machine-readable code. See `ErrorCode` for the known values.
- `message` (string, required) — Human-readable explanation (pt-BR). Presentation only; may change.
- `docs` (string, optional) — Link to this code in the public error catalogue.
- `requestId` (string, optional) — Gateway request id. Quote it when contacting support.
- `details` (map from string to any, optional) — Optional machine-readable context for the specific `errorCode` (for example `kind` on `identity_verification_monthly_limit_exceeded`, `maxBytes` on `payload_too_large`, `attemptsRemaining` on `facetec_attempts_exhausted`). Keys are documented per operation; absent when the code carries no extra context.
- `partner` (ErrorResponsePartner, optional) — Raw error from the settlement bank, when the failure came from it. Diagnostic only.

### 500 Internal Server Error

Unexpected server error.

- `errorCode` (string, required) — Stable machine-readable code. See `ErrorCode` for the known values.
- `message` (string, required) — Human-readable explanation (pt-BR). Presentation only; may change.
- `docs` (string, optional) — Link to this code in the public error catalogue.
- `requestId` (string, optional) — Gateway request id. Quote it when contacting support.
- `details` (map from string to any, optional) — Optional machine-readable context for the specific `errorCode` (for example `kind` on `identity_verification_monthly_limit_exceeded`, `maxBytes` on `payload_too_large`, `attemptsRemaining` on `facetec_attempts_exhausted`). Keys are documented per operation; absent when the code carries no extra context.
- `partner` (ErrorResponsePartner, optional) — Raw error from the settlement bank, when the failure came from it. Diagnostic only.

### 503 Service Unavailable Error

Partner temporarily unavailable.

- `errorCode` (string, required) — Stable machine-readable code. See `ErrorCode` for the known values.
- `message` (string, required) — Human-readable explanation (pt-BR). Presentation only; may change.
- `docs` (string, optional) — Link to this code in the public error catalogue.
- `requestId` (string, optional) — Gateway request id. Quote it when contacting support.
- `details` (map from string to any, optional) — Optional machine-readable context for the specific `errorCode` (for example `kind` on `identity_verification_monthly_limit_exceeded`, `maxBytes` on `payload_too_large`, `attemptsRemaining` on `facetec_attempts_exhausted`). Keys are documented per operation; absent when the code carries no extra context.
- `partner` (ErrorResponsePartner, optional) — Raw error from the settlement bank, when the failure came from it. Diagnostic only.

### 504 Gateway Timeout Error

Timeout while contacting banking partner.

- `errorCode` (string, required) — Stable machine-readable code. See `ErrorCode` for the known values.
- `message` (string, required) — Human-readable explanation (pt-BR). Presentation only; may change.
- `docs` (string, optional) — Link to this code in the public error catalogue.
- `requestId` (string, optional) — Gateway request id. Quote it when contacting support.
- `details` (map from string to any, optional) — Optional machine-readable context for the specific `errorCode` (for example `kind` on `identity_verification_monthly_limit_exceeded`, `maxBytes` on `payload_too_large`, `attemptsRemaining` on `facetec_attempts_exhausted`). Keys are documented per operation; absent when the code carries no extra context.
- `partner` (ErrorResponsePartner, optional) — Raw error from the settlement bank, when the failure came from it. Diagnostic only.

## Types

### ErrorResponsePartner

Raw error from the settlement bank, when the failure came from it. Diagnostic only.

- `code` (string, optional)
- `message` (string, optional)
- `field` (string, optional) — Field the partner pointed at, when any.

## Examples

### Decoded QR Code (dynamic-immediate)

**Response**

```json
{
  "key": "123e4567-e89b-12d3-a456-426614174000",
  "amount": 150,
  "originalAmount": 150,
  "identifier": "8e4d8c19-1d3f-4b22-bf6f-79a4d0e1f001",
  "decodeId": "8e4d8c19-1d3f-4b22-bf6f-79a4d0e1f001",
  "qrCodeType": "dynamic-immediate",
  "qrCodeTypeId": 1,
  "allowChange": false,
  "description": "Online purchase payment",
  "payeeName": "EMPRESA EXEMPLO LTDA",
  "payeeDocument": "12345678000190",
  "bankIspb": "50871921",
  "bankBranch": "0001",
  "bankAccount": "123456-7",
  "accountType": "CHECKING"
}
```

**SDK Code**

```python Decoded QR Code (dynamic-immediate)
import requests

url = "https://tenant.api.corpx.com/v1/accounts/accountId/pix/out/qr-code/decode"

headers = {
    "X-Tenant-Id": "X-Tenant-Id",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript Decoded QR Code (dynamic-immediate)
const url = 'https://tenant.api.corpx.com/v1/accounts/accountId/pix/out/qr-code/decode';
const options = {
  method: 'POST',
  headers: {'X-Tenant-Id': 'X-Tenant-Id', Authorization: 'Bearer <token>'}
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Decoded QR Code (dynamic-immediate)
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://tenant.api.corpx.com/v1/accounts/accountId/pix/out/qr-code/decode"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("X-Tenant-Id", "X-Tenant-Id")
	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Decoded QR Code (dynamic-immediate)
require 'uri'
require 'net/http'

url = URI("https://tenant.api.corpx.com/v1/accounts/accountId/pix/out/qr-code/decode")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-Tenant-Id"] = 'X-Tenant-Id'
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Decoded QR Code (dynamic-immediate)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://tenant.api.corpx.com/v1/accounts/accountId/pix/out/qr-code/decode")
  .header("X-Tenant-Id", "X-Tenant-Id")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Decoded QR Code (dynamic-immediate)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://tenant.api.corpx.com/v1/accounts/accountId/pix/out/qr-code/decode', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'X-Tenant-Id' => 'X-Tenant-Id',
  ],
]);

echo $response->getBody();
```

```csharp Decoded QR Code (dynamic-immediate)
using RestSharp;

var client = new RestClient("https://tenant.api.corpx.com/v1/accounts/accountId/pix/out/qr-code/decode");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Tenant-Id", "X-Tenant-Id");
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Decoded QR Code (dynamic-immediate)
import Foundation

let headers = [
  "X-Tenant-Id": "X-Tenant-Id",
  "Authorization": "Bearer <token>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://tenant.api.corpx.com/v1/accounts/accountId/pix/out/qr-code/decode")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Decoded QR Code (dynamic-due-date)

**Response**

```json
{
  "key": "123e4567-e89b-12d3-a456-426614174000",
  "amount": 148.5,
  "originalAmount": 150,
  "identifier": "5b1c1c0c-1d3f-4b22-bf6f-79a4d0e1f002",
  "decodeId": "5b1c1c0c-1d3f-4b22-bf6f-79a4d0e1f002",
  "qrCodeType": "dynamic-due-date",
  "qrCodeTypeId": 2,
  "allowChange": false,
  "description": "Invoice #4567",
  "payeeName": "EMPRESA EXEMPLO LTDA",
  "payeeTradeName": "Loja Exemplo",
  "payeeDocument": "12345678000190",
  "bankIspb": "50871921",
  "bankBranch": "0001",
  "bankAccount": "987654-3",
  "accountType": "CHECKING",
  "discount": 5,
  "deduction": 0,
  "interest": 2.5,
  "penalty": 1,
  "dueDate": "2026-06-15",
  "paymentDeadline": "2026-06-20"
}
```

**SDK Code**

```python Decoded QR Code (dynamic-due-date)
import requests

url = "https://tenant.api.corpx.com/v1/accounts/accountId/pix/out/qr-code/decode"

headers = {
    "X-Tenant-Id": "X-Tenant-Id",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript Decoded QR Code (dynamic-due-date)
const url = 'https://tenant.api.corpx.com/v1/accounts/accountId/pix/out/qr-code/decode';
const options = {
  method: 'POST',
  headers: {'X-Tenant-Id': 'X-Tenant-Id', Authorization: 'Bearer <token>'}
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Decoded QR Code (dynamic-due-date)
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://tenant.api.corpx.com/v1/accounts/accountId/pix/out/qr-code/decode"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("X-Tenant-Id", "X-Tenant-Id")
	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Decoded QR Code (dynamic-due-date)
require 'uri'
require 'net/http'

url = URI("https://tenant.api.corpx.com/v1/accounts/accountId/pix/out/qr-code/decode")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-Tenant-Id"] = 'X-Tenant-Id'
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Decoded QR Code (dynamic-due-date)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://tenant.api.corpx.com/v1/accounts/accountId/pix/out/qr-code/decode")
  .header("X-Tenant-Id", "X-Tenant-Id")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Decoded QR Code (dynamic-due-date)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://tenant.api.corpx.com/v1/accounts/accountId/pix/out/qr-code/decode', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'X-Tenant-Id' => 'X-Tenant-Id',
  ],
]);

echo $response->getBody();
```

```csharp Decoded QR Code (dynamic-due-date)
using RestSharp;

var client = new RestClient("https://tenant.api.corpx.com/v1/accounts/accountId/pix/out/qr-code/decode");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Tenant-Id", "X-Tenant-Id");
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Decoded QR Code (dynamic-due-date)
import Foundation

let headers = [
  "X-Tenant-Id": "X-Tenant-Id",
  "Authorization": "Bearer <token>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://tenant.api.corpx.com/v1/accounts/accountId/pix/out/qr-code/decode")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Decode a dynamic QR Code

**Request**

```json
{
  "emv": "00020126580014br.gov.bcb.pix0136123e4567-e89b-12d3-a456-426614174000520400005303986540510.005802BR5913Example Store6008Sao Paulo62070503***6304ABCD"
}
```

**Response**

```json
{
  "key": "123e4567-e89b-12d3-a456-426614174000",
  "amount": 150,
  "originalAmount": 150,
  "identifier": "8e4d8c19-1d3f-4b22-bf6f-79a4d0e1f001",
  "decodeId": "8e4d8c19-1d3f-4b22-bf6f-79a4d0e1f001",
  "qrCodeType": "dynamic-immediate",
  "qrCodeTypeId": 1,
  "allowChange": false,
  "description": "Online purchase payment",
  "payeeName": "EMPRESA EXEMPLO LTDA",
  "payeeDocument": "12345678000190",
  "bankIspb": "50871921",
  "bankBranch": "0001",
  "bankAccount": "123456-7",
  "accountType": "CHECKING"
}
```

**SDK Code**

```python Decode a dynamic QR Code
import requests

url = "https://tenant.api.corpx.com/v1/accounts/accountId/pix/out/qr-code/decode"

payload = { "emv": "00020126580014br.gov.bcb.pix0136123e4567-e89b-12d3-a456-426614174000520400005303986540510.005802BR5913Example Store6008Sao Paulo62070503***6304ABCD" }
headers = {
    "X-Tenant-Id": "X-Tenant-Id",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Decode a dynamic QR Code
const url = 'https://tenant.api.corpx.com/v1/accounts/accountId/pix/out/qr-code/decode';
const options = {
  method: 'POST',
  headers: {
    'X-Tenant-Id': 'X-Tenant-Id',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"emv":"00020126580014br.gov.bcb.pix0136123e4567-e89b-12d3-a456-426614174000520400005303986540510.005802BR5913Example Store6008Sao Paulo62070503***6304ABCD"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Decode a dynamic QR Code
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://tenant.api.corpx.com/v1/accounts/accountId/pix/out/qr-code/decode"

	payload := strings.NewReader("{\n  \"emv\": \"00020126580014br.gov.bcb.pix0136123e4567-e89b-12d3-a456-426614174000520400005303986540510.005802BR5913Example Store6008Sao Paulo62070503***6304ABCD\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-Tenant-Id", "X-Tenant-Id")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Decode a dynamic QR Code
require 'uri'
require 'net/http'

url = URI("https://tenant.api.corpx.com/v1/accounts/accountId/pix/out/qr-code/decode")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-Tenant-Id"] = 'X-Tenant-Id'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"emv\": \"00020126580014br.gov.bcb.pix0136123e4567-e89b-12d3-a456-426614174000520400005303986540510.005802BR5913Example Store6008Sao Paulo62070503***6304ABCD\"\n}"

response = http.request(request)
puts response.read_body
```

```java Decode a dynamic QR Code
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://tenant.api.corpx.com/v1/accounts/accountId/pix/out/qr-code/decode")
  .header("X-Tenant-Id", "X-Tenant-Id")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"emv\": \"00020126580014br.gov.bcb.pix0136123e4567-e89b-12d3-a456-426614174000520400005303986540510.005802BR5913Example Store6008Sao Paulo62070503***6304ABCD\"\n}")
  .asString();
```

```php Decode a dynamic QR Code
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://tenant.api.corpx.com/v1/accounts/accountId/pix/out/qr-code/decode', [
  'body' => '{
  "emv": "00020126580014br.gov.bcb.pix0136123e4567-e89b-12d3-a456-426614174000520400005303986540510.005802BR5913Example Store6008Sao Paulo62070503***6304ABCD"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'X-Tenant-Id' => 'X-Tenant-Id',
  ],
]);

echo $response->getBody();
```

```csharp Decode a dynamic QR Code
using RestSharp;

var client = new RestClient("https://tenant.api.corpx.com/v1/accounts/accountId/pix/out/qr-code/decode");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Tenant-Id", "X-Tenant-Id");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"emv\": \"00020126580014br.gov.bcb.pix0136123e4567-e89b-12d3-a456-426614174000520400005303986540510.005802BR5913Example Store6008Sao Paulo62070503***6304ABCD\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Decode a dynamic QR Code
import Foundation

let headers = [
  "X-Tenant-Id": "X-Tenant-Id",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["emv": "00020126580014br.gov.bcb.pix0136123e4567-e89b-12d3-a456-426614174000520400005303986540510.005802BR5913Example Store6008Sao Paulo62070503***6304ABCD"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://tenant.api.corpx.com/v1/accounts/accountId/pix/out/qr-code/decode")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```