curl --location 'https://api.stylepay.com.br/api/v1/gateway/pix-payment' \
--header 'stpi: seu_client_id' \
--header 'stps: seu_client_secret' \
--header 'Content-Type: application/json' \
--data '{
"amount": 50.00,
"description": "Pagamento para fornecedor",
"creditParty": {
"name": "Maria Santos",
"keyType": "CPF",
"key": "98765432100"
},
"callbackUrl": "https://seusite.com/webhook/pix-payment"
}'
const response = await fetch('https://api.stylepay.com.br/api/v1/gateway/pix-payment', {
method: 'POST',
headers: {
'stpi': 'seu_client_id',
'stps': 'seu_client_secret',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 50.00,
description: "Pagamento para fornecedor",
creditParty: {
name: "Maria Santos",
keyType: "CPF",
key: "98765432100"
},
callbackUrl: "https://seusite.com/webhook/pix-payment"
})
});
const data = await response.json();
import requests
import json
url = "https://api.stylepay.com.br/api/v1/gateway/pix-payment"
headers = {
"stpi": "seu_client_id",
"stps": "seu_client_secret",
"Content-Type": "application/json"
}
payload = {
"amount": 50.00,
"description": "Pagamento para fornecedor",
"creditParty": {
"name": "Maria Santos",
"keyType": "CPF",
"key": "98765432100"
},
"callbackUrl": "https://seusite.com/webhook/pix-payment"
}
response = requests.post(url, headers=headers, data=json.dumps(payload))
<?php
$url = "https://api.stylepay.com.br/api/v1/gateway/pix-payment";
$headers = [
"stpi: seu_client_id",
"stps: seu_client_secret",
"Content-Type: application/json"
];
$payload = [
"amount" => 50.00,
"description" => "Pagamento para fornecedor",
"creditParty" => [
"name" => "Maria Santos",
"keyType" => "CPF",
"key" => "98765432100"
],
"callbackUrl" => "https://seusite.com/webhook/pix-payment"
];
$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);
?>
package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
url := "https://api.stylepay.com.br/api/v1/gateway/pix-payment"
payload := map[string]interface{}{
"amount": 50.00,
"description": "Pagamento para fornecedor",
"creditParty": map[string]string{
"name": "Maria Santos",
"keyType": "CPF",
"key": "98765432100",
},
"callbackUrl": "https://seusite.com/webhook/pix-payment",
}
jsonData, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("stpi", "seu_client_id")
req.Header.Set("stps", "seu_client_secret")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
}
{
"statusCode": 200,
"transaction_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"amount": 50.00,
"tax": 1.50,
"status": "PENDING"
}
{
"statusCode": 400,
"message": "Invalid key format",
"error": "Bad Request"
}
{
"statusCode": 401,
"message": "Invalid credentials",
"error": "Unauthorized"
}
{
"statusCode": 500,
"message": "Internal server error",
"error": "Internal Server Error"
}
Pagamentos
Realizar Pagamento PIX
Envia um pagamento PIX para qualquer chave
POST
/
api
/
v1
/
gateway
/
pix-payment
curl --location 'https://api.stylepay.com.br/api/v1/gateway/pix-payment' \
--header 'stpi: seu_client_id' \
--header 'stps: seu_client_secret' \
--header 'Content-Type: application/json' \
--data '{
"amount": 50.00,
"description": "Pagamento para fornecedor",
"creditParty": {
"name": "Maria Santos",
"keyType": "CPF",
"key": "98765432100"
},
"callbackUrl": "https://seusite.com/webhook/pix-payment"
}'
const response = await fetch('https://api.stylepay.com.br/api/v1/gateway/pix-payment', {
method: 'POST',
headers: {
'stpi': 'seu_client_id',
'stps': 'seu_client_secret',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 50.00,
description: "Pagamento para fornecedor",
creditParty: {
name: "Maria Santos",
keyType: "CPF",
key: "98765432100"
},
callbackUrl: "https://seusite.com/webhook/pix-payment"
})
});
const data = await response.json();
import requests
import json
url = "https://api.stylepay.com.br/api/v1/gateway/pix-payment"
headers = {
"stpi": "seu_client_id",
"stps": "seu_client_secret",
"Content-Type": "application/json"
}
payload = {
"amount": 50.00,
"description": "Pagamento para fornecedor",
"creditParty": {
"name": "Maria Santos",
"keyType": "CPF",
"key": "98765432100"
},
"callbackUrl": "https://seusite.com/webhook/pix-payment"
}
response = requests.post(url, headers=headers, data=json.dumps(payload))
<?php
$url = "https://api.stylepay.com.br/api/v1/gateway/pix-payment";
$headers = [
"stpi: seu_client_id",
"stps: seu_client_secret",
"Content-Type: application/json"
];
$payload = [
"amount" => 50.00,
"description" => "Pagamento para fornecedor",
"creditParty" => [
"name" => "Maria Santos",
"keyType" => "CPF",
"key" => "98765432100"
],
"callbackUrl" => "https://seusite.com/webhook/pix-payment"
];
$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);
?>
package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
url := "https://api.stylepay.com.br/api/v1/gateway/pix-payment"
payload := map[string]interface{}{
"amount": 50.00,
"description": "Pagamento para fornecedor",
"creditParty": map[string]string{
"name": "Maria Santos",
"keyType": "CPF",
"key": "98765432100",
},
"callbackUrl": "https://seusite.com/webhook/pix-payment",
}
jsonData, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("stpi", "seu_client_id")
req.Header.Set("stps", "seu_client_secret")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
}
{
"statusCode": 200,
"transaction_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"amount": 50.00,
"tax": 1.50,
"status": "PENDING"
}
{
"statusCode": 400,
"message": "Invalid key format",
"error": "Bad Request"
}
{
"statusCode": 401,
"message": "Invalid credentials",
"error": "Unauthorized"
}
{
"statusCode": 500,
"message": "Internal server error",
"error": "Internal Server Error"
}
Autenticação
Esta requisição requer autenticação via headers customizados:string
required
Seu Client ID
string
required
Seu Client Secret
string
default:"application/json"
required
Tipo do conteúdo da requisição
Corpo da Requisição
number
required
Valor do pagamento em reais (ex: 50.00)
string
required
Descrição ou finalidade do pagamento
object
required
string
required
URL para receber notificações de webhook sobre o status do pagamento
Resposta
number
Código de status HTTP da operação
string
UUID único da transação de pagamento
number
Valor do pagamento realizado
number
Taxa cobrada pela transação
string
Status atual do pagamento. Valores possíveis:
PENDING, COMPLETED, FAILEDTipos de Chave PIX
A API aceita os seguintes tipos de chave PIX:| Tipo | Descrição | Formato |
|---|---|---|
CPF | Cadastro de Pessoa Física | 11 dígitos (somente números) |
CNPJ | Cadastro Nacional de Pessoa Jurídica | 14 dígitos (somente números) |
EMAIL | Endereço de e-mail | email@exemplo.com |
PHONE | Número de telefone | +5511999999999 |
EVP | Chave aleatória (End-to-end) | UUID no formato padrão |
curl --location 'https://api.stylepay.com.br/api/v1/gateway/pix-payment' \
--header 'stpi: seu_client_id' \
--header 'stps: seu_client_secret' \
--header 'Content-Type: application/json' \
--data '{
"amount": 50.00,
"description": "Pagamento para fornecedor",
"creditParty": {
"name": "Maria Santos",
"keyType": "CPF",
"key": "98765432100"
},
"callbackUrl": "https://seusite.com/webhook/pix-payment"
}'
const response = await fetch('https://api.stylepay.com.br/api/v1/gateway/pix-payment', {
method: 'POST',
headers: {
'stpi': 'seu_client_id',
'stps': 'seu_client_secret',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 50.00,
description: "Pagamento para fornecedor",
creditParty: {
name: "Maria Santos",
keyType: "CPF",
key: "98765432100"
},
callbackUrl: "https://seusite.com/webhook/pix-payment"
})
});
const data = await response.json();
import requests
import json
url = "https://api.stylepay.com.br/api/v1/gateway/pix-payment"
headers = {
"stpi": "seu_client_id",
"stps": "seu_client_secret",
"Content-Type": "application/json"
}
payload = {
"amount": 50.00,
"description": "Pagamento para fornecedor",
"creditParty": {
"name": "Maria Santos",
"keyType": "CPF",
"key": "98765432100"
},
"callbackUrl": "https://seusite.com/webhook/pix-payment"
}
response = requests.post(url, headers=headers, data=json.dumps(payload))
<?php
$url = "https://api.stylepay.com.br/api/v1/gateway/pix-payment";
$headers = [
"stpi: seu_client_id",
"stps: seu_client_secret",
"Content-Type: application/json"
];
$payload = [
"amount" => 50.00,
"description" => "Pagamento para fornecedor",
"creditParty" => [
"name" => "Maria Santos",
"keyType" => "CPF",
"key" => "98765432100"
],
"callbackUrl" => "https://seusite.com/webhook/pix-payment"
];
$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);
?>
package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
url := "https://api.stylepay.com.br/api/v1/gateway/pix-payment"
payload := map[string]interface{}{
"amount": 50.00,
"description": "Pagamento para fornecedor",
"creditParty": map[string]string{
"name": "Maria Santos",
"keyType": "CPF",
"key": "98765432100",
},
"callbackUrl": "https://seusite.com/webhook/pix-payment",
}
jsonData, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("stpi", "seu_client_id")
req.Header.Set("stps", "seu_client_secret")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
}
{
"statusCode": 200,
"transaction_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"amount": 50.00,
"tax": 1.50,
"status": "PENDING"
}
{
"statusCode": 400,
"message": "Invalid key format",
"error": "Bad Request"
}
{
"statusCode": 401,
"message": "Invalid credentials",
"error": "Unauthorized"
}
{
"statusCode": 500,
"message": "Internal server error",
"error": "Internal Server Error"
}
Notas Importantes
O pagamento é processado de forma assíncrona. Use a
callbackUrl para receber atualizações sobre o status da transação.Certifique-se de validar a chave PIX do beneficiário antes de enviar o pagamento. Pagamentos enviados para chaves inválidas podem resultar em falhas ou valores não recuperáveis.
A taxa (
tax) é calculada automaticamente com base no valor da transação e nas regras da sua conta.⌘I

