SlideShare a Scribd company logo
How to Develop your own
In-App-Purchase (IAP)
Service in Odoo?
In-app purchasing refers to the buying
of services from inside an application.
The Normal Service Flow
1
External Service
(Third Party Service)
5
3
2
4
transaction flow
Odoo IAP
Service
End
Customers
The Service
Provider
The Normal Service Flow
The Client requests a service of some sort.
The Service Provider asks Odoo if there are enough credits for the service in the
Client’s account, and creates a transaction over that amount.
The Service Provider provides the service (either on their own or calling to External
Services).
The Service Provider goes back to Odoo to capture (if the service could be provided)
or cancel (if the service could not be provided) the transaction created at step 2.
Finally, the Service Provider notifies the Client that the service has been rendered,
possibly (depending on the service) displaying or storing its results in the client’s
system.
If everything goes well, the normal flow is the following:
1
2
3
4
5
The Normal Service Flow
The Client requests a service of some sort.
The Service Provider asks Odoo if there are enough credits for the service in the
Client’s account, and creates a transaction over that amount.
The Service Provider provides the service (either on their own or calling to External
Services).
The Service Provider goes back to Odoo to capture (if the service could be provided)
or cancel (if the service could not be provided) the transaction created at step 2.
Finally, the Service Provider notifies the Client that the service has been rendered,
possibly (depending on the service) displaying or storing its results in the client’s
system.
If everything goes well, the normal flow is the following:
1
2
3
4
5
The Normal Service Flow
The Client requests a service of some sort.
The Service Provider asks Odoo if there are enough credits for the service in the
Client’s account, and creates a transaction over that amount.
The Service Provider provides the service (either on their own or calling to External
Services).
The Service Provider goes back to Odoo to capture (if the service could be provided)
or cancel (if the service could not be provided) the transaction created at step 2.
Finally, the Service Provider notifies the Client that the service has been rendered,
possibly (depending on the service) displaying or storing its results in the client’s
system.
If everything goes well, the normal flow is the following:
1
2
3
4
5
The Normal Service Flow
The Client requests a service of some sort.
The Service Provider asks Odoo if there are enough credits for the service in the
Client’s account, and creates a transaction over that amount.
The Service Provider provides the service (either on their own or calling to External
Services).
The Service Provider goes back to Odoo to capture (if the service could be provided)
or cancel (if the service could not be provided) the transaction created at step 2.
Finally, the Service Provider notifies the Client that the service has been rendered,
possibly (depending on the service) displaying or storing its results in the client’s
system.
If everything goes well, the normal flow is the following:
1
2
3
4
5
The Normal Service Flow
The Client requests a service of some sort.
The Service Provider asks Odoo if there are enough credits for the service in the
Client’s account, and creates a transaction over that amount.
The Service Provider provides the service (either on their own or calling to External
Services).
The Service Provider goes back to Odoo to capture (if the service could be provided)
or cancel (if the service could not be provided) the transaction created at step 2.
Finally, the Service Provider notifies the Client that the service has been rendered,
possibly (depending on the service) displaying or storing its results in the client’s
system.
If everything goes well, the normal flow is the following:
1
2
3
4
5
Insufficient credits Flow
1
3
2
4
External Service
(Third Party Service)
Odoo IAP
Service
End
Customers
The Service
Provider
Building your service
Registering the service with Odoo IAP
The Credits
➔ The credits went from integer to float value starting October 2018. Integer
values are still supported for backward compatibilities.
➔ Every service provided through the IAP platform can be used by the
clients with tokens or credits. The credits are an float unit and their
monetary value depends on the service and is decided by the provider.
◆ Examples of credit and consumption:
● for a sms service : 1 credit = 1 sms
● for an ad service : 10 credit = 100 Char Ad or
● for a postage service : 1 credit = 1 post stamp.
➔ The value of the credits is fixed with the help of prepaid credit packs that the
clients can buy on iap.odoo.com (see Packs).
Odoo App
The Client Side Odoo App
➔ The second step is to develop an Odoo App which clients can install in
their Odoo instance and through which they can request the services
you provide.
➔ First, we will create an odoo module depending on iap. IAP is a
standard from V11 onwards and the dependency ensures a local account
is properly set up and we will have access to some necessary views and
useful helpers.
➔ Add client side business logic that will call service side API that provides
the desired service.
➔ There are no specific requirement of protocol and services on service
and client side.
➔ To make implementation easy, IAP provides a iap_jsonrpc() helper to
call a JSON-RPC2 endpoint on an IAP service side Odoo instance and
transparently re-raise related Odoo exceptions.
➔ Each transaction called over API will require client account token.
➔ The token of the current client that is provided by the iap.account
model’s account_token field. You can retrieve the account for your
service by calling env['iap.account'].get("service_name") where
"service_name" is the name of the service registered under IAP
Account.
Odoo IAP Helpers
iap.tools.iap_tools.iap_capture
➔ JSON-RPC2 wrapper to call service
json endpoint implemented using
Odoo IAP Services
➔ iap_jsonrpc() takes care of re-raising
InsufficientCreditError for you.
from odoo.addons.iap.tools import iap_tools
def fetch_cur_rate(self):
user_token = self.env['iap.account'].get('live_cur_ex_rate')
service_endpoint =
self.env['ir.config_parameter'].sudo().get_param('live_cur_ex_rate.endpoint',
self._default_live_cur_ex_rate)
for move in self:
if move.company_currency_id == move.currency_id:
raise UserError(_('Invoice currency and company currency is same, '
'this document do not require exchange rates.'))
params = {
'user_token': user_token.account_token,
'request_res_id': '%s,%s'%(move._name, move.id),
'from_cur': move.company_currency_id.name,
'to_cur': move.currency_id.name,
}
response = iap_tools.iap_jsonrpc(service_endpoint + '/curex/v1/convert',
params=params)
result = response.get('result', 0)
if not result:
raise UserError(_('Could not get the result please try again later. '
'No credit was consumed for this request.'))
move.write({
'iap_curex_rate': result,
'iap_curex_rate_dt': fields.Datetime.now(),
})
credit = self.env['iap.account'].get_credits('live_cur_ex_rate')
credit_url = self.env['iap.account'].get_credits_url('live_cur_ex_rate')
return {'type': 'ir.actions.act_window_close'}
Transaction API
The Service Provider Side
Capture (/iap/1/capture)
Authorize (/iap/1/authorize)
Cancel /iap/1/authorize
Verifies that the user’s account has at least asked credit available and creates a
hold (pending transaction) on that amount.
Confirms the specified transaction, transferring the reserved credits from the user’s
account to the service provider’s.
Cancels the specified transaction, releasing the hold on the user’s credits.
IAP Service Helpers
In Build Helper to implement IAP Service side using Odoo
iap.tools.iap_tools.iap_authorize
iap.tools.iap_tools.iap_charge
iap.tools.iap_tools.iap_capture
A context manager for authorizing and automatically capturing or cancelling
transactions for use in the backend/proxy.
Confirms the specified transaction, transferring the reserved credits from the user’s
account to the service provider’s.
Captures the amount credit on the given transaction.
iap.tools.iap_tools.iap_cancel
Cancels an authorized transaction.
iap.tools.iap_tools.iap_authorize
iap.tools.iap_tools.iap_charge
iap.tools.iap_tools.iap_capture
A context manager for authorizing and automatically capturing or cancelling
transactions for use in the backend/proxy.
Confirms the specified transaction, transferring the reserved credits from the user’s
account to the service provider’s.
Captures the amount credit on the given transaction.
iap.tools.iap_tools.iap_cancel
Cancels an authorized transaction.
iap.tools.iap_tools.iap_authorize
iap.tools.iap_tools.iap_charge
iap.tools.iap_tools.iap_capture
A context manager for authorizing and automatically capturing or cancelling
transactions for use in the backend/proxy.
Confirms the specified transaction, transferring the reserved credits from the user’s
account to the service provider’s.
Captures the amount credit on the given transaction.
iap.tools.iap_tools.iap_cancel
Cancels an authorized transaction.
iap.tools.iap_tools.iap_authorize
iap.tools.iap_tools.iap_charge
iap.tools.iap_tools.iap_capture
A context manager for authorizing and automatically capturing or cancelling
transactions for use in the backend/proxy.
Confirms the specified transaction, transferring the reserved credits from the user’s
account to the service provider’s.
Captures the amount credit on the given transaction.
iap.tools.iap_tools.iap_cancel
Cancels an authorized transaction.
iap.tools.iap_tools.iap_authorize
iap.tools.iap_tools.iap_charge
iap.tools.iap_tools.iap_capture
A context manager for authorizing and automatically capturing or cancelling
transactions for use in the backend/proxy.
Confirms the specified transaction, transferring the reserved credits from the user’s
account to the service provider’s.
Captures the amount credit on the given transaction.
iap.tools.iap_tools.iap_cancel
Cancels an authorized transaction.
Testing IAP
➔ By default, iap_charge contacts the production IAP endpoint,
◆ https://iap.odoo.com
➔ While developing and testing your service you may want to point it
towards the development IAP endpoint
◆ https://iap-sandbox.odoo.com
➔ To do so, set the iap.endpoint config parameter in your service Odoo:
in debug/developer mode
● Setting ‣ Technical ‣ Parameters ‣ System Parameters
◆ just define an entry for the key iap.endpoint with value
https://iap-sandbox.odoo.com, if none already exists.
➔ By default, iap_charge contacts the production IAP endpoint,
◆ https://iap.odoo.com
➔ While developing and testing your service you may want to point it
towards the development IAP endpoint
◆ https://iap-sandbox.odoo.com
➔ To do so, set the iap.endpoint config parameter in your service Odoo:
in debug/developer mode
● Setting ‣ Technical ‣ Parameters ‣ System Parameters
◆ just define an entry for the key iap.endpoint with value
https://iap-sandbox.odoo.com, if none already exists.
➔ By default, iap_charge contacts the production IAP endpoint,
◆ https://iap.odoo.com
➔ While developing and testing your service you may want to point it
towards the development IAP endpoint
◆ https://iap-sandbox.odoo.com
➔ To do so, set the iap.endpoint config parameter in your service Odoo:
in debug/developer mode
● Setting ‣ Technical ‣ Parameters ‣ System Parameters
◆ just define an entry for the key iap.endpoint with value
https://iap-sandbox.odoo.com, if none already exists.
DemoDemo Application code
https://github.com/jam-odoo/odoo-iap-demo-app
Thank You
Chat Questions

