Closed Bug 956351 Opened 8 years ago Closed 8 years ago

Add API to generate a JWT by product ID

Categories

(Marketplace Graveyard :: API, defect, P2)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 944519

People

(Reporter: kumar, Unassigned)

References

Details

After creating a product in Devhub (bug 956334) the developer will have a unique product ID. We need a public API (in webpay? Zamboni?) where you can post a product ID and get a JWT to pass into nav.mozPay().

The API will look up the product by ID and will fetch a fixed price point, name, description, icons, etc.
Blocks: 944480
See this for details on the JWT: https://developer.mozilla.org/en-US/Marketplace/Monetization/In-app_payments

The API probably needs to also start a transaction in addition to generating a JWT. It would return something like:

{jwt: "...", transactionId: 1234}

The JWT itself would need to include :

productData=transactionId=1234
postbackURL=https://.../somewhere/special/in/webpay/or/zamboni
chargebackURL=https://.../somewhere/special/in/webpay/or/zamboni
Version: 1.4 → 1.5
Priority: -- → P5
Priority: P5 → P2
I think this API also needs to return a receipt blob that can be installed on device. bug 944522 might be a dupe.
Component: Payments/Refunds → API
(In reply to Kumar McMillan [:kumar] from comment #2)
> I think this API also needs to return a receipt blob that can be installed
> on device. bug 944522 might be a dupe.

Should we return a receipt blob when the payment hasn't been completed yet?
Oops, that comment was meant for bug 956354
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 944519
You need to log in before you can comment on or make changes to this bug.