curl --location 'https://api.stylepay.com.br/api/v1/gateway/request-qrcode' \
--header 'stpi: seu_client_id' \
--header 'stps: seu_client_secret' \
--header 'Content-Type: application/json' \
--data-raw '{
"amount": 10.50,
"external_id": "pedido_123",
"payer": {
"name": "João Silva",
"document": "12345678900", # Precisa ser um Documento Valido
"phoneNumber": "11999999999",
"email": "joao@email.com",
"address": {
"street": "Rua Exemplo",
"number": "123",
"neighborhood": "Centro",
"city": "São Paulo",
"state": "SP",
"zipCode": "01234567"
}
},
"payerQuestion": "Pagamento do pedido #123",
"postbackUrl": "https://seusite.com/webhook/pix",
"products": [
{
"name": "Produto 1",
"quantity": "2",
"price": 5.25
}
]
}'
const response = await fetch('https://api.stylepay.com.br/api/v1/gateway/request-qrcode', {
method: 'POST',
headers: {
'stpi': 'seu_client_id',
'stps': 'seu_client_secret',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 10.50,
external_id: "pedido_123",
payer: {
name: "João Silva",
document: "12345678900",
phoneNumber: "11999999999",
email: "joao@email.com",
address: {
street: "Rua Exemplo",
number: "123",
neighborhood: "Centro",
city: "São Paulo",
state: "SP",
zipCode: "01234567"
}
},
payerQuestion: "Pagamento do pedido #123",
postbackUrl: "https://seusite.com/webhook/pix",
products: [
{
name: "Produto 1",
quantity: "2",
price: 5.25
}
]
})
});
const data = await response.json();
import requests
import json
url = "https://api.stylepay.com.br/api/v1/gateway/request-qrcode"
headers = {
"stpi": "seu_client_id",
"stps": "seu_client_secret",
"Content-Type": "application/json"
}
payload = {
"amount": 10.50,
"external_id": "pedido_123",
"payer": {
"name": "João Silva",
"document": "12345678900",
"phoneNumber": "11999999999",
"email": "joao@email.com",
"address": {
"street": "Rua Exemplo",
"number": "123",
"neighborhood": "Centro",
"city": "São Paulo",
"state": "SP",
"zipCode": "01234567"
}
},
"payerQuestion": "Pagamento do pedido #123",
"postbackUrl": "https://seusite.com/webhook/pix",
"products": [
{
"name": "Produto 1",
"quantity": "2",
"price": 5.25
}
]
}
response = requests.post(url, headers=headers, data=json.dumps(payload))
<?php
$url = "https://api.stylepay.com.br/api/v1/gateway/request-qrcode";
$headers = [
"stpi: seu_client_id",
"stps: seu_client_secret",
"Content-Type: application/json"
];
$payload = [
"amount" => 10.50,
"external_id" => "pedido_123",
"payer" => [
"name" => "João Silva",
"document" => "12345678900",
"phoneNumber" => "11999999999",
"email" => "joao@email.com",
"address" => [
"street" => "Rua Exemplo",
"number" => "123",
"neighborhood" => "Centro",
"city" => "São Paulo",
"state" => "SP",
"zipCode" => "01234567"
]
],
"payerQuestion" => "Pagamento do pedido #123",
"postbackUrl" => "https://seusite.com/webhook/pix",
"products" => [
[
"name" => "Produto 1",
"quantity" => "2",
"price" => 5.25
]
]
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
?>
{
"payment_id": "550e8400-e29b-41d4-a716-446655440000",
"qrcode_image": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==",
"qrcode": "00020126580014br.gov.bcb.pix0136123e4567-e12b-12d3-a456-42665544000052040000530398654041.005802BR5913MERCHANT NAME6009SAO PAULO62070503***63041D3D",
"status": "PENDING"
}
Pagamentos
Gerar QR Code PIX
Gera um QR Code PIX para cobrança
POST
/
api
/
v1
/
gateway
/
request-qrcode
curl --location 'https://api.stylepay.com.br/api/v1/gateway/request-qrcode' \
--header 'stpi: seu_client_id' \
--header 'stps: seu_client_secret' \
--header 'Content-Type: application/json' \
--data-raw '{
"amount": 10.50,
"external_id": "pedido_123",
"payer": {
"name": "João Silva",
"document": "12345678900", # Precisa ser um Documento Valido
"phoneNumber": "11999999999",
"email": "joao@email.com",
"address": {
"street": "Rua Exemplo",
"number": "123",
"neighborhood": "Centro",
"city": "São Paulo",
"state": "SP",
"zipCode": "01234567"
}
},
"payerQuestion": "Pagamento do pedido #123",
"postbackUrl": "https://seusite.com/webhook/pix",
"products": [
{
"name": "Produto 1",
"quantity": "2",
"price": 5.25
}
]
}'
const response = await fetch('https://api.stylepay.com.br/api/v1/gateway/request-qrcode', {
method: 'POST',
headers: {
'stpi': 'seu_client_id',
'stps': 'seu_client_secret',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 10.50,
external_id: "pedido_123",
payer: {
name: "João Silva",
document: "12345678900",
phoneNumber: "11999999999",
email: "joao@email.com",
address: {
street: "Rua Exemplo",
number: "123",
neighborhood: "Centro",
city: "São Paulo",
state: "SP",
zipCode: "01234567"
}
},
payerQuestion: "Pagamento do pedido #123",
postbackUrl: "https://seusite.com/webhook/pix",
products: [
{
name: "Produto 1",
quantity: "2",
price: 5.25
}
]
})
});
const data = await response.json();
import requests
import json
url = "https://api.stylepay.com.br/api/v1/gateway/request-qrcode"
headers = {
"stpi": "seu_client_id",
"stps": "seu_client_secret",
"Content-Type": "application/json"
}
payload = {
"amount": 10.50,
"external_id": "pedido_123",
"payer": {
"name": "João Silva",
"document": "12345678900",
"phoneNumber": "11999999999",
"email": "joao@email.com",
"address": {
"street": "Rua Exemplo",
"number": "123",
"neighborhood": "Centro",
"city": "São Paulo",
"state": "SP",
"zipCode": "01234567"
}
},
"payerQuestion": "Pagamento do pedido #123",
"postbackUrl": "https://seusite.com/webhook/pix",
"products": [
{
"name": "Produto 1",
"quantity": "2",
"price": 5.25
}
]
}
response = requests.post(url, headers=headers, data=json.dumps(payload))
<?php
$url = "https://api.stylepay.com.br/api/v1/gateway/request-qrcode";
$headers = [
"stpi: seu_client_id",
"stps: seu_client_secret",
"Content-Type: application/json"
];
$payload = [
"amount" => 10.50,
"external_id" => "pedido_123",
"payer" => [
"name" => "João Silva",
"document" => "12345678900",
"phoneNumber" => "11999999999",
"email" => "joao@email.com",
"address" => [
"street" => "Rua Exemplo",
"number" => "123",
"neighborhood" => "Centro",
"city" => "São Paulo",
"state" => "SP",
"zipCode" => "01234567"
]
],
"payerQuestion" => "Pagamento do pedido #123",
"postbackUrl" => "https://seusite.com/webhook/pix",
"products" => [
[
"name" => "Produto 1",
"quantity" => "2",
"price" => 5.25
]
]
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
?>
{
"payment_id": "550e8400-e29b-41d4-a716-446655440000",
"qrcode_image": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==",
"qrcode": "00020126580014br.gov.bcb.pix0136123e4567-e12b-12d3-a456-42665544000052040000530398654041.005802BR5913MERCHANT NAME6009SAO PAULO62070503***63041D3D",
"status": "PENDING"
}
Autenticação
Esta requisição requer autenticação via headers customizados:Corpo da Requisição
Informações do pagador
Show Propriedades
Show Propriedades
Resposta
curl --location 'https://api.stylepay.com.br/api/v1/gateway/request-qrcode' \
--header 'stpi: seu_client_id' \
--header 'stps: seu_client_secret' \
--header 'Content-Type: application/json' \
--data-raw '{
"amount": 10.50,
"external_id": "pedido_123",
"payer": {
"name": "João Silva",
"document": "12345678900", # Precisa ser um Documento Valido
"phoneNumber": "11999999999",
"email": "joao@email.com",
"address": {
"street": "Rua Exemplo",
"number": "123",
"neighborhood": "Centro",
"city": "São Paulo",
"state": "SP",
"zipCode": "01234567"
}
},
"payerQuestion": "Pagamento do pedido #123",
"postbackUrl": "https://seusite.com/webhook/pix",
"products": [
{
"name": "Produto 1",
"quantity": "2",
"price": 5.25
}
]
}'
const response = await fetch('https://api.stylepay.com.br/api/v1/gateway/request-qrcode', {
method: 'POST',
headers: {
'stpi': 'seu_client_id',
'stps': 'seu_client_secret',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 10.50,
external_id: "pedido_123",
payer: {
name: "João Silva",
document: "12345678900",
phoneNumber: "11999999999",
email: "joao@email.com",
address: {
street: "Rua Exemplo",
number: "123",
neighborhood: "Centro",
city: "São Paulo",
state: "SP",
zipCode: "01234567"
}
},
payerQuestion: "Pagamento do pedido #123",
postbackUrl: "https://seusite.com/webhook/pix",
products: [
{
name: "Produto 1",
quantity: "2",
price: 5.25
}
]
})
});
const data = await response.json();
import requests
import json
url = "https://api.stylepay.com.br/api/v1/gateway/request-qrcode"
headers = {
"stpi": "seu_client_id",
"stps": "seu_client_secret",
"Content-Type": "application/json"
}
payload = {
"amount": 10.50,
"external_id": "pedido_123",
"payer": {
"name": "João Silva",
"document": "12345678900",
"phoneNumber": "11999999999",
"email": "joao@email.com",
"address": {
"street": "Rua Exemplo",
"number": "123",
"neighborhood": "Centro",
"city": "São Paulo",
"state": "SP",
"zipCode": "01234567"
}
},
"payerQuestion": "Pagamento do pedido #123",
"postbackUrl": "https://seusite.com/webhook/pix",
"products": [
{
"name": "Produto 1",
"quantity": "2",
"price": 5.25
}
]
}
response = requests.post(url, headers=headers, data=json.dumps(payload))
<?php
$url = "https://api.stylepay.com.br/api/v1/gateway/request-qrcode";
$headers = [
"stpi: seu_client_id",
"stps: seu_client_secret",
"Content-Type: application/json"
];
$payload = [
"amount" => 10.50,
"external_id" => "pedido_123",
"payer" => [
"name" => "João Silva",
"document" => "12345678900",
"phoneNumber" => "11999999999",
"email" => "joao@email.com",
"address" => [
"street" => "Rua Exemplo",
"number" => "123",
"neighborhood" => "Centro",
"city" => "São Paulo",
"state" => "SP",
"zipCode" => "01234567"
]
],
"payerQuestion" => "Pagamento do pedido #123",
"postbackUrl" => "https://seusite.com/webhook/pix",
"products" => [
[
"name" => "Produto 1",
"quantity" => "2",
"price" => 5.25
]
]
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
?>
{
"payment_id": "550e8400-e29b-41d4-a716-446655440000",
"qrcode_image": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==",
"qrcode": "00020126580014br.gov.bcb.pix0136123e4567-e12b-12d3-a456-42665544000052040000530398654041.005802BR5913MERCHANT NAME6009SAO PAULO62070503***63041D3D",
"status": "PENDING"
}

