Marketplace/InAppPayments

From MozillaWiki
Jump to: navigation, search
Stop (medium size).png
The Marketplace has been placed into maintenance mode. It is no longer under active development. You can read complete details here.

This page discusses some improvements to In-app Payments for the Marketplace.

Issues

  • Developers have to manage the in-app keys.
  • Developers require a server to store the in-app keys.
  • Developers respond to payment notices for success or failure.
  • Marketplace doesn't know anything about an in-app payment, meaning purchase history and refunds are empty.

Proposed solution

  • App developers enters in a product and price on the Mozilla Marketplace developer hub and gets a URL for example /mozpay/product/shiny-pony/buy.
  • User clicks a Buy button.
  • App does a POST to /mozpay/product/shiny-pony/buy
    • That initiates a transaction on the server.
    • Server contacts the marketplace to record start of the transaction.
      • Is there an issue here with matching up Marketplace persona accounts? (no, because we'll be using device receipts)
    • Creates the JWT and returns it to the client
    • The client receives the JWT and passes it to mozPay.
  • App polls the server waiting for a completed purchase...
  • When completed a receipt is returned to the client
  • App verifies the receipt is correct for that app.
    • App verifies the receipt against the receipt verification.
  • App grants access to product purchased.
  • User can revisit the marketplace and get a list of completed in-app payments. [out of scope]
    • Users can click a button to get a receipt for an in-app payment.
      • App should check the receipt is correct for that app.
      • App verifies the receipt against the receipt verification.

Issues

  • Refunds and chargebacks will still need a server, although we will report that on a reciept check.
  • Lots of products?
  • revoking / updating receipt - ie. for subscription products?
  • developer testing
  • Current in app payment tester http://inapp-pay-test.paas.allizom.org/
  • Multiple payment providers?
    • eg: create bango account, create in app payment, create timwe account then what happens
  • Existing https://github.com/mozilla/receiptverifier

Bugs

Tracking bug is 944480.

ID Summary Priority Status
757226 Implement mozApps app.replaceReceipt() P2 RESOLVED
944482 Ensure origin required for paid packaged apps P5 RESOLVED
944487 Create a product and price model P2 RESOLVED
944489 Create a product and price API P2 RESOLVED
944490 Create a product and price page P5 RESOLVED
944518 Create a start in-app payment transaction API -- RESOLVED
944519 Create a start in-app payment transaction API P2 RESOLVED
944522 Create a get receipt API P3 RESOLVED
944523 Add in historic in-app purchases page P3 RESOLVED
944525 Update purchase flow for in-app payments P2 RESOLVED
956333 Create a Solitude product with a default price P2 RESOLVED
956334 Create in-app products from Devhub P2 RESOLVED
956348 Create Solitude product with localized descriptions P3 RESOLVED
956349 Create Solitude product with icons P3 RESOLVED
956351 Add API to generate a JWT by product ID P2 RESOLVED
956354 Add API to check transaction for in-app purchase P2 RESOLVED
956358 [tracking] Create client JS library for server-less in-app payments P2 RESOLVED
956359 Document server-less in-app payments P2 RESOLVED
956366 Install an in-app purchase receipt on device P2 RESOLVED
956367 Verify a server-less in-app purchase receipt P2 RESOLVED
972905 in-app payment tester for server-less payments P2 RESOLVED
977764 Insert some data about the in-app payment into the receipt P2 RESOLVED
977767 Verification should take into account the in-app product P2 RESOLVED
978880 Hiding or flagging apps with new in-app payments P3 RESOLVED
981102 [tracking] Allow developers to simulate a server-less in-app payment P2 RESOLVED
984504 support multiple purchases of the same item for server-less payments P2 RESOLVED
984526 Cope correctly with incoming in-app payments in webpay P2 RESOLVED
986614 Set user on contribution object for purchase of in app object after post-purchase postback P2 RESOLVED
1014841 fxpay: turn example into packaged app P1 RESOLVED
1016447 Cannot save in-app product in DevHub -- RESOLVED
1016671 In-app product without image URL causes error P3 RESOLVED
1016685 Cannot begin a transaction from fxpay.purchase() P1 RESOLVED
1019096 Add in-app products to app debug page in Zamboni -- RESOLVED
1019269 Process a postback for a serverless in-app payment -- RESOLVED
1019890 Add inapp foreign key to Contribution P1 RESOLVED
1021359 Enable product verification for in-app purchase receipts P2 RESOLVED
1021822 [mkt] Set up receipt check service for payments-alt P2 RESOLVED
1022936 Remove link from in-app payments screen P2 RESOLVED
1023403 Restore purchases after re-installing the app -- RESOLVED
1023632 Ensure developer receipts work for in-app payments P4 RESOLVED
1023634 Ensure test receipts work for in-app payments P4 RESOLVED
1025122 [mkt] set up a custom receipt signer for payments-alt P1 RESOLVED
1027397 Expose application ID in Dev Hub page for in-app products -- RESOLVED
1027908 Security Review: Serverless in-app payments -- RESOLVED
1028361 Make in app product page a bit prettier P4 RESOLVED
1028389 In-app products config shows an alert on error P2 RESOLVED
1028976 Unable to save in-app product P2 RESOLVED
1035448 Change inapp public ID to UUID P3 RESOLVED
1037605 fxpay: return an error if system XHR permission doesn't exist P3 RESOLVED
1038365 Re-create in-app products when adding a payment provider P2 RESOLVED
1043590 Prevent non-public app from doing payments with fxpay P2 RESOLVED
1046230 in-app product name should not be unique P2 RESOLVED
1052143 [Devhub] Add a file a bug link to new inapp products pages P4 RESOLVED
1054532 fxpay: return complete product info when restoring from receipt P2 RESOLVED
1056317 Update fxpay to use inapp product UUID P2 RESOLVED
1056416 fxpay: return full product info to callback on purchase() P2 RESOLVED
1058112 fix in-app test receipts to use new GUID for inapp_id P2 RESOLVED
1058279 Validate inapp product thumbnail size P1 RESOLVED
1058284 Allow developers to disable an inapp product P3 RESOLVED
1059944 Overall in-app payments page to explain the differences P3 RESOLVED
1059959 Improve the initial landing on in app products P3 RESOLVED
1060662 package up the fxpay lib with bower P1 RESOLVED
1062445 fpay: send library version as API request header P1 RESOLVED
1064586 Update the link to in-app payments @ ../in-app-config/ -- VERIFIED
1064687 List the pricetiers in ascending order P2 VERIFIED
1064690 Unable to save in-app products @ TypeError: price is undefined in_app_products.js:14 P2 VERIFIED
1065006 in-app product APIs cause 404s because of misinterpreted app origins P1 VERIFIED
1065328 [stage] App validation is successful even there's no origin specified in the manifest file -- RESOLVED
1065352 [stage] In-app Payments option can be selected for a Hosted app also -- RESOLVED
1066356 Disabled in-app product shows up in the app P3 RESOLVED
1066359 Purchasing in-app product fails with TRANS_NOT_FOUND -- RESOLVED
1066374 Allow devs to reorder the in-app product list -- RESOLVED
1066418 Not all in-app products get listed within the app -- RESOLVED
1066419 Allow a brief description about in-app products -- RESOLVED
1067390 Restoring users products from receipt does not work (ERROR_DECODING) P1 VERIFIED
1125968 UnicodeDecodeError when fulfilling in-app product purchase with a non-ascii title P1 RESOLVED

76 Total; 0 Open (0%); 71 Resolved (93.42%); 5 Verified (6.58%);