More Related Content

What's hot

Docx Report Module
Docx Report ModuleDocx Report Module
Docx Report Module
Odoo
 
Set Default Values to Fields in Odoo 15
Set Default Values to Fields in Odoo 15Set Default Values to Fields in Odoo 15
Set Default Values to Fields in Odoo 15
Celine George
 
How to show warning _ error messages in Odoo 16
How to show warning _ error messages in Odoo 16 How to show warning _ error messages in Odoo 16
How to show warning _ error messages in Odoo 16
Celine George
 
How to Use Constraint and SQL Constraint in Odoo 15
How to Use Constraint and SQL Constraint in Odoo 15How to Use Constraint and SQL Constraint in Odoo 15
How to Use Constraint and SQL Constraint in Odoo 15
Celine George
 
Odoo Experience 2018 - How to Break Odoo Security (or how to prevent it)
Odoo Experience 2018 - How to Break Odoo Security (or how to prevent it)Odoo Experience 2018 - How to Break Odoo Security (or how to prevent it)
Odoo Experience 2018 - How to Break Odoo Security (or how to prevent it)
ElínAnna Jónasdóttir
 
Odoo - Smart buttons
Odoo - Smart buttonsOdoo - Smart buttons
Odoo - Smart buttons
Odoo
 
Tutorial: Develop an App with the Odoo Framework
Tutorial: Develop an App with the Odoo FrameworkTutorial: Develop an App with the Odoo Framework
Tutorial: Develop an App with the Odoo Framework
Odoo
 
View Inheritance in Odoo 15
View Inheritance in Odoo 15View Inheritance in Odoo 15
View Inheritance in Odoo 15
Celine George
 
mis_builder 2016
mis_builder 2016mis_builder 2016
mis_builder 2016
acsone
 
Odoo - Create themes for website
Odoo - Create themes for websiteOdoo - Create themes for website
Odoo - Create themes for website
Odoo
 
Odoo Experience 2018 - Inherit from These 10 Mixins to Empower Your App
Odoo Experience 2018 - Inherit from These 10 Mixins to Empower Your AppOdoo Experience 2018 - Inherit from These 10 Mixins to Empower Your App
Odoo Experience 2018 - Inherit from These 10 Mixins to Empower Your App
ElínAnna Jónasdóttir
 
Odoo ERP functional
Odoo ERP functionalOdoo ERP functional
Odoo ERP functional
مصعب محمد زكريا
 
The benefits of odoo
The benefits of odoo The benefits of odoo
The benefits of odoo
ATEES Industrial Training Pvt Ltd
 
Odoo system presentation.pdf
Odoo system presentation.pdfOdoo system presentation.pdf
Odoo system presentation.pdf
Святослав Надозирний
 
Odoo Experience 2018 - All You Need to Know About Odoo's Partnership
Odoo Experience 2018 - All You Need to Know About Odoo's PartnershipOdoo Experience 2018 - All You Need to Know About Odoo's Partnership
Odoo Experience 2018 - All You Need to Know About Odoo's Partnership
ElínAnna Jónasdóttir
 
Odoo
OdooOdoo
Odoo Experience 2018 - Visualizing Data in Odoo: How to Create a New View
Odoo Experience 2018 - Visualizing Data in Odoo: How to Create a New ViewOdoo Experience 2018 - Visualizing Data in Odoo: How to Create a New View
Odoo Experience 2018 - Visualizing Data in Odoo: How to Create a New View
ElínAnna Jónasdóttir
 
How to develop automated tests
How to develop automated testsHow to develop automated tests
How to develop automated tests
Odoo
 
odoo 11.0 development (CRUD)
odoo 11.0 development (CRUD)odoo 11.0 development (CRUD)
odoo 11.0 development (CRUD)
Mohamed Magdy
 
QWeb Report in odoo
QWeb Report in odooQWeb Report in odoo
QWeb Report in odoo
expertodoo
 

What's hot (20)

Docx Report Module
Docx Report ModuleDocx Report Module
Docx Report Module
 
Set Default Values to Fields in Odoo 15
Set Default Values to Fields in Odoo 15Set Default Values to Fields in Odoo 15
Set Default Values to Fields in Odoo 15
 
How to show warning _ error messages in Odoo 16
How to show warning _ error messages in Odoo 16 How to show warning _ error messages in Odoo 16
How to show warning _ error messages in Odoo 16
 
