Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.42k stars 1.99k forks source link

Marketplace: add a route that can open a purchase depending on the ownership id #68704

Closed cpapazoglou closed 1 year ago

cpapazoglou commented 2 years ago

In SaaS licensing, customers have the SaaS application from the vendor but the billing is happening in WP.com. In those cases, normally there is a billing section inside that SaaS application. Vendors will need to state that billing is managed by WordPress.com and ideally have a link which redirects to the specific purchase in Calypso.

Currently, we've got a route https://wordpress.com/me/purchases/:domain/:purchaseId that works with purchase_id since we share the ownsership_id with vendors it would make sense also have a https://wordpress.com/me/purchases-by-owner/:ownershipId route.

Related to pedbJv-h-p2#comment-14

cpapazoglou commented 2 years ago

Backlog grooming:

Related function: https://github.com/Automattic/wp-calypso/blob/7655b6d1f326371990851da10ebb97f133fbdc17/client/state/purchases/selectors/get-by-purchase-id.js#L1-L13