---
title: "Settle an owned order with a confirmed Stripe PaymentIntent"
method: POST
path: "/v1/partner/orders/{order_number}/pay"
tags: ["Partner Provisioning"]
---

# Settle an owned order with a confirmed Stripe PaymentIntent

`POST /v1/partner/orders/{order_number}/pay`

## Request

- Base URL: `https://developers.servera.lt`
- URL: `https://developers.servera.lt/v1/partner/orders/{order_number}/pay`
- Auth: HTTP bearer

Settle an owned order's proforma with a Stripe PaymentIntent (created by /pay-intent
and confirmed on your page with Payment Element). Servera re-verifies the PI is
succeeded and matches the invoice amount, then converts the proforma to VAT, reconciles
the payment and activates the services — synchronously (you get `status: paid` back).

## Path parameters

- `order_number` string, required

## Headers

- `Idempotency-Key` string, nullable

## Request body

- PartnerPayBody
  - `payment_intent_id` string, required: The Stripe PaymentIntent id (pi_…) returned by /pay-intent and confirmed on your page.
  - `max_charge` number, nullable: Optional cap; refused if the invoice total exceeds it.

## Response `200`

Successful Response

- PartnerPayResult
  - `invoice_id` integer, required
  - `invoice_number` string, nullable
  - `document_type` 'proforma' | 'vat', nullable
  - `converted_from_proforma` string, nullable
  - `status` 'unpaid' | 'paid' | 'cancelled' | 'draft' | 'refunded', required
  - `is_paid` boolean, nullable
  - `already_paid` boolean, nullable
  - `method` string, nullable
  - `total` number, nullable
  - `net` number, nullable
  - `vat` number, nullable
  - `vat_rate` number, nullable
  - `gross` number, nullable
  - `currency` string, nullable
  - `pending` boolean, nullable
  - `payment_state` string, nullable
  - `note` string, nullable

## Other responses

- `400`: Bad request — error is order_has_no_invoice or payment_intent_id required
- `401`: Unauthorized — missing or invalid API key
- `402`: PI not usable — error is one of: pi_not_bound_to_order, pi_retrieve_failed, pi_not_succeeded, amount_mismatch, currency_mismatch, pi_invoice_mismatch, pi_already_used
- `403`: Forbidden — error is insufficient_scope (needs the partner:provision scope) or no_products_assigned
- `404`: Not found — error is order_not_found
- `422`: Validation Error

---

[API](https://skmtc.dev/servera/apis/servera-developers-api-2.md) · [All operations](https://skmtc.dev/servera/apis/servera-developers-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/servera/apis/servera-developers-api-2/revisions/2e744791e77f?raw)