How to Use Constraint and SQL Constraint in Odoo 15
How to Use Constraint and SQL Constraint in Odoo 15How to Use Constraint and SQL Constraint in Odoo 15
How to Use Constraint and SQL Constraint in Odoo 15
 
Odoo Experience 2018 - How to Break Odoo Security (or how to prevent it)
Odoo Experience 2018 - How to Break Odoo Security (or how to prevent it)Odoo Experience 2018 - How to Break Odoo Security (or how to prevent it)
Odoo Experience 2018 - How to Break Odoo Security (or how to prevent it)
 
Odoo - Smart buttons
Odoo - Smart buttonsOdoo - Smart buttons
Odoo - Smart buttons
 
Tutorial: Develop an App with the Odoo Framework
Tutorial: Develop an App with the Odoo FrameworkTutorial: Develop an App with the Odoo Framework
Tutorial: Develop an App with the Odoo Framework
 
View Inheritance in Odoo 15
View Inheritance in Odoo 15View Inheritance in Odoo 15
View Inheritance in Odoo 15
 
mis_builder 2016
mis_builder 2016mis_builder 2016
mis_builder 2016
 
Odoo - Create themes for website
Odoo - Create themes for websiteOdoo - Create themes for website
Odoo - Create themes for website
 
Odoo Experience 2018 - Inherit from These 10 Mixins to Empower Your App
Odoo Experience 2018 - Inherit from These 10 Mixins to Empower Your AppOdoo Experience 2018 - Inherit from These 10 Mixins to Empower Your App
Odoo Experience 2018 - Inherit from These 10 Mixins to Empower Your App
 
Odoo ERP functional
Odoo ERP functionalOdoo ERP functional
Odoo ERP functional
 
The benefits of odoo
The benefits of odoo The benefits of odoo
The benefits of odoo
 
Odoo system presentation.pdf
Odoo system presentation.pdfOdoo system presentation.pdf
Odoo system presentation.pdf
 
Odoo Experience 2018 - All You Need to Know About Odoo's Partnership
Odoo Experience 2018 - All You Need to Know About Odoo's PartnershipOdoo Experience 2018 - All You Need to Know About Odoo's Partnership
Odoo Experience 2018 - All You Need to Know About Odoo's Partnership
 
Odoo
OdooOdoo
Odoo
 
Odoo Experience 2018 - Visualizing Data in Odoo: How to Create a New View
Odoo Experience 2018 - Visualizing Data in Odoo: How to Create a New ViewOdoo Experience 2018 - Visualizing Data in Odoo: How to Create a New View
Odoo Experience 2018 - Visualizing Data in Odoo: How to Create a New View
 
How to develop automated tests
How to develop automated testsHow to develop automated tests
How to develop automated tests
 
odoo 11.0 development (CRUD)
odoo 11.0 development (CRUD)odoo 11.0 development (CRUD)
odoo 11.0 development (CRUD)
 
QWeb Report in odoo
QWeb Report in odooQWeb Report in odoo
QWeb Report in odoo
 

Similar to How to Develop your own in App-Purchase Service in Odoo

HandyMan(SRS Final Presentation)
HandyMan(SRS Final Presentation)HandyMan(SRS Final Presentation)
HandyMan(SRS Final Presentation)
FazleRabbi80
 
WebXpress Cash Management Solution
WebXpress Cash Management SolutionWebXpress Cash Management Solution
WebXpress Cash Management Solution
WebXpress.IN
 
Scenario OverviewAn airline company is looking for a PRP.docx
Scenario OverviewAn airline company is looking for a PRP.docxScenario OverviewAn airline company is looking for a PRP.docx
Scenario OverviewAn airline company is looking for a PRP.docx
anhlodge
 
Routing Jobsite Field Data for Approval and Billing in 4castplus
Routing Jobsite Field Data for Approval and Billing in 4castplusRouting Jobsite Field Data for Approval and Billing in 4castplus
Routing Jobsite Field Data for Approval and Billing in 4castplus
4castplus
 
Using Error Budgets to Prioritize Work
Using Error Budgets to Prioritize WorkUsing Error Budgets to Prioritize Work
Using Error Budgets to Prioritize Work
Nathen Harvey
 
apidays LIVE Hong Kong 2021 - API Economy in Financial Services by Siddhant A...
apidays LIVE Hong Kong 2021 - API Economy in Financial Services by Siddhant A...apidays LIVE Hong Kong 2021 - API Economy in Financial Services by Siddhant A...
apidays LIVE Hong Kong 2021 - API Economy in Financial Services by Siddhant A...
apidays
 
Service Contracts Lifecycle Management
Service Contracts Lifecycle ManagementService Contracts Lifecycle Management
Service Contracts Lifecycle Management
Mohan Dutt
 
Qs2 um en_07_supplier_return_to_debit
Qs2 um en_07_supplier_return_to_debitQs2 um en_07_supplier_return_to_debit
Qs2 um en_07_supplier_return_to_debit
khayer
 
HSN - The Political Network
HSN - The Political NetworkHSN - The Political Network
HSN - The Political Network
HFT
 
ONLINE CAR SERVICING SYSTEM PROJECT REPORT.pdf
ONLINE CAR SERVICING SYSTEM PROJECT REPORT.pdfONLINE CAR SERVICING SYSTEM PROJECT REPORT.pdf
ONLINE CAR SERVICING SYSTEM PROJECT REPORT.pdf
Kamal Acharya
 
Accenture fico interview-questions
Accenture fico interview-questionsAccenture fico interview-questions
Accenture fico interview-questions
prabhakar vanam
 
Payment Routing Module using Kafka Streams
Payment Routing Module using Kafka StreamsPayment Routing Module using Kafka Streams
Payment Routing Module using Kafka Streams
IRJET Journal
 
WSO2 MASTER CLASS ITALIA #11 - APIM 4.0 & approccio event based
WSO2 MASTER CLASS ITALIA #11 - APIM 4.0 & approccio event basedWSO2 MASTER CLASS ITALIA #11 - APIM 4.0 & approccio event based
WSO2 MASTER CLASS ITALIA #11 - APIM 4.0 & approccio event based
Profesia Srl, Lynx Group
 
115442368-49930505-Car-Rental-System-Project-Report
115442368-49930505-Car-Rental-System-Project-Report115442368-49930505-Car-Rental-System-Project-Report
115442368-49930505-Car-Rental-System-Project-Report
Scott Bou
 
Returns and service
Returns and serviceReturns and service
Returns and service
suryanarayana tata
 
RESTful services and OAUTH protocol in IoT
RESTful services and OAUTH protocol in IoTRESTful services and OAUTH protocol in IoT
RESTful services and OAUTH protocol in IoT
Yakov Fain
 
Tugas 10 sap sd
Tugas 10 sap sdTugas 10 sap sd
Tugas 10 sap sd
REGA0218101202HARISA
 
Procurement of Services using Oracle EBS
Procurement of Services using Oracle EBSProcurement of Services using Oracle EBS
Procurement of Services using Oracle EBS
iWare Logic Technologies Pvt. Ltd.
 
API-first Integration for Microservices
API-first Integration for MicroservicesAPI-first Integration for Microservices
API-first Integration for Microservices
WSO2
 
Rex Introduction - Accounting was never so EASY.
Rex Introduction - Accounting was never so EASY.Rex Introduction - Accounting was never so EASY.
Rex Introduction - Accounting was never so EASY.
Rex-Solutions
 

Similar to How to Develop your own in App-Purchase Service in Odoo (20)

