curl --request POST \
--url https://api.example.com/spi/v1/transfers/cashout/initiate \
--header 'Authorization: Bearer demo-access-token' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: pix-demo-20260903-000001' \
--header 'X-Account-Id: 019606a1-3b4c-7d8e-9f01-234567890abc' \
--data '{
"description": "Pagamento de aluguel",
"endToEndId": "E12345678202605061030abcdef12345",
"initiationType": "DICT",
"key": "pix-demo@example.com"
}'import requests
url = "https://api.example.com/spi/v1/transfers/cashout/initiate"
payload = {
"description": "Pagamento de aluguel",
"endToEndId": "E12345678202605061030abcdef12345",
"initiationType": "DICT",
"key": "pix-demo@example.com"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"X-Account-Id": "<x-account-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
'X-Account-Id': '<x-account-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
description: 'Pagamento de aluguel',
endToEndId: 'E12345678202605061030abcdef12345',
initiationType: 'DICT',
key: 'pix-demo@example.com'
})
};
fetch('https://api.example.com/spi/v1/transfers/cashout/initiate', 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.example.com/spi/v1/transfers/cashout/initiate",
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([
'description' => 'Pagamento de aluguel',
'endToEndId' => 'E12345678202605061030abcdef12345',
'initiationType' => 'DICT',
'key' => 'pix-demo@example.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"X-Account-Id: <x-account-id>"
],
]);
$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.example.com/spi/v1/transfers/cashout/initiate"
payload := strings.NewReader("{\n \"description\": \"Pagamento de aluguel\",\n \"endToEndId\": \"E12345678202605061030abcdef12345\",\n \"initiationType\": \"DICT\",\n \"key\": \"pix-demo@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("X-Account-Id", "<x-account-id>")
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.example.com/spi/v1/transfers/cashout/initiate")
.header("Idempotency-Key", "<idempotency-key>")
.header("X-Account-Id", "<x-account-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Pagamento de aluguel\",\n \"endToEndId\": \"E12345678202605061030abcdef12345\",\n \"initiationType\": \"DICT\",\n \"key\": \"pix-demo@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/spi/v1/transfers/cashout/initiate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["X-Account-Id"] = '<x-account-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"Pagamento de aluguel\",\n \"endToEndId\": \"E12345678202605061030abcdef12345\",\n \"initiationType\": \"DICT\",\n \"key\": \"pix-demo@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"amount": "10.00",
"createdAt": "2026-05-06T10:30:00Z",
"description": "Pagamento de aluguel",
"destination": {
"account": {
"branch": "0001",
"number": "0007654321",
"participant": "87654321",
"type": "CACC"
},
"key": "pix-demo@example.com",
"owner": {
"document": "12345678901",
"name": "João da Silva",
"tradeName": "Empresa Exemplo LTDA",
"type": "NATURAL_PERSON"
}
},
"endToEndId": "E12345678202605061030abcdef12345",
"expiresAt": "2026-05-06T10:35:00Z",
"id": "019606a1-3b4c-7d8e-9f01-234567890abc",
"initiationType": "DICT",
"source": {
"account": {
"branch": "0001",
"number": "0007654321",
"participant": "87654321",
"type": "CACC"
},
"key": "+5511999998888",
"owner": {
"document": "12345678901",
"name": "João da Silva",
"tradeName": "Empresa Exemplo LTDA",
"type": "NATURAL_PERSON"
}
},
"updatedAt": "2026-05-06T10:30:00Z"
}{
"code": "PIX-0030",
"title": "Idempotency Key Required",
"message": "The Idempotency-Key header is required for this operation and must be within the accepted length."
}{
"code": "PIX-0031",
"title": "Idempotency Key Conflict",
"message": "The Idempotency-Key was already used with a different request."
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Iniciar una transferencia Pix (paso 1)
Crea una iniciación de transferencia en estado PENDING y valida la cuenta de origen. El importe se proporciona durante el procesamiento.
curl --request POST \
--url https://api.example.com/spi/v1/transfers/cashout/initiate \
--header 'Authorization: Bearer demo-access-token' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: pix-demo-20260903-000001' \
--header 'X-Account-Id: 019606a1-3b4c-7d8e-9f01-234567890abc' \
--data '{
"description": "Pagamento de aluguel",
"endToEndId": "E12345678202605061030abcdef12345",
"initiationType": "DICT",
"key": "pix-demo@example.com"
}'import requests
url = "https://api.example.com/spi/v1/transfers/cashout/initiate"
payload = {
"description": "Pagamento de aluguel",
"endToEndId": "E12345678202605061030abcdef12345",
"initiationType": "DICT",
"key": "pix-demo@example.com"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"X-Account-Id": "<x-account-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
'X-Account-Id': '<x-account-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
description: 'Pagamento de aluguel',
endToEndId: 'E12345678202605061030abcdef12345',
initiationType: 'DICT',
key: 'pix-demo@example.com'
})
};
fetch('https://api.example.com/spi/v1/transfers/cashout/initiate', 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.example.com/spi/v1/transfers/cashout/initiate",
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([
'description' => 'Pagamento de aluguel',
'endToEndId' => 'E12345678202605061030abcdef12345',
'initiationType' => 'DICT',
'key' => 'pix-demo@example.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"X-Account-Id: <x-account-id>"
],
]);
$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.example.com/spi/v1/transfers/cashout/initiate"
payload := strings.NewReader("{\n \"description\": \"Pagamento de aluguel\",\n \"endToEndId\": \"E12345678202605061030abcdef12345\",\n \"initiationType\": \"DICT\",\n \"key\": \"pix-demo@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("X-Account-Id", "<x-account-id>")
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.example.com/spi/v1/transfers/cashout/initiate")
.header("Idempotency-Key", "<idempotency-key>")
.header("X-Account-Id", "<x-account-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Pagamento de aluguel\",\n \"endToEndId\": \"E12345678202605061030abcdef12345\",\n \"initiationType\": \"DICT\",\n \"key\": \"pix-demo@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/spi/v1/transfers/cashout/initiate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["X-Account-Id"] = '<x-account-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"Pagamento de aluguel\",\n \"endToEndId\": \"E12345678202605061030abcdef12345\",\n \"initiationType\": \"DICT\",\n \"key\": \"pix-demo@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"amount": "10.00",
"createdAt": "2026-05-06T10:30:00Z",
"description": "Pagamento de aluguel",
"destination": {
"account": {
"branch": "0001",
"number": "0007654321",
"participant": "87654321",
"type": "CACC"
},
"key": "pix-demo@example.com",
"owner": {
"document": "12345678901",
"name": "João da Silva",
"tradeName": "Empresa Exemplo LTDA",
"type": "NATURAL_PERSON"
}
},
"endToEndId": "E12345678202605061030abcdef12345",
"expiresAt": "2026-05-06T10:35:00Z",
"id": "019606a1-3b4c-7d8e-9f01-234567890abc",
"initiationType": "DICT",
"source": {
"account": {
"branch": "0001",
"number": "0007654321",
"participant": "87654321",
"type": "CACC"
},
"key": "+5511999998888",
"owner": {
"document": "12345678901",
"name": "João da Silva",
"tradeName": "Empresa Exemplo LTDA",
"type": "NATURAL_PERSON"
}
},
"updatedAt": "2026-05-06T10:30:00Z"
}{
"code": "PIX-0030",
"title": "Idempotency Key Required",
"message": "The Idempotency-Key header is required for this operation and must be within the accepted length."
}{
"code": "PIX-0031",
"title": "Idempotency Key Conflict",
"message": "The Idempotency-Key was already used with a different request."
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Autorizaciones
JWT bearer token issued by the identity provider.
Encabezados
Clave generada por el cliente para reintentar exactamente la misma solicitud de forma segura.
1 - 64UUID de la cuenta asociada a la operación.
"019606a1-3b4c-7d8e-9f01-234567890abc"
Cuerpo
Resolution strategy for the destination
"DICT"
Free-form payment description
"Pagamento de aluguel"
Manual destination (MANUAL initiation only)
Show child attributes
Show child attributes
EMV BR Code payload (QR_CODE initiation only)
"00020101021126360014br.gov.bcb.pix0114+5511999998888520400005303986540510.005802BR5913JOAO DA SILVA6008BRASILIA62070503***63045B56"
Optional caller-supplied 32-char BCB endToEndId
"E12345678202605061030abcdef12345"
DICT key (DICT initiation only)
"+5511999998888"
Respuesta
Created
"2026-05-06T10:30:00Z"
"2026-05-06T10:35:00Z"
"019606a1-3b4c-7d8e-9f01-234567890abc"
"DICT"
"2026-05-06T10:30:00Z"
"10.00"
"Pagamento de aluguel"
Show child attributes
Show child attributes
"00020101021126360014br.gov.bcb.pix0114+5511999998888520400005303986540510.005802BR5913JOAO DA SILVA6008BRASILIA62070503***63045B56"
"E12345678202605061030abcdef12345"
Show child attributes
Show child attributes
¿Esta página le ayudó?

