Help! I need to Connect a Payment API

Eu preciso de Ajuda para conectar minha plataforma de pagamentos (Mercado Pago) ao meu projeto no Weweb, via api

Segue a documentação: https://www.mercadopago.com.br/developers/pt/reference/

Não estou conseguindo, erro de network toda a vez, me ajudem urgente

++++++++++++ ENGLISH

I need help connecting my payments platform (Mercado Pago) to my Weweb project, via API

Below is the documentation: https://www.mercadopago.com.br/developers/pt/reference/

I can’t get it, network error every time, help me urgently

I think it would be great if you added some context, like what you already tried for example :slight_smile:

I’m new to this low code world! I tried to connect the api normally through “api rest”, but it works
“Network Error” and I can’t continue with development, I’m creating a platform for selling event tickets, and I need to link a payment gatewayy

It’s probably a CORS issues since this API is not meant to be used from the frontend, but from a secure backend.

From the beginning of the page you linked:

Importante
Nunca exponha sua chave privada em um repositório público, nem a utilize no seu código do lado do cliente. Faça-o sempre com segurança a partir do seu servidor.

Yes, I understand! Can you suggest solutions for me to do this integration?

weweb makes a request to an endpoint on you backend of choice (supabase, xano etc), your backend makes the request to the payment api and then return the result to weweb. This way your secret key stays on your backend and it is not exposed to the client.

I already thought about this point. But I was unable to perform the integration within my backend (xano)
I looked for some tutorials, but I didn’t find anything similar.

Thank you for your help
I appreciate that!

If you could direct me on how I can use this API in my application, I would be grateful.

** I use XANO, but I can use another backend if necessary

why were you unable do make the requests from xano? have you checked External API Request - Xano Documentation

I couldn’t make the API calls because I didn’t know how, I’m new to this area and I’m learning along with this project
I’ll try again with the documentation you sent me and I’ll get back to you with feedback.

I still haven’t found a solution for this project…

I found this integration option but I still need help, it asks to install a js library and an SDK, but I don’t know how to do that, if you can help me I’d be grateful

https://www.mercadopago.com.br/developers/pt/docs/checkout-bricks/landing

If it is like stripe you are talking about two different things. The rest api is probably the main interface to the payment provider, while the js sdk is probably to integrate ready-made checkout components in your page to avoid redirects.
I think you need to figure out the rest api first because you will need it anyway to interact from the server, and also because you really need to learn how to work with rest api in both xano and weweb. It’s not difficult, you just need to follow the tutorials that you find on the docs of the platforms. It’s usually easier to learn with an easier rest api and then apply the logic to the api you need.

Of course you can go the mentorship way and have somebody teach you this stuff, or you can hire somebody to do the integration for you, but I think that for the rest api you will be ok with the tutorials and some practice.

I’ve already managed to make the API call, I’m in the final step! I just need to know how I can implement this js library to add the checkout element and finish my application

Thank you for your support

well, for that you need to dip your hands with js and read the sdk documentation :upside_down_face:

1 Like

@Lapola deu certo a integração?

Deu certo Sim! Quebrei a cabeça mas consegui