HandyMan(SRS Final Presentation)
HandyMan(SRS Final Presentation)HandyMan(SRS Final Presentation)
HandyMan(SRS Final Presentation)
 
WebXpress Cash Management Solution
WebXpress Cash Management SolutionWebXpress Cash Management Solution
WebXpress Cash Management Solution
 
Scenario OverviewAn airline company is looking for a PRP.docx
Scenario OverviewAn airline company is looking for a PRP.docxScenario OverviewAn airline company is looking for a PRP.docx
Scenario OverviewAn airline company is looking for a PRP.docx
 
Routing Jobsite Field Data for Approval and Billing in 4castplus
Routing Jobsite Field Data for Approval and Billing in 4castplusRouting Jobsite Field Data for Approval and Billing in 4castplus
Routing Jobsite Field Data for Approval and Billing in 4castplus
 
Using Error Budgets to Prioritize Work
Using Error Budgets to Prioritize WorkUsing Error Budgets to Prioritize Work
Using Error Budgets to Prioritize Work
 
apidays LIVE Hong Kong 2021 - API Economy in Financial Services by Siddhant A...
apidays LIVE Hong Kong 2021 - API Economy in Financial Services by Siddhant A...apidays LIVE Hong Kong 2021 - API Economy in Financial Services by Siddhant A...
apidays LIVE Hong Kong 2021 - API Economy in Financial Services by Siddhant A...
 
Service Contracts Lifecycle Management
Service Contracts Lifecycle ManagementService Contracts Lifecycle Management
Service Contracts Lifecycle Management
 
Qs2 um en_07_supplier_return_to_debit
Qs2 um en_07_supplier_return_to_debitQs2 um en_07_supplier_return_to_debit
Qs2 um en_07_supplier_return_to_debit
 
HSN - The Political Network
HSN - The Political NetworkHSN - The Political Network
HSN - The Political Network
 
ONLINE CAR SERVICING SYSTEM PROJECT REPORT.pdf
ONLINE CAR SERVICING SYSTEM PROJECT REPORT.pdfONLINE CAR SERVICING SYSTEM PROJECT REPORT.pdf
ONLINE CAR SERVICING SYSTEM PROJECT REPORT.pdf
 
Accenture fico interview-questions
Accenture fico interview-questionsAccenture fico interview-questions
Accenture fico interview-questions
 
Payment Routing Module using Kafka Streams
Payment Routing Module using Kafka StreamsPayment Routing Module using Kafka Streams
Payment Routing Module using Kafka Streams
 
WSO2 MASTER CLASS ITALIA #11 - APIM 4.0 & approccio event based
WSO2 MASTER CLASS ITALIA #11 - APIM 4.0 & approccio event basedWSO2 MASTER CLASS ITALIA #11 - APIM 4.0 & approccio event based
WSO2 MASTER CLASS ITALIA #11 - APIM 4.0 & approccio event based
 
115442368-49930505-Car-Rental-System-Project-Report
115442368-49930505-Car-Rental-System-Project-Report115442368-49930505-Car-Rental-System-Project-Report
115442368-49930505-Car-Rental-System-Project-Report
 
Returns and service
Returns and serviceReturns and service
Returns and service
 
RESTful services and OAUTH protocol in IoT
RESTful services and OAUTH protocol in IoTRESTful services and OAUTH protocol in IoT
RESTful services and OAUTH protocol in IoT
 
Tugas 10 sap sd
Tugas 10 sap sdTugas 10 sap sd
Tugas 10 sap sd
 
Procurement of Services using Oracle EBS
Procurement of Services using Oracle EBSProcurement of Services using Oracle EBS
Procurement of Services using Oracle EBS
 
API-first Integration for Microservices
API-first Integration for MicroservicesAPI-first Integration for Microservices
API-first Integration for Microservices
 
Rex Introduction - Accounting was never so EASY.
Rex Introduction - Accounting was never so EASY.Rex Introduction - Accounting was never so EASY.
Rex Introduction - Accounting was never so EASY.
 

More from Odoo

Timesheet Workshop: The Timesheet App People Love!
Timesheet Workshop: The Timesheet App People Love!Timesheet Workshop: The Timesheet App People Love!
Timesheet Workshop: The Timesheet App People Love!
Odoo
 
Odoo 3D Product View with Google Model-Viewer
Odoo 3D Product View with Google Model-ViewerOdoo 3D Product View with Google Model-Viewer
Odoo 3D Product View with Google Model-Viewer
Odoo
 
Keynote - Vision & Strategy
Keynote - Vision & StrategyKeynote - Vision & Strategy
Keynote - Vision & Strategy
Odoo
 
Opening Keynote - Unveilling Odoo 14
Opening Keynote - Unveilling Odoo 14Opening Keynote - Unveilling Odoo 14
Opening Keynote - Unveilling Odoo 14
Odoo
 
Extending Odoo with a Comprehensive Budgeting and Forecasting Capability
Extending Odoo with a Comprehensive Budgeting and Forecasting CapabilityExtending Odoo with a Comprehensive Budgeting and Forecasting Capability
Extending Odoo with a Comprehensive Budgeting and Forecasting Capability
Odoo
 
Managing Multi-channel Selling with Odoo
Managing Multi-channel Selling with OdooManaging Multi-channel Selling with Odoo
Managing Multi-channel Selling with Odoo
Odoo
 
Product Configurator: Advanced Use Case
Product Configurator: Advanced Use CaseProduct Configurator: Advanced Use Case
Product Configurator: Advanced Use Case
Odoo
 
Accounting Automation: How Much Money We Saved and How?
Accounting Automation: How Much Money We Saved and How?Accounting Automation: How Much Money We Saved and How?
Accounting Automation: How Much Money We Saved and How?
Odoo
 
Rock Your Logistics with Advanced Operations
Rock Your Logistics with Advanced OperationsRock Your Logistics with Advanced Operations
Rock Your Logistics with Advanced Operations
Odoo
 
Transition from a cost to a flow-centric organization
Transition from a cost to a flow-centric organizationTransition from a cost to a flow-centric organization
Transition from a cost to a flow-centric organization
Odoo
 
Synchronization: The Supply Chain Response to Overcome the Crisis
Synchronization: The Supply Chain Response to Overcome the CrisisSynchronization: The Supply Chain Response to Overcome the Crisis
Synchronization: The Supply Chain Response to Overcome the Crisis
Odoo
 
Running a University with Odoo
Running a University with OdooRunning a University with Odoo
Running a University with Odoo
Odoo
 
Down Payments on Purchase Orders in Odoo
Down Payments on Purchase Orders in OdooDown Payments on Purchase Orders in Odoo
Down Payments on Purchase Orders in Odoo
Odoo
 
Odoo Implementation in Phases - Success Story of a Retail Chain 3Sach food
Odoo Implementation in Phases - Success Story of a Retail Chain 3Sach foodOdoo Implementation in Phases - Success Story of a Retail Chain 3Sach food
Odoo Implementation in Phases - Success Story of a Retail Chain 3Sach food
Odoo
 
Migration from Salesforce to Odoo
Migration from Salesforce to OdooMigration from Salesforce to Odoo
Migration from Salesforce to Odoo
Odoo
 
Preventing User Mistakes by Using Machine Learning
Preventing User Mistakes by Using Machine LearningPreventing User Mistakes by Using Machine Learning
Preventing User Mistakes by Using Machine Learning
Odoo
 
