Update Price
curl --request PUT \
--url https://uat-api.clinkbill.com/api/price/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--header 'X-Timestamp: <x-timestamp>' \
--data '
{
"currency": "USD",
"unitAmount": 39.99,
"priceType": "recurring",
"recurringDetails": {
"interval": "month",
"trialPeriodDays": 0,
"pricingModel": "flat_rate"
},
"isActive": true
}
'HttpResponse<String> response = Unirest.put("https://uat-api.clinkbill.com/api/price/{id}")
.header("X-Timestamp", "<x-timestamp>")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"USD\",\n \"unitAmount\": 39.99,\n \"priceType\": \"recurring\",\n \"recurringDetails\": {\n \"interval\": \"month\",\n \"trialPeriodDays\": 0,\n \"pricingModel\": \"flat_rate\"\n },\n \"isActive\": true\n}")
.asString();import requests
url = "https://uat-api.clinkbill.com/api/price/{id}"
payload = {
"currency": "USD",
"unitAmount": 39.99,
"priceType": "recurring",
"recurringDetails": {
"interval": "month",
"trialPeriodDays": 0,
"pricingModel": "flat_rate"
},
"isActive": True
}
headers = {
"X-Timestamp": "<x-timestamp>",
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-Timestamp': '<x-timestamp>',
'X-API-KEY': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
currency: 'USD',
unitAmount: 39.99,
priceType: 'recurring',
recurringDetails: {interval: 'month', trialPeriodDays: 0, pricingModel: 'flat_rate'},
isActive: true
})
};
fetch('https://uat-api.clinkbill.com/api/price/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"code": 123,
"msg": "<string>",
"data": {
"priceId": "<string>",
"priceSnapshotId": "<string>",
"productId": "<string>",
"currency": "USD",
"unitAmount": 123,
"priceType": "one_time",
"recurring": {
"interval": "day",
"trialPeriodDays": 123,
"pricingModel": "flat_rate",
"transformQuantity": {
"divideBy": 123,
"round": "up"
},
"intervalCount": 123
},
"active": true,
"createTime": 123
}
}"<string>"Price
Update Price
Update a price under your current merchant account based on the price ID.
PUT
/
price
/
{id}
Update Price
curl --request PUT \
--url https://uat-api.clinkbill.com/api/price/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--header 'X-Timestamp: <x-timestamp>' \
--data '
{
"currency": "USD",
"unitAmount": 39.99,
"priceType": "recurring",
"recurringDetails": {
"interval": "month",
"trialPeriodDays": 0,
"pricingModel": "flat_rate"
},
"isActive": true
}
'HttpResponse<String> response = Unirest.put("https://uat-api.clinkbill.com/api/price/{id}")
.header("X-Timestamp", "<x-timestamp>")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"USD\",\n \"unitAmount\": 39.99,\n \"priceType\": \"recurring\",\n \"recurringDetails\": {\n \"interval\": \"month\",\n \"trialPeriodDays\": 0,\n \"pricingModel\": \"flat_rate\"\n },\n \"isActive\": true\n}")
.asString();import requests
url = "https://uat-api.clinkbill.com/api/price/{id}"
payload = {
"currency": "USD",
"unitAmount": 39.99,
"priceType": "recurring",
"recurringDetails": {
"interval": "month",
"trialPeriodDays": 0,
"pricingModel": "flat_rate"
},
"isActive": True
}
headers = {
"X-Timestamp": "<x-timestamp>",
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-Timestamp': '<x-timestamp>',
'X-API-KEY': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
currency: 'USD',
unitAmount: 39.99,
priceType: 'recurring',
recurringDetails: {interval: 'month', trialPeriodDays: 0, pricingModel: 'flat_rate'},
isActive: true
})
};
fetch('https://uat-api.clinkbill.com/api/price/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"code": 123,
"msg": "<string>",
"data": {
"priceId": "<string>",
"priceSnapshotId": "<string>",
"productId": "<string>",
"currency": "USD",
"unitAmount": 123,
"priceType": "one_time",
"recurring": {
"interval": "day",
"trialPeriodDays": 123,
"pricingModel": "flat_rate",
"transformQuantity": {
"divideBy": 123,
"round": "up"
},
"intervalCount": 123
},
"active": true,
"createTime": 123
}
}"<string>"Authorizations
Headers
Body
application/json
Parameters that can be updated for a price