SlideShare a Scribd company logo
1 of 13
Download to read offline
In App Purchase
In app purchase is a relatively simple feature with a bit of hassle from the stores who handle the product management. The API itself is trivial
What’s In App Purchase?
✦ In app purchase allows us to use the Google Play or
iTunes billing system to pay for virtual goods
✦ This is a huge benefit as payment can be as easy as a
single click and very convenient
✦ It’s also a restriction, both Apple & Google prohibit the
sale of virtual goods in any other way!
✦ The drawbacks are: 30% commission & you can’t/
shouldn’t pay for non-virtual goods
Before we begin lets review the basics of what is in-app-purchase. In app purchase allows us to use the same billing support Apple & Google use for buying apps in
order to sell items within the app. You can use this to sell virtual goods which means things that are parts of the application such as digital content, upgrades, in-app
features, game elements etc.

Using in-app-purchase is much easier than credit card billing or any other form of payment as the whole process is managed by Google or Apple. 

However, it’s also a requirement. If you have elements sold within your app you might get banned if you don’t use in app purchase. As an example we recently updated
the kitchen sink demo in the Apple appstore and got a rejection. The tester reviewed the link in the app to codenameone.com and complained that we sell items within
the site (the subscription) and don’t use in-app-purchase. We explained that that app is completely free and the subscription has nothing to do with the app and the app
passed the verification.

This should obviously teach you that communication in these cases is bidirectional and also how serious Apple is about the in-app-purchase requirement.

So why don’t we sell Codename One subscriptions via in-app-purchase. This is something we are actually considering but the main demotivation is the 30% commission
to Apple. They now have a special case for subscriptions that might make them more financially viable so we might add that in the future as an option but overall in-app-
purchase is expensive. If you are having thoughts about charging extra for in-app-purchase made thru the app that would be a problem as it’s prohibited by the Apple
terms of service.
Let’s start by looking at the code for in app purchase. Just like push requires the push callback in the main class, in app purchase requires the callback in the main class
too.
I’ll skip ahead to the callback methods for the purchase. itemPurchased is the actual purchase callback and it includes the sku representing the item that was purchased.
An sku is a constant value that you define when you setup the items in google play or itunes connect. The sku lets you determine the item that the user purchased when
you have more than one item. We are calling into the pending build method in this case to proceed with the purchase flow we started there. I’ll go into that soon.

We have an error callback as well which we can use for error logging. The refund callback might be interesting if this is a feature you can disable on refund but in this
case if a user asks for a refund there isn’t much we can do as the app was already built. 

The rest of the callbacks relate to subscription and manual purchase callback which is no longer used. Subscription is a subject in its own right that I won’t get into here.
But it’s a very good direction as it allows a constant and steady stream of revenue.

Lets move into the AppForm code for purchase
The purchase UI shows a dialog with commands for purchasing an iOS, Android or source code build. For now we don’t support the iOS build but might provide this in a
future update. Based on the command selected by the user we can select the right target and perform the right purchase type
Once pending build is invoked it just invokes build app as usual. Since this is invoked by the purchase callback this is effectively seamless We could have used the SKU
value from the server and called the build app callback with the SKU which would have worked exactly the same as this.

As you can see the code is pretty trivial, the main hassle is dealing with this in Google’s and Apples interfaces
In Google Play after you’ve uploaded your initial APK you can select “In-app products”
We click “Add New Product” then select managed product which allows us to add a new product SKU
I type in build_for_android as the SKU, I can use an arbitrary string value to represent the SKU
I type in a name and a description for the item we’re selling, this will be displayed to the user as part of the native payment process by Google play
The next state is scrolling down to the price and clicking the add price button so we can enter the price for the item using the local currency
I set the price for 40 NIS which is mostly a trial and error thing of what google will generate in terms of the pricing table. Once this is set I can scroll to the top and save
the data and this in a nutshell is in app purchase.
Thank You
Thanks for watching. I hope you found this informative

More Related Content

Similar to Set Up In-App Purchase for Apps

Simple affiliate secrets
Simple affiliate secrets Simple affiliate secrets
Simple affiliate secrets Abdul Wahab
 
Everlane iOS App Design Critique
Everlane iOS App Design CritiqueEverlane iOS App Design Critique
Everlane iOS App Design CritiqueXander Pollock
 
Final Project:E Connect
Final Project:E ConnectFinal Project:E Connect
Final Project:E ConnectRoshan Mishra
 
Continental gift
Continental giftContinental gift
Continental giftmrjonesbrgs
 
Acquire Customers at the Lowest Cost
Acquire Customers at the Lowest CostAcquire Customers at the Lowest Cost
Acquire Customers at the Lowest CostDrew Beaurline
 