Becoming an Odoo Expert: How to Prepare for the Certification
Becoming an Odoo Expert: How to Prepare for the Certification Becoming an Odoo Expert: How to Prepare for the Certification
Becoming an Odoo Expert: How to Prepare for the Certification
Odoo
 
Instant Printing of any Odoo Report or Shipping Label
Instant Printing of any Odoo Report or Shipping LabelInstant Printing of any Odoo Report or Shipping Label
Instant Printing of any Odoo Report or Shipping Label
Odoo
 
How Odoo helped an Organization Grow 3 Fold
How Odoo helped an Organization Grow 3 FoldHow Odoo helped an Organization Grow 3 Fold
How Odoo helped an Organization Grow 3 Fold
Odoo
 
From Shopify to Odoo
From Shopify to OdooFrom Shopify to Odoo
From Shopify to Odoo
Odoo
 

More from Odoo (20)

Timesheet Workshop: The Timesheet App People Love!
Timesheet Workshop: The Timesheet App People Love!Timesheet Workshop: The Timesheet App People Love!
Timesheet Workshop: The Timesheet App People Love!
 
Odoo 3D Product View with Google Model-Viewer
Odoo 3D Product View with Google Model-ViewerOdoo 3D Product View with Google Model-Viewer
Odoo 3D Product View with Google Model-Viewer
 
Keynote - Vision & Strategy
Keynote - Vision & StrategyKeynote - Vision & Strategy
Keynote - Vision & Strategy
 
Opening Keynote - Unveilling Odoo 14
Opening Keynote - Unveilling Odoo 14Opening Keynote - Unveilling Odoo 14
Opening Keynote - Unveilling Odoo 14
 
Extending Odoo with a Comprehensive Budgeting and Forecasting Capability
Extending Odoo with a Comprehensive Budgeting and Forecasting CapabilityExtending Odoo with a Comprehensive Budgeting and Forecasting Capability
Extending Odoo with a Comprehensive Budgeting and Forecasting Capability
 
Managing Multi-channel Selling with Odoo
Managing Multi-channel Selling with OdooManaging Multi-channel Selling with Odoo
Managing Multi-channel Selling with Odoo
 
Product Configurator: Advanced Use Case
Product Configurator: Advanced Use CaseProduct Configurator: Advanced Use Case
Product Configurator: Advanced Use Case
 
Accounting Automation: How Much Money We Saved and How?
Accounting Automation: How Much Money We Saved and How?Accounting Automation: How Much Money We Saved and How?
Accounting Automation: How Much Money We Saved and How?
 
Rock Your Logistics with Advanced Operations
Rock Your Logistics with Advanced OperationsRock Your Logistics with Advanced Operations
Rock Your Logistics with Advanced Operations
 
Transition from a cost to a flow-centric organization
Transition from a cost to a flow-centric organizationTransition from a cost to a flow-centric organization
Transition from a cost to a flow-centric organization
 
Synchronization: The Supply Chain Response to Overcome the Crisis
Synchronization: The Supply Chain Response to Overcome the CrisisSynchronization: The Supply Chain Response to Overcome the Crisis
Synchronization: The Supply Chain Response to Overcome the Crisis
 
Running a University with Odoo
Running a University with OdooRunning a University with Odoo
Running a University with Odoo
 
Down Payments on Purchase Orders in Odoo
Down Payments on Purchase Orders in OdooDown Payments on Purchase Orders in Odoo
Down Payments on Purchase Orders in Odoo
 
Odoo Implementation in Phases - Success Story of a Retail Chain 3Sach food
Odoo Implementation in Phases - Success Story of a Retail Chain 3Sach foodOdoo Implementation in Phases - Success Story of a Retail Chain 3Sach food
Odoo Implementation in Phases - Success Story of a Retail Chain 3Sach food
 
Migration from Salesforce to Odoo
Migration from Salesforce to OdooMigration from Salesforce to Odoo
Migration from Salesforce to Odoo
 
Preventing User Mistakes by Using Machine Learning
Preventing User Mistakes by Using Machine LearningPreventing User Mistakes by Using Machine Learning
Preventing User Mistakes by Using Machine Learning
 
Becoming an Odoo Expert: How to Prepare for the Certification
Becoming an Odoo Expert: How to Prepare for the Certification Becoming an Odoo Expert: How to Prepare for the Certification
Becoming an Odoo Expert: How to Prepare for the Certification
 
Instant Printing of any Odoo Report or Shipping Label
Instant Printing of any Odoo Report or Shipping LabelInstant Printing of any Odoo Report or Shipping Label
Instant Printing of any Odoo Report or Shipping Label
 
How Odoo helped an Organization Grow 3 Fold
How Odoo helped an Organization Grow 3 FoldHow Odoo helped an Organization Grow 3 Fold
How Odoo helped an Organization Grow 3 Fold
 
From Shopify to Odoo
From Shopify to OdooFrom Shopify to Odoo
From Shopify to Odoo
 

Recently uploaded

Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan ChartSatta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results
 
Enhancing Adoption of AI in Agri-food: Introduction
Enhancing Adoption of AI in Agri-food: IntroductionEnhancing Adoption of AI in Agri-food: Introduction
Enhancing Adoption of AI in Agri-food: Introduction
Cor Verdouw
 
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan ChartSatta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results
 
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan ChartSatta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results
 
1Q24_HYUNDAI CAPITAL SERVICES INC. AND SUBSIDIARIES
1Q24_HYUNDAI CAPITAL SERVICES INC. AND SUBSIDIARIES1Q24_HYUNDAI CAPITAL SERVICES INC. AND SUBSIDIARIES
1Q24_HYUNDAI CAPITAL SERVICES INC. AND SUBSIDIARIES
irhcs
 
Prescriptive analytics BA4206 Anna University PPT
Prescriptive analytics BA4206 Anna University PPTPrescriptive analytics BA4206 Anna University PPT
Prescriptive analytics BA4206 Anna University PPT
Freelance
 
欧洲杯投注-欧洲杯投注外围盘口-欧洲杯投注盘口app|【​网址​🎉ac22.net🎉​】
欧洲杯投注-欧洲杯投注外围盘口-欧洲杯投注盘口app|【​网址​🎉ac22.net🎉​】欧洲杯投注-欧洲杯投注外围盘口-欧洲杯投注盘口app|【​网址​🎉ac22.net🎉​】
欧洲杯投注-欧洲杯投注外围盘口-欧洲杯投注盘口app|【​网址​🎉ac22.net🎉​】
concepsionchomo153
 
Science Around Us Module 2 Matter Around Us
Science Around Us Module 2 Matter Around UsScience Around Us Module 2 Matter Around Us
Science Around Us Module 2 Matter Around Us
PennapaKeavsiri
 
Cover Story - China's Investment Leader - Dr. Alyce SU
Cover Story - China's Investment Leader - Dr. Alyce SUCover Story - China's Investment Leader - Dr. Alyce SU
Cover Story - China's Investment Leader - Dr. Alyce SU
msthrill
 
DearbornMusic-KatherineJasperFullSailUni
DearbornMusic-KatherineJasperFullSailUniDearbornMusic-KatherineJasperFullSailUni
DearbornMusic-KatherineJasperFullSailUni
katiejasper96
 
Presentation by Herman Kienhuis (Curiosity VC) on Investing in AI for ABS Alu...
Presentation by Herman Kienhuis (Curiosity VC) on Investing in AI for ABS Alu...Presentation by Herman Kienhuis (Curiosity VC) on Investing in AI for ABS Alu...
Presentation by Herman Kienhuis (Curiosity VC) on Investing in AI for ABS Alu...
Herman Kienhuis
 
