Subscriptions
Preview addon price before purchase
POST
Permission: billing.manage
apiTokenheader
AuthorizationBearer <token>An API token (mwp_…) from Settings → API tokens. Only accepted on this host.
sub_id*Sub IdFormat
uuidapplication/json- body
addon_id*Addon IdFormat
uuidquantity?QuantityNumber of units to add (e.g. 3 = 3 extra sites or 30GB). Max 100 per purchase.
Range
1 <= value <= 100Default
1Successful Response
application/json- response
success*booleandata*The result; on an error, details such as code and permission.
message*stringstatus_code*integertimestamp*stringFormat
date-timemeta?|nullcurl -X POST "https://example.com/v1/subscriptions/497f6eca-6276-4993-bfeb-53cbbbba6f08/addons/preview" \ -H "Content-Type: application/json" \ -d '{ "addon_id": "5ff038d0-7cf6-40b4-8583-90cbc723fc2b" }'{ "message": "string", "status_code": 0, "timestamp": "2019-08-24T14:15:22Z", "meta": {}, "success": true, "data": { "addon_name": "string", "quantity": 0, "unit_price": "string", "total_price": "string", "billing_cycle": "string", "prorated_price": "string", "remaining_days": 0, "cycle_days": 0, "resource_type": "none", "resource_amount": 0, "current_period_end": null }}