Payments

Create (or return) the PayPal sandbox order for an intent

POST
/intents/{id}/paypal-order

Create (or return) the PayPal sandbox order for an intent. Requires the OWNER role. Idempotent: send an Idempotency-Key.

Authorization

__Host-qm_session<token>

Session cookie set by sign-in on HTTPS deployments (the hosted demo).

In: cookie

Path Parameters

id*string

Resource id (UUID).

Formatuuid

Header Parameters

X-Requested-With*string

CSRF guard: must be quartermaster on every mutation.

Idempotency-Key*string

A unique key per user action; retries with the same key return the first result.

Length8 <= length <= 128

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/intents/0f8fad5b-d9cb-469f-a165-70867728950e/paypal-order" \  -H "X-Requested-With: quartermaster" \  -H "Idempotency-Key: 3b8c2c1e-6f6d-4a59-9a43-8f0c2a9e1d22"
{  "payment": {    "id": "string",    "intent_id": "string",    "purchase_order_id": "string",    "status": "CREATED",    "paypal_order_id": "string",    "paypal_capture_id": "string",    "amount_minor": 0,    "currency": "string",    "captured_amount_minor": 0,    "refunded_amount_minor": 0,    "failure_code": "string",    "failure_message": "string",    "created_at": "string",    "updated_at": "string",    "completed_at": "string"  },  "paypal_order_id": "string"}