---
title: "Create a hosted PayPal checkout order for marketplace funding"
method: POST
path: "/v1/payments/paypal/orders"
tags: ["billing"]
---

# Create a hosted PayPal checkout order for marketplace funding

`POST /v1/payments/paypal/orders`

## Request

- Base URL: `https://api.runx.ai`
- URL: `https://api.runx.ai/v1/payments/paypal/orders`
- Auth: HTTP bearer

## Request body

- PayPalMarketplaceOrderRequest
  - `principal_id` string
  - `idempotency_key` string, required
  - `posting_id` string, required
  - `payer_ref` string, required
  - `payee_ref` string, required
  - `currency` string, required
  - `price_cents` integer, required
  - `fee_cents` integer, required
  - `claim_limit` integer, required
  - `funded_claim_slots` integer, required
  - `quote_digest` string
  - `quote_expires_at` string, date-time
  - `refund_policy_ref` string
  - `return_url` string, uri
  - `cancel_url` string, uri

## Response `200`

PayPal order and approval URL.

- PayPalOrderEnvelope
  - `ok` unknown, required
  - `order_id` string, required
  - `status` string, required
  - `approval_url` string, uri
  - `amount_cents` integer, required
  - `currency` string, required

## Other responses

- `400`: Validation error.
- `401`: Unauthorized.
- `502`: PayPal order creation failed.
- `503`: PayPal marketplace funding is not configured.

---

[API](https://skmtc.dev/runx/apis/runx-hosted-api.md) · [All operations](https://skmtc.dev/runx/apis/runx-hosted-api/llms.txt) · [OpenAPI document](https://skmtc.dev/runx/apis/runx-hosted-api/revisions/6c940d8edacc?raw)