Kirill Klip GEM Royalty TNR Gold Lithium Presentation
Kirill Klip GEM Royalty TNR Gold Lithium PresentationKirill Klip GEM Royalty TNR Gold Lithium Presentation
Kirill Klip GEM Royalty TNR Gold Lithium Presentation
Kirill Klip
 
❼❷⓿❺❻❷❽❷❼❽ Dpboss Matka Result Satta Matka Guessing Satta Fix jodi Kalyan Fin...
❼❷⓿❺❻❷❽❷❼❽ Dpboss Matka Result Satta Matka Guessing Satta Fix jodi Kalyan Fin...❼❷⓿❺❻❷❽❷❼❽ Dpboss Matka Result Satta Matka Guessing Satta Fix jodi Kalyan Fin...
❼❷⓿❺❻❷❽❷❼❽ Dpboss Matka Result Satta Matka Guessing Satta Fix jodi Kalyan Fin...
❼❷⓿❺❻❷❽❷❼❽ Dpboss Kalyan Satta Matka Guessing Matka Result Main Bazar chart
 
Unlocking WhatsApp Marketing with HubSpot: Integrating Messaging into Your Ma...
Unlocking WhatsApp Marketing with HubSpot: Integrating Messaging into Your Ma...Unlocking WhatsApp Marketing with HubSpot: Integrating Messaging into Your Ma...
Unlocking WhatsApp Marketing with HubSpot: Integrating Messaging into Your Ma...
Niswey
 
list of states and organizations .pdf
list of  states  and  organizations .pdflist of  states  and  organizations .pdf
list of states and organizations .pdf
Rbc Rbcua
 
Adani Group's Active Interest In Increasing Its Presence in the Cement Manufa...
Adani Group's Active Interest In Increasing Its Presence in the Cement Manufa...Adani Group's Active Interest In Increasing Its Presence in the Cement Manufa...
Adani Group's Active Interest In Increasing Its Presence in the Cement Manufa...
Adani case
 
Call 8867766396 Dpboss Matka Guessing Satta Matta Matka Kalyan Chart Indian M...
Call 8867766396 Dpboss Matka Guessing Satta Matta Matka Kalyan Chart Indian M...Call 8867766396 Dpboss Matka Guessing Satta Matta Matka Kalyan Chart Indian M...
Call 8867766396 Dpboss Matka Guessing Satta Matta Matka Kalyan Chart Indian M...
dpbossdpboss69
 
Registered-Establishment-List-in-Uttarakhand-pdf.pdf
Registered-Establishment-List-in-Uttarakhand-pdf.pdfRegistered-Establishment-List-in-Uttarakhand-pdf.pdf
Registered-Establishment-List-in-Uttarakhand-pdf.pdf
dazzjoker
 
The Role of White Label Bookkeeping Services in Supporting the Growth and Sca...
The Role of White Label Bookkeeping Services in Supporting the Growth and Sca...The Role of White Label Bookkeeping Services in Supporting the Growth and Sca...
The Role of White Label Bookkeeping Services in Supporting the Growth and Sca...
YourLegal Accounting
 
IMG_20240615_091110.pdf dpboss guessing
IMG_20240615_091110.pdf dpboss  guessingIMG_20240615_091110.pdf dpboss  guessing

Recently uploaded (20)

Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan ChartSatta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
 
Enhancing Adoption of AI in Agri-food: Introduction
Enhancing Adoption of AI in Agri-food: IntroductionEnhancing Adoption of AI in Agri-food: Introduction
Enhancing Adoption of AI in Agri-food: Introduction
 
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan ChartSatta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
 
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan ChartSatta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
 
1Q24_HYUNDAI CAPITAL SERVICES INC. AND SUBSIDIARIES
1Q24_HYUNDAI CAPITAL SERVICES INC. AND SUBSIDIARIES1Q24_HYUNDAI CAPITAL SERVICES INC. AND SUBSIDIARIES
1Q24_HYUNDAI CAPITAL SERVICES INC. AND SUBSIDIARIES
 
Prescriptive analytics BA4206 Anna University PPT
Prescriptive analytics BA4206 Anna University PPTPrescriptive analytics BA4206 Anna University PPT
Prescriptive analytics BA4206 Anna University PPT
 
欧洲杯投注-欧洲杯投注外围盘口-欧洲杯投注盘口app|【​网址​🎉ac22.net🎉​】
欧洲杯投注-欧洲杯投注外围盘口-欧洲杯投注盘口app|【​网址​🎉ac22.net🎉​】欧洲杯投注-欧洲杯投注外围盘口-欧洲杯投注盘口app|【​网址​🎉ac22.net🎉​】
欧洲杯投注-欧洲杯投注外围盘口-欧洲杯投注盘口app|【​网址​🎉ac22.net🎉​】
 
Science Around Us Module 2 Matter Around Us
Science Around Us Module 2 Matter Around UsScience Around Us Module 2 Matter Around Us
Science Around Us Module 2 Matter Around Us
 
Cover Story - China's Investment Leader - Dr. Alyce SU
Cover Story - China's Investment Leader - Dr. Alyce SUCover Story - China's Investment Leader - Dr. Alyce SU
Cover Story - China's Investment Leader - Dr. Alyce SU
 
DearbornMusic-KatherineJasperFullSailUni
DearbornMusic-KatherineJasperFullSailUniDearbornMusic-KatherineJasperFullSailUni
DearbornMusic-KatherineJasperFullSailUni
 
Presentation by Herman Kienhuis (Curiosity VC) on Investing in AI for ABS Alu...
Presentation by Herman Kienhuis (Curiosity VC) on Investing in AI for ABS Alu...Presentation by Herman Kienhuis (Curiosity VC) on Investing in AI for ABS Alu...
Presentation by Herman Kienhuis (Curiosity VC) on Investing in AI for ABS Alu...
 
Kirill Klip GEM Royalty TNR Gold Lithium Presentation
Kirill Klip GEM Royalty TNR Gold Lithium PresentationKirill Klip GEM Royalty TNR Gold Lithium Presentation
Kirill Klip GEM Royalty TNR Gold Lithium Presentation
 
❼❷⓿❺❻❷❽❷❼❽ Dpboss Matka Result Satta Matka Guessing Satta Fix jodi Kalyan Fin...
❼❷⓿❺❻❷❽❷❼❽ Dpboss Matka Result Satta Matka Guessing Satta Fix jodi Kalyan Fin...❼❷⓿❺❻❷❽❷❼❽ Dpboss Matka Result Satta Matka Guessing Satta Fix jodi Kalyan Fin...
❼❷⓿❺❻❷❽❷❼❽ Dpboss Matka Result Satta Matka Guessing Satta Fix jodi Kalyan Fin...
 
Unlocking WhatsApp Marketing with HubSpot: Integrating Messaging into Your Ma...
Unlocking WhatsApp Marketing with HubSpot: Integrating Messaging into Your Ma...Unlocking WhatsApp Marketing with HubSpot: Integrating Messaging into Your Ma...
Unlocking WhatsApp Marketing with HubSpot: Integrating Messaging into Your Ma...
 
list of states and organizations .pdf
list of  states  and  organizations .pdflist of  states  and  organizations .pdf
list of states and organizations .pdf
 
