Remotehost Docs

Change an add-on's quantity

PATCH
/orgs/{orgId}/addons/{listingId}/purchase

For an add-on sold per unit. An increase is charged now for the rest of the period and applies once paid (pendingQuantity meanwhile, with confirmationUrl when it needs confirming); a decrease credits the rest of the period and applies at once. Asking again for a change Stripe never received sends it again. Needs billing.manage. Audited.

Authorization

bearerAuth
AuthorizationBearer <token>

A RemoteHost API key (rh_sk_...) or a user session token.

In: header

Path Parameters

orgId*string
listingId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/orgs/string/addons/string/purchase" \  -H "Content-Type: application/json" \  -d '{    "quantity": 0  }'
{  "purchase": {    "id": "string",    "listingId": "string",    "status": "pending",    "source": "billing",    "quantity": 0,    "pendingQuantity": 0,    "startedAt": "string",    "endsAt": "string",    "endedAt": "string"  },  "confirmationUrl": "string"}