Prices
Create Price
Changed onCreates a price of a product.
The product must be in your account. It can be archived.
Rules:
- currency defaults to the default currency of your account, else EUR
- minute and hour intervals are accepted in test mode only
- The billing period (intervalCount intervals) cannot be longer than one year
- trialPeriodDays is from 1 to 1825
The amount, the currency and the billing period cannot change later. To change them, create a new price.
post/prices
Request
- Base URLhttps://api.monei.com/v1
- AuthAPI key in header Authorization
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"productId": "8f2c6d1a-4b3e-4f7a-9d2c-1e5b7a9c3f60",
"unitAmount": 1990,
"currency": "EUR",
"type": "RECURRING",
"recurring": {
"interval": "month",
"intervalCount": 1,
"trialPeriodDays": 7
},
"active": true,
"nickname": "Monthly",
"metadata": {
"systemId": "12345"
}
}Response
A price object
Example response
{
"id": "3c5a1f8e-2b7d-4e9a-9c41-7d2e6b0f5a13",
"productId": "8f2c6d1a-4b3e-4f7a-9d2c-1e5b7a9c3f60",
"currency": "EUR",
"unitAmount": 1990,
"type": "RECURRING",
"recurring": {
"interval": "month",
"intervalCount": 1,
"trialPeriodDays": 7
},
"active": true,
"nickname": "Monthly",
"metadata": {
"systemId": "12345"
},
"createdAt": 1636366897,
"updatedAt": 1636366897
}Changes
- info
endpoint added
- info