Hi! I have developed a desktop application in java. Now I want to do payment integration with this app. Actually I

have to do payment integration for first time in my life. So i have some questions/confusions for payment integration. But

before asking those questions I tell you that what i want actually.

I have many features in my app. I want that some a features available for free and some availabe after the user

purchase my software

Questions:

1:) I have no website and i have not hosted my software on any hosting website. Is it compulsory to have any web

site if i want to do payment integration(For example if I want to use payza integration or payoneer integration)?

or my java application can directly use integration API and connect to gateway of any money transfer website(e.g

payza or payoneer)?

2:)Can I host my software on any free hosting site so that people anywhere in the world download and purchase my

software?

Thanx in advance

Dani AI

Generated

Practical options and a simple workflow for adding a Buy button to a Java desktop app (no full website required).

There are three common approaches. 1) Minimal: use a payment provider that offers a hosted checkout page or a payment link. The app opens the system browser to that URL; the provider collects card data and can deliver a file or send an automatic receipt/email. This requires no server-side code, but it limits automation (no guaranteed machine-readable proof of payment). 2) Recommended: a tiny HTTPS backend to receive provider webhooks, generate or record a license, and deliver an activation token to the buyer. 3) Full control: same as (2) but issue signed license tokens so the client can verify them offline.

Example: open a hosted checkout from Java (very small example):

import java.awt.Desktop;
import java.net.URI;

Desktop.getDesktop().browse(new URI("https://your-checkout-url"));

For reliable licensing without embedding secrets in the client, generate a license on the server and sign it with an RSA private key; the app verifies the signature with the public key. Verification sketch (server signs, client verifies):

Signature sig = Signature.getInstance("SHA256withRSA");
sig.initVerify(publicKey);
sig.update(licenseData.getBytes(StandardCharsets.UTF_8));
boolean valid = sig.verify(Base64.getDecoder().decode(signatureB64));

Practical notes and cautions: never store payment API secrets inside the desktop binary. Use provider-hosted checkout to reduce PCI scope. A free or low-cost host can run the webhook/activation endpoint, but confirm it supports HTTPS and the provider’s webhook requirements. For development, expose a local webhook receiver with a tunnel (eg, ngrok) to test. As suggested, there are many implementation guides; as warned, Java binaries can be decompiled, so enforce entitlement server-side and treat obfuscation only as deterrent; and as implied, weigh price/effort vs likely piracy.

Recommended Answers

All 10 Replies

To me, after reading your post twice I get the feeling this is the following question.

How do I sell my Java app?

It appears that's been kicked around for over a decade so the answer is up to you. You can do this however you want today.

I just simply want a "Buy" button in my app.After when user presses that button , a page should open where he can buy my software by giving his credit/ATM card number e.t.c.
I want such thing.

I have no tension about marketing strategy of my app. I just want payment integration.
I want that i upload my app on any hosting site or server and then provide the link to my software in "post" on social media website (e.g facebook). Then the interersted user open that link and then download and install my software.

After installing my software he can only uses basic features and for using all the features , there should a "Buy " button. After pressing that button, he must directed to a money transfer website and then give his credit/ATM card number and purchase that all advanced features of my software.... This is the thing what i want. I hope u will understand my problem and guide me.

You wrote what you want, so now it's time for you to add the button, code and use any of the methods kicked around before.

In other words, take your wants and start coding, using what folk have written about in the past.

also: unless your 'app' is just a front-end connecting to a remote back-end, forget it. Java is pretty easy to decompile.
ship off your .jar (or whatever) file, and it might take the user less than 5 minutes to have full functionality anyway.

, good point. Just recently our office picked up on a development project and they were worrying about decompilers so they were expending time (which is money) on that area. They were taken aback that we don't bother with obfuscation at all. Our focus and energy is strictly applied to the app's problems and resolution. If they want obfuscation, we were pretty blunt that their intern could handle that but we don't bother at all.

Mind you we deal with apps that are specialized and of no interest to hackers or just about anyone else.

I think the obfuscation/hacking issue is much over-rated. Although decompiling and modifying a jar is possible, few people have the necessary skills and even fewer can be bothered unless it’s a really desirable program with too high a cost. If you set a sensible price then it will be less painful to pay than to hack every new version as you keep releasing updates.
Ok, so maybe there will also be the1% who will hack it just because they can, so ignore them.

Mind you we deal with apps that are specialized and of no interest to hackers or just about anyone else

Although decompiling and modifying a jar is possible, few people have the necessary skills and even fewer can be bothered unless it’s a really desirable program with too high a cost

Though those are good points, this looks a bit like the "buying the cow versus free milk" debate. If the software isn't worth it: why buying it? You would have to pay
a. purchase fee
b. maintenance fee(s)

in order to have a running application which is kept up to date. Would many want to do that for software they can (nowadays) easily write/generate themselves?

So: there's no real need for a payment service unless the software is worth stealing :)
having (free) access to decent commercial software, will easily turn a profit.

Thank you very much to all the guys for your guidance and replies.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.