Skip to main content
POST
/
v1
/
price-configurations
Create price configuration
curl --request POST \
  --url https://api.hyperline.co/v1/price-configurations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "currency": "EUR",
  "billing_interval": {
    "period": "once"
  },
  "type": "fee",
  "prices": [
    {
      "type": "fee",
      "amount": 123,
      "id": "<string>"
    }
  ],
  "product_id": "<string>",
  "country": "FR",
  "plan_id": "<string>",
  "price_book_id": "<string>",
  "commitment_interval": {
    "period": "all"
  }
}
'
import requests

url = "https://api.hyperline.co/v1/price-configurations"

payload = {
"currency": "EUR",
"billing_interval": { "period": "once" },
"type": "fee",
"prices": [
{
"type": "fee",
"amount": 123,
"id": "<string>"
}
],
"product_id": "<string>",
"country": "FR",
"plan_id": "<string>",
"price_book_id": "<string>",
"commitment_interval": { "period": "all" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
currency: 'EUR',
billing_interval: {period: 'once'},
type: 'fee',
prices: [{type: 'fee', amount: 123, id: '<string>'}],
product_id: '<string>',
country: 'FR',
plan_id: '<string>',
price_book_id: '<string>',
commitment_interval: {period: 'all'}
})
};

fetch('https://api.hyperline.co/v1/price-configurations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hyperline.co/v1/price-configurations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'currency' => 'EUR',
'billing_interval' => [
'period' => 'once'
],
'type' => 'fee',
'prices' => [
[
'type' => 'fee',
'amount' => 123,
'id' => '<string>'
]
],
'product_id' => '<string>',
'country' => 'FR',
'plan_id' => '<string>',
'price_book_id' => '<string>',
'commitment_interval' => [
'period' => 'all'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.hyperline.co/v1/price-configurations"

payload := strings.NewReader("{\n \"currency\": \"EUR\",\n \"billing_interval\": {\n \"period\": \"once\"\n },\n \"type\": \"fee\",\n \"prices\": [\n {\n \"type\": \"fee\",\n \"amount\": 123,\n \"id\": \"<string>\"\n }\n ],\n \"product_id\": \"<string>\",\n \"country\": \"FR\",\n \"plan_id\": \"<string>\",\n \"price_book_id\": \"<string>\",\n \"commitment_interval\": {\n \"period\": \"all\"\n }\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.hyperline.co/v1/price-configurations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"EUR\",\n \"billing_interval\": {\n \"period\": \"once\"\n },\n \"type\": \"fee\",\n \"prices\": [\n {\n \"type\": \"fee\",\n \"amount\": 123,\n \"id\": \"<string>\"\n }\n ],\n \"product_id\": \"<string>\",\n \"country\": \"FR\",\n \"plan_id\": \"<string>\",\n \"price_book_id\": \"<string>\",\n \"commitment_interval\": {\n \"period\": \"all\"\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.hyperline.co/v1/price-configurations")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"currency\": \"EUR\",\n \"billing_interval\": {\n \"period\": \"once\"\n },\n \"type\": \"fee\",\n \"prices\": [\n {\n \"type\": \"fee\",\n \"amount\": 123,\n \"id\": \"<string>\"\n }\n ],\n \"product_id\": \"<string>\",\n \"country\": \"FR\",\n \"plan_id\": \"<string>\",\n \"price_book_id\": \"<string>\",\n \"commitment_interval\": {\n \"period\": \"all\"\n }\n}"

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "product_id": "<string>",
  "price_book_id": "<string>",
  "status": "active",
  "currency": "EUR",
  "country": "FR",
  "plan_id": "<string>",
  "billing_interval": {
    "period": "once"
  },
  "commitment_interval": {
    "period": "all"
  },
  "updated_at": "2023-12-25",
  "archived_at": "2023-12-25",
  "type": "fee",
  "prices": [
    {
      "type": "fee",
      "amount": 123,
      "id": "<string>"
    }
  ]
}
{
"message": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Create price configuration payload

currency
enum<string>
required

Currency code. See ISO 4217.

Available options:
EUR,
AED,
AFN,
XCD,
ALL,
AMD,
AOA,
ARS,
USD,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BGN,
BHD,
BIF,
XOF,
BMD,
BND,
BOB,
BRL,
BSD,
BTN,
NOK,
BWP,
BYR,
BZD,
CAD,
CDF,
XAF,
CHF,
NZD,
CLP,
CNY,
COP,
CRC,
CUP,
CVE,
ANG,
CZK,
DJF,
DKK,
DOP,
DZD,
EGP,
MAD,
ERN,
ETB,
FJD,
FKP,
GBP,
GEL,
GHS,
GIP,
GMD,
GNF,
GTQ,
GYD,
HKD,
HNL,
HRK,
HTG,
HUF,
IDR,
ILS,
INR,
IQD,
IRR,
ISK,
JMD,
JOD,
JPY,
KES,
KGS,
KHR,
KMF,
KPW,
KRW,
KWD,
KYD,
KZT,
LAK,
LBP,
LKR,
LRD,
LSL,
LYD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRO,
MUR,
MVR,
MWK,
MXN,
MYR,
MZN,
NAD,
XPF,
NGN,
NIO,
NPR,
OMR,
PAB,
PEN,
PGK,
PHP,
PKR,
PLN,
PYG,
QAR,
RON,
RSD,
RUB,
RWF,
SAR,
SBD,
SCR,
SDG,
SEK,
SGD,
SHP,
SLL,
SOS,
SRD,
SSP,
STD,
SYP,
SZL,
THB,
TJS,
TMT,
TND,
TOP,
TRY,
TTD,
TWD,
TZS,
UAH,
UGX,
UYU,
UZS,
VEF,
VND,
VUV,
WST,
YER,
ZAR,
ZMW,
ZWL
Example:

"EUR"

billing_interval
object
required

Billing interval on which the price configuration is eligible.

type
enum<string>
required
Available options:
fee
prices
object[]
required

Price tiers of the price configuration. If fixed amount, only one price is available.

Maximum array length: 1
product_id
string
required

ID of the product to add the price configuration to.

country
enum<string> | null

Two-letter country code in ISO format. See ISO 3166-1 alpha-2.

Available options:
AD,
AE,
AF,
AG,
AI,
AL,
AM,
AO,
AQ,
AR,
AS,
AT,
AU,
AW,
AX,
AZ,
BA,
BB,
BD,
BE,
BG,
BH,
BI,
BJ,
BL,
BM,
BN,
BO,
BQ,
BR,
BS,
BT,
BF,
BV,
BW,
BY,
BZ,
CA,
CC,
CD,
CF,
CG,
CH,
CI,
CK,
CL,
CM,
CN,
CO,
CR,
CU,
CV,
CW,
CX,
CY,
CZ,
DE,
DJ,
DK,
DM,
DO,
DZ,
EC,
EE,
EG,
EH,
ER,
ES,
ET,
FI,
FJ,
FK,
FM,
FO,
FR,
GA,
GB,
GD,
GE,
GF,
GG,
GH,
GI,
GL,
GM,
GN,
GP,
GQ,
GR,
GS,
GT,
GU,
GW,
GY,
HK,
HM,
HN,
HR,
HT,
HU,
IC,
ID,
IE,
IL,
IM,
IN,
IO,
IQ,
IR,
IS,
IT,
JE,
JM,
JO,
JP,
KE,
KG,
KH,
KI,
KM,
KN,
KP,
KR,
KW,
KY,
KZ,
LA,
LB,
LC,
LI,
LK,
LR,
LS,
LT,
LU,
LV,
LY,
MA,
MC,
MD,
ME,
MF,
MG,
MH,
MK,
ML,
MM,
MN,
MO,
MP,
MQ,
MR,
MS,
MT,
MU,
MV,
MW,
MX,
MY,
MZ,
NA,
NC,
NE,
NF,
NG,
NI,
NL,
NO,
NP,
NR,
NU,
NZ,
OM,
PA,
PE,
PF,
PG,
PH,
PK,
PL,
PM,
PN,
PR,
PS,
PT,
PT-20,
PT-30,
PW,
PY,
QA,
RE,
RO,
RS,
RU,
RW,
SA,
SB,
SC,
SD,
SE,
SG,
SH,
SI,
SJ,
SK,
SL,
SM,
SN,
SO,
SR,
SS,
ST,
SV,
SX,
SY,
SZ,
TC,
TD,
TF,
TG,
TH,
TJ,
TK,
TL,
TM,
TN,
TO,
TR,
TT,
TV,
TW,
TZ,
UA,
UG,
UM,
US,
UY,
UZ,
VA,
VC,
VE,
VG,
VI,
VN,
VU,
WF,
WS,
XK,
YE,
YT,
ZA,
ZM,
ZW
Example:

"FR"

plan_id
string | null
deprecated

ID of the plan on which this price configuration is eligible

price_book_id
string | null

ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book.

commitment_interval
object

Commitment interval on which the price configuration is eligible.

Response

The newly created price configuration

id
string
required

Price configuration ID.

product_id
string
required

ID of the product this price configuration belongs to.

price_book_id
string | null
required

ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book.

status
enum<string>
required

Price configuration status.

Available options:
active,
archived
Example:

"active"

currency
enum<string> | null
required

Currency code. See ISO 4217.

Available options:
EUR,
AED,
AFN,
XCD,
ALL,
AMD,
AOA,
ARS,
USD,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BGN,
BHD,
BIF,
XOF,
BMD,
BND,
BOB,
BRL,
BSD,
BTN,
NOK,
BWP,
BYR,
BZD,
CAD,
CDF,
XAF,
CHF,
NZD,
CLP,
CNY,
COP,
CRC,
CUP,
CVE,
ANG,
CZK,
DJF,
DKK,
DOP,
DZD,
EGP,
MAD,
ERN,
ETB,
FJD,
FKP,
G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JM,
JO,
JP,
KE,
KG,
KH,
KI,
KM,
KN,
KP,
KR,
KW,
KY,
KZ,
LA,
LB,
LC,
LI,
LK,
LR,
LS,
LT,
LU,
LV,
LY,
MA,
MC,
MD,
ME,
MF,
MG,
MH,
MK,
ML,
MM,
MN,
MO,
MP,
MQ,
MR,
MS,
MT,
MU,
MV,
MW,
MX,
MY,
MZ,
NA,
NC,
NE,
NF,
NG,
NI,
NL,
NO,
NP,
NR,
NU,
NZ,
OM,
PA,
PE,
PF,
PG,
PH,
PK,
PL,
PM,
PN,
PR,
PS,
PT,
PT-20,
PT-30,
PW,
PY,
QA,
RE,
RO,
RS,
RU,
RW,
SA,
SB,
SC,
SD,
SE,
SG,
SH,
SI,
SJ,
SK,
SL,
SM,
SN,
SO,
SR,
SS,
ST,
SV,
SX,
SY,
SZ,
TC,
TD,
TF,
TG,
TH,
TJ,
TK,
TL,
TM,
TN,
TO,
TR,
TT,
TV,
TW,
TZ,
UA,
UG,
UM,
US,
UY,
UZ,
VA,
VC,
VE,
VG,
VI,
VN,
VU,
WF,
WS,
XK,
YE,
YT,
ZA,
ZM,
ZW
Example:

"FR"

plan_id
string | null
required
deprecated

ID of the plan on which this price configuration is eligible

billing_interval
object
required

Billing interval on which the price configuration is eligible.

commitment_interval
object
required

Commitment interval on which the price configuration is eligible.

updated_at
string<date>
required

Last edition date of the price configuration.

archived_at
string<date> | null
required

Date of the price configuration archival.

type
enum<string>
required
Available options:
fee
prices
object[]
required

Price tiers of the price configuration. If fixed amount, only one price is available.

Maximum array length: 1