curl -X GET "https://pagamentos.basspago.com.br/api/v2/infractions/b2d4f6a8-1357-4ace-9bdf-024681357900" \
--cert ./client.crt \
--key ./client.key \
--pass "SUA_SENHA_DO_CERTIFICADO" \
-H "Authorization: Bearer {access_token}"
<?php
$infractionId = 'b2d4f6a8-1357-4ace-9bdf-024681357900';
$ch = curl_init("https://pagamentos.basspago.com.br/api/v2/infractions/{$infractionId}");
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 infractionId = "b2d4f6a8-1357-4ace-9bdf-024681357900";
const { data } = await axios.get(
`https://pagamentos.basspago.com.br/api/v2/infractions/${infractionId}`,
{
httpsAgent: agent,
headers: { Authorization: "Bearer {access_token}" },
}
);
console.log(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
},
"debtor": {
"name": "Carlos Henrique Souza",
"document": "11144477735",
"documentType": "CPF"
},
"creditor": {
"name": "Sua Loja Ltda",
"document": "12345678000199",
"documentType": "CNPJ"
},
"createdAt": "2026-07-21T10:30:00Z",
"lastUpdatedAt": "2026-07-21T18:56:00Z",
"deadline": "2026-07-22T23:59:59Z",
"defenseSubmittedAt": null,
"closedAt": null
}
Contestações
Consultar infração
Consulte os detalhes de uma contestação (MED) pelo ID.
GET
/
api
/
v2
/
infractions
/
{infractionId}
curl -X GET "https://pagamentos.basspago.com.br/api/v2/infractions/b2d4f6a8-1357-4ace-9bdf-024681357900" \
--cert ./client.crt \
--key ./client.key \
--pass "SUA_SENHA_DO_CERTIFICADO" \
-H "Authorization: Bearer {access_token}"
<?php
$infractionId = 'b2d4f6a8-1357-4ace-9bdf-024681357900';
$ch = curl_init("https://pagamentos.basspago.com.br/api/v2/infractions/{$infractionId}");
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 infractionId = "b2d4f6a8-1357-4ace-9bdf-024681357900";
const { data } = await axios.get(
`https://pagamentos.basspago.com.br/api/v2/infractions/${infractionId}`,
{
httpsAgent: agent,
headers: { Authorization: "Bearer {access_token}" },
}
);
console.log(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
},
"debtor": {
"name": "Carlos Henrique Souza",
"document": "11144477735",
"documentType": "CPF"
},
"creditor": {
"name": "Sua Loja Ltda",
"document": "12345678000199",
"documentType": "CNPJ"
},
"createdAt": "2026-07-21T10:30:00Z",
"lastUpdatedAt": "2026-07-21T18:56:00Z",
"deadline": "2026-07-22T23:59:59Z",
"defenseSubmittedAt": null,
"closedAt": null
}
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}.Path
string
required
Identificador da contestação (MED) que você quer consultar.
Resposta
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).object
Dados da parte pagadora (
name, document, documentType).object
Dados da parte recebedora (
name, document, documentType).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).
string
Data e hora do envio da defesa.
null se ainda não houver defesa.string
Data e hora do encerramento.
null se a contestação ainda estiver aberta.curl -X GET "https://pagamentos.basspago.com.br/api/v2/infractions/b2d4f6a8-1357-4ace-9bdf-024681357900" \
--cert ./client.crt \
--key ./client.key \
--pass "SUA_SENHA_DO_CERTIFICADO" \
-H "Authorization: Bearer {access_token}"
<?php
$infractionId = 'b2d4f6a8-1357-4ace-9bdf-024681357900';
$ch = curl_init("https://pagamentos.basspago.com.br/api/v2/infractions/{$infractionId}");
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 infractionId = "b2d4f6a8-1357-4ace-9bdf-024681357900";
const { data } = await axios.get(
`https://pagamentos.basspago.com.br/api/v2/infractions/${infractionId}`,
{
httpsAgent: agent,
headers: { Authorization: "Bearer {access_token}" },
}
);
console.log(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
},
"debtor": {
"name": "Carlos Henrique Souza",
"document": "11144477735",
"documentType": "CPF"
},
"creditor": {
"name": "Sua Loja Ltda",
"document": "12345678000199",
"documentType": "CNPJ"
},
"createdAt": "2026-07-21T10:30:00Z",
"lastUpdatedAt": "2026-07-21T18:56:00Z",
"deadline": "2026-07-22T23:59:59Z",
"defenseSubmittedAt": null,
"closedAt": null
}