Pay button like API that will connect to Bubbe database

Hi,

I would like to create a REST API which will allow users from non bubble apps to access to Bubble database via a button (just like paypal express checkout):

1/ open an external page
2/ user can login securely to bubble (return data as response to API) through a page I will create
3/ Return to other non bubble url

Like a lightbox.

Is it possible with Bubble?
Thanks