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>"更新价格
Update a price under your current merchant account based on the price ID.
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>"授权
Your secret API key obtained from the Clink dashboard (Developers section)
请求头
Current timestamp in milliseconds since Unix epoch (required for request signing)
"1783513683000"
路径参数
Unique identifier of the price
请求体
Parameters that can be updated for a price
Unique identifier of the product
Three-letter ISO currency code
USD, EUR, JPY, GBP, AUD, CAD, CNY, HKD, SGD, KRW, AED, THB, IDR, PHP, MYR, BRL, INR Unit amount for one-time or recurring base price
29.99
Price type
one_time, recurring Details of the Subscription
Show child attributes
Show child attributes
Regional pricing priority. Lower values have higher priority.
Whether this price is active. Use true to activate the price or false to deactivate it. The string values 1 and 0 are accepted for backward compatibility only. Omit the field to keep the current status unchanged.
true
Whether this price should be the product default price