Legacy v1
Create a PIX Payment
Create a PIX payment through the legacy v1 API.
POST
/
pix
/
v1
/
payment
Create a PIX Payment
curl --request POST \
--url https://api.pagou.ai/pix/v1/payment \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--data '
{
"type": "PIX",
"payer": {
"fullName": "<string>",
"document": "<string>"
},
"transaction": {
"value": 1,
"description": "<string>",
"expirationTime": 1073741823,
"dueDate": "<string>",
"externalId": "<string>"
},
"splits": [
{
"pixKey": "<string>",
"document": "<string>",
"percent": 50,
"amount": 1,
"externalId": "<string>"
}
]
}
'import requests
url = "https://api.pagou.ai/pix/v1/payment"
payload = {
"type": "PIX",
"payer": {
"fullName": "<string>",
"document": "<string>"
},
"transaction": {
"value": 1,
"description": "<string>",
"expirationTime": 1073741823,
"dueDate": "<string>",
"externalId": "<string>"
},
"splits": [
{
"pixKey": "<string>",
"document": "<string>",
"percent": 50,
"amount": 1,
"externalId": "<string>"
}
]
}
headers = {
"apiKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apiKey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'PIX',
payer: {fullName: '<string>', document: '<string>'},
transaction: {
value: 1,
description: '<string>',
expirationTime: 1073741823,
dueDate: '<string>',
externalId: '<string>'
},
splits: [
{
pixKey: '<string>',
document: '<string>',
percent: 50,
amount: 1,
externalId: '<string>'
}
]
})
};
fetch('https://api.pagou.ai/pix/v1/payment', 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.pagou.ai/pix/v1/payment",
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([
'type' => 'PIX',
'payer' => [
'fullName' => '<string>',
'document' => '<string>'
],
'transaction' => [
'value' => 1,
'description' => '<string>',
'expirationTime' => 1073741823,
'dueDate' => '<string>',
'externalId' => '<string>'
],
'splits' => [
[
'pixKey' => '<string>',
'document' => '<string>',
'percent' => 50,
'amount' => 1,
'externalId' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apiKey: <api-key>"
],
]);
$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.pagou.ai/pix/v1/payment"
payload := strings.NewReader("{\n \"type\": \"PIX\",\n \"payer\": {\n \"fullName\": \"<string>\",\n \"document\": \"<string>\"\n },\n \"transaction\": {\n \"value\": 1,\n \"description\": \"<string>\",\n \"expirationTime\": 1073741823,\n \"dueDate\": \"<string>\",\n \"externalId\": \"<string>\"\n },\n \"splits\": [\n {\n \"pixKey\": \"<string>\",\n \"document\": \"<string>\",\n \"percent\": 50,\n \"amount\": 1,\n \"externalId\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apiKey", "<api-key>")
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.pagou.ai/pix/v1/payment")
.header("apiKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"PIX\",\n \"payer\": {\n \"fullName\": \"<string>\",\n \"document\": \"<string>\"\n },\n \"transaction\": {\n \"value\": 1,\n \"description\": \"<string>\",\n \"expirationTime\": 1073741823,\n \"dueDate\": \"<string>\",\n \"externalId\": \"<string>\"\n },\n \"splits\": [\n {\n \"pixKey\": \"<string>\",\n \"document\": \"<string>\",\n \"percent\": 50,\n \"amount\": 1,\n \"externalId\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pagou.ai/pix/v1/payment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apiKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"PIX\",\n \"payer\": {\n \"fullName\": \"<string>\",\n \"document\": \"<string>\"\n },\n \"transaction\": {\n \"value\": 1,\n \"description\": \"<string>\",\n \"expirationTime\": 1073741823,\n \"dueDate\": \"<string>\",\n \"externalId\": \"<string>\"\n },\n \"splits\": [\n {\n \"pixKey\": \"<string>\",\n \"document\": \"<string>\",\n \"percent\": 50,\n \"amount\": 1,\n \"externalId\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"transactionId": "trn_2d02fb2dbfa5479bbd8ec8ad5d629b9e",
"status": "WAITING_PAYMENT",
"pixQrCode": "00020101021226830014br.gov.bcb.pix2558example.com/pix/33f8fcb9-54aa-4f2c-8a66-466067f225cb5204000053039865802BR5921PAGOU SANDBOX TESTE6008SaoPaulo62070503***6304D17A",
"pixCode": "000201010212...6304D17A",
"generateTime": "2026-02-06T19:52:13.295Z",
"expirationDate": "2026-02-06T20:52:13.295Z",
"paymentLink": null
}{
"type": "https://api.pagou.ai/problems/validation-error",
"title": "Validation Error",
"status": 422,
"detail": "The request contains invalid data.",
"instance": "/pix/v1/payment",
"errors": [
{
"field": "transaction.value",
"message": "Must be greater than zero.",
"code": "invalid_type"
}
]
}{
"type": "https://api.pagou.ai/problems/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "Authentication failed for POST /pix/v1/payment.",
"instance": "/pix/v1/payment"
}Authorizations
Body
application/json
Response
Success
Available options:
IN_ANALYSIS, WAITING_CONFIRMATION, WAITING_PAYMENT, WAITING_WITHDRAW, WITHDRAW_REQUEST, WITHDRAW_PAID, WEBHOOK_UPDATED, WEBHOOK_ERROR, PAID, CANCELLED, REVERSED, REFUND, REFUND_IN, REFUND_OUT, SOFT_REFUND, ERROR, PENDING_APPROVAL, APPROVED, DECLINED ⌘I
Create a PIX Payment
curl --request POST \
--url https://api.pagou.ai/pix/v1/payment \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--data '
{
"type": "PIX",
"payer": {
"fullName": "<string>",
"document": "<string>"
},
"transaction": {
"value": 1,
"description": "<string>",
"expirationTime": 1073741823,
"dueDate": "<string>",
"externalId": "<string>"
},
"splits": [
{
"pixKey": "<string>",
"document": "<string>",
"percent": 50,
"amount": 1,
"externalId": "<string>"
}
]
}
'import requests
url = "https://api.pagou.ai/pix/v1/payment"
payload = {
"type": "PIX",
"payer": {
"fullName": "<string>",
"document": "<string>"
},
"transaction": {
"value": 1,
"description": "<string>",
"expirationTime": 1073741823,
"dueDate": "<string>",
"externalId": "<string>"
},
"splits": [
{
"pixKey": "<string>",
"document": "<string>",
"percent": 50,
"amount": 1,
"externalId": "<string>"
}
]
}
headers = {
"apiKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apiKey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'PIX',
payer: {fullName: '<string>', document: '<string>'},
transaction: {
value: 1,
description: '<string>',
expirationTime: 1073741823,
dueDate: '<string>',
externalId: '<string>'
},
splits: [
{
pixKey: '<string>',
document: '<string>',
percent: 50,
amount: 1,
externalId: '<string>'
}
]
})
};
fetch('https://api.pagou.ai/pix/v1/payment', 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.pagou.ai/pix/v1/payment",
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([
'type' => 'PIX',
'payer' => [
'fullName' => '<string>',
'document' => '<string>'
],
'transaction' => [
'value' => 1,
'description' => '<string>',
'expirationTime' => 1073741823,
'dueDate' => '<string>',
'externalId' => '<string>'
],
'splits' => [
[
'pixKey' => '<string>',
'document' => '<string>',
'percent' => 50,
'amount' => 1,
'externalId' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apiKey: <api-key>"
],
]);
$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.pagou.ai/pix/v1/payment"
payload := strings.NewReader("{\n \"type\": \"PIX\",\n \"payer\": {\n \"fullName\": \"<string>\",\n \"document\": \"<string>\"\n },\n \"transaction\": {\n \"value\": 1,\n \"description\": \"<string>\",\n \"expirationTime\": 1073741823,\n \"dueDate\": \"<string>\",\n \"externalId\": \"<string>\"\n },\n \"splits\": [\n {\n \"pixKey\": \"<string>\",\n \"document\": \"<string>\",\n \"percent\": 50,\n \"amount\": 1,\n \"externalId\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apiKey", "<api-key>")
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.pagou.ai/pix/v1/payment")
.header("apiKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"PIX\",\n \"payer\": {\n \"fullName\": \"<string>\",\n \"document\": \"<string>\"\n },\n \"transaction\": {\n \"value\": 1,\n \"description\": \"<string>\",\n \"expirationTime\": 1073741823,\n \"dueDate\": \"<string>\",\n \"externalId\": \"<string>\"\n },\n \"splits\": [\n {\n \"pixKey\": \"<string>\",\n \"document\": \"<string>\",\n \"percent\": 50,\n \"amount\": 1,\n \"externalId\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pagou.ai/pix/v1/payment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apiKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"PIX\",\n \"payer\": {\n \"fullName\": \"<string>\",\n \"document\": \"<string>\"\n },\n \"transaction\": {\n \"value\": 1,\n \"description\": \"<string>\",\n \"expirationTime\": 1073741823,\n \"dueDate\": \"<string>\",\n \"externalId\": \"<string>\"\n },\n \"splits\": [\n {\n \"pixKey\": \"<string>\",\n \"document\": \"<string>\",\n \"percent\": 50,\n \"amount\": 1,\n \"externalId\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"transactionId": "trn_2d02fb2dbfa5479bbd8ec8ad5d629b9e",
"status": "WAITING_PAYMENT",
"pixQrCode": "00020101021226830014br.gov.bcb.pix2558example.com/pix/33f8fcb9-54aa-4f2c-8a66-466067f225cb5204000053039865802BR5921PAGOU SANDBOX TESTE6008SaoPaulo62070503***6304D17A",
"pixCode": "000201010212...6304D17A",
"generateTime": "2026-02-06T19:52:13.295Z",
"expirationDate": "2026-02-06T20:52:13.295Z",
"paymentLink": null
}{
"type": "https://api.pagou.ai/problems/validation-error",
"title": "Validation Error",
"status": 422,
"detail": "The request contains invalid data.",
"instance": "/pix/v1/payment",
"errors": [
{
"field": "transaction.value",
"message": "Must be greater than zero.",
"code": "invalid_type"
}
]
}{
"type": "https://api.pagou.ai/problems/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "Authentication failed for POST /pix/v1/payment.",
"instance": "/pix/v1/payment"
}
