Confirmar pagamento Pix por QR Code
curl --request POST \
--url http://localhost:3030/v1/payouts/pix-qr \
--header 'Content-Type: application/json' \
--header 'x-client-id: <api-key>' \
--header 'x-client-secret: <api-key>' \
--header 'x-turbofy-signature: <x-turbofy-signature>' \
--header 'x-turbofy-timestamp: <x-turbofy-timestamp>' \
--data '
{
"previewId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "<string>"
}
'import requests
url = "http://localhost:3030/v1/payouts/pix-qr"
payload = {
"previewId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "<string>"
}
headers = {
"x-client-id": "<api-key>",
"x-client-secret": "<api-key>",
"x-turbofy-timestamp": "<x-turbofy-timestamp>",
"x-turbofy-signature": "<x-turbofy-signature>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-client-id': '<api-key>',
'x-client-secret': '<api-key>',
'x-turbofy-timestamp': '<x-turbofy-timestamp>',
'x-turbofy-signature': '<x-turbofy-signature>',
'Content-Type': 'application/json'
},
body: JSON.stringify({previewId: '3c90c3cc-0d44-4b50-8888-8dd25736052a', idempotencyKey: '<string>'})
};
fetch('http://localhost:3030/v1/payouts/pix-qr', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3030",
CURLOPT_URL => "http://localhost:3030/v1/payouts/pix-qr",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'previewId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'idempotencyKey' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-client-id: <api-key>",
"x-client-secret: <api-key>",
"x-turbofy-signature: <x-turbofy-signature>",
"x-turbofy-timestamp: <x-turbofy-timestamp>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3030/v1/payouts/pix-qr"
payload := strings.NewReader("{\n \"previewId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"idempotencyKey\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-client-id", "<api-key>")
req.Header.Add("x-client-secret", "<api-key>")
req.Header.Add("x-turbofy-timestamp", "<x-turbofy-timestamp>")
req.Header.Add("x-turbofy-signature", "<x-turbofy-signature>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3030/v1/payouts/pix-qr")
.header("x-client-id", "<api-key>")
.header("x-client-secret", "<api-key>")
.header("x-turbofy-timestamp", "<x-turbofy-timestamp>")
.header("x-turbofy-signature", "<x-turbofy-signature>")
.header("Content-Type", "application/json")
.body("{\n \"previewId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"idempotencyKey\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3030/v1/payouts/pix-qr")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["x-client-id"] = '<api-key>'
request["x-client-secret"] = '<api-key>'
request["x-turbofy-timestamp"] = '<x-turbofy-timestamp>'
request["x-turbofy-signature"] = '<x-turbofy-signature>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"previewId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"idempotencyKey\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"paymentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "QUEUED",
"amountCents": 1,
"feeCents": 1,
"totalDebitedCents": 1,
"currency": "BRL",
"endToEndId": "<string>",
"failureCode": "<string>"
}{
"paymentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "QUEUED",
"amountCents": 1,
"feeCents": 1,
"totalDebitedCents": 1,
"currency": "BRL",
"endToEndId": "<string>",
"failureCode": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Payouts
Solicitar pagamento por QR Pix
Confirma uma prévia válida e inicia o pagamento por QR Pix com idempotência.
POST
/
v1
/
payouts
/
pix-qr
Confirmar pagamento Pix por QR Code
curl --request POST \
--url http://localhost:3030/v1/payouts/pix-qr \
--header 'Content-Type: application/json' \
--header 'x-client-id: <api-key>' \
--header 'x-client-secret: <api-key>' \
--header 'x-turbofy-signature: <x-turbofy-signature>' \
--header 'x-turbofy-timestamp: <x-turbofy-timestamp>' \
--data '
{
"previewId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "<string>"
}
'import requests
url = "http://localhost:3030/v1/payouts/pix-qr"
payload = {
"previewId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "<string>"
}
headers = {
"x-client-id": "<api-key>",
"x-client-secret": "<api-key>",
"x-turbofy-timestamp": "<x-turbofy-timestamp>",
"x-turbofy-signature": "<x-turbofy-signature>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-client-id': '<api-key>',
'x-client-secret': '<api-key>',
'x-turbofy-timestamp': '<x-turbofy-timestamp>',
'x-turbofy-signature': '<x-turbofy-signature>',
'Content-Type': 'application/json'
},
body: JSON.stringify({previewId: '3c90c3cc-0d44-4b50-8888-8dd25736052a', idempotencyKey: '<string>'})
};
fetch('http://localhost:3030/v1/payouts/pix-qr', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3030",
CURLOPT_URL => "http://localhost:3030/v1/payouts/pix-qr",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'previewId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'idempotencyKey' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-client-id: <api-key>",
"x-client-secret: <api-key>",
"x-turbofy-signature: <x-turbofy-signature>",
"x-turbofy-timestamp: <x-turbofy-timestamp>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3030/v1/payouts/pix-qr"
payload := strings.NewReader("{\n \"previewId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"idempotencyKey\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-client-id", "<api-key>")
req.Header.Add("x-client-secret", "<api-key>")
req.Header.Add("x-turbofy-timestamp", "<x-turbofy-timestamp>")
req.Header.Add("x-turbofy-signature", "<x-turbofy-signature>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3030/v1/payouts/pix-qr")
.header("x-client-id", "<api-key>")
.header("x-client-secret", "<api-key>")
.header("x-turbofy-timestamp", "<x-turbofy-timestamp>")
.header("x-turbofy-signature", "<x-turbofy-signature>")
.header("Content-Type", "application/json")
.body("{\n \"previewId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"idempotencyKey\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3030/v1/payouts/pix-qr")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["x-client-id"] = '<api-key>'
request["x-client-secret"] = '<api-key>'
request["x-turbofy-timestamp"] = '<x-turbofy-timestamp>'
request["x-turbofy-signature"] = '<x-turbofy-signature>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"previewId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"idempotencyKey\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"paymentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "QUEUED",
"amountCents": 1,
"feeCents": 1,
"totalDebitedCents": 1,
"currency": "BRL",
"endToEndId": "<string>",
"failureCode": "<string>"
}{
"paymentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "QUEUED",
"amountCents": 1,
"feeCents": 1,
"totalDebitedCents": 1,
"currency": "BRL",
"endToEndId": "<string>",
"failureCode": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Caso de uso
Use esta operação depois de revisar a prévia e confirmar o pagamento. Envie opreviewId e uma idempotencyKey para evitar duplicidade em reenvios da mesma solicitação.
Autenticação
x-client-idx-client-secretx-turbofy-timestampx-turbofy-signature- Escopo
payout:write
Requisitos
previewIddeve ser um UUID de uma prévia ainda válida.idempotencyKeydeve conter de 8 a 100 caracteres ASCII imprimíveis sem espaços.- O merchant e o tipo de QR precisam estar habilitados após homologação.
Resposta
202: pagamento entrou na fila TurboFy para processamento. Consulte opaymentIdretornado para acompanhar o estado.200: replay idempotente. A resposta usa o mesmo formato público de Consultar pagamento por QR Pix.
paymentId, status, amountCents, feeCents, totalDebitedCents, currency, endToEndId e failureCode. endToEndId e failureCode podem ser null.
Erros
409 PIX_QR_PREVIEW_EXPIRED: a prévia expirou.409 PIX_QR_PREVIEW_CHANGED: os dados da prévia mudaram.409 PIX_QR_PREVIEW_ALREADY_CONFIRMED: a prévia já foi confirmada.409 PIX_QR_CHARGE_ALREADY_CONFIRMED: a cobrança já foi confirmada.409 PIX_QR_IDEMPOTENCY_CONFLICT: a chave de idempotência foi reutilizada com outra solicitação.- Outros conflitos financeiros retornam os códigos canônicos de saldo ou bloqueio.
422: QR não verificado ou expirado, valor divergente, tipo não disponível ou valor fora do intervalo permitido.503 PIX_QR_UNAVAILABLE: serviço indisponível ou recurso desabilitado para o merchant ou tipo de QR.
Próximo passo
Consulte Consultar pagamento por QR Pix com opaymentId para acompanhar o resultado.Authorizations
Headers
Body
application/json
Response
Default Response
Last modified on November 12, 2026