Author Image

andrii1303

May 24, 2024

Problema com resposta 'chave_invalida' ao realizar pagamento

integraçãoAPIproblemachavepagadorfavorecidorespostarequest

Hi, I have a problem with pay. I have such response. {'nome': 'chave_invalida', 'mensagem': 'A chave informada não faz referência à conta Efí autenticada'}. Could you please help me?

Respostas (5):
Avatar discord do usuario joaolucas_efi

joaolucas_efi

24/05/2024

This response means that the chave that you sent in request isn't from the account that you made the request.

Avatar discord do usuario andrii1303

andrii1303

24/05/2024

How to find out which one is wrong? "pagador" or "favorecido"

Avatar discord do usuario joaolucas_efi

joaolucas_efi

24/05/2024

In this case the pagador, favorecido means who will receive the value

Avatar discord do usuario andrii1303

andrii1303

24/05/2024

body = {
"valor": f"{payment.ticket.price_seller_formatted}.00",
"pagador": {
"chave": self.EFI_FT_PIX_KEY,
},
"favorecido": {
"chave": payment.ticket.seller.efi_key,
},
}

Is it not correct request?
pagador = from
favorecido = to

Avatar discord do usuario joaolucas_efi

joaolucas_efi

24/05/2024

This is correct, but in this case the credentials that you use are not from the account that own the self.EFI_FT_PIX_KEY.