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

# Create a Stripe PaymentIntent for an owned order

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

## Request

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

Create a Stripe PaymentIntent for an owned order's unpaid proforma and return its
`client_secret` + `publishable_key` + `mode`. Collect the card on your page with
Stripe.js Payment Element using these, confirm, then call POST …/pay with the
`payment_intent_id`. Single Stripe account — no Shared Payment Token needed.

Pass `mode` ("live" — default, or "test") to choose the environment per call: "test"
creates the PaymentIntent with the sandbox key set so you can dry-run a sale with a
Stripe test card (no real money). The chosen mode is pinned to the order, so the
follow-up /pay and any webhook confirmation process it with the matching keys.

## Path parameters

- `order_number` string, required

## Request body

- PartnerPayIntentBody: Optional body for POST …/pay-intent. Use `mode` to choose the processing environment per call. Omit it (or send "live") for a real charge; send "test" to run a sandbox charge (test card, no real money) against the same order — the PaymentIntent is created with the matching key set and the order is pinned to that mode so the follow-up /pay (and any async confirmation) use it too.
  - `mode` 'live' | 'test', nullable: Processing environment: 'live' (default) or 'test'.

## Response `200`

Successful Response

- PartnerPayIntent
  - `payment_intent_id` string, required
  - `client_secret` string, required
  - `publishable_key` string, required
  - `mode` 'live' | 'test': Environment this PaymentIntent was created in. Confirm it on your page with the matching Stripe.js publishable key (returned above).
  - `amount` number, required
  - `currency` string
  - `invoice_id` integer, required
  - `invoice_number` string, nullable

## Other responses

- `400`: Bad request — error is order_has_no_invoice, order_not_payable, invalid_mode, mode_locked or stripe_not_configured
- `401`: Unauthorized — missing or invalid API key
- `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)