How Does Affiliate Marketing Work
How Does Affiliate Marketing WorkHow Does Affiliate Marketing Work
How Does Affiliate Marketing WorkHimanshuBhandari32
 
How Much Does it Cost to Build Apps like OfferUp.pptx
How Much Does it Cost to Build Apps like OfferUp.pptxHow Much Does it Cost to Build Apps like OfferUp.pptx
How Much Does it Cost to Build Apps like OfferUp.pptxTarun Nagar
 
[Android] Google Play in app billing
[Android] Google Play in app billing[Android] Google Play in app billing
[Android] Google Play in app billingJun Shimizu
 
Affiliate Marketing Mastermind
Affiliate Marketing MastermindAffiliate Marketing Mastermind
Affiliate Marketing MastermindRonakBisht1
 
Apps for good final presentation app dev uk
Apps for good final presentation   app dev ukApps for good final presentation   app dev uk
Apps for good final presentation app dev ukdporter213
 
The Only Guide You Need To Develop An Instacart Like Grocery App
The Only Guide You Need To Develop An Instacart Like Grocery AppThe Only Guide You Need To Develop An Instacart Like Grocery App
The Only Guide You Need To Develop An Instacart Like Grocery AppInnofied Solution
 
Apps for good final presentation
Apps for good final presentationApps for good final presentation
Apps for good final presentationda00524868
 
iPad Features Overview
iPad Features OverviewiPad Features Overview
iPad Features OverviewJennifer Lopez
 
The BankMobile App - Smartphone First Impressions
The BankMobile App -  Smartphone First ImpressionsThe BankMobile App -  Smartphone First Impressions
The BankMobile App - Smartphone First ImpressionsDavid Gerbino
 

Similar to Set Up In-App Purchase for Apps (20)

Grocery App
Grocery AppGrocery App
Grocery App
 
Simple affiliate secrets
Simple affiliate secrets Simple affiliate secrets
Simple affiliate secrets
 
Everlane iOS App Design Critique
Everlane iOS App Design CritiqueEverlane iOS App Design Critique
Everlane iOS App Design Critique
 
Mobileapps
MobileappsMobileapps
Mobileapps
 
Final Project:E Connect
Final Project:E ConnectFinal Project:E Connect
Final Project:E Connect
 
Continental gift
Continental giftContinental gift
Continental gift
 
Acquire Customers at the Lowest Cost
Acquire Customers at the Lowest CostAcquire Customers at the Lowest Cost
Acquire Customers at the Lowest Cost
 
How Does Affiliate Marketing Work
How Does Affiliate Marketing WorkHow Does Affiliate Marketing Work
How Does Affiliate Marketing Work
 
How Much Does it Cost to Build Apps like OfferUp.pptx
How Much Does it Cost to Build Apps like OfferUp.pptxHow Much Does it Cost to Build Apps like OfferUp.pptx
How Much Does it Cost to Build Apps like OfferUp.pptx
 
[Android] Google Play in app billing
[Android] Google Play in app billing[Android] Google Play in app billing
[Android] Google Play in app billing
 
Affiliate Marketing Mastermind
Affiliate Marketing MastermindAffiliate Marketing Mastermind
Affiliate Marketing Mastermind
 
Apps for good final presentation app dev uk
Apps for good final presentation   app dev ukApps for good final presentation   app dev uk
Apps for good final presentation app dev uk
 
The Only Guide You Need To Develop An Instacart Like Grocery App
The Only Guide You Need To Develop An Instacart Like Grocery AppThe Only Guide You Need To Develop An Instacart Like Grocery App
The Only Guide You Need To Develop An Instacart Like Grocery App
 
Apps for good final presentation
Apps for good final presentationApps for good final presentation
Apps for good final presentation
 
Simple Affiliate Secrets
Simple Affiliate SecretsSimple Affiliate Secrets
Simple Affiliate Secrets
 
App Store Optimizer
App Store OptimizerApp Store Optimizer
App Store Optimizer
 
Apps Army.pdf
Apps Army.pdfApps Army.pdf
Apps Army.pdf
 
Design_writeup (1)
Design_writeup (1)Design_writeup (1)
Design_writeup (1)
 
iPad Features Overview
iPad Features OverviewiPad Features Overview
iPad Features Overview
 
The BankMobile App - Smartphone First Impressions
The BankMobile App -  Smartphone First ImpressionsThe BankMobile App -  Smartphone First Impressions
The BankMobile App - Smartphone First Impressions
 

More from ShaiAlmog1

