---
title: "POST /v1/invoices/calculate_pricing"
method: POST
path: "/v1/invoices/calculate_pricing"
tags: ["Money"]
---

# POST /v1/invoices/calculate_pricing

`POST /v1/invoices/calculate_pricing`

## Request body

- MarketApiCalculateInvoicePricingRequest
  - `invoice_id` string, required
  - `payment_method_type` string, required
  - `credit_amount_cents` integer, nullable
  - `address` MarketApiAddressPayload
    - `country` string, required
    - `postal_code` string, nullable
    - `state` string, nullable
    - `city` string, nullable
    - `line1` string, nullable
    - `line2` string, nullable
  - `should_update_customer_address` boolean

## Response `200`

Invoice pricing recalculated

- MarketApiCalculateInvoicePricingResponse
  - `object` 'pricing', required
  - `credit_amount_cents` integer, required
  - `platform_fee_cents` integer, required
  - `actual_fee_cents` integer, required
  - `adjustment_cents` integer, required
  - `subtotal_cents` integer, required
  - `tax_cents` integer, required
  - `total_with_tax_cents` integer, required
  - `payment_method_type` string, required
  - `updated` boolean, required

## Other responses

- `400` — Bad request
- `403` — Forbidden
- `404` — Invoice not found
- `500` — Internal server error

## Changes

- **2026-05-15** `b819ba3108b3` — 12 breaking, 4 info
  - removed the required property `details` from the response with the `400` status
  - removed the required property `details` from the response with the `403` status
  - removed the required property `details` from the response with the `404` status
  - removed the required property `details` from the response with the `500` status
  - …12 more
- **2026-02-17** `ad9dff266598` — 1 info
  - the endpoint scheme security `market-api_bearer_auth` was added to the API
- **2026-02-17** `48ff5f0fb9ee` — 1 info
  - the endpoint scheme security `market-api_bearer_auth` was removed from the API
- **2026-02-17** `0222183e15b3` — 1 info
  - the endpoint scheme security `market-api_bearer_auth` was added to the API
- **2025-11-29** `c9d6d56eabd5` — 1 breaking, 1 warning
  - removed the required property `save_payment_method` from the response with the `200` status
  - removed the request property `save_payment_method`

[Change history](https://skmtc.dev/sfcompute/apis/san-francisco-compute-documentation/changes/v1/invoices/calculate_pricing/post.md)

---

[API](https://skmtc.dev/sfcompute/apis/san-francisco-compute-documentation.md) · [All operations](https://skmtc.dev/sfcompute/apis/san-francisco-compute-documentation/llms.txt) · [OpenAPI document](https://skmtc.dev/sfcompute/apis/san-francisco-compute-documentation/revisions/93dd7661e9bb?raw)