Adani Group's Active Interest In Increasing Its Presence in the Cement Manufa...
Adani Group's Active Interest In Increasing Its Presence in the Cement Manufa...Adani Group's Active Interest In Increasing Its Presence in the Cement Manufa...
Adani Group's Active Interest In Increasing Its Presence in the Cement Manufa...
 
Call 8867766396 Dpboss Matka Guessing Satta Matta Matka Kalyan Chart Indian M...
Call 8867766396 Dpboss Matka Guessing Satta Matta Matka Kalyan Chart Indian M...Call 8867766396 Dpboss Matka Guessing Satta Matta Matka Kalyan Chart Indian M...
Call 8867766396 Dpboss Matka Guessing Satta Matta Matka Kalyan Chart Indian M...
 
Registered-Establishment-List-in-Uttarakhand-pdf.pdf
Registered-Establishment-List-in-Uttarakhand-pdf.pdfRegistered-Establishment-List-in-Uttarakhand-pdf.pdf
Registered-Establishment-List-in-Uttarakhand-pdf.pdf
 
The Role of White Label Bookkeeping Services in Supporting the Growth and Sca...
The Role of White Label Bookkeeping Services in Supporting the Growth and Sca...The Role of White Label Bookkeeping Services in Supporting the Growth and Sca...
The Role of White Label Bookkeeping Services in Supporting the Growth and Sca...
 
IMG_20240615_091110.pdf dpboss guessing
IMG_20240615_091110.pdf dpboss  guessingIMG_20240615_091110.pdf dpboss  guessing
IMG_20240615_091110.pdf dpboss guessing
 

How to Develop your own in App-Purchase Service in Odoo

  • 1.
  • 2. How to Develop your own In-App-Purchase (IAP) Service in Odoo?
  • 3. In-app purchasing refers to the buying of services from inside an application.
  • 4. The Normal Service Flow 1 External Service (Third Party Service) 5 3 2 4 transaction flow Odoo IAP Service End Customers The Service Provider
  • 5. The Normal Service Flow The Client requests a service of some sort. The Service Provider asks Odoo if there are enough credits for the service in the Client’s account, and creates a transaction over that amount. The Service Provider provides the service (either on their own or calling to External Services). The Service Provider goes back to Odoo to capture (if the service could be provided) or cancel (if the service could not be provided) the transaction created at step 2. Finally, the Service Provider notifies the Client that the service has been rendered, possibly (depending on the service) displaying or storing its results in the client’s system. If everything goes well, the normal flow is the following: 1 2 3 4 5
  • 6. The Normal Service Flow The Client requests a service of some sort. The Service Provider asks Odoo if there are enough credits for the service in the Client’s account, and creates a transaction over that amount. The Service Provider provides the service (either on their own or calling to External Services). The Service Provider goes back to Odoo to capture (if the service could be provided) or cancel (if the service could not be provided) the transaction created at step 2. Finally, the Service Provider notifies the Client that the service has been rendered, possibly (depending on the service) displaying or storing its results in the client’s system. If everything goes well, the normal flow is the following: 1 2 3 4 5
  • 7. The Normal Service Flow The Client requests a service of some sort. The Service Provider asks Odoo if there are enough credits for the service in the Client’s account, and creates a transaction over that amount. The Service Provider provides the service (either on their own or calling to External Services). The Service Provider goes back to Odoo to capture (if the service could be provided) or cancel (if the service could not be provided) the transaction created at step 2. Finally, the Service Provider notifies the Client that the service has been rendered, possibly (depending on the service) displaying or storing its results in the client’s system. If everything goes well, the normal flow is the following: 1 2 3 4 5
  • 8. The Normal Service Flow The Client requests a service of some sort. The Service Provider asks Odoo if there are enough credits for the service in the Client’s account, and creates a transaction over that amount. The Service Provider provides the service (either on their own or calling to External Services). The Service Provider goes back to Odoo to capture (if the service could be provided) or cancel (if the service could not be provided) the transaction created at step 2. Finally, the Service Provider notifies the Client that the service has been rendered, possibly (depending on the service) displaying or storing its results in the client’s system. If everything goes well, the normal flow is the following: 1 2 3 4 5
  • 9. The Normal Service Flow The Client requests a service of some sort. The Service Provider asks Odoo if there are enough credits for the service in the Client’s account, and creates a transaction over that amount. The Service Provider provides the service (either on their own or calling to External Services). The Service Provider goes back to Odoo to capture (if the service could be provided) or cancel (if the service could not be provided) the transaction created at step 2. Finally, the Service Provider notifies the Client that the service has been rendered, possibly (depending on the service) displaying or storing its results in the client’s system. If everything goes well, the normal flow is the following: 1 2 3 4 5
  • 10. Insufficient credits Flow 1 3 2 4 External Service (Third Party Service) Odoo IAP Service End Customers The Service Provider
  • 11. Building your service Registering the service with Odoo IAP
  • 12.
  • 13.
  • 14.
  • 15. The Credits ➔ The credits went from integer to float value starting October 2018. Integer values are still supported for backward compatibilities. ➔ Every service provided through the IAP platform can be used by the clients with tokens or credits. The credits are an float unit and their monetary value depends on the service and is decided by the provider. ◆ Examples of credit and consumption: ● for a sms service : 1 credit = 1 sms ● for an ad service : 10 credit = 100 Char Ad or ● for a postage service : 1 credit = 1 post stamp. ➔ The value of the credits is fixed with the help of prepaid credit packs that the clients can buy on iap.odoo.com (see Packs).
  • 16. Odoo App The Client Side Odoo App
  • 17. ➔ The second step is to develop an Odoo App which clients can install in their Odoo instance and through which they can request the services you provide. ➔ First, we will create an odoo module depending on iap. IAP is a standard from V11 onwards and the dependency ensures a local account is properly set up and we will have access to some necessary views and useful helpers. ➔ Add client side business logic that will call service side API that provides the desired service. ➔ There are no specific requirement of protocol and services on service and client side.
  • 18. ➔ To make implementation easy, IAP provides a iap_jsonrpc() helper to call a JSON-RPC2 endpoint on an IAP service side Odoo instance and transparently re-raise related Odoo exceptions. ➔ Each transaction called over API will require client account token. ➔ The token of the current client that is provided by the iap.account model’s account_token field. You can retrieve the account for your service by calling env['iap.account'].get("service_name") where "service_name" is the name of the service registered under IAP Account.
  • 19. Odoo IAP Helpers iap.tools.iap_tools.iap_capture ➔ JSON-RPC2 wrapper to call service json endpoint implemented using Odoo IAP Services ➔ iap_jsonrpc() takes care of re-raising InsufficientCreditError for you. from odoo.addons.iap.tools import iap_tools def fetch_cur_rate(self): user_token = self.env['iap.account'].get('live_cur_ex_rate') service_endpoint = self.env['ir.config_parameter'].sudo().get_param('live_cur_ex_rate.endpoint', self._default_live_cur_ex_rate) for move in self: if move.company_currency_id == move.currency_id: raise UserError(_('Invoice currency and company currency is same, ' 'this document do not require exchange rates.')) params = { 'user_token': user_token.account_token, 'request_res_id': '%s,%s'%(move._name, move.id), 'from_cur': move.company_currency_id.name, 'to_cur': move.currency_id.name, } response = iap_tools.iap_jsonrpc(service_endpoint + '/curex/v1/convert', params=params) result = response.get('result', 0) if not result: raise UserError(_('Could not get the result please try again later. ' 'No credit was consumed for this request.')) move.write({ 'iap_curex_rate': result, 'iap_curex_rate_dt': fields.Datetime.now(), }) credit = self.env['iap.account'].get_credits('live_cur_ex_rate') credit_url = self.env['iap.account'].get_credits_url('live_cur_ex_rate') return {'type': 'ir.actions.act_window_close'}
  • 21. Capture (/iap/1/capture) Authorize (/iap/1/authorize) Cancel /iap/1/authorize Verifies that the user’s account has at least asked credit available and creates a hold (pending transaction) on that amount. Confirms the specified transaction, transferring the reserved credits from the user’s account to the service provider’s. Cancels the specified transaction, releasing the hold on the user’s credits.
  • 22. IAP Service Helpers In Build Helper to implement IAP Service side using Odoo
  • 23. iap.tools.iap_tools.iap_authorize iap.tools.iap_tools.iap_charge iap.tools.iap_tools.iap_capture A context manager for authorizing and automatically capturing or cancelling transactions for use in the backend/proxy. Confirms the specified transaction, transferring the reserved credits from the user’s account to the service provider’s. Captures the amount credit on the given transaction. iap.tools.iap_tools.iap_cancel Cancels an authorized transaction.
  • 24. iap.tools.iap_tools.iap_authorize iap.tools.iap_tools.iap_charge iap.tools.iap_tools.iap_capture A context manager for authorizing and automatically capturing or cancelling transactions for use in the backend/proxy. Confirms the specified transaction, transferring the reserved credits from the user’s account to the service provider’s. Captures the amount credit on the given transaction. iap.tools.iap_tools.iap_cancel Cancels an authorized transaction.
  • 25. iap.tools.iap_tools.iap_authorize iap.tools.iap_tools.iap_charge iap.tools.iap_tools.iap_capture A context manager for authorizing and automatically capturing or cancelling transactions for use in the backend/proxy. Confirms the specified transaction, transferring the reserved credits from the user’s account to the service provider’s. Captures the amount credit on the given transaction. iap.tools.iap_tools.iap_cancel Cancels an authorized transaction.
  • 26. iap.tools.iap_tools.iap_authorize iap.tools.iap_tools.iap_charge iap.tools.iap_tools.iap_capture A context manager for authorizing and automatically capturing or cancelling transactions for use in the backend/proxy. Confirms the specified transaction, transferring the reserved credits from the user’s account to the service provider’s. Captures the amount credit on the given transaction. iap.tools.iap_tools.iap_cancel Cancels an authorized transaction.
  • 27. iap.tools.iap_tools.iap_authorize iap.tools.iap_tools.iap_charge iap.tools.iap_tools.iap_capture A context manager for authorizing and automatically capturing or cancelling transactions for use in the backend/proxy. Confirms the specified transaction, transferring the reserved credits from the user’s account to the service provider’s. Captures the amount credit on the given transaction. iap.tools.iap_tools.iap_cancel Cancels an authorized transaction.
  • 29. ➔ By default, iap_charge contacts the production IAP endpoint, ◆ https://iap.odoo.com ➔ While developing and testing your service you may want to point it towards the development IAP endpoint ◆ https://iap-sandbox.odoo.com ➔ To do so, set the iap.endpoint config parameter in your service Odoo: in debug/developer mode ● Setting ‣ Technical ‣ Parameters ‣ System Parameters ◆ just define an entry for the key iap.endpoint with value https://iap-sandbox.odoo.com, if none already exists.
  • 30. ➔ By default, iap_charge contacts the production IAP endpoint, ◆ https://iap.odoo.com ➔ While developing and testing your service you may want to point it towards the development IAP endpoint ◆ https://iap-sandbox.odoo.com ➔ To do so, set the iap.endpoint config parameter in your service Odoo: in debug/developer mode ● Setting ‣ Technical ‣ Parameters ‣ System Parameters ◆ just define an entry for the key iap.endpoint with value https://iap-sandbox.odoo.com, if none already exists.
  • 31. ➔ By default, iap_charge contacts the production IAP endpoint, ◆ https://iap.odoo.com ➔ While developing and testing your service you may want to point it towards the development IAP endpoint ◆ https://iap-sandbox.odoo.com ➔ To do so, set the iap.endpoint config parameter in your service Odoo: in debug/developer mode ● Setting ‣ Technical ‣ Parameters ‣ System Parameters ◆ just define an entry for the key iap.endpoint with value https://iap-sandbox.odoo.com, if none already exists.

