Quick Start
This guide will help you create your first PIX sale in just a few minutes.
Prerequisites
- API credentials (
client_idandclient_secret) - A tool to make HTTP requests (cURL, Postman, or code)
Step 1: Authenticate
First, obtain an access token:
bash
curl -X POST https://api.misespay.com/auth \
-H "Content-Type: application/json" \
-d '{
"client_id": "your_client_id",
"client_secret": "your_client_secret"
}'Response:
json
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "Bearer",
"expires_in": 300
}TIP
Save the access_token - you'll use it in the next requests!
Step 2: Create a PIX Sale
Now create your first sale:
bash
curl -X POST https://api.misespay.com/v1/sales \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"amount": 150.75,
"customer_name": "John Silva",
"customer_email": "john@example.com"
}'Response:
json
{
"id": "cb931031-091a-4243-90ba-44842f39f42d",
"qrcode_url": "https://checkout.misespay.com/pagamento/cb931031-091a-4243-90ba-44842f39f42d",
"reference": "mj9z1j03UU3v",
"expires_at": "2025-12-17T09:42:08.259048-03:00",
"txid": "NOX237W9YZJRIQZP9B1IID7FMQSL1UYD",
"qrcode_text": "00020101021226710014br.gov.bcb.pix...",
"qrcode_base64": "iVBORw0KGgoAAAANSUhEUgAAAQAAAAEAAQMAAABmvDol..."
}Step 3: Display the QR Code
Use the qrcode_base64 to display the image:
html
<img
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEAAQMAAABmvDol..."
alt="PIX QR Code"
/>Or provide the qrcode_text for the customer to copy and paste in their bank app.
Next Steps
Now that you've created your first PIX sale:
- 📖 Complete Sales Documentation - All fields and options
- 🔍 Query Sale Status - Check if it was paid
Need Help?
- 📧 Email: support@misespay.com
- 💬 Discord: discord.gg/mises
- 📚 GitHub: github.com/mises/pix-api
