curl -X GET "https://pagamentos.basspago.com.br/api/v2/infractions?last_change_start=2026-07-01T00:00:00Z&last_change_end=2026-07-31T23:59:59Z" \
--cert ./client.crt \
--key ./client.key \
--pass "SUA_SENHA_DO_CERTIFICADO" \
-H "Authorization: Bearer {access_token}"
<?php
$query = http_build_query([
'last_change_start' => '2026-07-01T00:00:00Z',
'last_change_end' => '2026-07-31T23:59:59Z',
]);
$ch = curl_init("https://pagamentos.basspago.com.br/api/v2/infractions?{$query}");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSLCERT => './client.crt',
CURLOPT_SSLKEY => './client.key',
CURLOPT_KEYPASSWD => 'SUA_SENHA_DO_CERTIFICADO',
CURLOPT_HTTPHEADER => ['Authorization: Bearer {access_token}'],
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import fs from "node:fs";
import https from "node:https";
import axios from "axios";
const agent = new https.Agent({
cert: fs.readFileSync("./client.crt"),
key: fs.readFileSync("./client.key"),
passphrase: "SUA_SENHA_DO_CERTIFICADO",
});
const { data } = await axios.get(
"https://pagamentos.basspago.com.br/api/v2/infractions",
{
httpsAgent: agent,
headers: { Authorization: "Bearer {access_token}" },
params: {
last_change_start: "2026-07-01T00:00:00Z",
last_change_end: "2026-07-31T23:59:59Z",
},
}
);
console.log(data);
{
"data": [
{
"id": "b2d4f6a8-1357-4ace-9bdf-024681357900",
"type": "MED",
"status": "WAITING_ADJUSTMENTS",
"endToEndId": "E87654321202607211856a1b2c3d4e5f",
"reportedBy": "CREDITOR_PSP",
"reportDetails": "Cliente contestou o pagamento por suspeita de fraude",
"transactionAmount": {
"currency": "BRL",
"amount": 49.90
},
"createdAt": "2026-07-21T10:30:00Z",
"lastUpdatedAt": "2026-07-21T18:56:00Z",
"deadline": "2026-07-22T23:59:59Z"
}
],
"pagination": {
"totalItems": 1,
"totalPages": 1,
"currentPage": 1,
"pageSize": 10
}
}
Contestações
Listar contestações
Liste as contestações (MEDs) da sua conta por período.
GET
/
api
/
v2
/
infractions
curl -X GET "https://pagamentos.basspago.com.br/api/v2/infractions?last_change_start=2026-07-01T00:00:00Z&last_change_end=2026-07-31T23:59:59Z" \
--cert ./client.crt \
--key ./client.key \
--pass "SUA_SENHA_DO_CERTIFICADO" \
-H "Authorization: Bearer {access_token}"
<?php
$query = http_build_query([
'last_change_start' => '2026-07-01T00:00:00Z',
'last_change_end' => '2026-07-31T23:59:59Z',
]);
$ch = curl_init("https://pagamentos.basspago.com.br/api/v2/infractions?{$query}");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSLCERT => './client.crt',
CURLOPT_SSLKEY => './client.key',
CURLOPT_KEYPASSWD => 'SUA_SENHA_DO_CERTIFICADO',
CURLOPT_HTTPHEADER => ['Authorization: Bearer {access_token}'],
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import fs from "node:fs";
import https from "node:https";
import axios from "axios";
const agent = new https.Agent({
cert: fs.readFileSync("./client.crt"),
key: fs.readFileSync("./client.key"),
passphrase: "SUA_SENHA_DO_CERTIFICADO",
});
const { data } = await axios.get(
"https://pagamentos.basspago.com.br/api/v2/infractions",
{
httpsAgent: agent,
headers: { Authorization: "Bearer {access_token}" },
params: {
last_change_start: "2026-07-01T00:00:00Z",
last_change_end: "2026-07-31T23:59:59Z",
},
}
);
console.log(data);
{
"data": [
{
"id": "b2d4f6a8-1357-4ace-9bdf-024681357900",
"type": "MED",
"status": "WAITING_ADJUSTMENTS",
"endToEndId": "E87654321202607211856a1b2c3d4e5f",
"reportedBy": "CREDITOR_PSP",
"reportDetails": "Cliente contestou o pagamento por suspeita de fraude",
"transactionAmount": {
"currency": "BRL",
"amount": 49.90
},
"createdAt": "2026-07-21T10:30:00Z",
"lastUpdatedAt": "2026-07-21T18:56:00Z",
"deadline": "2026-07-22T23:59:59Z"
}
],
"pagination": {
"totalItems": 1,
"totalPages": 1,
"currentPage": 1,
"pageSize": 10
}
}
Essa rota utiliza os certificados e o Bearer Token de Cash Out.
Todo MED exige resposta em até 24 horas quando o status for
WAITING_ADJUSTMENTS (ou equivalente aguardando resposta). Trate esses eventos com prioridade.Fluxo de status:
WAITING_PSP (aguardando sua ação) → DEFENDED (depois que você envia a defesa) ou CLOSED (contestação encerrada). Acompanhe cada contestação para não perder o prazo de resposta.Certificados
Esta rota usa autenticação mútua (mTLS). Envie o certificado de Cash Out, a chave e a senha na requisição:file
required
Certificado de Cash Out do cliente (
client.crt).file
required
Chave privada do cliente (
client.key).string
required
Senha para descriptografar a chave
.key, enviada por e-mail junto com os certificados.Headers
string
required
Bearer Token de Cash Out. Formato:
Bearer {access_token}.Query
string
required
Início do filtro pela última alteração, no formato ISO 8601. Exemplo:
2026-07-01T00:00:00Z.string
required
Fim do filtro pela última alteração, no formato ISO 8601. Exemplo:
2026-07-31T23:59:59Z.integer
Página da consulta (mínimo
1).integer
Registros por página, de
1 a 100. Padrão: 10.string
Campo usado para ordenar os resultados:
EVENT_DATE ou STATUS.string
Filtra pelo status da contestação:
ALL, ACKNOWLEDGED, WAITING_ADJUSTMENTS, DEFENDED ou CLOSED.Resposta
array
Lista de contestações encontradas no período.
Show data
Show data
string
Identificador da contestação (MED).
string
Tipo da contestação (ex.:
MED).string
Status atual da contestação.
string
Identificador end-to-end do Pix contestado.
string
Quem abriu a contestação.
string
Motivo informado na abertura da contestação.
object
Valor da transação contestada (
currency, amount).string
Data e hora de abertura (ISO 8601).
string
Data e hora da última atualização (ISO 8601).
string
Prazo limite para resposta (ISO 8601).
object
Dados de paginação:
totalItems, totalPages, currentPage e pageSize.curl -X GET "https://pagamentos.basspago.com.br/api/v2/infractions?last_change_start=2026-07-01T00:00:00Z&last_change_end=2026-07-31T23:59:59Z" \
--cert ./client.crt \
--key ./client.key \
--pass "SUA_SENHA_DO_CERTIFICADO" \
-H "Authorization: Bearer {access_token}"
<?php
$query = http_build_query([
'last_change_start' => '2026-07-01T00:00:00Z',
'last_change_end' => '2026-07-31T23:59:59Z',
]);
$ch = curl_init("https://pagamentos.basspago.com.br/api/v2/infractions?{$query}");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSLCERT => './client.crt',
CURLOPT_SSLKEY => './client.key',
CURLOPT_KEYPASSWD => 'SUA_SENHA_DO_CERTIFICADO',
CURLOPT_HTTPHEADER => ['Authorization: Bearer {access_token}'],
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import fs from "node:fs";
import https from "node:https";
import axios from "axios";
const agent = new https.Agent({
cert: fs.readFileSync("./client.crt"),
key: fs.readFileSync("./client.key"),
passphrase: "SUA_SENHA_DO_CERTIFICADO",
});
const { data } = await axios.get(
"https://pagamentos.basspago.com.br/api/v2/infractions",
{
httpsAgent: agent,
headers: { Authorization: "Bearer {access_token}" },
params: {
last_change_start: "2026-07-01T00:00:00Z",
last_change_end: "2026-07-31T23:59:59Z",
},
}
);
console.log(data);
{
"data": [
{
"id": "b2d4f6a8-1357-4ace-9bdf-024681357900",
"type": "MED",
"status": "WAITING_ADJUSTMENTS",
"endToEndId": "E87654321202607211856a1b2c3d4e5f",
"reportedBy": "CREDITOR_PSP",
"reportDetails": "Cliente contestou o pagamento por suspeita de fraude",
"transactionAmount": {
"currency": "BRL",
"amount": 49.90
},
"createdAt": "2026-07-21T10:30:00Z",
"lastUpdatedAt": "2026-07-21T18:56:00Z",
"deadline": "2026-07-22T23:59:59Z"
}
],
"pagination": {
"totalItems": 1,
"totalPages": 1,
"currentPage": 1,
"pageSize": 10
}
}