API Reference
- Customers
- Products
- Plans
- Contracts
- Invoices
- Measurements
- Auth
- Events
- Reports
- Integrations
- Credits
- Webhooks
Contracts
Revise contract
POST
/
contract
/
revise
/
{contractId}
curl --request POST \
--url https://connect.withvayu.com/contract/revise/{contractId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"plan": {
"name": "<string>",
"description": "<string>",
"products": [
{
"name": "<string>",
"description": "<string>",
"variants": [
{
"meterId": "<string>",
"pricing": {
"pricingModel": "PerUnit",
"priceConfiguration": {
"price": 1,
"chunkSize": 1
}
},
"settings": {
"productType": "Credit",
"productConfiguration": {
"shouldCreateSeparateInvoice": false
}
},
"description": "<string>",
"name": "<string>"
}
],
"basePrice": 1,
"commitment": {
"amount": 1,
"type": "Price",
"replenishmentInterval": 123
},
"currencyCommitment": 123,
"paymentTerm": "Postpayment",
"billingInterval": "Monthly",
"accumulationInterval": 123,
"proRata": true,
"erpMetadata": {
"erpId": "<string>",
"erpName": "<string>",
"displayId": "<string>"
},
"rateMultiplier": 123,
"isPeriodicVariants": false
}
],
"billingData": {
"billingInterval": "Monthly",
"duration": 1,
"paymentTerm": "Postpayment",
"autoRenewal": false,
"proRated": true
},
"status": "Active",
"basedFromPlanId": "<string>",
"trial": {
"duration": 123,
"type": "Weeks",
"free": false
},
"purchaseOrder": "<string>",
"rawSyncData": {}
},
"startDate": "2023-11-07T05:31:56Z"
}'
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
Body
application/json
Minimum length:
1
Minimum length:
1
Minimum length:
1
flag to indicate if the payment is postpayment or prepayment
Available options:
Prepayment
, Postpayment
Available options:
Monthly
, BiMonthly
, Quarterly
, SixMonths
, Yearly
Minimum length:
1
Required range:
x >= 0
The billing data of the plan. The billing data contains the billing interval, the plan duration the payment terms and auto renewal, and the billing method.
Available options:
Monthly
, BiMonthly
, Quarterly
, SixMonths
, Yearly
Required range:
x > 0
flag to indicate if the payment is postpayment or prepayment
Available options:
Prepayment
, Postpayment
The status of the plan. plan statuses are active, inactive
Available options:
Active
, Inactive
, Error
Minimum length:
1
Maximum length:
20
Response
200
_mintlify/placeholder
RequestSuccess
curl --request POST \
--url https://connect.withvayu.com/contract/revise/{contractId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"plan": {
"name": "<string>",
"description": "<string>",
"products": [
{
"name": "<string>",
"description": "<string>",
"variants": [
{
"meterId": "<string>",
"pricing": {
"pricingModel": "PerUnit",
"priceConfiguration": {
"price": 1,
"chunkSize": 1
}
},
"settings": {
"productType": "Credit",
"productConfiguration": {
"shouldCreateSeparateInvoice": false
}
},
"description": "<string>",
"name": "<string>"
}
],
"basePrice": 1,
"commitment": {
"amount": 1,
"type": "Price",
"replenishmentInterval": 123
},
"currencyCommitment": 123,
"paymentTerm": "Postpayment",
"billingInterval": "Monthly",
"accumulationInterval": 123,
"proRata": true,
"erpMetadata": {
"erpId": "<string>",
"erpName": "<string>",
"displayId": "<string>"
},
"rateMultiplier": 123,
"isPeriodicVariants": false
}
],
"billingData": {
"billingInterval": "Monthly",
"duration": 1,
"paymentTerm": "Postpayment",
"autoRenewal": false,
"proRated": true
},
"status": "Active",
"basedFromPlanId": "<string>",
"trial": {
"duration": 123,
"type": "Weeks",
"free": false
},
"purchaseOrder": "<string>",
"rawSyncData": {}
},
"startDate": "2023-11-07T05:31:56Z"
}'