The Duck Teaches Learn to debug from the masters. Local to production- kill ...
The Duck Teaches  Learn to debug from the masters. Local to production- kill ...The Duck Teaches  Learn to debug from the masters. Local to production- kill ...
The Duck Teaches Learn to debug from the masters. Local to production- kill ...ShaiAlmog1
 
create-netflix-clone-06-client-ui.pdf
create-netflix-clone-06-client-ui.pdfcreate-netflix-clone-06-client-ui.pdf
create-netflix-clone-06-client-ui.pdfShaiAlmog1
 
create-netflix-clone-01-introduction_transcript.pdf
create-netflix-clone-01-introduction_transcript.pdfcreate-netflix-clone-01-introduction_transcript.pdf
create-netflix-clone-01-introduction_transcript.pdfShaiAlmog1
 
create-netflix-clone-02-server_transcript.pdf
create-netflix-clone-02-server_transcript.pdfcreate-netflix-clone-02-server_transcript.pdf
create-netflix-clone-02-server_transcript.pdfShaiAlmog1
 
create-netflix-clone-04-server-continued_transcript.pdf
create-netflix-clone-04-server-continued_transcript.pdfcreate-netflix-clone-04-server-continued_transcript.pdf
create-netflix-clone-04-server-continued_transcript.pdfShaiAlmog1
 
create-netflix-clone-01-introduction.pdf
create-netflix-clone-01-introduction.pdfcreate-netflix-clone-01-introduction.pdf
create-netflix-clone-01-introduction.pdfShaiAlmog1
 
create-netflix-clone-06-client-ui_transcript.pdf
create-netflix-clone-06-client-ui_transcript.pdfcreate-netflix-clone-06-client-ui_transcript.pdf
create-netflix-clone-06-client-ui_transcript.pdfShaiAlmog1
 
create-netflix-clone-03-server.pdf
create-netflix-clone-03-server.pdfcreate-netflix-clone-03-server.pdf
create-netflix-clone-03-server.pdfShaiAlmog1
 
create-netflix-clone-04-server-continued.pdf
create-netflix-clone-04-server-continued.pdfcreate-netflix-clone-04-server-continued.pdf
create-netflix-clone-04-server-continued.pdfShaiAlmog1
 
create-netflix-clone-05-client-model_transcript.pdf
create-netflix-clone-05-client-model_transcript.pdfcreate-netflix-clone-05-client-model_transcript.pdf
create-netflix-clone-05-client-model_transcript.pdfShaiAlmog1
 
create-netflix-clone-03-server_transcript.pdf
create-netflix-clone-03-server_transcript.pdfcreate-netflix-clone-03-server_transcript.pdf
create-netflix-clone-03-server_transcript.pdfShaiAlmog1
 
create-netflix-clone-02-server.pdf
create-netflix-clone-02-server.pdfcreate-netflix-clone-02-server.pdf
create-netflix-clone-02-server.pdfShaiAlmog1
 
create-netflix-clone-05-client-model.pdf
create-netflix-clone-05-client-model.pdfcreate-netflix-clone-05-client-model.pdf
create-netflix-clone-05-client-model.pdfShaiAlmog1
 
Creating a Whatsapp Clone - Part II.pdf
Creating a Whatsapp Clone - Part II.pdfCreating a Whatsapp Clone - Part II.pdf
Creating a Whatsapp Clone - Part II.pdfShaiAlmog1
 
Creating a Whatsapp Clone - Part IX - Transcript.pdf
Creating a Whatsapp Clone - Part IX - Transcript.pdfCreating a Whatsapp Clone - Part IX - Transcript.pdf
Creating a Whatsapp Clone - Part IX - Transcript.pdfShaiAlmog1
 
Creating a Whatsapp Clone - Part II - Transcript.pdf
Creating a Whatsapp Clone - Part II - Transcript.pdfCreating a Whatsapp Clone - Part II - Transcript.pdf
Creating a Whatsapp Clone - Part II - Transcript.pdfShaiAlmog1
 
Creating a Whatsapp Clone - Part V - Transcript.pdf
Creating a Whatsapp Clone - Part V - Transcript.pdfCreating a Whatsapp Clone - Part V - Transcript.pdf
Creating a Whatsapp Clone - Part V - Transcript.pdfShaiAlmog1
 
Creating a Whatsapp Clone - Part IV - Transcript.pdf
Creating a Whatsapp Clone - Part IV - Transcript.pdfCreating a Whatsapp Clone - Part IV - Transcript.pdf
Creating a Whatsapp Clone - Part IV - Transcript.pdfShaiAlmog1
 
