Consultar status de uma cobrança PIX (cash-in)
curl --request POST \
--url https://api.paysurebr.com/v1/pix/cashin/consult \
--header 'Content-Type: application/json' \
--header 'ci: <api-key>' \
--data '
{
"reference_code": "PSR-9c8f7a1e-4d2b-4e6a-8c9f-1a2b3c4d5e6f",
"external_reference": "<string>"
}
'import requests
url = "https://api.paysurebr.com/v1/pix/cashin/consult"
payload = {
"reference_code": "PSR-9c8f7a1e-4d2b-4e6a-8c9f-1a2b3c4d5e6f",
"external_reference": "<string>"
}
headers = {
"ci": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {ci: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
reference_code: 'PSR-9c8f7a1e-4d2b-4e6a-8c9f-1a2b3c4d5e6f',
external_reference: '<string>'
})
};
fetch('https://api.paysurebr.com/v1/pix/cashin/consult', 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.paysurebr.com/v1/pix/cashin/consult",
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([
'reference_code' => 'PSR-9c8f7a1e-4d2b-4e6a-8c9f-1a2b3c4d5e6f',
'external_reference' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"ci: <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.paysurebr.com/v1/pix/cashin/consult"
payload := strings.NewReader("{\n \"reference_code\": \"PSR-9c8f7a1e-4d2b-4e6a-8c9f-1a2b3c4d5e6f\",\n \"external_reference\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("ci", "<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.paysurebr.com/v1/pix/cashin/consult")
.header("ci", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"reference_code\": \"PSR-9c8f7a1e-4d2b-4e6a-8c9f-1a2b3c4d5e6f\",\n \"external_reference\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paysurebr.com/v1/pix/cashin/consult")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["ci"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reference_code\": \"PSR-9c8f7a1e-4d2b-4e6a-8c9f-1a2b3c4d5e6f\",\n \"external_reference\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"cashin": {
"reference_code": "<string>",
"external_reference": "<string>",
"value_cents": 123,
"status": "pending",
"payment_date": "2023-11-07T05:31:56Z",
"end_to_end": "<string>",
"payer_name": "<string>",
"payer_document": "<string>"
}
}{
"message": "<string>",
"ms": 123
}Cash-in
Consultar cash-in
Informe reference_code (nosso PSR-...) ou external_reference (seu external_id). Basta um.
POST
/
v1
/
pix
/
cashin
/
consult
Consultar status de uma cobrança PIX (cash-in)
curl --request POST \
--url https://api.paysurebr.com/v1/pix/cashin/consult \
--header 'Content-Type: application/json' \
--header 'ci: <api-key>' \
--data '
{
"reference_code": "PSR-9c8f7a1e-4d2b-4e6a-8c9f-1a2b3c4d5e6f",
"external_reference": "<string>"
}
'import requests
url = "https://api.paysurebr.com/v1/pix/cashin/consult"
payload = {
"reference_code": "PSR-9c8f7a1e-4d2b-4e6a-8c9f-1a2b3c4d5e6f",
"external_reference": "<string>"
}
headers = {
"ci": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {ci: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
reference_code: 'PSR-9c8f7a1e-4d2b-4e6a-8c9f-1a2b3c4d5e6f',
external_reference: '<string>'
})
};
fetch('https://api.paysurebr.com/v1/pix/cashin/consult', 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.paysurebr.com/v1/pix/cashin/consult",
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([
'reference_code' => 'PSR-9c8f7a1e-4d2b-4e6a-8c9f-1a2b3c4d5e6f',
'external_reference' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"ci: <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.paysurebr.com/v1/pix/cashin/consult"
payload := strings.NewReader("{\n \"reference_code\": \"PSR-9c8f7a1e-4d2b-4e6a-8c9f-1a2b3c4d5e6f\",\n \"external_reference\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("ci", "<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.paysurebr.com/v1/pix/cashin/consult")
.header("ci", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"reference_code\": \"PSR-9c8f7a1e-4d2b-4e6a-8c9f-1a2b3c4d5e6f\",\n \"external_reference\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paysurebr.com/v1/pix/cashin/consult")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["ci"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reference_code\": \"PSR-9c8f7a1e-4d2b-4e6a-8c9f-1a2b3c4d5e6f\",\n \"external_reference\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"cashin": {
"reference_code": "<string>",
"external_reference": "<string>",
"value_cents": 123,
"status": "pending",
"payment_date": "2023-11-07T05:31:56Z",
"end_to_end": "<string>",
"payer_name": "<string>",
"payer_document": "<string>"
}
}{
"message": "<string>",
"ms": 123
}Consulta o status atual de uma cobrança PIX gerada anteriormente.
Use o
reference_code retornado em POST /v1/pix/qrcode para identificar a transação.
Não use polling agressivo. Confie no webhook em
postbackUrl como fonte primária de status. Use essa rota apenas para reconciliação manual.Authorizations
Autenticação por par client-credentials. Envie dois headers em toda requisição:
ci: client_id (público)cs: client_secret (privado — nunca exponha no frontend)
Gere as credenciais no painel da Paysure em API Keys. Você pode ter múltiplas chaves ativas.
Body
application/json
Response
Status do cash-in
Show child attributes
Show child attributes

