Corrigi dois problemas importantes: adicionei formatação adequada ao número de telefone para o padrão brasileiro (XX) X XXXX-XXXX e incluí o campo cnpj: null no objeto client para corresponder exatamente aos exemplos da documentação da API. O telefone agora é formatado automaticamente com parênteses, espaços e traços conforme esperado pela Amplo Pay.
I detected and automatically synced new changes from main in v0-remix-of-untitled-chat-4z.
The code returns the following error:
fetch to https://app.amplopay.com/api/v1/gateway/pix/receive failed with status 400 and body: {"statusCode":400,"errorCode":"GATEWAY_INVALID_DATA","message":"Invalid request data, check 'details' for more information.","details":[{"validation":"url","code":"invalid_string","message":"Invalid url","path":["callbackUrl"]}]}
at async createPixPayment (/app/checkout/actions)
at async handleSubmit (/app/checkout/page)
Revise the code to address the error.
I was previewing: /checkout