curl --request POST \
--url https://api.misespay.com/v2/pix \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 150.75,
"description": "Pagamento do pedido #12345",
"customer": {
"name": "João da Silva",
"document": "12345678909",
"email": "jsmith@example.com",
"phone": "+5511999998888"
},
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expiresIn": 3600,
"externalReference": "pedido-12345",
"metadata": {
"orderId": "12345",
"source": "website"
}
}
'import requests
url = "https://api.misespay.com/v2/pix"
payload = {
"amount": 150.75,
"description": "Pagamento do pedido #12345",
"customer": {
"name": "João da Silva",
"document": "12345678909",
"email": "jsmith@example.com",
"phone": "+5511999998888"
},
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expiresIn": 3600,
"externalReference": "pedido-12345",
"metadata": {
"orderId": "12345",
"source": "website"
}
}
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({
amount: 150.75,
description: 'Pagamento do pedido #12345',
customer: {
name: 'João da Silva',
document: '12345678909',
email: 'jsmith@example.com',
phone: '+5511999998888'
},
projectId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
expiresIn: 3600,
externalReference: 'pedido-12345',
metadata: {orderId: '12345', source: 'website'}
})
};
fetch('https://api.misespay.com/v2/pix', 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.misespay.com/v2/pix",
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' => 150.75,
'description' => 'Pagamento do pedido #12345',
'customer' => [
'name' => 'João da Silva',
'document' => '12345678909',
'email' => 'jsmith@example.com',
'phone' => '+5511999998888'
],
'projectId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'expiresIn' => 3600,
'externalReference' => 'pedido-12345',
'metadata' => [
'orderId' => '12345',
'source' => 'website'
]
]),
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.misespay.com/v2/pix"
payload := strings.NewReader("{\n \"amount\": 150.75,\n \"description\": \"Pagamento do pedido #12345\",\n \"customer\": {\n \"name\": \"João da Silva\",\n \"document\": \"12345678909\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"+5511999998888\"\n },\n \"projectId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expiresIn\": 3600,\n \"externalReference\": \"pedido-12345\",\n \"metadata\": {\n \"orderId\": \"12345\",\n \"source\": \"website\"\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.misespay.com/v2/pix")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 150.75,\n \"description\": \"Pagamento do pedido #12345\",\n \"customer\": {\n \"name\": \"João da Silva\",\n \"document\": \"12345678909\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"+5511999998888\"\n },\n \"projectId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expiresIn\": 3600,\n \"externalReference\": \"pedido-12345\",\n \"metadata\": {\n \"orderId\": \"12345\",\n \"source\": \"website\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.misespay.com/v2/pix")
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 \"amount\": 150.75,\n \"description\": \"Pagamento do pedido #12345\",\n \"customer\": {\n \"name\": \"João da Silva\",\n \"document\": \"12345678909\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"+5511999998888\"\n },\n \"projectId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expiresIn\": 3600,\n \"externalReference\": \"pedido-12345\",\n \"metadata\": {\n \"orderId\": \"12345\",\n \"source\": \"website\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 150.75,
"currency": "BRL",
"pixCopyPaste": "00020126580014br.gov.bcb.pix0136a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"qrCodeBase64": "<string>",
"pspPaymentId": "de3516a2-c63a-4c02-b132-a239bf42e183",
"externalReference": "pedido-12345"
}{
"statusCode": 400,
"error": "BadRequest",
"message": "name must be longer than or equal to 2 characters",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "<string>"
}{
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication token is required",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "<string>"
}{
"statusCode": 404,
"error": "NotFound",
"message": "Resource with id 550e8400-e29b-41d4-a716-446655440000 not found",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {
"resource": "Example",
"id": "550e8400-e29b-41d4-a716-446655440000"
},
"traceId": "<string>"
}{
"statusCode": 500,
"error": "InternalError",
"message": "An unexpected error occurred",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "2771463d58840c8e116dc6dda1e1e5d0"
}Criar Cobrança PIX
Cria uma cobrança PIX instantânea.
Permissão requerida: PIX:WRITE ou FULL_ACCESS
curl --request POST \
--url https://api.misespay.com/v2/pix \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 150.75,
"description": "Pagamento do pedido #12345",
"customer": {
"name": "João da Silva",
"document": "12345678909",
"email": "jsmith@example.com",
"phone": "+5511999998888"
},
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expiresIn": 3600,
"externalReference": "pedido-12345",
"metadata": {
"orderId": "12345",
"source": "website"
}
}
'import requests
url = "https://api.misespay.com/v2/pix"
payload = {
"amount": 150.75,
"description": "Pagamento do pedido #12345",
"customer": {
"name": "João da Silva",
"document": "12345678909",
"email": "jsmith@example.com",
"phone": "+5511999998888"
},
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expiresIn": 3600,
"externalReference": "pedido-12345",
"metadata": {
"orderId": "12345",
"source": "website"
}
}
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({
amount: 150.75,
description: 'Pagamento do pedido #12345',
customer: {
name: 'João da Silva',
document: '12345678909',
email: 'jsmith@example.com',
phone: '+5511999998888'
},
projectId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
expiresIn: 3600,
externalReference: 'pedido-12345',
metadata: {orderId: '12345', source: 'website'}
})
};
fetch('https://api.misespay.com/v2/pix', 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.misespay.com/v2/pix",
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' => 150.75,
'description' => 'Pagamento do pedido #12345',
'customer' => [
'name' => 'João da Silva',
'document' => '12345678909',
'email' => 'jsmith@example.com',
'phone' => '+5511999998888'
],
'projectId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'expiresIn' => 3600,
'externalReference' => 'pedido-12345',
'metadata' => [
'orderId' => '12345',
'source' => 'website'
]
]),
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.misespay.com/v2/pix"
payload := strings.NewReader("{\n \"amount\": 150.75,\n \"description\": \"Pagamento do pedido #12345\",\n \"customer\": {\n \"name\": \"João da Silva\",\n \"document\": \"12345678909\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"+5511999998888\"\n },\n \"projectId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expiresIn\": 3600,\n \"externalReference\": \"pedido-12345\",\n \"metadata\": {\n \"orderId\": \"12345\",\n \"source\": \"website\"\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.misespay.com/v2/pix")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 150.75,\n \"description\": \"Pagamento do pedido #12345\",\n \"customer\": {\n \"name\": \"João da Silva\",\n \"document\": \"12345678909\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"+5511999998888\"\n },\n \"projectId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expiresIn\": 3600,\n \"externalReference\": \"pedido-12345\",\n \"metadata\": {\n \"orderId\": \"12345\",\n \"source\": \"website\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.misespay.com/v2/pix")
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 \"amount\": 150.75,\n \"description\": \"Pagamento do pedido #12345\",\n \"customer\": {\n \"name\": \"João da Silva\",\n \"document\": \"12345678909\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"+5511999998888\"\n },\n \"projectId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expiresIn\": 3600,\n \"externalReference\": \"pedido-12345\",\n \"metadata\": {\n \"orderId\": \"12345\",\n \"source\": \"website\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 150.75,
"currency": "BRL",
"pixCopyPaste": "00020126580014br.gov.bcb.pix0136a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"qrCodeBase64": "<string>",
"pspPaymentId": "de3516a2-c63a-4c02-b132-a239bf42e183",
"externalReference": "pedido-12345"
}{
"statusCode": 400,
"error": "BadRequest",
"message": "name must be longer than or equal to 2 characters",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "<string>"
}{
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication token is required",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "<string>"
}{
"statusCode": 404,
"error": "NotFound",
"message": "Resource with id 550e8400-e29b-41d4-a716-446655440000 not found",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {
"resource": "Example",
"id": "550e8400-e29b-41d4-a716-446655440000"
},
"traceId": "<string>"
}{
"statusCode": 500,
"error": "InternalError",
"message": "An unexpected error occurred",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "2771463d58840c8e116dc6dda1e1e5d0"
}Autorizações
Access token obtido no POST /auth (client_id + client_secret). Válido por 300 segundos.
Cabeçalhos
Chave única do cliente (8-255 chars) que torna a requisição idempotente. Retentativas com a mesma chave retornam a resposta cacheada (TTL 24h). Mesma chave com body diferente retorna 422.
8 - 255Corpo
Valor em BRL (ex: 100.50 para R$ 100,50)
x >= 1150.75
Descrição da cobrança
255"Pagamento do pedido #12345"
Dados do pagador (todos opcionais).
Show child attributes
Show child attributes
ID do projeto para associar a transação
Segundos até expiração (padrão: 86400 = 24h)
300 <= x <= 6048003600
Seu ID de referência externa
255"pedido-12345"
Metadados customizados (pares chave-valor)
{ "orderId": "12345", "source": "website" }
Resposta
Cobrança PIX criada com sucesso
ID da cobrança (ID da transação)
Status da cobrança
pending, completed, failed, cancelled Valor em BRL
150.75
Código da moeda
"BRL"
Código PIX copia e cola
"00020126580014br.gov.bcb.pix0136a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Data de expiração
Data de criação
QR Code do PIX em formato data URI (data:image/png;base64,...)
ID da transação no provedor de pagamento (PSP). Use para conciliação; ausente se o PSP não retornou o ID na criação.
"de3516a2-c63a-4c02-b132-a239bf42e183"
Seu ID de referência externa
"pedido-12345"

