{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Adapter for Envoy
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • 日本語コミュニティ
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Monetization /
avatar image
0
Question by Peter Douglas · Jul 17, 2020 at 01:59 PM · 164 Views transaction recordingtransaction recording policy

Transaction Recording on POST only - any advice?

We have a product contains 2 proxies one of which is a POST, and one a GET. During the POST preflow the GET is called using the same apikey to verify the user is authorized for this POST.

We created a package that has a rate plan that bills 1 cent per 200 OK request. When we make a request, however, this rate plan bills 2 cents. It seems to be billing for both calls that are made.

We tried disabling the authorization call out and indeed, the plan only billed one penny.

Question: how can I limit the tx recording policy so it only bills once, for the successful POST? I'm still digging but any help would be marvelous.

Thank you

Comment
Add comment
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Close

1 Answer

  • Sort: 
avatar image
0

Answer by rajanish · Jul 17, 2020 at 04:44 PM

does both the calls have the same request path ? if not, api product allows to specify multiple paths. Once there are multiple paths, separate transaction recording policies can be configured per path. So leave the authorization specific path unchecked.
Also note that success criteria default value is "200". Make sure to use anything other than txProviderStatus == '200', If default is used, even unchecked resources are treated success

Hoping this helps!

Comment
Add comment Show 3 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Peter Douglas · Jul 17, 2020 at 06:58 PM 0
Link

Thanks, Rajanish we always appreciate a response! I did not add that in slightly more detail, the "auth" callout uses the same apikey to answer the question "are you who you say you are" and "have you registered these devices (printers) for use."

Each of the proxies just uses a "/" resource path unfortunately. So in configuring the tx recording policy we can't tinker with paths. In fact, in certain error conditions the monetization charged one penny because one of the two proxies "succeeded" in producing a mint.tx.status = 200.

We have a workaround which is less than perfect from a developer portal experience:

Create 2 products (one for the POST proxy, one for the auth callout proxy); bundle them in one package. Set the POST tx recording to be legit (txProviderStatus == '200') and set the auth tx recording policy to txProviderStatus == 'ZZZ', something that will never trigger mint.tx.status. This successfully only bills once.

The unfortunate side effect is that on the developer portal when creating an app, the user will need to check the box to add BOTH products to their app.

avatar image rajanish Peter Douglas · Jul 17, 2020 at 09:55 PM 0
Link

The other option is tinker proxy implementation to set a custom variable to identify success/fail and use that variable to determine success criteria
So in that case, auth proxy will not set this variable at all. So you could avoid developer to choose two products

avatar image Peter Douglas rajanish · Jul 20, 2020 at 01:06 PM 0
Link

That sounds doable and will give that a try, Rajanish. I will let you know what we end up with.

Follow this Question

Answers Answers and Comments

52 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Context variable as custom attribute in Transaction Record Policy 1 Answer

Multiple custom attributes in Transaction Recording policy 1 Answer

Some of the options are not listed in the Resources drop down menu under Refunds section of Transaction Recording Policy 2 Answers

1 billing transaction is 32 API calls 1 Answer

Monetization are not getting any revenues 2 Answers

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2021 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Adapter for Envoy
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • 日本語コミュニティ
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Badges