Criar cobrança Pix
curl --request POST \
--url https://nuvrapayments.com/api/v1/charges \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 15000,
"externalReference": "pedido-4821",
"customer": {
"document": "12345678909",
"email": "maria@example.com",
"name": "Maria Silva",
"phone": "+5511999998888",
"ip": "<string>"
},
"description": "Plano Pro",
"expiresIn": 3600,
"method": "pix"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 15000,
externalReference: 'pedido-4821',
customer: {
document: '12345678909',
email: 'maria@example.com',
name: 'Maria Silva',
phone: '+5511999998888',
ip: '<string>'
},
description: 'Plano Pro',
expiresIn: 3600,
method: 'pix'
})
};
fetch('https://nuvrapayments.com/api/v1/charges', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://nuvrapayments.com/api/v1/charges"
payload = {
"amount": 15000,
"externalReference": "pedido-4821",
"customer": {
"document": "12345678909",
"email": "maria@example.com",
"name": "Maria Silva",
"phone": "+5511999998888",
"ip": "<string>"
},
"description": "Plano Pro",
"expiresIn": 3600,
"method": "pix"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://nuvrapayments.com/api/v1/charges",
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([
'amount' => 15000,
'externalReference' => 'pedido-4821',
'customer' => [
'document' => '12345678909',
'email' => 'maria@example.com',
'name' => 'Maria Silva',
'phone' => '+5511999998888',
'ip' => '<string>'
],
'description' => 'Plano Pro',
'expiresIn' => 3600,
'method' => 'pix'
]),
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;
}{
"amount": 15000,
"createdAt": "2026-12-03T12:00:00.000Z",
"currency": "BRL",
"customer": {
"document": "12345678909",
"email": "maria@example.com",
"name": "Maria Silva",
"phone": "+5511999998888"
},
"endToEndId": "<string>",
"externalReference": "pedido-4821",
"fee": 149,
"id": "ord_...",
"method": "pix",
"net": 14851,
"payer": {
"bank": {
"ispb": "<string>",
"name": "<string>"
},
"document": "<string>",
"documentType": "cpf",
"name": "<string>"
},
"pix": {
"copyPaste": "00020126...5204",
"expiresAt": "2026-12-03T13:00:00.000Z",
"qrCodeBase64": "<string>",
"qrCodeUrl": "<string>",
"txid": "<string>"
},
"status": "pending",
"paidAt": "2023-11-07T05:31:56Z"
}{
"amount": 15000,
"createdAt": "2026-12-03T12:00:00.000Z",
"currency": "BRL",
"customer": {
"document": "12345678909",
"email": "maria@example.com",
"name": "Maria Silva",
"phone": "+5511999998888"
},
"endToEndId": "<string>",
"externalReference": "pedido-4821",
"fee": 149,
"id": "ord_...",
"method": "pix",
"net": 14851,
"payer": {
"bank": {
"ispb": "<string>",
"name": "<string>"
},
"document": "<string>",
"documentType": "cpf",
"name": "<string>"
},
"pix": {
"copyPaste": "00020126...5204",
"expiresAt": "2026-12-03T13:00:00.000Z",
"qrCodeBase64": "<string>",
"qrCodeUrl": "<string>",
"txid": "<string>"
},
"status": "pending",
"paidAt": "2023-11-07T05:31:56Z"
}{
"error": "rate_limited",
"message": "<string>",
"retryAfter": 1
}Cobranças
Criar cobrança Pix
Cria uma cobrança Pix e devolve o QR Code. Idempotente por externalReference: o mesmo payload devolve a cobrança existente (200); payload diferente responde 409. Criar a cobrança não confirma o pagamento: acompanhe pelo webhook charge.paid. Permissão: charge:create.
POST
/
charges
Criar cobrança Pix
curl --request POST \
--url https://nuvrapayments.com/api/v1/charges \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 15000,
"externalReference": "pedido-4821",
"customer": {
"document": "12345678909",
"email": "maria@example.com",
"name": "Maria Silva",
"phone": "+5511999998888",
"ip": "<string>"
},
"description": "Plano Pro",
"expiresIn": 3600,
"method": "pix"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 15000,
externalReference: 'pedido-4821',
customer: {
document: '12345678909',
email: 'maria@example.com',
name: 'Maria Silva',
phone: '+5511999998888',
ip: '<string>'
},
description: 'Plano Pro',
expiresIn: 3600,
method: 'pix'
})
};
fetch('https://nuvrapayments.com/api/v1/charges', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://nuvrapayments.com/api/v1/charges"
payload = {
"amount": 15000,
"externalReference": "pedido-4821",
"customer": {
"document": "12345678909",
"email": "maria@example.com",
"name": "Maria Silva",
"phone": "+5511999998888",
"ip": "<string>"
},
"description": "Plano Pro",
"expiresIn": 3600,
"method": "pix"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://nuvrapayments.com/api/v1/charges",
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([
'amount' => 15000,
'externalReference' => 'pedido-4821',
'customer' => [
'document' => '12345678909',
'email' => 'maria@example.com',
'name' => 'Maria Silva',
'phone' => '+5511999998888',
'ip' => '<string>'
],
'description' => 'Plano Pro',
'expiresIn' => 3600,
'method' => 'pix'
]),
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;
}{
"amount": 15000,
"createdAt": "2026-12-03T12:00:00.000Z",
"currency": "BRL",
"customer": {
"document": "12345678909",
"email": "maria@example.com",
"name": "Maria Silva",
"phone": "+5511999998888"
},
"endToEndId": "<string>",
"externalReference": "pedido-4821",
"fee": 149,
"id": "ord_...",
"method": "pix",
"net": 14851,
"payer": {
"bank": {
"ispb": "<string>",
"name": "<string>"
},
"document": "<string>",
"documentType": "cpf",
"name": "<string>"
},
"pix": {
"copyPaste": "00020126...5204",
"expiresAt": "2026-12-03T13:00:00.000Z",
"qrCodeBase64": "<string>",
"qrCodeUrl": "<string>",
"txid": "<string>"
},
"status": "pending",
"paidAt": "2023-11-07T05:31:56Z"
}{
"amount": 15000,
"createdAt": "2026-12-03T12:00:00.000Z",
"currency": "BRL",
"customer": {
"document": "12345678909",
"email": "maria@example.com",
"name": "Maria Silva",
"phone": "+5511999998888"
},
"endToEndId": "<string>",
"externalReference": "pedido-4821",
"fee": 149,
"id": "ord_...",
"method": "pix",
"net": 14851,
"payer": {
"bank": {
"ispb": "<string>",
"name": "<string>"
},
"document": "<string>",
"documentType": "cpf",
"name": "<string>"
},
"pix": {
"copyPaste": "00020126...5204",
"expiresAt": "2026-12-03T13:00:00.000Z",
"qrCodeBase64": "<string>",
"qrCodeUrl": "<string>",
"txid": "<string>"
},
"status": "pending",
"paidAt": "2023-11-07T05:31:56Z"
}{
"error": "rate_limited",
"message": "<string>",
"retryAfter": 1
}Authorizations
Body
application/json
Response
Já existia uma cobrança com esta externalReference e o mesmo payload. Nada novo foi criado.