Skip to main content
POST
/
orders
/
{orderId}
/
calculate-price
{
  "pricing": {
    "subtotal": 125.99,
    "taxAmount": 10.08,
    "fees": 1.32,
    "total": 137.39,
    "taxIncluded": true,
    "currency": "USD",
    "recurringCosts": {
      "subtotal": 29.99,
      "total": 32.39,
      "taxAmount": 2.4,
      "taxIncluded": true,
      "billingCycle": {
        "period": "MONTHLY",
        "interval": 1
      }
    },
    "initialInvoice": {
      "subtotal": 14.5,
      "total": 15.66,
      "taxAmount": 123,
      "taxIncluded": true,
      "period": {
        "start": "2024-01-15",
        "end": "2024-01-31"
      }
    },
    "lineItemPricing": [
      {
        "lineItemId": "e47ac10b-58cc-4372-a567-0e02b2c3d479",
        "description": "iPhone 15 Pro + Premium Plan",
        "amount": 999,
        "taxAmount": 79.92,
        "taxIncluded": true,
        "taxBreakdown": [
          {
            "description": "Sales Tax",
            "amount": 2.4,
            "rate": 8.25
          }
        ],
        "recurringAmount": 29.99,
        "initialInvoiceAmount": 14.5
      }
    ],
    "calculatedAt": "2024-01-15T10:30:00Z",
    "lineItems": [
      {
        "lineItemId": "<string>",
        "subtotal": 123,
        "total": 123,
        "taxBreakdown": [
          {
            "description": "Sales Tax",
            "amount": 2.4,
            "rate": 8.25
          }
        ],
        "taxAmount": 24.75,
        "taxIncluded": true,
        "fees": [
          {
            "name": "Activation fee",
            "amount": 25
          }
        ],
        "totalFees": 25,
        "discounts": [
          {
            "name": "First month free",
            "amount": 50
          }
        ],
        "totalDiscounts": 50
      }
    ]
  }
}

Authorizations

X-API-Key
string
header
required

An API key that grants access to the Connect API. You can create and manage API keys in the portal.

Headers

X-Idempotency-Key
string

A unique key to ensure idempotency of requests. If a request with the same key has already been processed, the same result will be returned. The key must be unique for each distinct operation. Keys are expired after 24 hours, but we recommend using a new key for each request.

Modified requests with the same idempotency keys are rejected with a 409 Conflict status code.

Maximum length: 256

Path Parameters

orderId
string
required

The unique identifier of the order

Response

Price calculation completed successfully

pricing
object
required

Detailed pricing information for an order including taxes, fees, and discounts. The price of an order. In regions with complex tax rules (e.g., the US), you need to call the price calculation endpoint to get accurate tax amounts before submitting the order. In other regions, tax is dependent on customer type but typically included.

I