PIX IN
Criar QR Code PIX para recebimento
Cria um QR Code PIX para receber pagamentos instantâneos
POST
/
api
/
v1
/
pix
/
in
/
qrcode
Criar QR Code PIX para recebimento
curl --request POST \
--url https://api.quantumpay.com.br/api/v1/pix/in/qrcode \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amountInCents": 5000,
"customer": {
"name": "Cliente Exemplo",
"email": "cliente@exemplo.com",
"documentType": "cpf",
"document": "11122233344",
"phone": "11912345678"
},
"description": "Pagamento de serviços",
"postbackUrl": "https://exemplo.com.br/webhook",
"items": [
{
"title": "Produto A",
"quantity": 2,
"amountInCents": 5000,
"tangible": false
}
],
"metadata": {
"utm_source": "google",
"checkout": "shopify"
}
}
'import requests
url = "https://api.quantumpay.com.br/api/v1/pix/in/qrcode"
payload = {
"amountInCents": 5000,
"customer": {
"name": "Cliente Exemplo",
"email": "cliente@exemplo.com",
"documentType": "cpf",
"document": "11122233344",
"phone": "11912345678"
},
"description": "Pagamento de serviços",
"postbackUrl": "https://exemplo.com.br/webhook",
"items": [
{
"title": "Produto A",
"quantity": 2,
"amountInCents": 5000,
"tangible": False
}
],
"metadata": {
"utm_source": "google",
"checkout": "shopify"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amountInCents: 5000,
customer: {
name: 'Cliente Exemplo',
email: 'cliente@exemplo.com',
documentType: 'cpf',
document: '11122233344',
phone: '11912345678'
},
description: 'Pagamento de serviços',
postbackUrl: 'https://exemplo.com.br/webhook',
items: [{title: 'Produto A', quantity: 2, amountInCents: 5000, tangible: false}],
metadata: {utm_source: 'google', checkout: 'shopify'}
})
};
fetch('https://api.quantumpay.com.br/api/v1/pix/in/qrcode', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.quantumpay.com.br/api/v1/pix/in/qrcode",
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([
'amountInCents' => 5000,
'customer' => [
'name' => 'Cliente Exemplo',
'email' => 'cliente@exemplo.com',
'documentType' => 'cpf',
'document' => '11122233344',
'phone' => '11912345678'
],
'description' => 'Pagamento de serviços',
'postbackUrl' => 'https://exemplo.com.br/webhook',
'items' => [
[
'title' => 'Produto A',
'quantity' => 2,
'amountInCents' => 5000,
'tangible' => false
]
],
'metadata' => [
'utm_source' => 'google',
'checkout' => 'shopify'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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 := "https://api.quantumpay.com.br/api/v1/pix/in/qrcode"
payload := strings.NewReader("{\n \"amountInCents\": 5000,\n \"customer\": {\n \"name\": \"Cliente Exemplo\",\n \"email\": \"cliente@exemplo.com\",\n \"documentType\": \"cpf\",\n \"document\": \"11122233344\",\n \"phone\": \"11912345678\"\n },\n \"description\": \"Pagamento de serviços\",\n \"postbackUrl\": \"https://exemplo.com.br/webhook\",\n \"items\": [\n {\n \"title\": \"Produto A\",\n \"quantity\": 2,\n \"amountInCents\": 5000,\n \"tangible\": false\n }\n ],\n \"metadata\": {\n \"utm_source\": \"google\",\n \"checkout\": \"shopify\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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(string(body))
}HttpResponse<String> response = Unirest.post("https://api.quantumpay.com.br/api/v1/pix/in/qrcode")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amountInCents\": 5000,\n \"customer\": {\n \"name\": \"Cliente Exemplo\",\n \"email\": \"cliente@exemplo.com\",\n \"documentType\": \"cpf\",\n \"document\": \"11122233344\",\n \"phone\": \"11912345678\"\n },\n \"description\": \"Pagamento de serviços\",\n \"postbackUrl\": \"https://exemplo.com.br/webhook\",\n \"items\": [\n {\n \"title\": \"Produto A\",\n \"quantity\": 2,\n \"amountInCents\": 5000,\n \"tangible\": false\n }\n ],\n \"metadata\": {\n \"utm_source\": \"google\",\n \"checkout\": \"shopify\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quantumpay.com.br/api/v1/pix/in/qrcode")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amountInCents\": 5000,\n \"customer\": {\n \"name\": \"Cliente Exemplo\",\n \"email\": \"cliente@exemplo.com\",\n \"documentType\": \"cpf\",\n \"document\": \"11122233344\",\n \"phone\": \"11912345678\"\n },\n \"description\": \"Pagamento de serviços\",\n \"postbackUrl\": \"https://exemplo.com.br/webhook\",\n \"items\": [\n {\n \"title\": \"Produto A\",\n \"quantity\": 2,\n \"amountInCents\": 5000,\n \"tangible\": false\n }\n ],\n \"metadata\": {\n \"utm_source\": \"google\",\n \"checkout\": \"shopify\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Transação criada com sucesso",
"data": {
"id": "trx_1a2b3c4d5e6f7g8h9i0j",
"pix": {
"emv": "00020126...SEU_CODIGO_EMV_AQUI...6304ABCD",
"qrCode": "[BASE64_ENCODED_QRCODE_IMAGE]"
},
"status": "pending",
"fees": 0
}
}{
"error": "INVALID_REQUEST",
"message": "O campo 'amount' é obrigatório",
"details": {}
}{
"error": "UNAUTHORIZED",
"message": "Token de autenticação inválido ou expirado"
}{
"error": "RATE_LIMITED",
"message": "Muitas requisições. Tente novamente em alguns minutos."
}Authorizations
Token JWT no cabeçalho Authorization
Body
application/json
Valor em centavos (mínimo R$ 1,00)
Required range:
x >= 100Example:
5000
Show child attributes
Show child attributes
Descrição que aparecerá no extrato do pagador
Maximum string length:
140Example:
"Pagamento de serviços"
URL para receber notificações de webhook
Example:
"https://exemplo.com.br/webhook"
Lista de itens do pedido
Show child attributes
Show child attributes
Metadados adicionais (UTMs, dados do checkout, etc.)
Example:
{
"utm_source": "google",
"checkout": "shopify"
}
⌘I
Criar QR Code PIX para recebimento
curl --request POST \
--url https://api.quantumpay.com.br/api/v1/pix/in/qrcode \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amountInCents": 5000,
"customer": {
"name": "Cliente Exemplo",
"email": "cliente@exemplo.com",
"documentType": "cpf",
"document": "11122233344",
"phone": "11912345678"
},
"description": "Pagamento de serviços",
"postbackUrl": "https://exemplo.com.br/webhook",
"items": [
{
"title": "Produto A",
"quantity": 2,
"amountInCents": 5000,
"tangible": false
}
],
"metadata": {
"utm_source": "google",
"checkout": "shopify"
}
}
'import requests
url = "https://api.quantumpay.com.br/api/v1/pix/in/qrcode"
payload = {
"amountInCents": 5000,
"customer": {
"name": "Cliente Exemplo",
"email": "cliente@exemplo.com",
"documentType": "cpf",
"document": "11122233344",
"phone": "11912345678"
},
"description": "Pagamento de serviços",
"postbackUrl": "https://exemplo.com.br/webhook",
"items": [
{
"title": "Produto A",
"quantity": 2,
"amountInCents": 5000,
"tangible": False
}
],
"metadata": {
"utm_source": "google",
"checkout": "shopify"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amountInCents: 5000,
customer: {
name: 'Cliente Exemplo',
email: 'cliente@exemplo.com',
documentType: 'cpf',
document: '11122233344',
phone: '11912345678'
},
description: 'Pagamento de serviços',
postbackUrl: 'https://exemplo.com.br/webhook',
items: [{title: 'Produto A', quantity: 2, amountInCents: 5000, tangible: false}],
metadata: {utm_source: 'google', checkout: 'shopify'}
})
};
fetch('https://api.quantumpay.com.br/api/v1/pix/in/qrcode', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.quantumpay.com.br/api/v1/pix/in/qrcode",
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([
'amountInCents' => 5000,
'customer' => [
'name' => 'Cliente Exemplo',
'email' => 'cliente@exemplo.com',
'documentType' => 'cpf',
'document' => '11122233344',
'phone' => '11912345678'
],
'description' => 'Pagamento de serviços',
'postbackUrl' => 'https://exemplo.com.br/webhook',
'items' => [
[
'title' => 'Produto A',
'quantity' => 2,
'amountInCents' => 5000,
'tangible' => false
]
],
'metadata' => [
'utm_source' => 'google',
'checkout' => 'shopify'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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 := "https://api.quantumpay.com.br/api/v1/pix/in/qrcode"
payload := strings.NewReader("{\n \"amountInCents\": 5000,\n \"customer\": {\n \"name\": \"Cliente Exemplo\",\n \"email\": \"cliente@exemplo.com\",\n \"documentType\": \"cpf\",\n \"document\": \"11122233344\",\n \"phone\": \"11912345678\"\n },\n \"description\": \"Pagamento de serviços\",\n \"postbackUrl\": \"https://exemplo.com.br/webhook\",\n \"items\": [\n {\n \"title\": \"Produto A\",\n \"quantity\": 2,\n \"amountInCents\": 5000,\n \"tangible\": false\n }\n ],\n \"metadata\": {\n \"utm_source\": \"google\",\n \"checkout\": \"shopify\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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(string(body))
}HttpResponse<String> response = Unirest.post("https://api.quantumpay.com.br/api/v1/pix/in/qrcode")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amountInCents\": 5000,\n \"customer\": {\n \"name\": \"Cliente Exemplo\",\n \"email\": \"cliente@exemplo.com\",\n \"documentType\": \"cpf\",\n \"document\": \"11122233344\",\n \"phone\": \"11912345678\"\n },\n \"description\": \"Pagamento de serviços\",\n \"postbackUrl\": \"https://exemplo.com.br/webhook\",\n \"items\": [\n {\n \"title\": \"Produto A\",\n \"quantity\": 2,\n \"amountInCents\": 5000,\n \"tangible\": false\n }\n ],\n \"metadata\": {\n \"utm_source\": \"google\",\n \"checkout\": \"shopify\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quantumpay.com.br/api/v1/pix/in/qrcode")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amountInCents\": 5000,\n \"customer\": {\n \"name\": \"Cliente Exemplo\",\n \"email\": \"cliente@exemplo.com\",\n \"documentType\": \"cpf\",\n \"document\": \"11122233344\",\n \"phone\": \"11912345678\"\n },\n \"description\": \"Pagamento de serviços\",\n \"postbackUrl\": \"https://exemplo.com.br/webhook\",\n \"items\": [\n {\n \"title\": \"Produto A\",\n \"quantity\": 2,\n \"amountInCents\": 5000,\n \"tangible\": false\n }\n ],\n \"metadata\": {\n \"utm_source\": \"google\",\n \"checkout\": \"shopify\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Transação criada com sucesso",
"data": {
"id": "trx_1a2b3c4d5e6f7g8h9i0j",
"pix": {
"emv": "00020126...SEU_CODIGO_EMV_AQUI...6304ABCD",
"qrCode": "[BASE64_ENCODED_QRCODE_IMAGE]"
},
"status": "pending",
"fees": 0
}
}{
"error": "INVALID_REQUEST",
"message": "O campo 'amount' é obrigatório",
"details": {}
}{
"error": "UNAUTHORIZED",
"message": "Token de autenticação inválido ou expirado"
}{
"error": "RATE_LIMITED",
"message": "Muitas requisições. Tente novamente em alguns minutos."
}