Solicitar transferência Pix
curl --request POST \
--url https://api.nyxpag.com.br/v1/transfers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 4,
"pixKey": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({amount: 4, pixKey: '<string>'})
};
fetch('https://api.nyxpag.com.br/v1/transfers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.nyxpag.com.br/v1/transfers"
payload = {
"amount": 4,
"pixKey": "<string>"
}
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://api.nyxpag.com.br/v1/transfers",
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' => 4,
'pixKey' => '<string>'
]),
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;
}{
"success": true,
"data": {
"id": "txn_mabc123_0123456789abcdef",
"externalId": "PEDIDO-1042",
"direction": "in",
"type": "payment",
"method": "pix",
"status": "pending",
"amount": 149.9,
"fee": 0.5,
"netAmount": 149.2,
"description": "<string>",
"pix": {
"copyPaste": "<string>",
"qrCodeBase64": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"requestId": "<string>"
}{
"success": false,
"code": "rate_limit_exceeded",
"error": {
"code": "rate_limit_exceeded",
"message": "Muitas solicitações. Aguarde antes de tentar novamente."
},
"retryAfter": 60,
"requestId": "req_example"
}Transferências
Solicitar transferência Pix
Permissão necessária: transfers:write. Idempotency-Key ou externalId é obrigatório; a mesma chave com payload diferente retorna conflito. O cliente não pode escolher a adquirente.
POST
/
transfers
Solicitar transferência Pix
curl --request POST \
--url https://api.nyxpag.com.br/v1/transfers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 4,
"pixKey": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({amount: 4, pixKey: '<string>'})
};
fetch('https://api.nyxpag.com.br/v1/transfers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.nyxpag.com.br/v1/transfers"
payload = {
"amount": 4,
"pixKey": "<string>"
}
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://api.nyxpag.com.br/v1/transfers",
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' => 4,
'pixKey' => '<string>'
]),
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;
}{
"success": true,
"data": {
"id": "txn_mabc123_0123456789abcdef",
"externalId": "PEDIDO-1042",
"direction": "in",
"type": "payment",
"method": "pix",
"status": "pending",
"amount": 149.9,
"fee": 0.5,
"netAmount": 149.2,
"description": "<string>",
"pix": {
"copyPaste": "<string>",
"qrCodeBase64": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"requestId": "<string>"
}{
"success": false,
"code": "rate_limit_exceeded",
"error": {
"code": "rate_limit_exceeded",
"message": "Muitas solicitações. Aguarde antes de tentar novamente."
},
"retryAfter": 60,
"requestId": "req_example"
}Authorizations
Use Authorization: Bearer nyx_live_...
Headers
Maximum string length:
100Body
application/json
- Option 1
- Option 2
Obrigatório para chave Pix e para BR Code estático sem valor. Omita quando o código já definir o valor.
Required range:
x >= 3Available options:
cpf, cnpj, email, phone, random Alternativa ao cabeçalho Idempotency-Key.
Maximum string length:
100Maximum string length:
140Destino moderno. Em pix_copy_paste ou qr_code, o BR Code é validado pela processadora. O valor do código prevalece; amount só é usado em código estático sem valor.
Show child attributes
Show child attributes
Response
Requisição idempotente existente