Creating a Whatsapp Clone - Part IV.pdf
Creating a Whatsapp Clone - Part IV.pdfCreating a Whatsapp Clone - Part IV.pdf
Creating a Whatsapp Clone - Part IV.pdfShaiAlmog1
 
Creating a Whatsapp Clone - Part I - Transcript.pdf
Creating a Whatsapp Clone - Part I - Transcript.pdfCreating a Whatsapp Clone - Part I - Transcript.pdf
Creating a Whatsapp Clone - Part I - Transcript.pdfShaiAlmog1
 

More from ShaiAlmog1 (20)

The Duck Teaches Learn to debug from the masters. Local to production- kill ...
The Duck Teaches  Learn to debug from the masters. Local to production- kill ...The Duck Teaches  Learn to debug from the masters. Local to production- kill ...
The Duck Teaches Learn to debug from the masters. Local to production- kill ...
 
create-netflix-clone-06-client-ui.pdf
create-netflix-clone-06-client-ui.pdfcreate-netflix-clone-06-client-ui.pdf
create-netflix-clone-06-client-ui.pdf
 
create-netflix-clone-01-introduction_transcript.pdf
create-netflix-clone-01-introduction_transcript.pdfcreate-netflix-clone-01-introduction_transcript.pdf
create-netflix-clone-01-introduction_transcript.pdf
 
create-netflix-clone-02-server_transcript.pdf
create-netflix-clone-02-server_transcript.pdfcreate-netflix-clone-02-server_transcript.pdf
create-netflix-clone-02-server_transcript.pdf
 
create-netflix-clone-04-server-continued_transcript.pdf
create-netflix-clone-04-server-continued_transcript.pdfcreate-netflix-clone-04-server-continued_transcript.pdf
create-netflix-clone-04-server-continued_transcript.pdf
 
create-netflix-clone-01-introduction.pdf
create-netflix-clone-01-introduction.pdfcreate-netflix-clone-01-introduction.pdf
create-netflix-clone-01-introduction.pdf
 
create-netflix-clone-06-client-ui_transcript.pdf
create-netflix-clone-06-client-ui_transcript.pdfcreate-netflix-clone-06-client-ui_transcript.pdf
create-netflix-clone-06-client-ui_transcript.pdf
 
create-netflix-clone-03-server.pdf
create-netflix-clone-03-server.pdfcreate-netflix-clone-03-server.pdf
create-netflix-clone-03-server.pdf
 
create-netflix-clone-04-server-continued.pdf
create-netflix-clone-04-server-continued.pdfcreate-netflix-clone-04-server-continued.pdf
create-netflix-clone-04-server-continued.pdf
 
create-netflix-clone-05-client-model_transcript.pdf
create-netflix-clone-05-client-model_transcript.pdfcreate-netflix-clone-05-client-model_transcript.pdf
create-netflix-clone-05-client-model_transcript.pdf
 
create-netflix-clone-03-server_transcript.pdf
create-netflix-clone-03-server_transcript.pdfcreate-netflix-clone-03-server_transcript.pdf
create-netflix-clone-03-server_transcript.pdf
 
create-netflix-clone-02-server.pdf
create-netflix-clone-02-server.pdfcreate-netflix-clone-02-server.pdf
create-netflix-clone-02-server.pdf
 
create-netflix-clone-05-client-model.pdf
create-netflix-clone-05-client-model.pdfcreate-netflix-clone-05-client-model.pdf
create-netflix-clone-05-client-model.pdf
 
Creating a Whatsapp Clone - Part II.pdf
Creating a Whatsapp Clone - Part II.pdfCreating a Whatsapp Clone - Part II.pdf
Creating a Whatsapp Clone - Part II.pdf
 
Creating a Whatsapp Clone - Part IX - Transcript.pdf
Creating a Whatsapp Clone - Part IX - Transcript.pdfCreating a Whatsapp Clone - Part IX - Transcript.pdf
Creating a Whatsapp Clone - Part IX - Transcript.pdf
 
Creating a Whatsapp Clone - Part II - Transcript.pdf
Creating a Whatsapp Clone - Part II - Transcript.pdfCreating a Whatsapp Clone - Part II - Transcript.pdf
Creating a Whatsapp Clone - Part II - Transcript.pdf
 
Creating a Whatsapp Clone - Part V - Transcript.pdf
Creating a Whatsapp Clone - Part V - Transcript.pdfCreating a Whatsapp Clone - Part V - Transcript.pdf
Creating a Whatsapp Clone - Part V - Transcript.pdf
 
Creating a Whatsapp Clone - Part IV - Transcript.pdf
Creating a Whatsapp Clone - Part IV - Transcript.pdfCreating a Whatsapp Clone - Part IV - Transcript.pdf
Creating a Whatsapp Clone - Part IV - Transcript.pdf
 
