Payments API location id / application id structure for unique application

I have an application I’ve built where I’d like to have my applications users collect square payments via the payment api. Right now, I capture my customers location id and have them setup an application in their Square Developer Portal so I can then capture their application id and their access token. Within my code base, for each logged in customer, I authorize any charges from within the app to their account to capture the charge on their Square account. However, I’d like to charge users of my customers application a convenience fee that should go to me, the application developer.

How should I configure my application with regards to my customers square account for the payments api to correctly authorize and accept payment? I thought I should use their location Id, but my own application id / access token so I can use the fee feature to charge my convenience fee, but insure the captured payment went to my customers square account rather than my own, but that didn’t work.

Anyone have any ideas how I can use the payment API to accept payments for my customers using their Square accounts (aka their own banks) but my application Id so I can charge a fee for using my app, but not collect their payments.

Square’s OAuth API will be what you’ll use to let Square merchants authorize your application and enables you to make API calls on behalf of Square sellers. You will then be able to use the app_fee_money to collect a fee from each payment and have the remaining amount go to your customers Square account.

Thanks so much for pointing this out! I did have a few follow up questions.

If we wanted our application customers to have a seamless experience, there is no other way to do this, correct? They’ll be forced to authorize and launch the “Are you ok with app foo bar charging payments, etc.” and after that we are forced to in our back end refresh our code / token every x days (less than 30) to ensure when someone uses the app our customers don’t have to go through the process all over again?

If the contexts helps, we’re basically using Square to capture payments from a mobile menu based application (think Seamless or Uber Eats). I’m trying to think of the lowest friction way for our customers (restaurants) to not have to do much on their end and make sure our their customers (restaurant customers ordering food) can pay without any friction.

Thanks!