Preview a plan change
GET
/v1/wallet/plan-change
const url = 'https://api.orvoca.com/v1/wallet/plan-change?plan=trial';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.orvoca.com/v1/wallet/plan-change?plan=trial' \ --header 'Authorization: Bearer <token>'What choosing a plan would charge, credit and when it takes effect. Changes nothing.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”plan
required
‘trial’ cancels the paid plan at the renewal date
string
‘trial’ cancels the paid plan at the renewal date
Responses
Section titled “Responses”The preview
Media typeapplication/json
object
kind
required
Upgrade: now, fee charged in full and the unused part of the current plan credited. downgrade and cancel: on the renewal date. keep: undoes a scheduled change
string
plan
required
string
charge
required
object
amount
required
integer
currency
required
string
credit
required
object
amount
required
integer
currency
required
string
effective_at
required
string
Example
{ "kind": "upgrade", "plan": "trial", "charge": { "currency": "INR" }, "credit": { "currency": "INR" }}Invalid request
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
param
string
request_id
required
string
Example generated
{ "error": { "code": "example", "message": "example", "param": "example", "request_id": "example" }}Not signed in or bad API key
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
param
string
request_id
required
string
Example generated
{ "error": { "code": "example", "message": "example", "param": "example", "request_id": "example" }}Not allowed
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
param
string
request_id
required
string
Example generated
{ "error": { "code": "example", "message": "example", "param": "example", "request_id": "example" }}Not found
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
param
string
request_id
required
string
Example generated
{ "error": { "code": "example", "message": "example", "param": "example", "request_id": "example" }}