Comunidade
Parâmetro "boleto.holder" inválido
Não estou entendendo porque recebo como resposta o seguinte:
"error_messages": [
{
"code": "40002",
"description": "invalid_parameter",
"parameter_name": "charges[0].payment_method.boleto.holder.name"
}
Experimentei o exemplo (Criar/Pagar Pedido - BOLETO) dado pela documentação, em https://developer.pagbank.com.br/reference/criar-pedido e também retornou o mesmo erro mencionado acima.
Segue requisição em detalhes (log pagbank) da minha requisição
400
{
"id": "c2353404-92e5-41a8-a750-d232c155e531",
"request": {
"method": "POST",
"headers": {
"authorization": "58613a59-8.....",
"x-idempotency-key": "67928bbb3d1247004908b171",
"content-type": "application/json"
},
"params": {},
"body": {
"customer": {
"name": "João Fulano",
"email": "[email protected]",
"tax_id": "3135......",
"phones": [
{
"country": "55",
"area": "11",
"number": "777778888",
"type": "MOBILE"
}
]
},
"items": [
{
"name": "Inibidor de Cheiro Capilar Septh Hair",
"quantity": "1",
"unit_amount": "3990"
}
],
"shipping": {
"address": {
"street": "Rua São Luiz",
"number": "77",
"complement": "A",
"locality": "Centro",
"city": "São Paulo",
"region_code": "SP",
"country": "BRA",
"postal_code": "17500001"
}
},
"reference_id": "67928bbb3d1247004908b171",
"charges": [
{
"reference_id": "referencia da cobranca",
"description": "descricao da cobranca",
"amount": {
"value": "500",
"currency": "BRL"
},
"payment_method": {
"type": "BOLETO",
"boleto": {
"due_date": "2023-06-20",
"instruction_lines": {
"[line_1]": "Pagamento processado para DESC Fatura",
"[line_2]": "Via PagSeguro"
},
"holder": {
"[name]": "Jose da Silva",
"[tax_id]": "12345679891",
"[email]": "[email protected]",
"[address][country]": "Brasil",
"[address][region]": "São Paulo",
"[address][region_code]": "SP",
"[address][city]": "Sao Paulo",
"[address][postal_code]": "01452002",
"[address][street]": "Avenida Brigadeiro Faria Lima",
"[address][number]": "1384",
"[address][locality]": "Pinheiros"
}
}
}
}
],
"notification_urls": [
"https://mysite.com.br/pagbank-response"
]
}
},
"response": {
"headers": {
"content-length": "135",
"Date": "Thu, 23 Jan 2025 19:31:18 GMT",
"Content-Type": "application/json"
},
"body": {
"error_messages": [
{
"code": "40002",
"description": "invalid_parameter",
"parameter_name": "charges[0].payment_method.boleto.holder.name"
}
]
},
"status-code": 400
},
"created": "2025-01-23T16:31:18.618-03:00"
}