Prices API

await accend.prices.create("prod_123", {
  amount: "97.00",
  currency: "BRL",
  model: "subscription",
  interval: "month"
});

Endpoints

  • POST /v1/products/{productId}/prices
  • PATCH /v1/products/{productId}/prices/{priceId}

POST /v1/products//prices

Scopes: write
{
  "amount": "9700",
  "currency": "BRL",
  "model": "subscription",
  "interval": "month"
}
  • amount string required
  • currency enum required: BRL | USDC
  • model enum required: one_time | subscription | metered | credits
  • interval enum conditional: month | year when model=subscription
  • usageBillingMode enum conditional: subscription | credits when model=metered
Response 201
{
  "data": {
    "id": "price_abc123",
    "productId": "prod_abc123",
    "amount": "9700",
    "currency": "BRL",
    "model": "subscription",
    "interval": "month",
    "active": true,
    "createdAt": "2025-01-15T10:00:00Z"
  },
  "error": null,
  "success": true
}

GET /v1/products/

Scopes: read Response 200
{
  "data": {
    "id": "prod_abc123",
    "name": "Pro Plan",
    "type": "subscription",
    "status": "active",
    "prices": [
      {
        "id": "price_abc123",
        "amount": "9700",
        "currency": "BRL",
        "model": "subscription",
        "interval": "month",
        "active": true,
        "createdAt": "2025-01-15T10:00:00Z"
      }
    ]
  },
  "error": null,
  "success": true
}

PATCH /v1/products//prices/

Scopes: write
{
  "amount": "12900",
  "currency": "BRL"
}
  • amount string optional
  • currency enum optional: BRL | USDC
Response 200: full updated price.