Editor's Notes

  1. Odoo logo centered w/ tagline
  2. In-app purchases allow service providers to distribute their applications for free and charge users microtransaction fee when user initiate the services offered by the application. IAP credit are sold in packs and customer can buy credit pack as they need.
  3. Place your own screenshot Select screenshot Click ‘Replace Image’ Select ‘Upload from computer’ from dropdown menu Choose photo Adjust accordingly, without distorting (stretching) photo
  4. Place your own screenshot Select screenshot Click ‘Replace Image’ Select ‘Upload from computer’ from dropdown menu Choose photo Adjust accordingly, without distorting (stretching) photo
  5. Place your own screenshot Select screenshot Click ‘Replace Image’ Select ‘Upload from computer’ from dropdown menu Choose photo Adjust accordingly, without distorting (stretching) photo
  6. The credits went from integer to float value starting October 2018. Integer values are still supported for backward compatibilities. Every service provided through the IAP platform can be used by the clients with tokens or credits. The credits are an float unit and their monetary value depends on the service and is decided by the provider. Examples of credit and consumption: for a sms service : 1 credit = 1 sms for an ad service : 10 credit = 100 Char Ad or for a postage service : 1 credit = 1 post stamp. The value of the credits is fixed with the help of prepaid credit packs that the clients can buy on iap.odoo.com (see Packs).
  7. The second step is to develop an Odoo App which clients can install in their Odoo instance and through which they can request the services you provide. First, we will create an odoo module depending on iap. IAP is a standard from V11 onwards and the dependency ensures a local account is properly set up and we will have access to some necessary views and useful helpers. Add client side business logic that will call service side API that provides the desired service. There are no specific requirement of protocol and services on service and client side.
  8. To make implementation easy, IAP provides a iap_jsonrpc() helper to call a JSON-RPC2 endpoint on an IAP service side Odoo instance and transparently re-raise related Odoo exceptions. Each transaction called over API will require client account token. The token of the current client that is provided by the iap.account model’s account_token field. You can retrieve the account for your service by calling env['iap.account'].get("service_name") where "service_name" is the name of the service registered under IAP Account.
  9. Authorize Verifies that the user’s account has at least asked credit available and creates a hold (pending transaction) on that amount. Any amount currently on hold by a pending transaction is considered unavailable to further authorize calls. Returns a `TransactionToken` identifying the pending transaction which can be used to capture (confirm) or cancel said transaction. Capture Confirms the specified transaction, transferring the reserved credits from the user’s account to the service provider’s. Capture calls are idempotent: performing capture calls on an already captured transaction has no further effect. Cancel Cancels the specified transaction, releasing the hold on the user’s credits. Cancel calls are idempotent: performing capture calls on an already cancelled transaction has no further effect.
  10. A context manager for authorizing and automatically capturing or cancelling transactions for use in the backend/proxy. Works much like e.g. a cursor context manager: immediately authorizes a transaction with the specified parameters; executes the with body; if the body executes in full without error, captures the transaction; otherwise cancels it.
  11. Will authorize asked credit.
  12. Will capture the amount credit on the given transaction.
  13. Will cancel an authorized transaction.
  14. And, now, we have 580 employees.