Commet
  • Pricing
Log InTry out
Create pricing market group POSTDelete pricing market group DELETEGet pricing market group GETList pricing market groups GETUpdate pricing market group PATCH
System status
DocumentationKnowledge BaseBuild with AIAPI ReferenceWebhooks

Create pricing market group

Create a reusable country group under the pricing namespace. Creating a group does not require a plan or price. Countries can belong to only one active group; each price chooses its currency independently.

POST
/pricing/market-groups

Create a reusable country group under the pricing namespace. Creating a group does not require a plan or price. Countries can belong to only one active group; each price chooses its currency independently.

Authorization

ApiKeyAuth
x-api-key<token>

In: header

Header Parameters

Idempotency-Key?string

Unique key used to safely retry this write for 24 hours without applying it twice.

Length1 <= length <= 200

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

name*string
Length1 <= length
countryCodes*array<>
Items1 <= items
metadata?

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/pricing/market-groups" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "countryCodes": [      "st"    ]  }'
{  "id": "string",  "name": "string",  "countryCodes": [    "string"  ],  "metadata": {    "property1": null,    "property2": null  },  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "object": "market_group",  "livemode": true}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}

Update invoice status PATCH

Mark an outstanding invoice as "paid" or "void" and return the updated invoice. Cannot change the status of already paid or voided invoices.

Delete pricing market group DELETE

Delete an unused pricing market group. Groups referenced by prices or subscriptions cannot be deleted.