Creating a Whatsapp Clone - Part IV.pdf
Creating a Whatsapp Clone - Part IV.pdfCreating a Whatsapp Clone - Part IV.pdf
Creating a Whatsapp Clone - Part IV.pdf
 
Creating a Whatsapp Clone - Part I - Transcript.pdf
Creating a Whatsapp Clone - Part I - Transcript.pdfCreating a Whatsapp Clone - Part I - Transcript.pdf
Creating a Whatsapp Clone - Part I - Transcript.pdf
 

Recently uploaded

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 

Recently uploaded (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

Set Up In-App Purchase for Apps

  • 1. In App Purchase In app purchase is a relatively simple feature with a bit of hassle from the stores who handle the product management. The API itself is trivial
  • 2. What’s In App Purchase? ✦ In app purchase allows us to use the Google Play or iTunes billing system to pay for virtual goods ✦ This is a huge benefit as payment can be as easy as a single click and very convenient ✦ It’s also a restriction, both Apple & Google prohibit the sale of virtual goods in any other way! ✦ The drawbacks are: 30% commission & you can’t/ shouldn’t pay for non-virtual goods Before we begin lets review the basics of what is in-app-purchase. In app purchase allows us to use the same billing support Apple & Google use for buying apps in order to sell items within the app. You can use this to sell virtual goods which means things that are parts of the application such as digital content, upgrades, in-app features, game elements etc. Using in-app-purchase is much easier than credit card billing or any other form of payment as the whole process is managed by Google or Apple. However, it’s also a requirement. If you have elements sold within your app you might get banned if you don’t use in app purchase. As an example we recently updated the kitchen sink demo in the Apple appstore and got a rejection. The tester reviewed the link in the app to codenameone.com and complained that we sell items within the site (the subscription) and don’t use in-app-purchase. We explained that that app is completely free and the subscription has nothing to do with the app and the app passed the verification. This should obviously teach you that communication in these cases is bidirectional and also how serious Apple is about the in-app-purchase requirement. So why don’t we sell Codename One subscriptions via in-app-purchase. This is something we are actually considering but the main demotivation is the 30% commission to Apple. They now have a special case for subscriptions that might make them more financially viable so we might add that in the future as an option but overall in-app- purchase is expensive. If you are having thoughts about charging extra for in-app-purchase made thru the app that would be a problem as it’s prohibited by the Apple terms of service.
  • 3. Let’s start by looking at the code for in app purchase. Just like push requires the push callback in the main class, in app purchase requires the callback in the main class too.
  • 4. I’ll skip ahead to the callback methods for the purchase. itemPurchased is the actual purchase callback and it includes the sku representing the item that was purchased. An sku is a constant value that you define when you setup the items in google play or itunes connect. The sku lets you determine the item that the user purchased when you have more than one item. We are calling into the pending build method in this case to proceed with the purchase flow we started there. I’ll go into that soon. We have an error callback as well which we can use for error logging. The refund callback might be interesting if this is a feature you can disable on refund but in this case if a user asks for a refund there isn’t much we can do as the app was already built. The rest of the callbacks relate to subscription and manual purchase callback which is no longer used. Subscription is a subject in its own right that I won’t get into here. But it’s a very good direction as it allows a constant and steady stream of revenue. Lets move into the AppForm code for purchase
  • 5. The purchase UI shows a dialog with commands for purchasing an iOS, Android or source code build. For now we don’t support the iOS build but might provide this in a future update. Based on the command selected by the user we can select the right target and perform the right purchase type
  • 6. Once pending build is invoked it just invokes build app as usual. Since this is invoked by the purchase callback this is effectively seamless We could have used the SKU value from the server and called the build app callback with the SKU which would have worked exactly the same as this. As you can see the code is pretty trivial, the main hassle is dealing with this in Google’s and Apples interfaces
  • 7. In Google Play after you’ve uploaded your initial APK you can select “In-app products”
  • 8. We click “Add New Product” then select managed product which allows us to add a new product SKU
  • 9. I type in build_for_android as the SKU, I can use an arbitrary string value to represent the SKU
  • 10. I type in a name and a description for the item we’re selling, this will be displayed to the user as part of the native payment process by Google play
  • 11. The next state is scrolling down to the price and clicking the add price button so we can enter the price for the item using the local currency
  • 12. I set the price for 40 NIS which is mostly a trial and error thing of what google will generate in terms of the pricing table. Once this is set I can scroll to the top and save the data and this in a nutshell is in app purchase.
  • 13. Thank You Thanks for watching. I hope you found this informative