wp-calypso
wp-calypso copied to clipboard
Marketplace: Endpoint for creating a billing_intent
A billing intent is the intention of a customer to go through with a transaction. The billing intent is created by a 3pd vendor after a customer selects their plan in the 3pd interfaces. Vendor should have a way to create [POST] this billing intent through an API.
- [ ] the endpoint accepts uuid (combination of user and site id), store_product_slug, price in usd, billing_interval ( monthly / annually ), return_url
- [ ] the endpoint returns a WP.com checkout url
https://wordpress.com/checkout/[DOMAIN]
or an error
A basic data structure for billing intents has been created in https://github.com/Automattic/wp-calypso/issues/67260
WIP Diff created: D87610-code
Diff separated for easy review- D88280-code
Deployed part 2 in r253253-wpcom
Diff created for tests: D88989-code
Since we are not doing anything catastrophic in production, I guess we can merge this and iterate.
Deployed r253805-wpcom
Test deployed r254043-wpcom