Skip to main content
POST
/
price
curl --request POST \
  --url https://uat-api.clinkbill.com/api/price \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --header 'X-Timestamp: <api-key>' \
  --data '
{
  "productId": "prd_xxxxx",
  "currency": "USD",
  "unitAmount": 29.99,
  "priceType": "recurring",
  "recurringDetails": {
    "interval": "month",
    "intervalCount": 1,
    "trialPeriodDays": 7,
    "pricingModel": "flat_rate"
  },
  "isDefaultPrice": true
}
'
{
  "code": 123,
  "msg": "<string>",
  "data": {
    "priceId": "<string>",
    "productId": "<string>",
    "unitAmount": 123,
    "recurring": {
      "trialPeriodDays": 123,
      "transformQuantity": {
        "divideBy": 123
      },
      "intervalCount": 123
    },
    "active": true,
    "createTime": 123
  }
}

Authorizations

X-API-KEY
string
header
required

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

X-Timestamp
string
header
required

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

Body

application/json

Parameters required to create a price by API

productId
string
required

Unique identifier of the product

currency
enum<string>
required

Three-letter ISO currency code

Available options:
USD,
EUR,
JPY,
GBP,
AUD,
CAD,
CNY,
HKD,
SGD,
KRW,
AED,
THB,
IDR,
PHP,
MYR,
BRL,
INR
unitAmount
number
required

Unit amount for one-time or recurring base price

Example:

29.99

priceType
enum<string>
required

Price type

Available options:
one_time,
recurring
recurringDetails
object

Details of the Subscription

priority
integer<int32>

Regional pricing priority. Lower values have higher priority.

isDefaultPrice
boolean

Whether this price should be the product default price

Response

Price created 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