跳转到主要内容
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: <api-key>' \
  --data '
{
  "currency": "USD",
  "unitAmount": 39.99,
  "priceType": "recurring",
  "recurringDetails": {
    "interval": "month",
    "intervalCount": 1,
    "pricingModel": "flat_rate"
  }
}
'
{
  "code": 123,
  "msg": "<string>",
  "data": {
    "priceId": "<string>",
    "productId": "<string>",
    "unitAmount": 123,
    "recurring": {
      "trialPeriodDays": 123,
      "transformQuantity": {
        "divideBy": 123
      },
      "intervalCount": 123
    },
    "active": true,
    "createTime": 123
  }
}

授权

X-API-KEY
string
header
必填

Your secret API key obtained from the Clink dashboard (Developers section)

X-Timestamp
string
header
必填

Current timestamp in milliseconds since Unix epoch (required for request signing)

路径参数

id
string
必填

Unique identifier of the price

请求体

application/json

Parameters that can be updated for a price

productId
string

Unique identifier of the product

currency
enum<string>

Three-letter ISO currency code

可用选项:
USD,
EUR,
JPY,
GBP,
AUD,
CAD,
CNY,
HKD,
SGD,
KRW,
AED,
THB,
IDR,
PHP,
MYR,
BRL,
INR
unitAmount
number

Unit amount for one-time or recurring base price

示例:

29.99

priceType
enum<string>

Price type

可用选项:
one_time,
recurring
recurringDetails
object

Details of the Subscription

priority
integer<int32>

Regional pricing priority. Lower values have higher priority.

isActive
string

Whether this price is active

isDefaultPrice
boolean

Whether this price should be the product default price

响应

Price updated successfully

Body of the response message

code
integer<int32>

Response status code, 200 when success

msg
string

Brief description of what happened, 'success' when happy case

data
object