curl --request POST \
--url https://api-gateway.pague.dev/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",
"pspCredentialId": "6e307aa4-4772-4230-a648-d88cee308f54",
"expiresIn": 3600,
"externalReference": "pedido-12345",
"metadata": {
"orderId": "12345",
"source": "website"
},
"split": [
{
"subAccount": "loja-centro",
"amount": 30
}
]
}
'import requests
url = "https://api-gateway.pague.dev/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",
"pspCredentialId": "6e307aa4-4772-4230-a648-d88cee308f54",
"expiresIn": 3600,
"externalReference": "pedido-12345",
"metadata": {
"orderId": "12345",
"source": "website"
},
"split": [
{
"subAccount": "loja-centro",
"amount": 30
}
]
}
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',
pspCredentialId: '6e307aa4-4772-4230-a648-d88cee308f54',
expiresIn: 3600,
externalReference: 'pedido-12345',
metadata: {orderId: '12345', source: 'website'},
split: [{subAccount: 'loja-centro', amount: 30}]
})
};
fetch('https://api-gateway.pague.dev/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-gateway.pague.dev/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',
'pspCredentialId' => '6e307aa4-4772-4230-a648-d88cee308f54',
'expiresIn' => 3600,
'externalReference' => 'pedido-12345',
'metadata' => [
'orderId' => '12345',
'source' => 'website'
],
'split' => [
[
'subAccount' => 'loja-centro',
'amount' => 30
]
]
]),
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-gateway.pague.dev/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 \"pspCredentialId\": \"6e307aa4-4772-4230-a648-d88cee308f54\",\n \"expiresIn\": 3600,\n \"externalReference\": \"pedido-12345\",\n \"metadata\": {\n \"orderId\": \"12345\",\n \"source\": \"website\"\n },\n \"split\": [\n {\n \"subAccount\": \"loja-centro\",\n \"amount\": 30\n }\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-gateway.pague.dev/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 \"pspCredentialId\": \"6e307aa4-4772-4230-a648-d88cee308f54\",\n \"expiresIn\": 3600,\n \"externalReference\": \"pedido-12345\",\n \"metadata\": {\n \"orderId\": \"12345\",\n \"source\": \"website\"\n },\n \"split\": [\n {\n \"subAccount\": \"loja-centro\",\n \"amount\": 30\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-gateway.pague.dev/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 \"pspCredentialId\": \"6e307aa4-4772-4230-a648-d88cee308f54\",\n \"expiresIn\": 3600,\n \"externalReference\": \"pedido-12345\",\n \"metadata\": {\n \"orderId\": \"12345\",\n \"source\": \"website\"\n },\n \"split\": [\n {\n \"subAccount\": \"loja-centro\",\n \"amount\": 30\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"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",
"pspCredentialId": "6e307aa4-4772-4230-a648-d88cee308f54",
"externalReference": "pedido-12345",
"split": [
{
"subAccount": "loja-centro",
"amount": 30
}
]
}{
"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"
}Create PIX Charge
Creates an instant PIX charge.
Required permission: PIX:WRITE or FULL_ACCESS
curl --request POST \
--url https://api-gateway.pague.dev/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",
"pspCredentialId": "6e307aa4-4772-4230-a648-d88cee308f54",
"expiresIn": 3600,
"externalReference": "pedido-12345",
"metadata": {
"orderId": "12345",
"source": "website"
},
"split": [
{
"subAccount": "loja-centro",
"amount": 30
}
]
}
'import requests
url = "https://api-gateway.pague.dev/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",
"pspCredentialId": "6e307aa4-4772-4230-a648-d88cee308f54",
"expiresIn": 3600,
"externalReference": "pedido-12345",
"metadata": {
"orderId": "12345",
"source": "website"
},
"split": [
{
"subAccount": "loja-centro",
"amount": 30
}
]
}
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',
pspCredentialId: '6e307aa4-4772-4230-a648-d88cee308f54',
expiresIn: 3600,
externalReference: 'pedido-12345',
metadata: {orderId: '12345', source: 'website'},
split: [{subAccount: 'loja-centro', amount: 30}]
})
};
fetch('https://api-gateway.pague.dev/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-gateway.pague.dev/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',
'pspCredentialId' => '6e307aa4-4772-4230-a648-d88cee308f54',
'expiresIn' => 3600,
'externalReference' => 'pedido-12345',
'metadata' => [
'orderId' => '12345',
'source' => 'website'
],
'split' => [
[
'subAccount' => 'loja-centro',
'amount' => 30
]
]
]),
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-gateway.pague.dev/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 \"pspCredentialId\": \"6e307aa4-4772-4230-a648-d88cee308f54\",\n \"expiresIn\": 3600,\n \"externalReference\": \"pedido-12345\",\n \"metadata\": {\n \"orderId\": \"12345\",\n \"source\": \"website\"\n },\n \"split\": [\n {\n \"subAccount\": \"loja-centro\",\n \"amount\": 30\n }\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-gateway.pague.dev/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 \"pspCredentialId\": \"6e307aa4-4772-4230-a648-d88cee308f54\",\n \"expiresIn\": 3600,\n \"externalReference\": \"pedido-12345\",\n \"metadata\": {\n \"orderId\": \"12345\",\n \"source\": \"website\"\n },\n \"split\": [\n {\n \"subAccount\": \"loja-centro\",\n \"amount\": 30\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-gateway.pague.dev/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 \"pspCredentialId\": \"6e307aa4-4772-4230-a648-d88cee308f54\",\n \"expiresIn\": 3600,\n \"externalReference\": \"pedido-12345\",\n \"metadata\": {\n \"orderId\": \"12345\",\n \"source\": \"website\"\n },\n \"split\": [\n {\n \"subAccount\": \"loja-centro\",\n \"amount\": 30\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"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",
"pspCredentialId": "6e307aa4-4772-4230-a648-d88cee308f54",
"externalReference": "pedido-12345",
"split": [
{
"subAccount": "loja-centro",
"amount": 30
}
]
}{
"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"
}split field shares part of the amount with other wallets of yours — sub-accounts, or the main account through the reserved word principal. At most 10 items, fixed amounts in BRL.Whoever creates the charge is the originator: it receives the gross amount, pays the full fee and only then splits, so the cap is the net amount (charge amount minus the fee), not the gross. The split happens at settlement, not at creation. Refunds and MED debit the originator only — whoever received a share is never debited.See Payment Split for the full rules, the examples and the error table.pspCredentialId field pins the institution that issues this charge, bypassing the configured routing. Copy the ID under Settings → Routing in the dashboard.Pinning is not preferring: if the institution is down or out of capacity, the charge fails instead of going out through another one. The response echoes pspCredentialId as a receipt.See Choosing the Institution for the full rules and the error table.Authorizations
Access token obtained from POST /auth (client_id + client_secret). Valid for 300 seconds.
Headers
Unique client-provided key (8-255 chars) that makes the request idempotent. Retries with the same key return the cached response (24h TTL). The same key with a different body returns 422.
8 - 255Reference of the sub-account the operation runs against. When omitted, the operation happens on the main account; the reserved value principal also resolves to the main account and is equivalent to omitting the header. Accepted on every endpoint except POST /auth and the /sub-accounts endpoints themselves, which always operate on the main account.
Possible errors: 404 SUB_ACCOUNT_NOT_FOUND, 403 SUB_ACCOUNT_FORBIDDEN, 403 SUB_ACCOUNT_SUSPENDED.
Requires the credential to have sub-account access enabled (Settings → Integration → API Credentials). It starts turned off and is not replaced by any permission, not even FULL_ACCESS: without it the response is 403 SUB_ACCOUNT_FORBIDDEN.
^[a-z0-9][a-z0-9_-]{1,31}$"loja-centro"
Body
Amount in BRL (e.g. 100.50 for R$ 100,50)
x >= 1150.75
Charge description
255"Pagamento do pedido #12345"
Payer details (all optional).
Show child attributes
Show child attributes
Project ID to associate the transaction with. If omitted, the charge inherits the account's project when there is a single one; with multiple projects the charge is created without a project.
Pins the institution that issues this charge, bypassing the configured routing. Use the ID shown under Settings → Routing in the dashboard. It must be an enabled, active institution of your account. If it is down or out of capacity, the charge FAILS — it does not fall back to another one: you asked for this one. Available to accounts with institution choice enabled.
"6e307aa4-4772-4230-a648-d88cee308f54"
Seconds until expiration (default: 86400 = 24h)
300 <= x <= 6048003600
Your external reference ID
255"pedido-12345"
Custom metadata (key-value pairs)
{ "orderId": "12345", "source": "website" }
Shares part of the amount with other sub-accounts of the same account, at settlement. Whoever creates the charge is the originator: it receives the gross amount, pays the full fee and only then splits — the fee is not shared with the recipients. The split sum cannot exceed the net amount (charge amount minus the fee). Refunds and MED debit the originator only; whoever received a share is never debited.
10Show child attributes
Show child attributes
Response
PIX charge created successfully
Charge ID (transaction ID)
Charge status
pending, completed, failed, cancelled Amount in BRL
150.75
Currency code
"BRL"
PIX copy-and-paste code
"00020126580014br.gov.bcb.pix0136a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Expiration date
Creation date
PIX QR Code as a data URI (data:image/png;base64,...)
Transaction ID at the payment service provider (PSP). Use it for reconciliation; absent if the PSP did not return the ID at creation.
"de3516a2-c63a-4c02-b132-a239bf42e183"
Institution that issued this charge. Only present when you pinned the institution in the request (pspCredentialId), as a receipt that it was honored.
"6e307aa4-4772-4230-a648-d88cee308f54"
Your external reference ID
"pedido-12345"
Accepted split, in BRL. Present only when the charge was created with a split — if it came back in the response, the sub-accounts existed and the sum fit in the net amount. What was actually distributed arrives in the payment_completed webhook.
Show child attributes
Show child attributes

