{"openapi":"3.0.3","x-tagGroups":[{"name":"Payments","tags":["Checkout Sessions","Payment Intents","Payment Methods","Payment Links"]},{"name":"Customers","tags":["Customers","Subscriptions","Billing Portal"]},{"name":"Catalog","tags":["Products","Coupons","Promotion Codes"]},{"name":"Platform","tags":["Notification Channels","Claims","Delivery"]},{"name":"System","tags":["SDK","Health","Meta"]}],"info":{"title":"Kling API","description":"Payments and subscriptions platform for Iceland.\n\n## Getting Started\n\n### 1. Get your API keys\n\nSign up at [kling.is](https://kling.is) and retrieve your API keys from the dashboard. You'll have two keys:\n- **Test key** (`sk_test_...`) - Use for development and testing\n- **Live key** (`sk_live_...`) - Use for production\n\n### 2. Authentication\n\nAll API requests require authentication using Bearer tokens:\n\n```bash\ncurl https://api.kling.is/v1/checkout/sessions \\\n  -H \"Authorization: Bearer sk_test_...\" \\\n  -H \"Content-Type: application/json\"\n```\n\n### 3. Create a Checkout Session\n\nStart accepting payments by creating a checkout session:\n\n```bash\ncurl https://api.kling.is/v1/checkout/sessions \\\n  -H \"Authorization: Bearer sk_test_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"amount\": 1000,\n    \"currency\": \"ISK\",\n    \"success_url\": \"https://example.com/success\"\n  }'\n```\n\nThis returns a `url` - redirect your customer there to complete payment.\n\n### 4. Handle the result\n\nAfter payment, the customer is redirected to your `success_url`. For server-side confirmation, register a webhook via `POST /v1/notification-channels` and subscribe to `checkout.session.completed` and `payment_intent.captured`.\n\nIf you asked for your own `form_fields` (for example a gift message or a delivery address), the customer's answers are returned as `custom_fields`, keyed by field name, both on `GET /v1/checkout/sessions/{id}` and in the `checkout.session.completed` webhook data.\n\n## SDKs & Libraries\n\n### Browser SDK (Embedded Checkout)\n\nInstall via npm:\n\n```bash\nnpm install @klingis/embed\n```\n\n```typescript\nimport { Kling } from '@klingis/embed';\n\nconst kling = Kling.init();\nconst result = await kling.checkout({ sessionId: 'cs_xxx' });\n```\n\nOr use the CDN script tag:\n\n```html\n&lt;script src=\"https://api.kling.is/v1/kling.js\"&gt;&lt;/script&gt;\n&lt;script&gt;\n  const kling = Kling.init();\n  const result = await kling.checkout({ sessionId: 'cs_xxx' });\n&lt;/script&gt;\n```\n\n### TypeScript / JavaScript (Server-side)\n\nInstall the typed server SDK:\n\n```bash\nnpm install @klingis/sdk\n```\n\n### Other Languages\n\nUse this OpenAPI specification with any OpenAPI code generator (e.g. openapi-generator-cli) to create a client in Python, Go, Ruby, Java, etc.\n","version":"1.0.0","x-sdks":{"javascript":{"name":"Kling Browser SDK","type":"browser","description":"Embedded checkout overlay: no redirect, customers stay on your page","install":"npm install @klingis/embed","example":"const kling = Kling.init();\nconst result = await kling.checkout({ sessionId: 'cs_xxx' });\nif (result.success) console.log('Payment:', result.paymentIntentId);"},"typescript":{"name":"Kling TypeScript SDK","type":"server","description":"Typed API client for Node.js / Bun / Deno server-side usage","install":"npm install @klingis/sdk","example":"import { configure, createCheckoutSession } from '@klingis/sdk';\n\nconfigure({ baseUrl: 'https://api.kling.is', headers: { 'x-api-key': 'sk_...' } });\n\nconst session = await createCheckoutSession({\n  amount: 1000,\n  currency: 'ISK',\n  success_url: 'https://example.com/success',\n});"},"other":{"name":"Any Language (via OpenAPI)","type":"generated","description":"Generate a client in Python, Go, Ruby, Java, etc. from this spec","install":"npx @openapitools/openapi-generator-cli generate -i https://api.kling.is/docs/json -g <language> -o ./kling-client"}}},"servers":[{"url":"https://api.kling.is","description":"Production"}],"tags":[{"name":"Checkout Sessions","description":"Create and manage checkout sessions. A checkout session represents a single payment flow: redirect your customer to the session URL to collect payment."},{"name":"Payment Intents","description":"Track the lifecycle of a payment from creation through authorization, capture, and refund. Each payment intent represents a single payment attempt."},{"name":"Payment Methods","description":"Save and manage tokenized payment methods for returning customers. Supports card tokenization with PCI-compliant handling."},{"name":"Payment Links","description":"Create shareable payment links that can be sent to customers via email, SMS, or chat. No integration required."},{"name":"Customers","description":"Create and manage customer records. Customers can have saved payment methods and active subscriptions."},{"name":"Products","description":"Define products with pricing for one-off payments or recurring subscriptions."},{"name":"Subscriptions","description":"Manage recurring billing. Subscriptions are created through checkout sessions with subscription products."},{"name":"Billing Portal","description":"Generate portal sessions that let your customers manage their subscriptions, update payment methods, and view billing history."},{"name":"Coupons","description":"Create discount coupons with percentage or fixed-amount reductions. Coupons can be limited by redemption count and duration."},{"name":"Promotion Codes","description":"Create customer-facing codes that apply coupons at checkout. Codes can be restricted by customer, expiration date, and usage limits."},{"name":"Notification Channels","description":"Configure webhook endpoints and Slack channels to receive real-time notifications about payment events."},{"name":"Claims","description":"Manage bank claims (kröfur) for collecting payments through the Icelandic banking system."},{"name":"SDK","description":"Browser SDK for embedded checkout overlays."},{"name":"Health","description":"Server health and readiness checks."},{"name":"Meta","description":"Server metadata and diagnostics."}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key in Bearer format"}},"schemas":{}},"paths":{"/health":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"const":"ok","type":"string"},"timestamp":{"type":"string"},"version":{"type":"string"}},"required":["status","timestamp","version"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"status":{"const":"ok","type":"string"},"timestamp":{"type":"string"},"version":{"type":"string"}},"required":["status","timestamp","version"]}},"text/plain":{"schema":{"type":"object","properties":{"status":{"const":"ok","type":"string"},"timestamp":{"type":"string"},"version":{"type":"string"}},"required":["status","timestamp","version"]}}}}},"operationId":"getHealth","tags":["Health"],"summary":"Liveness check"}},"/ready":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"anyOf":[{"const":"ok","type":"string"},{"const":"degraded","type":"string"}]},"db":{"type":"boolean"},"timestamp":{"type":"string"}},"required":["status","db","timestamp"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"status":{"anyOf":[{"const":"ok","type":"string"},{"const":"degraded","type":"string"}]},"db":{"type":"boolean"},"timestamp":{"type":"string"}},"required":["status","db","timestamp"]}},"text/plain":{"schema":{"type":"object","properties":{"status":{"anyOf":[{"const":"ok","type":"string"},{"const":"degraded","type":"string"}]},"db":{"type":"boolean"},"timestamp":{"type":"string"}},"required":["status","db","timestamp"]}}}},"503":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"anyOf":[{"const":"ok","type":"string"},{"const":"degraded","type":"string"}]},"db":{"type":"boolean"},"timestamp":{"type":"string"}},"required":["status","db","timestamp"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"status":{"anyOf":[{"const":"ok","type":"string"},{"const":"degraded","type":"string"}]},"db":{"type":"boolean"},"timestamp":{"type":"string"}},"required":["status","db","timestamp"]}},"text/plain":{"schema":{"type":"object","properties":{"status":{"anyOf":[{"const":"ok","type":"string"},{"const":"degraded","type":"string"}]},"db":{"type":"boolean"},"timestamp":{"type":"string"}},"required":["status","db","timestamp"]}}}}},"operationId":"getReady","tags":["Health"],"summary":"Readiness check (includes DB probe)"}},"/metrics":{"get":{"operationId":"getMetrics","tags":["Health"],"summary":"Prometheus metrics","responses":{"200":{}}}},"/v1":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"},"documentation":{"type":"string"}},"required":["name","version","documentation"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"},"documentation":{"type":"string"}},"required":["name","version","documentation"]}},"text/plain":{"schema":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"},"documentation":{"type":"string"}},"required":["name","version","documentation"]}}}}},"operationId":"getV1","tags":["Meta"],"summary":"API version info"}},"/v1/device/authorize":{"post":{"parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"device_code":{"type":"string"},"user_code":{"type":"string"},"verification_url":{"type":"string"},"expires_in":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"poll_interval":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}},"required":["device_code","user_code","verification_url","expires_in","poll_interval"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"device_code":{"type":"string"},"user_code":{"type":"string"},"verification_url":{"type":"string"},"expires_in":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"poll_interval":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}},"required":["device_code","user_code","verification_url","expires_in","poll_interval"]}},"text/plain":{"schema":{"type":"object","properties":{"device_code":{"type":"string"},"user_code":{"type":"string"},"verification_url":{"type":"string"},"expires_in":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"poll_interval":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}},"required":["device_code","user_code","verification_url","expires_in","poll_interval"]}}}}},"operationId":"postV1DeviceAuthorize","tags":["Device Auth"],"summary":"Start device authorization flow","description":"Initiates a device auth flow for CLI or AI agent. Returns a user code to display and a device code for polling.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["client_name"],"properties":{"client_name":{"minLength":1,"maxLength":100,"description":"Client identifier, e.g. \"Kling CLI v1.0.0\"","type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["client_name"],"properties":{"client_name":{"minLength":1,"maxLength":100,"description":"Client identifier, e.g. \"Kling CLI v1.0.0\"","type":"string"}}}},"text/plain":{"schema":{"type":"object","required":["client_name"],"properties":{"client_name":{"minLength":1,"maxLength":100,"description":"Client identifier, e.g. \"Kling CLI v1.0.0\"","type":"string"}}}}}}}},"/v1/device/token":{"get":{"parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"device_code","required":true}],"operationId":"getV1DeviceToken","tags":["Device Auth"],"summary":"Poll for device authorization result","description":"Poll this endpoint to check if the user has authorized the device. Returns the API key once authorized.","responses":{"200":{}}}},"/v1/merchant":{"get":{"operationId":"getV1Merchant","tags":["Merchant"],"summary":"Get current merchant profile","description":"Returns the merchant profile associated with the API key.\n\n`capabilities` is the onboarding lifecycle per capability (payments, claims, tap_to_pay). `enabled_capabilities` is the list of capability ids that work right now in this key's environment, derived from what the merchant has configured: `payments.card` (an active card acquirer), `payments.bank_claim` (an active bank-claims provider), `delivery.dropp` (an active Dropp carrier, see the Delivery endpoints). Use it to decide which features to offer; for example only show a pickup-point step when `delivery.dropp` is present. `features` holds rollout flags: `features.pos` is true when the Kling POS (product pages, cash sales, paired terminal, staff PINs, Z-report) is switched on for this merchant; while it is false the POS routes answer 403 `pos_not_enabled`.","responses":{"200":{}}},"patch":{"parameters":[],"operationId":"patchV1Merchant","tags":["Merchant"],"summary":"Update merchant profile","description":"Update merchant profile fields. Only provided fields are updated.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"merchant_type":{"anyOf":[{"const":"company","type":"string"},{"const":"individual","type":"string"}]},"kennitala":{"minLength":10,"maxLength":10,"pattern":"^\\d{10}$","type":"string"},"phone":{"maxLength":50,"type":"string"},"website":{"maxLength":255,"type":"string"},"business_description":{"maxLength":2000,"type":"string"},"bank_account":{"maxLength":14,"type":"string"},"legal_address":{"type":"object","required":["street","city","postalCode","country"],"properties":{"street":{"type":"string"},"city":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}}}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"merchant_type":{"anyOf":[{"const":"company","type":"string"},{"const":"individual","type":"string"}]},"kennitala":{"minLength":10,"maxLength":10,"pattern":"^\\d{10}$","type":"string"},"phone":{"maxLength":50,"type":"string"},"website":{"maxLength":255,"type":"string"},"business_description":{"maxLength":2000,"type":"string"},"bank_account":{"maxLength":14,"type":"string"},"legal_address":{"type":"object","required":["street","city","postalCode","country"],"properties":{"street":{"type":"string"},"city":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}}}}}},"text/plain":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"merchant_type":{"anyOf":[{"const":"company","type":"string"},{"const":"individual","type":"string"}]},"kennitala":{"minLength":10,"maxLength":10,"pattern":"^\\d{10}$","type":"string"},"phone":{"maxLength":50,"type":"string"},"website":{"maxLength":255,"type":"string"},"business_description":{"maxLength":2000,"type":"string"},"bank_account":{"maxLength":14,"type":"string"},"legal_address":{"type":"object","required":["street","city","postalCode","country"],"properties":{"street":{"type":"string"},"city":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}}}}}}}},"responses":{"200":{}}}},"/v1/merchant/submit":{"post":{"operationId":"postV1MerchantSubmit","tags":["Merchant"],"summary":"Submit merchant for review","description":"Submit the merchant application for review to enable live payments. Requires kennitala, phone, and business description to be set.","responses":{"200":{}}}},"/v1/merchant/registry-lookup":{"post":{"parameters":[],"operationId":"postV1MerchantRegistry-lookup","tags":["Merchant"],"summary":"Look up company in Icelandic registry","description":"Look up a kennitala in the Skatturinn company registry. Returns company name and address.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["kennitala"],"properties":{"kennitala":{"minLength":10,"maxLength":10,"pattern":"^\\d{10}$","description":"Icelandic kennitala (10 digits)","type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["kennitala"],"properties":{"kennitala":{"minLength":10,"maxLength":10,"pattern":"^\\d{10}$","description":"Icelandic kennitala (10 digits)","type":"string"}}}},"text/plain":{"schema":{"type":"object","required":["kennitala"],"properties":{"kennitala":{"minLength":10,"maxLength":10,"pattern":"^\\d{10}$","description":"Icelandic kennitala (10 digits)","type":"string"}}}}}},"responses":{"200":{}}}},"/v1/merchant/theme/":{"get":{"responses":{"200":{"description":"How the merchant's hosted checkout is branded","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"merchant.theme","type":"string"},"primary_color":{"nullable":true,"anyOf":[{"description":"Hex colour for buttons and accents, e.g. #b45309","type":"string"},{"type":"null"}]},"background_color":{"nullable":true,"anyOf":[{"description":"Hex colour behind the checkout, e.g. #FBF6EE","type":"string"},{"type":"null"}]},"font_family":{"nullable":true,"anyOf":[{"description":"Font family name, e.g. \"Inter\" or \"Red Hat Display\". Google Fonts are loaded by name.","type":"string"},{"type":"null"}]},"heading_font_family":{"nullable":true,"anyOf":[{"description":"Font family name for the checkout's headings (title, amount), e.g. \"Archivo Black\". null means headings use font_family.","type":"string"},{"type":"null"}]},"button_roundness":{"nullable":true,"anyOf":[{"anyOf":[{"const":"sharp","type":"string"},{"const":"rounded","type":"string"},{"const":"pill","type":"string"}]},{"type":"null"}]},"logo_url":{"nullable":true,"anyOf":[{"description":"Absolute https URL of the merchant's logo, shown at the top of the checkout","type":"string"},{"type":"null"}]},"source":{"nullable":true,"anyOf":[{"description":"Where the theme came from: a website that was scanned, or the surface that pushed it (e.g. kling-pages)","type":"string"},{"type":"null"}]},"updated_at":{"nullable":true,"anyOf":[{"description":"Unix timestamp of the last change, null when no theme is set","type":"number"},{"type":"null"}]}},"required":["object","primary_color","background_color","font_family","heading_font_family","button_roundness","logo_url","source","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"object":{"const":"merchant.theme","type":"string"},"primary_color":{"nullable":true,"anyOf":[{"description":"Hex colour for buttons and accents, e.g. #b45309","type":"string"},{"type":"null"}]},"background_color":{"nullable":true,"anyOf":[{"description":"Hex colour behind the checkout, e.g. #FBF6EE","type":"string"},{"type":"null"}]},"font_family":{"nullable":true,"anyOf":[{"description":"Font family name, e.g. \"Inter\" or \"Red Hat Display\". Google Fonts are loaded by name.","type":"string"},{"type":"null"}]},"heading_font_family":{"nullable":true,"anyOf":[{"description":"Font family name for the checkout's headings (title, amount), e.g. \"Archivo Black\". null means headings use font_family.","type":"string"},{"type":"null"}]},"button_roundness":{"nullable":true,"anyOf":[{"anyOf":[{"const":"sharp","type":"string"},{"const":"rounded","type":"string"},{"const":"pill","type":"string"}]},{"type":"null"}]},"logo_url":{"nullable":true,"anyOf":[{"description":"Absolute https URL of the merchant's logo, shown at the top of the checkout","type":"string"},{"type":"null"}]},"source":{"nullable":true,"anyOf":[{"description":"Where the theme came from: a website that was scanned, or the surface that pushed it (e.g. kling-pages)","type":"string"},{"type":"null"}]},"updated_at":{"nullable":true,"anyOf":[{"description":"Unix timestamp of the last change, null when no theme is set","type":"number"},{"type":"null"}]}},"required":["object","primary_color","background_color","font_family","heading_font_family","button_roundness","logo_url","source","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"object":{"const":"merchant.theme","type":"string"},"primary_color":{"nullable":true,"anyOf":[{"description":"Hex colour for buttons and accents, e.g. #b45309","type":"string"},{"type":"null"}]},"background_color":{"nullable":true,"anyOf":[{"description":"Hex colour behind the checkout, e.g. #FBF6EE","type":"string"},{"type":"null"}]},"font_family":{"nullable":true,"anyOf":[{"description":"Font family name, e.g. \"Inter\" or \"Red Hat Display\". Google Fonts are loaded by name.","type":"string"},{"type":"null"}]},"heading_font_family":{"nullable":true,"anyOf":[{"description":"Font family name for the checkout's headings (title, amount), e.g. \"Archivo Black\". null means headings use font_family.","type":"string"},{"type":"null"}]},"button_roundness":{"nullable":true,"anyOf":[{"anyOf":[{"const":"sharp","type":"string"},{"const":"rounded","type":"string"},{"const":"pill","type":"string"}]},{"type":"null"}]},"logo_url":{"nullable":true,"anyOf":[{"description":"Absolute https URL of the merchant's logo, shown at the top of the checkout","type":"string"},{"type":"null"}]},"source":{"nullable":true,"anyOf":[{"description":"Where the theme came from: a website that was scanned, or the surface that pushed it (e.g. kling-pages)","type":"string"},{"type":"null"}]},"updated_at":{"nullable":true,"anyOf":[{"description":"Unix timestamp of the last change, null when no theme is set","type":"number"},{"type":"null"}]}},"required":["object","primary_color","background_color","font_family","heading_font_family","button_roundness","logo_url","source","updated_at"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"getV1MerchantTheme","tags":["Merchant"],"summary":"Get the checkout theme","description":"How the merchant's hosted checkout is branded for this key's environment: colours, body and heading fonts, button shape and logo, selected the way the checkout selects them (environment + active). Every field is null until a theme is set for the environment (by the dashboard's Theme screen, a website scan, or a PATCH here).","security":[{"bearerAuth":[]}]},"patch":{"parameters":[],"responses":{"200":{"description":"How the merchant's hosted checkout is branded","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"merchant.theme","type":"string"},"primary_color":{"nullable":true,"anyOf":[{"description":"Hex colour for buttons and accents, e.g. #b45309","type":"string"},{"type":"null"}]},"background_color":{"nullable":true,"anyOf":[{"description":"Hex colour behind the checkout, e.g. #FBF6EE","type":"string"},{"type":"null"}]},"font_family":{"nullable":true,"anyOf":[{"description":"Font family name, e.g. \"Inter\" or \"Red Hat Display\". Google Fonts are loaded by name.","type":"string"},{"type":"null"}]},"heading_font_family":{"nullable":true,"anyOf":[{"description":"Font family name for the checkout's headings (title, amount), e.g. \"Archivo Black\". null means headings use font_family.","type":"string"},{"type":"null"}]},"button_roundness":{"nullable":true,"anyOf":[{"anyOf":[{"const":"sharp","type":"string"},{"const":"rounded","type":"string"},{"const":"pill","type":"string"}]},{"type":"null"}]},"logo_url":{"nullable":true,"anyOf":[{"description":"Absolute https URL of the merchant's logo, shown at the top of the checkout","type":"string"},{"type":"null"}]},"source":{"nullable":true,"anyOf":[{"description":"Where the theme came from: a website that was scanned, or the surface that pushed it (e.g. kling-pages)","type":"string"},{"type":"null"}]},"updated_at":{"nullable":true,"anyOf":[{"description":"Unix timestamp of the last change, null when no theme is set","type":"number"},{"type":"null"}]}},"required":["object","primary_color","background_color","font_family","heading_font_family","button_roundness","logo_url","source","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"object":{"const":"merchant.theme","type":"string"},"primary_color":{"nullable":true,"anyOf":[{"description":"Hex colour for buttons and accents, e.g. #b45309","type":"string"},{"type":"null"}]},"background_color":{"nullable":true,"anyOf":[{"description":"Hex colour behind the checkout, e.g. #FBF6EE","type":"string"},{"type":"null"}]},"font_family":{"nullable":true,"anyOf":[{"description":"Font family name, e.g. \"Inter\" or \"Red Hat Display\". Google Fonts are loaded by name.","type":"string"},{"type":"null"}]},"heading_font_family":{"nullable":true,"anyOf":[{"description":"Font family name for the checkout's headings (title, amount), e.g. \"Archivo Black\". null means headings use font_family.","type":"string"},{"type":"null"}]},"button_roundness":{"nullable":true,"anyOf":[{"anyOf":[{"const":"sharp","type":"string"},{"const":"rounded","type":"string"},{"const":"pill","type":"string"}]},{"type":"null"}]},"logo_url":{"nullable":true,"anyOf":[{"description":"Absolute https URL of the merchant's logo, shown at the top of the checkout","type":"string"},{"type":"null"}]},"source":{"nullable":true,"anyOf":[{"description":"Where the theme came from: a website that was scanned, or the surface that pushed it (e.g. kling-pages)","type":"string"},{"type":"null"}]},"updated_at":{"nullable":true,"anyOf":[{"description":"Unix timestamp of the last change, null when no theme is set","type":"number"},{"type":"null"}]}},"required":["object","primary_color","background_color","font_family","heading_font_family","button_roundness","logo_url","source","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"object":{"const":"merchant.theme","type":"string"},"primary_color":{"nullable":true,"anyOf":[{"description":"Hex colour for buttons and accents, e.g. #b45309","type":"string"},{"type":"null"}]},"background_color":{"nullable":true,"anyOf":[{"description":"Hex colour behind the checkout, e.g. #FBF6EE","type":"string"},{"type":"null"}]},"font_family":{"nullable":true,"anyOf":[{"description":"Font family name, e.g. \"Inter\" or \"Red Hat Display\". Google Fonts are loaded by name.","type":"string"},{"type":"null"}]},"heading_font_family":{"nullable":true,"anyOf":[{"description":"Font family name for the checkout's headings (title, amount), e.g. \"Archivo Black\". null means headings use font_family.","type":"string"},{"type":"null"}]},"button_roundness":{"nullable":true,"anyOf":[{"anyOf":[{"const":"sharp","type":"string"},{"const":"rounded","type":"string"},{"const":"pill","type":"string"}]},{"type":"null"}]},"logo_url":{"nullable":true,"anyOf":[{"description":"Absolute https URL of the merchant's logo, shown at the top of the checkout","type":"string"},{"type":"null"}]},"source":{"nullable":true,"anyOf":[{"description":"Where the theme came from: a website that was scanned, or the surface that pushed it (e.g. kling-pages)","type":"string"},{"type":"null"}]},"updated_at":{"nullable":true,"anyOf":[{"description":"Unix timestamp of the last change, null when no theme is set","type":"number"},{"type":"null"}]}},"required":["object","primary_color","background_color","font_family","heading_font_family","button_roundness","logo_url","source","updated_at"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"409":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"422":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"patchV1MerchantTheme","tags":["Merchant"],"summary":"Update the checkout theme","description":"Set how the hosted checkout is branded. Only the fields you send change; send null to clear one. Values are validated strictly (hex colours, a font family name, an https logo URL) because they are rendered into the checkout page. The theme is read and written for the key's environment (a test key edits what the test checkout shows). A merchant has one theme row today, shared by both environments with production winning: a live key that finds the row in test claims it (the row moves to live with your changes applied, so a merchant who set up in test and then went live can brand the live checkout), while a test key that finds a live row answers `409 theme_environment_mismatch` and changes nothing. The same theme is shown in the dashboard's Theme screen. Idempotent by nature; an `Idempotency-Key` header is honoured.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"primary_color":{"nullable":true,"anyOf":[{"pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$","description":"Hex colour (#rgb, #rrggbb or #rrggbbaa) for buttons and accents. null clears it.","type":"string"},{"type":"null"}]},"background_color":{"nullable":true,"anyOf":[{"pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$","description":"Hex colour behind the checkout. null clears it.","type":"string"},{"type":"null"}]},"font_family":{"nullable":true,"anyOf":[{"pattern":"^[A-Za-z0-9][A-Za-z0-9 -]{0,63}$","description":"A single font family name (letters, digits, spaces, hyphens), e.g. \"Inter\". Not a font stack. Google Fonts are loaded by name. null clears it.","type":"string"},{"type":"null"}]},"heading_font_family":{"nullable":true,"anyOf":[{"pattern":"^[A-Za-z0-9][A-Za-z0-9 -]{0,63}$","description":"Font family name for headings (the title and amount), same rules as font_family, e.g. \"Archivo Black\". null clears it, and headings use font_family.","type":"string"},{"type":"null"}]},"button_roundness":{"nullable":true,"anyOf":[{"anyOf":[{"const":"sharp","type":"string"},{"const":"rounded","type":"string"},{"const":"pill","type":"string"}]},{"type":"null"}]},"logo_url":{"nullable":true,"anyOf":[{"pattern":"^https://[^\\s\"'<>]{1,490}$","maxLength":500,"description":"Absolute https URL of the logo shown at the top of the checkout. null removes it.","type":"string"},{"type":"null"}]},"source":{"maxLength":500,"description":"Free label of who set the theme, e.g. kling-pages or the shop's URL. Shown in the dashboard.","type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"primary_color":{"nullable":true,"anyOf":[{"pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$","description":"Hex colour (#rgb, #rrggbb or #rrggbbaa) for buttons and accents. null clears it.","type":"string"},{"type":"null"}]},"background_color":{"nullable":true,"anyOf":[{"pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$","description":"Hex colour behind the checkout. null clears it.","type":"string"},{"type":"null"}]},"font_family":{"nullable":true,"anyOf":[{"pattern":"^[A-Za-z0-9][A-Za-z0-9 -]{0,63}$","description":"A single font family name (letters, digits, spaces, hyphens), e.g. \"Inter\". Not a font stack. Google Fonts are loaded by name. null clears it.","type":"string"},{"type":"null"}]},"heading_font_family":{"nullable":true,"anyOf":[{"pattern":"^[A-Za-z0-9][A-Za-z0-9 -]{0,63}$","description":"Font family name for headings (the title and amount), same rules as font_family, e.g. \"Archivo Black\". null clears it, and headings use font_family.","type":"string"},{"type":"null"}]},"button_roundness":{"nullable":true,"anyOf":[{"anyOf":[{"const":"sharp","type":"string"},{"const":"rounded","type":"string"},{"const":"pill","type":"string"}]},{"type":"null"}]},"logo_url":{"nullable":true,"anyOf":[{"pattern":"^https://[^\\s\"'<>]{1,490}$","maxLength":500,"description":"Absolute https URL of the logo shown at the top of the checkout. null removes it.","type":"string"},{"type":"null"}]},"source":{"maxLength":500,"description":"Free label of who set the theme, e.g. kling-pages or the shop's URL. Shown in the dashboard.","type":"string"}}}},"text/plain":{"schema":{"type":"object","properties":{"primary_color":{"nullable":true,"anyOf":[{"pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$","description":"Hex colour (#rgb, #rrggbb or #rrggbbaa) for buttons and accents. null clears it.","type":"string"},{"type":"null"}]},"background_color":{"nullable":true,"anyOf":[{"pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$","description":"Hex colour behind the checkout. null clears it.","type":"string"},{"type":"null"}]},"font_family":{"nullable":true,"anyOf":[{"pattern":"^[A-Za-z0-9][A-Za-z0-9 -]{0,63}$","description":"A single font family name (letters, digits, spaces, hyphens), e.g. \"Inter\". Not a font stack. Google Fonts are loaded by name. null clears it.","type":"string"},{"type":"null"}]},"heading_font_family":{"nullable":true,"anyOf":[{"pattern":"^[A-Za-z0-9][A-Za-z0-9 -]{0,63}$","description":"Font family name for headings (the title and amount), same rules as font_family, e.g. \"Archivo Black\". null clears it, and headings use font_family.","type":"string"},{"type":"null"}]},"button_roundness":{"nullable":true,"anyOf":[{"anyOf":[{"const":"sharp","type":"string"},{"const":"rounded","type":"string"},{"const":"pill","type":"string"}]},{"type":"null"}]},"logo_url":{"nullable":true,"anyOf":[{"pattern":"^https://[^\\s\"'<>]{1,490}$","maxLength":500,"description":"Absolute https URL of the logo shown at the top of the checkout. null removes it.","type":"string"},{"type":"null"}]},"source":{"maxLength":500,"description":"Free label of who set the theme, e.g. kling-pages or the shop's URL. Shown in the dashboard.","type":"string"}}}}}}}},"/v1/events":{"get":{"parameters":[{"schema":{"minimum":1,"maximum":100,"default":25,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100,"default":25,"type":"integer"}]},"in":"query","name":"limit","required":true},{"description":"ISO timestamp — only return events after this time","schema":{"type":"string"},"in":"query","name":"after","required":false}],"operationId":"getV1Events","tags":["Events"],"summary":"List recent events","description":"List events from the event ledger. Use the 'after' parameter to poll for new events since a given timestamp.","responses":{"200":{}}}},"/api/v1/shopify/webhook/":{"post":{"operationId":"postApiV1ShopifyWebhook","responses":{"200":{}}}},"/v1/checkout/sessions/":{"post":{"parameters":[],"responses":{"200":{"description":"A checkout session represents a single payment or subscription signup flow","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the checkout session","type":"string"},"object":{"const":"checkout.session","type":"string"},"livemode":{"description":"Whether this is a live mode session (true) or test mode (false)","type":"boolean"},"amount":{"description":"Total amount to charge now, in the smallest currency unit, after any discount. 0 for trial/setup checkouts.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total amount to charge now, in the smallest currency unit, after any discount. 0 for trial/setup checkouts.","type":"integer"}]},"amount_subtotal":{"description":"Amount before any discount, in the smallest currency unit (equals amount + discount_amount).","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Amount before any discount, in the smallest currency unit (equals amount + discount_amount).","type":"integer"}]},"discount_amount":{"description":"Discount applied to the amount charged now, in the smallest currency unit. 0 when no code is applied, or for trial/setup checkouts where the discount applies to the first charge after the trial.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Discount applied to the amount charged now, in the smallest currency unit. 0 when no code is applied, or for trial/setup checkouts where the discount applies to the first charge after the trial.","type":"integer"}]},"promotion_code_id":{"nullable":true,"anyOf":[{"description":"ID of the applied promotion code, if any. Set even for trial/setup checkouts where discount_amount is 0.","type":"string"},{"type":"null"}]},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"status":{"description":"Current status of the checkout session","anyOf":[{"const":"open","type":"string"},{"const":"complete","type":"string"},{"const":"expired","type":"string"}]},"url":{"description":"URL to redirect the customer to for payment","type":"string"},"short_url":{"description":"Short URL for SMS and compact sharing","type":"string"},"success_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to after successful payment","type":"string"},{"type":"null"}]},"cancel_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to if the customer cancels","type":"string"},{"type":"null"}]},"save_payment_method":{"description":"Whether to save the payment method for future use","type":"boolean"},"customer":{"nullable":true,"anyOf":[{"description":"ID of the customer, if linked","type":"string"},{"type":"null"}]},"product":{"nullable":true,"anyOf":[{"description":"ID of the primary product, if this is a product-based checkout","type":"string"},{"type":"null"}]},"subscription":{"nullable":true,"anyOf":[{"description":"ID of the subscription created by this checkout, if applicable","type":"string"},{"type":"null"}]},"payment_intent":{"nullable":true,"anyOf":[{"description":"ID of the payment intent created after payment completes","type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"description":"ID of the saved payment method, if save_payment_method was true","type":"string"},{"type":"null"}]},"customer_email":{"nullable":true,"anyOf":[{"description":"Pre-filled customer email for the checkout form","type":"string"},{"type":"null"}]},"customer_name":{"nullable":true,"anyOf":[{"description":"Pre-filled customer name for the checkout form","type":"string"},{"type":"null"}]},"customer_phone":{"nullable":true,"anyOf":[{"description":"Pre-filled customer phone for the checkout form","type":"string"},{"type":"null"}]},"payment_status":{"description":"Whether the money has arrived. `status: complete` means the buyer finished the checkout; for a bank claim (krafa) that is when the claim is issued, and the session reads `awaiting_claim` until the buyer pays it in their bank (then `paid`, and `payment_intent.captured` fires). `unpaid`: not complete, or the payment failed or was cancelled (e.g. a krafa cancelled at the bank). `no_payment_required`: complete with nothing to pay. Book shipping on `paid`.","anyOf":[{"const":"paid","type":"string"},{"const":"awaiting_claim","type":"string"},{"const":"unpaid","type":"string"},{"const":"no_payment_required","type":"string"}]},"locale":{"nullable":true,"anyOf":[{"description":"Language the checkout is shown in; null when the buyer's browser decides","anyOf":[{"const":"is","type":"string"},{"const":"en","type":"string"}]},{"type":"null"}]},"items":{"description":"Line items in this checkout session. Empty array for simple amount-based checkouts.","type":"array","items":{"description":"A line item in the checkout session","type":"object","required":["id","product_id","variant_id","description","quantity","unit_amount","vat_rate"],"properties":{"id":{"description":"Unique identifier for the line item","type":"string"},"product_id":{"nullable":true,"anyOf":[{"description":"ID of the product this item references, if any","type":"string"},{"type":"null"}]},"variant_id":{"nullable":true,"anyOf":[{"description":"ID of the product variant bought, when the product has variants","type":"string"},{"type":"null"}]},"description":{"description":"Human-readable description of the line item. For a variant it names the choice, e.g. \"Hettupeysa, Stærð: M\"","type":"string"},"quantity":{"description":"Number of units","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of units","type":"integer"}]},"unit_amount":{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","type":"integer"}]},"vat_rate":{"description":"VAT rate as an integer percentage: 0, 11, or 24","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate as an integer percentage: 0, 11, or 24","type":"integer"}]}}}},"form_fields":{"description":"Custom form fields to collect during checkout. null = default (name + email), empty array = skip customer info collection. The customer's answers to your own fields are returned in custom_fields.","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"custom_fields":{"description":"Answers the customer entered for your custom form_fields, keyed by field name (for example {\"Gift message\": \"Happy birthday\"}). Known fields (name, email, phone, nationalId) are not included here; name, email and phone are returned in customer_name, customer_email and customer_phone. Values are always strings. null until the customer submits the customer info step, or when the session has no custom fields.","nullable":true,"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},{"type":"null"}]},"allow_custom_amount":{"description":"Whether the customer can enter a custom amount (pay-what-you-want)","type":"boolean"},"minimum_amount":{"nullable":true,"anyOf":[{"description":"Minimum amount the customer must pay when allow_custom_amount is true","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Minimum amount the customer must pay when allow_custom_amount is true","type":"integer"}]},{"type":"null"}]},"expires_at":{"description":"Unix timestamp when this session expires (24 hours after creation)","type":"number"},"created_at":{"description":"Unix timestamp when this session was created","type":"number"},"metadata":{"description":"Arbitrary key-value metadata attached to the session","nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"required":["id","object","livemode","amount","amount_subtotal","discount_amount","promotion_code_id","currency","status","url","short_url","success_url","cancel_url","save_payment_method","customer","product","subscription","payment_intent","payment_method","customer_email","customer_name","customer_phone","payment_status","locale","items","form_fields","custom_fields","allow_custom_amount","minimum_amount","expires_at","created_at","metadata"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the checkout session","type":"string"},"object":{"const":"checkout.session","type":"string"},"livemode":{"description":"Whether this is a live mode session (true) or test mode (false)","type":"boolean"},"amount":{"description":"Total amount to charge now, in the smallest currency unit, after any discount. 0 for trial/setup checkouts.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total amount to charge now, in the smallest currency unit, after any discount. 0 for trial/setup checkouts.","type":"integer"}]},"amount_subtotal":{"description":"Amount before any discount, in the smallest currency unit (equals amount + discount_amount).","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Amount before any discount, in the smallest currency unit (equals amount + discount_amount).","type":"integer"}]},"discount_amount":{"description":"Discount applied to the amount charged now, in the smallest currency unit. 0 when no code is applied, or for trial/setup checkouts where the discount applies to the first charge after the trial.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Discount applied to the amount charged now, in the smallest currency unit. 0 when no code is applied, or for trial/setup checkouts where the discount applies to the first charge after the trial.","type":"integer"}]},"promotion_code_id":{"nullable":true,"anyOf":[{"description":"ID of the applied promotion code, if any. Set even for trial/setup checkouts where discount_amount is 0.","type":"string"},{"type":"null"}]},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"status":{"description":"Current status of the checkout session","anyOf":[{"const":"open","type":"string"},{"const":"complete","type":"string"},{"const":"expired","type":"string"}]},"url":{"description":"URL to redirect the customer to for payment","type":"string"},"short_url":{"description":"Short URL for SMS and compact sharing","type":"string"},"success_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to after successful payment","type":"string"},{"type":"null"}]},"cancel_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to if the customer cancels","type":"string"},{"type":"null"}]},"save_payment_method":{"description":"Whether to save the payment method for future use","type":"boolean"},"customer":{"nullable":true,"anyOf":[{"description":"ID of the customer, if linked","type":"string"},{"type":"null"}]},"product":{"nullable":true,"anyOf":[{"description":"ID of the primary product, if this is a product-based checkout","type":"string"},{"type":"null"}]},"subscription":{"nullable":true,"anyOf":[{"description":"ID of the subscription created by this checkout, if applicable","type":"string"},{"type":"null"}]},"payment_intent":{"nullable":true,"anyOf":[{"description":"ID of the payment intent created after payment completes","type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"description":"ID of the saved payment method, if save_payment_method was true","type":"string"},{"type":"null"}]},"customer_email":{"nullable":true,"anyOf":[{"description":"Pre-filled customer email for the checkout form","type":"string"},{"type":"null"}]},"customer_name":{"nullable":true,"anyOf":[{"description":"Pre-filled customer name for the checkout form","type":"string"},{"type":"null"}]},"customer_phone":{"nullable":true,"anyOf":[{"description":"Pre-filled customer phone for the checkout form","type":"string"},{"type":"null"}]},"payment_status":{"description":"Whether the money has arrived. `status: complete` means the buyer finished the checkout; for a bank claim (krafa) that is when the claim is issued, and the session reads `awaiting_claim` until the buyer pays it in their bank (then `paid`, and `payment_intent.captured` fires). `unpaid`: not complete, or the payment failed or was cancelled (e.g. a krafa cancelled at the bank). `no_payment_required`: complete with nothing to pay. Book shipping on `paid`.","anyOf":[{"const":"paid","type":"string"},{"const":"awaiting_claim","type":"string"},{"const":"unpaid","type":"string"},{"const":"no_payment_required","type":"string"}]},"locale":{"nullable":true,"anyOf":[{"description":"Language the checkout is shown in; null when the buyer's browser decides","anyOf":[{"const":"is","type":"string"},{"const":"en","type":"string"}]},{"type":"null"}]},"items":{"description":"Line items in this checkout session. Empty array for simple amount-based checkouts.","type":"array","items":{"description":"A line item in the checkout session","type":"object","required":["id","product_id","variant_id","description","quantity","unit_amount","vat_rate"],"properties":{"id":{"description":"Unique identifier for the line item","type":"string"},"product_id":{"nullable":true,"anyOf":[{"description":"ID of the product this item references, if any","type":"string"},{"type":"null"}]},"variant_id":{"nullable":true,"anyOf":[{"description":"ID of the product variant bought, when the product has variants","type":"string"},{"type":"null"}]},"description":{"description":"Human-readable description of the line item. For a variant it names the choice, e.g. \"Hettupeysa, Stærð: M\"","type":"string"},"quantity":{"description":"Number of units","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of units","type":"integer"}]},"unit_amount":{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","type":"integer"}]},"vat_rate":{"description":"VAT rate as an integer percentage: 0, 11, or 24","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate as an integer percentage: 0, 11, or 24","type":"integer"}]}}}},"form_fields":{"description":"Custom form fields to collect during checkout. null = default (name + email), empty array = skip customer info collection. The customer's answers to your own fields are returned in custom_fields.","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"custom_fields":{"description":"Answers the customer entered for your custom form_fields, keyed by field name (for example {\"Gift message\": \"Happy birthday\"}). Known fields (name, email, phone, nationalId) are not included here; name, email and phone are returned in customer_name, customer_email and customer_phone. Values are always strings. null until the customer submits the customer info step, or when the session has no custom fields.","nullable":true,"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},{"type":"null"}]},"allow_custom_amount":{"description":"Whether the customer can enter a custom amount (pay-what-you-want)","type":"boolean"},"minimum_amount":{"nullable":true,"anyOf":[{"description":"Minimum amount the customer must pay when allow_custom_amount is true","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Minimum amount the customer must pay when allow_custom_amount is true","type":"integer"}]},{"type":"null"}]},"expires_at":{"description":"Unix timestamp when this session expires (24 hours after creation)","type":"number"},"created_at":{"description":"Unix timestamp when this session was created","type":"number"},"metadata":{"description":"Arbitrary key-value metadata attached to the session","nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"required":["id","object","livemode","amount","amount_subtotal","discount_amount","promotion_code_id","currency","status","url","short_url","success_url","cancel_url","save_payment_method","customer","product","subscription","payment_intent","payment_method","customer_email","customer_name","customer_phone","payment_status","locale","items","form_fields","custom_fields","allow_custom_amount","minimum_amount","expires_at","created_at","metadata"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the checkout session","type":"string"},"object":{"const":"checkout.session","type":"string"},"livemode":{"description":"Whether this is a live mode session (true) or test mode (false)","type":"boolean"},"amount":{"description":"Total amount to charge now, in the smallest currency unit, after any discount. 0 for trial/setup checkouts.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total amount to charge now, in the smallest currency unit, after any discount. 0 for trial/setup checkouts.","type":"integer"}]},"amount_subtotal":{"description":"Amount before any discount, in the smallest currency unit (equals amount + discount_amount).","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Amount before any discount, in the smallest currency unit (equals amount + discount_amount).","type":"integer"}]},"discount_amount":{"description":"Discount applied to the amount charged now, in the smallest currency unit. 0 when no code is applied, or for trial/setup checkouts where the discount applies to the first charge after the trial.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Discount applied to the amount charged now, in the smallest currency unit. 0 when no code is applied, or for trial/setup checkouts where the discount applies to the first charge after the trial.","type":"integer"}]},"promotion_code_id":{"nullable":true,"anyOf":[{"description":"ID of the applied promotion code, if any. Set even for trial/setup checkouts where discount_amount is 0.","type":"string"},{"type":"null"}]},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"status":{"description":"Current status of the checkout session","anyOf":[{"const":"open","type":"string"},{"const":"complete","type":"string"},{"const":"expired","type":"string"}]},"url":{"description":"URL to redirect the customer to for payment","type":"string"},"short_url":{"description":"Short URL for SMS and compact sharing","type":"string"},"success_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to after successful payment","type":"string"},{"type":"null"}]},"cancel_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to if the customer cancels","type":"string"},{"type":"null"}]},"save_payment_method":{"description":"Whether to save the payment method for future use","type":"boolean"},"customer":{"nullable":true,"anyOf":[{"description":"ID of the customer, if linked","type":"string"},{"type":"null"}]},"product":{"nullable":true,"anyOf":[{"description":"ID of the primary product, if this is a product-based checkout","type":"string"},{"type":"null"}]},"subscription":{"nullable":true,"anyOf":[{"description":"ID of the subscription created by this checkout, if applicable","type":"string"},{"type":"null"}]},"payment_intent":{"nullable":true,"anyOf":[{"description":"ID of the payment intent created after payment completes","type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"description":"ID of the saved payment method, if save_payment_method was true","type":"string"},{"type":"null"}]},"customer_email":{"nullable":true,"anyOf":[{"description":"Pre-filled customer email for the checkout form","type":"string"},{"type":"null"}]},"customer_name":{"nullable":true,"anyOf":[{"description":"Pre-filled customer name for the checkout form","type":"string"},{"type":"null"}]},"customer_phone":{"nullable":true,"anyOf":[{"description":"Pre-filled customer phone for the checkout form","type":"string"},{"type":"null"}]},"payment_status":{"description":"Whether the money has arrived. `status: complete` means the buyer finished the checkout; for a bank claim (krafa) that is when the claim is issued, and the session reads `awaiting_claim` until the buyer pays it in their bank (then `paid`, and `payment_intent.captured` fires). `unpaid`: not complete, or the payment failed or was cancelled (e.g. a krafa cancelled at the bank). `no_payment_required`: complete with nothing to pay. Book shipping on `paid`.","anyOf":[{"const":"paid","type":"string"},{"const":"awaiting_claim","type":"string"},{"const":"unpaid","type":"string"},{"const":"no_payment_required","type":"string"}]},"locale":{"nullable":true,"anyOf":[{"description":"Language the checkout is shown in; null when the buyer's browser decides","anyOf":[{"const":"is","type":"string"},{"const":"en","type":"string"}]},{"type":"null"}]},"items":{"description":"Line items in this checkout session. Empty array for simple amount-based checkouts.","type":"array","items":{"description":"A line item in the checkout session","type":"object","required":["id","product_id","variant_id","description","quantity","unit_amount","vat_rate"],"properties":{"id":{"description":"Unique identifier for the line item","type":"string"},"product_id":{"nullable":true,"anyOf":[{"description":"ID of the product this item references, if any","type":"string"},{"type":"null"}]},"variant_id":{"nullable":true,"anyOf":[{"description":"ID of the product variant bought, when the product has variants","type":"string"},{"type":"null"}]},"description":{"description":"Human-readable description of the line item. For a variant it names the choice, e.g. \"Hettupeysa, Stærð: M\"","type":"string"},"quantity":{"description":"Number of units","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of units","type":"integer"}]},"unit_amount":{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","type":"integer"}]},"vat_rate":{"description":"VAT rate as an integer percentage: 0, 11, or 24","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate as an integer percentage: 0, 11, or 24","type":"integer"}]}}}},"form_fields":{"description":"Custom form fields to collect during checkout. null = default (name + email), empty array = skip customer info collection. The customer's answers to your own fields are returned in custom_fields.","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"custom_fields":{"description":"Answers the customer entered for your custom form_fields, keyed by field name (for example {\"Gift message\": \"Happy birthday\"}). Known fields (name, email, phone, nationalId) are not included here; name, email and phone are returned in customer_name, customer_email and customer_phone. Values are always strings. null until the customer submits the customer info step, or when the session has no custom fields.","nullable":true,"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},{"type":"null"}]},"allow_custom_amount":{"description":"Whether the customer can enter a custom amount (pay-what-you-want)","type":"boolean"},"minimum_amount":{"nullable":true,"anyOf":[{"description":"Minimum amount the customer must pay when allow_custom_amount is true","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Minimum amount the customer must pay when allow_custom_amount is true","type":"integer"}]},{"type":"null"}]},"expires_at":{"description":"Unix timestamp when this session expires (24 hours after creation)","type":"number"},"created_at":{"description":"Unix timestamp when this session was created","type":"number"},"metadata":{"description":"Arbitrary key-value metadata attached to the session","nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"required":["id","object","livemode","amount","amount_subtotal","discount_amount","promotion_code_id","currency","status","url","short_url","success_url","cancel_url","save_payment_method","customer","product","subscription","payment_intent","payment_method","customer_email","customer_name","customer_phone","payment_status","locale","items","form_fields","custom_fields","allow_custom_amount","minimum_amount","expires_at","created_at","metadata"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1CheckoutSessions","description":"Create a new checkout session. Provide 'items' for multi-line-item checkout, 'product_id' for single-product checkout, or 'amount' for custom amount checkout.","tags":["Checkout Sessions"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"product_id":{"format":"uuid","description":"ID of a product for single-product checkout. Mutually exclusive with 'amount' and 'items'.","type":"string"},"locale":{"description":"Language the checkout is shown in. Without it the buyer's browser decides (cookie, then Accept-Language, then Icelandic). A shop that sells in Icelandic sends \"is\" so a buyer whose browser is set to English still sees Icelandic. A ?locale= on the checkout URL overrides it.","anyOf":[{"const":"is","type":"string"},{"const":"en","type":"string"}]},"variant_id":{"format":"uuid","description":"With product_id: the variant the buyer chose. Required when the product has variants (400 variant_required); its price replaces the product's, and the line's description names the choice. A counted variant with nothing in stock is refused with 409 variant_sold_out.","type":"string"},"amount":{"minimum":1,"maximum":2147483647,"description":"Fixed amount in the smallest currency unit (e.g. ISK integer). Mutually exclusive with 'product_id' and 'items'.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"description":"Fixed amount in the smallest currency unit (e.g. ISK integer). Mutually exclusive with 'product_id' and 'items'.","type":"integer"}]},"currency":{"minLength":3,"maxLength":3,"default":"ISK","description":"Three-letter ISO currency code. Defaults to ISK.","type":"string"},"items":{"description":"Line items for the checkout. Total amount is computed as sum of (amount * quantity) across all items. Mutually exclusive with top-level 'product_id' and 'amount'.","type":"array","items":{"description":"A line item. Provide either 'product_id' or 'description' + 'amount'.","type":"object","properties":{"product_id":{"format":"uuid","description":"ID of an existing product. Amount and VAT rate are derived from the product. Mutually exclusive with 'amount'.","type":"string"},"variant_id":{"format":"uuid","description":"The variant of product_id the buyer chose (e.g. size M). Required when the product has variants (400 variant_required); the variant's price is used and the description reads \"<product name>, <option>: <value>\". A counted variant (Lager app) with nothing in stock is refused with 409 variant_sold_out, and more than is in stock with 409 variant_insufficient_stock.","type":"string"},"description":{"maxLength":500,"description":"Human-readable description. Required when 'product_id' is not provided.","type":"string"},"amount":{"minimum":1,"maximum":2147483647,"description":"Price per unit in the smallest currency unit. Required when 'product_id' is not provided.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"description":"Price per unit in the smallest currency unit. Required when 'product_id' is not provided.","type":"integer"}]},"quantity":{"minimum":1,"maximum":2147483647,"default":1,"description":"Number of units. Defaults to 1.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"default":1,"description":"Number of units. Defaults to 1.","type":"integer"}]},"tax_rate":{"description":"Inclusive VAT rate as an integer percentage: 0, 11, or 24. Defaults to 0 for custom items.","anyOf":[{"const":0,"type":"number"},{"const":11,"type":"number"},{"const":24,"type":"number"}]}}}},"customer_id":{"format":"uuid","description":"ID of an existing customer to link to this checkout session","type":"string"},"promotion_code":{"description":"Promotion code to pre-apply to this checkout. Pass the code string (e.g. \"VELKOMIN50\"), not the promotion-code ID. The discount is applied to the hosted page as if the customer had entered it. An unknown, expired, or ineligible code is rejected with a 400 rather than silently ignored. For trial/setup checkouts the code is recorded and applied to the first charge after the trial.","type":"string"},"success_url":{"format":"uri","description":"URL to redirect the customer to after successful payment. Session ID is appended as ?session_id=...","type":"string"},"cancel_url":{"format":"uri","description":"URL to redirect the customer to if they cancel the checkout","type":"string"},"save_payment_method":{"default":false,"description":"Whether to tokenize and save the payment method for future charges. Always true for subscription products.","type":"boolean"},"customer_email":{"format":"email","description":"Pre-fill the customer's email on the checkout form","type":"string"},"customer_name":{"description":"Pre-fill the customer's name on the checkout form","type":"string"},"customer_phone":{"description":"Pre-fill the customer's phone number on the checkout form","type":"string"},"form_fields":{"description":"Custom form fields to collect during checkout. null or omitted = default (name + email). Empty array = skip customer info step entirely. Array = render specified fields.","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field configuration","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields (name, email, phone, nationalId) map to customer properties; the customer's answers to any other field are returned in the session's custom_fields, keyed by this name.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be completed before payment","type":"boolean"}}}},{"type":"null"}]},"allow_custom_amount":{"default":false,"description":"Enable pay-what-you-want mode where the customer can enter a custom amount","type":"boolean"},"minimum_amount":{"minimum":1,"maximum":2147483647,"description":"Minimum amount the customer must pay in pay-what-you-want mode. Requires 'allow_custom_amount' to be true.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"description":"Minimum amount the customer must pay in pay-what-you-want mode. Requires 'allow_custom_amount' to be true.","type":"integer"}]},"capture":{"default":true,"description":"Whether to capture the payment immediately. Set to false for authorize-only (pre-auth) flows.","type":"boolean"},"payment_method_type":{"description":"Payment method type for this checkout. Defaults to 'card'.","anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"metadata":{"description":"Arbitrary key-value pairs to attach to the checkout session. Useful for storing order IDs or other references.","type":"object","patternProperties":{"^(.*)$":{}}},"payment_provider_id":{"format":"uuid","description":"ID of a specific merchant payment provider to use for this checkout. If omitted, the first active provider for the environment is used.","type":"string"}},"additionalProperties":false}},"multipart/form-data":{"schema":{"type":"object","properties":{"product_id":{"format":"uuid","description":"ID of a product for single-product checkout. Mutually exclusive with 'amount' and 'items'.","type":"string"},"locale":{"description":"Language the checkout is shown in. Without it the buyer's browser decides (cookie, then Accept-Language, then Icelandic). A shop that sells in Icelandic sends \"is\" so a buyer whose browser is set to English still sees Icelandic. A ?locale= on the checkout URL overrides it.","anyOf":[{"const":"is","type":"string"},{"const":"en","type":"string"}]},"variant_id":{"format":"uuid","description":"With product_id: the variant the buyer chose. Required when the product has variants (400 variant_required); its price replaces the product's, and the line's description names the choice. A counted variant with nothing in stock is refused with 409 variant_sold_out.","type":"string"},"amount":{"minimum":1,"maximum":2147483647,"description":"Fixed amount in the smallest currency unit (e.g. ISK integer). Mutually exclusive with 'product_id' and 'items'.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"description":"Fixed amount in the smallest currency unit (e.g. ISK integer). Mutually exclusive with 'product_id' and 'items'.","type":"integer"}]},"currency":{"minLength":3,"maxLength":3,"default":"ISK","description":"Three-letter ISO currency code. Defaults to ISK.","type":"string"},"items":{"description":"Line items for the checkout. Total amount is computed as sum of (amount * quantity) across all items. Mutually exclusive with top-level 'product_id' and 'amount'.","type":"array","items":{"description":"A line item. Provide either 'product_id' or 'description' + 'amount'.","type":"object","properties":{"product_id":{"format":"uuid","description":"ID of an existing product. Amount and VAT rate are derived from the product. Mutually exclusive with 'amount'.","type":"string"},"variant_id":{"format":"uuid","description":"The variant of product_id the buyer chose (e.g. size M). Required when the product has variants (400 variant_required); the variant's price is used and the description reads \"<product name>, <option>: <value>\". A counted variant (Lager app) with nothing in stock is refused with 409 variant_sold_out, and more than is in stock with 409 variant_insufficient_stock.","type":"string"},"description":{"maxLength":500,"description":"Human-readable description. Required when 'product_id' is not provided.","type":"string"},"amount":{"minimum":1,"maximum":2147483647,"description":"Price per unit in the smallest currency unit. Required when 'product_id' is not provided.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"description":"Price per unit in the smallest currency unit. Required when 'product_id' is not provided.","type":"integer"}]},"quantity":{"minimum":1,"maximum":2147483647,"default":1,"description":"Number of units. Defaults to 1.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"default":1,"description":"Number of units. Defaults to 1.","type":"integer"}]},"tax_rate":{"description":"Inclusive VAT rate as an integer percentage: 0, 11, or 24. Defaults to 0 for custom items.","anyOf":[{"const":0,"type":"number"},{"const":11,"type":"number"},{"const":24,"type":"number"}]}}}},"customer_id":{"format":"uuid","description":"ID of an existing customer to link to this checkout session","type":"string"},"promotion_code":{"description":"Promotion code to pre-apply to this checkout. Pass the code string (e.g. \"VELKOMIN50\"), not the promotion-code ID. The discount is applied to the hosted page as if the customer had entered it. An unknown, expired, or ineligible code is rejected with a 400 rather than silently ignored. For trial/setup checkouts the code is recorded and applied to the first charge after the trial.","type":"string"},"success_url":{"format":"uri","description":"URL to redirect the customer to after successful payment. Session ID is appended as ?session_id=...","type":"string"},"cancel_url":{"format":"uri","description":"URL to redirect the customer to if they cancel the checkout","type":"string"},"save_payment_method":{"default":false,"description":"Whether to tokenize and save the payment method for future charges. Always true for subscription products.","type":"boolean"},"customer_email":{"format":"email","description":"Pre-fill the customer's email on the checkout form","type":"string"},"customer_name":{"description":"Pre-fill the customer's name on the checkout form","type":"string"},"customer_phone":{"description":"Pre-fill the customer's phone number on the checkout form","type":"string"},"form_fields":{"description":"Custom form fields to collect during checkout. null or omitted = default (name + email). Empty array = skip customer info step entirely. Array = render specified fields.","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field configuration","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields (name, email, phone, nationalId) map to customer properties; the customer's answers to any other field are returned in the session's custom_fields, keyed by this name.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be completed before payment","type":"boolean"}}}},{"type":"null"}]},"allow_custom_amount":{"default":false,"description":"Enable pay-what-you-want mode where the customer can enter a custom amount","type":"boolean"},"minimum_amount":{"minimum":1,"maximum":2147483647,"description":"Minimum amount the customer must pay in pay-what-you-want mode. Requires 'allow_custom_amount' to be true.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"description":"Minimum amount the customer must pay in pay-what-you-want mode. Requires 'allow_custom_amount' to be true.","type":"integer"}]},"capture":{"default":true,"description":"Whether to capture the payment immediately. Set to false for authorize-only (pre-auth) flows.","type":"boolean"},"payment_method_type":{"description":"Payment method type for this checkout. Defaults to 'card'.","anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"metadata":{"description":"Arbitrary key-value pairs to attach to the checkout session. Useful for storing order IDs or other references.","type":"object","patternProperties":{"^(.*)$":{}}},"payment_provider_id":{"format":"uuid","description":"ID of a specific merchant payment provider to use for this checkout. If omitted, the first active provider for the environment is used.","type":"string"}},"additionalProperties":false}},"text/plain":{"schema":{"type":"object","properties":{"product_id":{"format":"uuid","description":"ID of a product for single-product checkout. Mutually exclusive with 'amount' and 'items'.","type":"string"},"locale":{"description":"Language the checkout is shown in. Without it the buyer's browser decides (cookie, then Accept-Language, then Icelandic). A shop that sells in Icelandic sends \"is\" so a buyer whose browser is set to English still sees Icelandic. A ?locale= on the checkout URL overrides it.","anyOf":[{"const":"is","type":"string"},{"const":"en","type":"string"}]},"variant_id":{"format":"uuid","description":"With product_id: the variant the buyer chose. Required when the product has variants (400 variant_required); its price replaces the product's, and the line's description names the choice. A counted variant with nothing in stock is refused with 409 variant_sold_out.","type":"string"},"amount":{"minimum":1,"maximum":2147483647,"description":"Fixed amount in the smallest currency unit (e.g. ISK integer). Mutually exclusive with 'product_id' and 'items'.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"description":"Fixed amount in the smallest currency unit (e.g. ISK integer). Mutually exclusive with 'product_id' and 'items'.","type":"integer"}]},"currency":{"minLength":3,"maxLength":3,"default":"ISK","description":"Three-letter ISO currency code. Defaults to ISK.","type":"string"},"items":{"description":"Line items for the checkout. Total amount is computed as sum of (amount * quantity) across all items. Mutually exclusive with top-level 'product_id' and 'amount'.","type":"array","items":{"description":"A line item. Provide either 'product_id' or 'description' + 'amount'.","type":"object","properties":{"product_id":{"format":"uuid","description":"ID of an existing product. Amount and VAT rate are derived from the product. Mutually exclusive with 'amount'.","type":"string"},"variant_id":{"format":"uuid","description":"The variant of product_id the buyer chose (e.g. size M). Required when the product has variants (400 variant_required); the variant's price is used and the description reads \"<product name>, <option>: <value>\". A counted variant (Lager app) with nothing in stock is refused with 409 variant_sold_out, and more than is in stock with 409 variant_insufficient_stock.","type":"string"},"description":{"maxLength":500,"description":"Human-readable description. Required when 'product_id' is not provided.","type":"string"},"amount":{"minimum":1,"maximum":2147483647,"description":"Price per unit in the smallest currency unit. Required when 'product_id' is not provided.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"description":"Price per unit in the smallest currency unit. Required when 'product_id' is not provided.","type":"integer"}]},"quantity":{"minimum":1,"maximum":2147483647,"default":1,"description":"Number of units. Defaults to 1.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"default":1,"description":"Number of units. Defaults to 1.","type":"integer"}]},"tax_rate":{"description":"Inclusive VAT rate as an integer percentage: 0, 11, or 24. Defaults to 0 for custom items.","anyOf":[{"const":0,"type":"number"},{"const":11,"type":"number"},{"const":24,"type":"number"}]}}}},"customer_id":{"format":"uuid","description":"ID of an existing customer to link to this checkout session","type":"string"},"promotion_code":{"description":"Promotion code to pre-apply to this checkout. Pass the code string (e.g. \"VELKOMIN50\"), not the promotion-code ID. The discount is applied to the hosted page as if the customer had entered it. An unknown, expired, or ineligible code is rejected with a 400 rather than silently ignored. For trial/setup checkouts the code is recorded and applied to the first charge after the trial.","type":"string"},"success_url":{"format":"uri","description":"URL to redirect the customer to after successful payment. Session ID is appended as ?session_id=...","type":"string"},"cancel_url":{"format":"uri","description":"URL to redirect the customer to if they cancel the checkout","type":"string"},"save_payment_method":{"default":false,"description":"Whether to tokenize and save the payment method for future charges. Always true for subscription products.","type":"boolean"},"customer_email":{"format":"email","description":"Pre-fill the customer's email on the checkout form","type":"string"},"customer_name":{"description":"Pre-fill the customer's name on the checkout form","type":"string"},"customer_phone":{"description":"Pre-fill the customer's phone number on the checkout form","type":"string"},"form_fields":{"description":"Custom form fields to collect during checkout. null or omitted = default (name + email). Empty array = skip customer info step entirely. Array = render specified fields.","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field configuration","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields (name, email, phone, nationalId) map to customer properties; the customer's answers to any other field are returned in the session's custom_fields, keyed by this name.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be completed before payment","type":"boolean"}}}},{"type":"null"}]},"allow_custom_amount":{"default":false,"description":"Enable pay-what-you-want mode where the customer can enter a custom amount","type":"boolean"},"minimum_amount":{"minimum":1,"maximum":2147483647,"description":"Minimum amount the customer must pay in pay-what-you-want mode. Requires 'allow_custom_amount' to be true.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"description":"Minimum amount the customer must pay in pay-what-you-want mode. Requires 'allow_custom_amount' to be true.","type":"integer"}]},"capture":{"default":true,"description":"Whether to capture the payment immediately. Set to false for authorize-only (pre-auth) flows.","type":"boolean"},"payment_method_type":{"description":"Payment method type for this checkout. Defaults to 'card'.","anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"metadata":{"description":"Arbitrary key-value pairs to attach to the checkout session. Useful for storing order IDs or other references.","type":"object","patternProperties":{"^(.*)$":{}}},"payment_provider_id":{"format":"uuid","description":"ID of a specific merchant payment provider to use for this checkout. If omitted, the first active provider for the environment is used.","type":"string"}},"additionalProperties":false}}}}},"get":{"parameters":[{"description":"Only sessions in this status. `complete` = the customer paid.","schema":{"anyOf":[{"const":"open","type":"string"},{"const":"complete","type":"string"},{"const":"expired","type":"string"}]},"in":"query","name":"status","required":false},{"description":"Only sessions created at or after this time: unix seconds (as created_at is returned) or an ISO 8601 timestamp, e.g. 2026-09-20T00:00:00Z.","schema":{"type":"string"},"in":"query","name":"created_gte","required":false},{"schema":{"minimum":1,"maximum":100,"default":10,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100,"default":10,"type":"integer"}]},"in":"query","name":"limit","required":true},{"description":"Checkout session id to page after (see has_more). Results are newest first.","schema":{"type":"string","format":"uuid"},"in":"query","name":"starting_after","required":false}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"description":"A checkout session represents a single payment or subscription signup flow","type":"object","required":["id","object","livemode","amount","amount_subtotal","discount_amount","promotion_code_id","currency","status","url","short_url","success_url","cancel_url","save_payment_method","customer","product","subscription","payment_intent","payment_method","customer_email","customer_name","customer_phone","payment_status","locale","items","form_fields","custom_fields","allow_custom_amount","minimum_amount","expires_at","created_at","metadata"],"properties":{"id":{"description":"Unique identifier for the checkout session","type":"string"},"object":{"const":"checkout.session","type":"string"},"livemode":{"description":"Whether this is a live mode session (true) or test mode (false)","type":"boolean"},"amount":{"description":"Total amount to charge now, in the smallest currency unit, after any discount. 0 for trial/setup checkouts.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total amount to charge now, in the smallest currency unit, after any discount. 0 for trial/setup checkouts.","type":"integer"}]},"amount_subtotal":{"description":"Amount before any discount, in the smallest currency unit (equals amount + discount_amount).","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Amount before any discount, in the smallest currency unit (equals amount + discount_amount).","type":"integer"}]},"discount_amount":{"description":"Discount applied to the amount charged now, in the smallest currency unit. 0 when no code is applied, or for trial/setup checkouts where the discount applies to the first charge after the trial.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Discount applied to the amount charged now, in the smallest currency unit. 0 when no code is applied, or for trial/setup checkouts where the discount applies to the first charge after the trial.","type":"integer"}]},"promotion_code_id":{"nullable":true,"anyOf":[{"description":"ID of the applied promotion code, if any. Set even for trial/setup checkouts where discount_amount is 0.","type":"string"},{"type":"null"}]},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"status":{"description":"Current status of the checkout session","anyOf":[{"const":"open","type":"string"},{"const":"complete","type":"string"},{"const":"expired","type":"string"}]},"url":{"description":"URL to redirect the customer to for payment","type":"string"},"short_url":{"description":"Short URL for SMS and compact sharing","type":"string"},"success_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to after successful payment","type":"string"},{"type":"null"}]},"cancel_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to if the customer cancels","type":"string"},{"type":"null"}]},"save_payment_method":{"description":"Whether to save the payment method for future use","type":"boolean"},"customer":{"nullable":true,"anyOf":[{"description":"ID of the customer, if linked","type":"string"},{"type":"null"}]},"product":{"nullable":true,"anyOf":[{"description":"ID of the primary product, if this is a product-based checkout","type":"string"},{"type":"null"}]},"subscription":{"nullable":true,"anyOf":[{"description":"ID of the subscription created by this checkout, if applicable","type":"string"},{"type":"null"}]},"payment_intent":{"nullable":true,"anyOf":[{"description":"ID of the payment intent created after payment completes","type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"description":"ID of the saved payment method, if save_payment_method was true","type":"string"},{"type":"null"}]},"customer_email":{"nullable":true,"anyOf":[{"description":"Pre-filled customer email for the checkout form","type":"string"},{"type":"null"}]},"customer_name":{"nullable":true,"anyOf":[{"description":"Pre-filled customer name for the checkout form","type":"string"},{"type":"null"}]},"customer_phone":{"nullable":true,"anyOf":[{"description":"Pre-filled customer phone for the checkout form","type":"string"},{"type":"null"}]},"payment_status":{"description":"Whether the money has arrived. `status: complete` means the buyer finished the checkout; for a bank claim (krafa) that is when the claim is issued, and the session reads `awaiting_claim` until the buyer pays it in their bank (then `paid`, and `payment_intent.captured` fires). `unpaid`: not complete, or the payment failed or was cancelled (e.g. a krafa cancelled at the bank). `no_payment_required`: complete with nothing to pay. Book shipping on `paid`.","anyOf":[{"const":"paid","type":"string"},{"const":"awaiting_claim","type":"string"},{"const":"unpaid","type":"string"},{"const":"no_payment_required","type":"string"}]},"locale":{"nullable":true,"anyOf":[{"description":"Language the checkout is shown in; null when the buyer's browser decides","anyOf":[{"const":"is","type":"string"},{"const":"en","type":"string"}]},{"type":"null"}]},"items":{"description":"Line items in this checkout session. Empty array for simple amount-based checkouts.","type":"array","items":{"description":"A line item in the checkout session","type":"object","required":["id","product_id","variant_id","description","quantity","unit_amount","vat_rate"],"properties":{"id":{"description":"Unique identifier for the line item","type":"string"},"product_id":{"nullable":true,"anyOf":[{"description":"ID of the product this item references, if any","type":"string"},{"type":"null"}]},"variant_id":{"nullable":true,"anyOf":[{"description":"ID of the product variant bought, when the product has variants","type":"string"},{"type":"null"}]},"description":{"description":"Human-readable description of the line item. For a variant it names the choice, e.g. \"Hettupeysa, Stærð: M\"","type":"string"},"quantity":{"description":"Number of units","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of units","type":"integer"}]},"unit_amount":{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","type":"integer"}]},"vat_rate":{"description":"VAT rate as an integer percentage: 0, 11, or 24","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate as an integer percentage: 0, 11, or 24","type":"integer"}]}}}},"form_fields":{"description":"Custom form fields to collect during checkout. null = default (name + email), empty array = skip customer info collection. The customer's answers to your own fields are returned in custom_fields.","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"custom_fields":{"description":"Answers the customer entered for your custom form_fields, keyed by field name (for example {\"Gift message\": \"Happy birthday\"}). Known fields (name, email, phone, nationalId) are not included here; name, email and phone are returned in customer_name, customer_email and customer_phone. Values are always strings. null until the customer submits the customer info step, or when the session has no custom fields.","nullable":true,"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},{"type":"null"}]},"allow_custom_amount":{"description":"Whether the customer can enter a custom amount (pay-what-you-want)","type":"boolean"},"minimum_amount":{"nullable":true,"anyOf":[{"description":"Minimum amount the customer must pay when allow_custom_amount is true","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Minimum amount the customer must pay when allow_custom_amount is true","type":"integer"}]},{"type":"null"}]},"expires_at":{"description":"Unix timestamp when this session expires (24 hours after creation)","type":"number"},"created_at":{"description":"Unix timestamp when this session was created","type":"number"},"metadata":{"description":"Arbitrary key-value metadata attached to the session","nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"additionalProperties":false}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"description":"A checkout session represents a single payment or subscription signup flow","type":"object","required":["id","object","livemode","amount","amount_subtotal","discount_amount","promotion_code_id","currency","status","url","short_url","success_url","cancel_url","save_payment_method","customer","product","subscription","payment_intent","payment_method","customer_email","customer_name","customer_phone","payment_status","locale","items","form_fields","custom_fields","allow_custom_amount","minimum_amount","expires_at","created_at","metadata"],"properties":{"id":{"description":"Unique identifier for the checkout session","type":"string"},"object":{"const":"checkout.session","type":"string"},"livemode":{"description":"Whether this is a live mode session (true) or test mode (false)","type":"boolean"},"amount":{"description":"Total amount to charge now, in the smallest currency unit, after any discount. 0 for trial/setup checkouts.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total amount to charge now, in the smallest currency unit, after any discount. 0 for trial/setup checkouts.","type":"integer"}]},"amount_subtotal":{"description":"Amount before any discount, in the smallest currency unit (equals amount + discount_amount).","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Amount before any discount, in the smallest currency unit (equals amount + discount_amount).","type":"integer"}]},"discount_amount":{"description":"Discount applied to the amount charged now, in the smallest currency unit. 0 when no code is applied, or for trial/setup checkouts where the discount applies to the first charge after the trial.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Discount applied to the amount charged now, in the smallest currency unit. 0 when no code is applied, or for trial/setup checkouts where the discount applies to the first charge after the trial.","type":"integer"}]},"promotion_code_id":{"nullable":true,"anyOf":[{"description":"ID of the applied promotion code, if any. Set even for trial/setup checkouts where discount_amount is 0.","type":"string"},{"type":"null"}]},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"status":{"description":"Current status of the checkout session","anyOf":[{"const":"open","type":"string"},{"const":"complete","type":"string"},{"const":"expired","type":"string"}]},"url":{"description":"URL to redirect the customer to for payment","type":"string"},"short_url":{"description":"Short URL for SMS and compact sharing","type":"string"},"success_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to after successful payment","type":"string"},{"type":"null"}]},"cancel_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to if the customer cancels","type":"string"},{"type":"null"}]},"save_payment_method":{"description":"Whether to save the payment method for future use","type":"boolean"},"customer":{"nullable":true,"anyOf":[{"description":"ID of the customer, if linked","type":"string"},{"type":"null"}]},"product":{"nullable":true,"anyOf":[{"description":"ID of the primary product, if this is a product-based checkout","type":"string"},{"type":"null"}]},"subscription":{"nullable":true,"anyOf":[{"description":"ID of the subscription created by this checkout, if applicable","type":"string"},{"type":"null"}]},"payment_intent":{"nullable":true,"anyOf":[{"description":"ID of the payment intent created after payment completes","type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"description":"ID of the saved payment method, if save_payment_method was true","type":"string"},{"type":"null"}]},"customer_email":{"nullable":true,"anyOf":[{"description":"Pre-filled customer email for the checkout form","type":"string"},{"type":"null"}]},"customer_name":{"nullable":true,"anyOf":[{"description":"Pre-filled customer name for the checkout form","type":"string"},{"type":"null"}]},"customer_phone":{"nullable":true,"anyOf":[{"description":"Pre-filled customer phone for the checkout form","type":"string"},{"type":"null"}]},"payment_status":{"description":"Whether the money has arrived. `status: complete` means the buyer finished the checkout; for a bank claim (krafa) that is when the claim is issued, and the session reads `awaiting_claim` until the buyer pays it in their bank (then `paid`, and `payment_intent.captured` fires). `unpaid`: not complete, or the payment failed or was cancelled (e.g. a krafa cancelled at the bank). `no_payment_required`: complete with nothing to pay. Book shipping on `paid`.","anyOf":[{"const":"paid","type":"string"},{"const":"awaiting_claim","type":"string"},{"const":"unpaid","type":"string"},{"const":"no_payment_required","type":"string"}]},"locale":{"nullable":true,"anyOf":[{"description":"Language the checkout is shown in; null when the buyer's browser decides","anyOf":[{"const":"is","type":"string"},{"const":"en","type":"string"}]},{"type":"null"}]},"items":{"description":"Line items in this checkout session. Empty array for simple amount-based checkouts.","type":"array","items":{"description":"A line item in the checkout session","type":"object","required":["id","product_id","variant_id","description","quantity","unit_amount","vat_rate"],"properties":{"id":{"description":"Unique identifier for the line item","type":"string"},"product_id":{"nullable":true,"anyOf":[{"description":"ID of the product this item references, if any","type":"string"},{"type":"null"}]},"variant_id":{"nullable":true,"anyOf":[{"description":"ID of the product variant bought, when the product has variants","type":"string"},{"type":"null"}]},"description":{"description":"Human-readable description of the line item. For a variant it names the choice, e.g. \"Hettupeysa, Stærð: M\"","type":"string"},"quantity":{"description":"Number of units","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of units","type":"integer"}]},"unit_amount":{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","type":"integer"}]},"vat_rate":{"description":"VAT rate as an integer percentage: 0, 11, or 24","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate as an integer percentage: 0, 11, or 24","type":"integer"}]}}}},"form_fields":{"description":"Custom form fields to collect during checkout. null = default (name + email), empty array = skip customer info collection. The customer's answers to your own fields are returned in custom_fields.","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"custom_fields":{"description":"Answers the customer entered for your custom form_fields, keyed by field name (for example {\"Gift message\": \"Happy birthday\"}). Known fields (name, email, phone, nationalId) are not included here; name, email and phone are returned in customer_name, customer_email and customer_phone. Values are always strings. null until the customer submits the customer info step, or when the session has no custom fields.","nullable":true,"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},{"type":"null"}]},"allow_custom_amount":{"description":"Whether the customer can enter a custom amount (pay-what-you-want)","type":"boolean"},"minimum_amount":{"nullable":true,"anyOf":[{"description":"Minimum amount the customer must pay when allow_custom_amount is true","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Minimum amount the customer must pay when allow_custom_amount is true","type":"integer"}]},{"type":"null"}]},"expires_at":{"description":"Unix timestamp when this session expires (24 hours after creation)","type":"number"},"created_at":{"description":"Unix timestamp when this session was created","type":"number"},"metadata":{"description":"Arbitrary key-value metadata attached to the session","nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"additionalProperties":false}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}},"text/plain":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"description":"A checkout session represents a single payment or subscription signup flow","type":"object","required":["id","object","livemode","amount","amount_subtotal","discount_amount","promotion_code_id","currency","status","url","short_url","success_url","cancel_url","save_payment_method","customer","product","subscription","payment_intent","payment_method","customer_email","customer_name","customer_phone","payment_status","locale","items","form_fields","custom_fields","allow_custom_amount","minimum_amount","expires_at","created_at","metadata"],"properties":{"id":{"description":"Unique identifier for the checkout session","type":"string"},"object":{"const":"checkout.session","type":"string"},"livemode":{"description":"Whether this is a live mode session (true) or test mode (false)","type":"boolean"},"amount":{"description":"Total amount to charge now, in the smallest currency unit, after any discount. 0 for trial/setup checkouts.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total amount to charge now, in the smallest currency unit, after any discount. 0 for trial/setup checkouts.","type":"integer"}]},"amount_subtotal":{"description":"Amount before any discount, in the smallest currency unit (equals amount + discount_amount).","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Amount before any discount, in the smallest currency unit (equals amount + discount_amount).","type":"integer"}]},"discount_amount":{"description":"Discount applied to the amount charged now, in the smallest currency unit. 0 when no code is applied, or for trial/setup checkouts where the discount applies to the first charge after the trial.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Discount applied to the amount charged now, in the smallest currency unit. 0 when no code is applied, or for trial/setup checkouts where the discount applies to the first charge after the trial.","type":"integer"}]},"promotion_code_id":{"nullable":true,"anyOf":[{"description":"ID of the applied promotion code, if any. Set even for trial/setup checkouts where discount_amount is 0.","type":"string"},{"type":"null"}]},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"status":{"description":"Current status of the checkout session","anyOf":[{"const":"open","type":"string"},{"const":"complete","type":"string"},{"const":"expired","type":"string"}]},"url":{"description":"URL to redirect the customer to for payment","type":"string"},"short_url":{"description":"Short URL for SMS and compact sharing","type":"string"},"success_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to after successful payment","type":"string"},{"type":"null"}]},"cancel_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to if the customer cancels","type":"string"},{"type":"null"}]},"save_payment_method":{"description":"Whether to save the payment method for future use","type":"boolean"},"customer":{"nullable":true,"anyOf":[{"description":"ID of the customer, if linked","type":"string"},{"type":"null"}]},"product":{"nullable":true,"anyOf":[{"description":"ID of the primary product, if this is a product-based checkout","type":"string"},{"type":"null"}]},"subscription":{"nullable":true,"anyOf":[{"description":"ID of the subscription created by this checkout, if applicable","type":"string"},{"type":"null"}]},"payment_intent":{"nullable":true,"anyOf":[{"description":"ID of the payment intent created after payment completes","type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"description":"ID of the saved payment method, if save_payment_method was true","type":"string"},{"type":"null"}]},"customer_email":{"nullable":true,"anyOf":[{"description":"Pre-filled customer email for the checkout form","type":"string"},{"type":"null"}]},"customer_name":{"nullable":true,"anyOf":[{"description":"Pre-filled customer name for the checkout form","type":"string"},{"type":"null"}]},"customer_phone":{"nullable":true,"anyOf":[{"description":"Pre-filled customer phone for the checkout form","type":"string"},{"type":"null"}]},"payment_status":{"description":"Whether the money has arrived. `status: complete` means the buyer finished the checkout; for a bank claim (krafa) that is when the claim is issued, and the session reads `awaiting_claim` until the buyer pays it in their bank (then `paid`, and `payment_intent.captured` fires). `unpaid`: not complete, or the payment failed or was cancelled (e.g. a krafa cancelled at the bank). `no_payment_required`: complete with nothing to pay. Book shipping on `paid`.","anyOf":[{"const":"paid","type":"string"},{"const":"awaiting_claim","type":"string"},{"const":"unpaid","type":"string"},{"const":"no_payment_required","type":"string"}]},"locale":{"nullable":true,"anyOf":[{"description":"Language the checkout is shown in; null when the buyer's browser decides","anyOf":[{"const":"is","type":"string"},{"const":"en","type":"string"}]},{"type":"null"}]},"items":{"description":"Line items in this checkout session. Empty array for simple amount-based checkouts.","type":"array","items":{"description":"A line item in the checkout session","type":"object","required":["id","product_id","variant_id","description","quantity","unit_amount","vat_rate"],"properties":{"id":{"description":"Unique identifier for the line item","type":"string"},"product_id":{"nullable":true,"anyOf":[{"description":"ID of the product this item references, if any","type":"string"},{"type":"null"}]},"variant_id":{"nullable":true,"anyOf":[{"description":"ID of the product variant bought, when the product has variants","type":"string"},{"type":"null"}]},"description":{"description":"Human-readable description of the line item. For a variant it names the choice, e.g. \"Hettupeysa, Stærð: M\"","type":"string"},"quantity":{"description":"Number of units","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of units","type":"integer"}]},"unit_amount":{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","type":"integer"}]},"vat_rate":{"description":"VAT rate as an integer percentage: 0, 11, or 24","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate as an integer percentage: 0, 11, or 24","type":"integer"}]}}}},"form_fields":{"description":"Custom form fields to collect during checkout. null = default (name + email), empty array = skip customer info collection. The customer's answers to your own fields are returned in custom_fields.","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"custom_fields":{"description":"Answers the customer entered for your custom form_fields, keyed by field name (for example {\"Gift message\": \"Happy birthday\"}). Known fields (name, email, phone, nationalId) are not included here; name, email and phone are returned in customer_name, customer_email and customer_phone. Values are always strings. null until the customer submits the customer info step, or when the session has no custom fields.","nullable":true,"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},{"type":"null"}]},"allow_custom_amount":{"description":"Whether the customer can enter a custom amount (pay-what-you-want)","type":"boolean"},"minimum_amount":{"nullable":true,"anyOf":[{"description":"Minimum amount the customer must pay when allow_custom_amount is true","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Minimum amount the customer must pay when allow_custom_amount is true","type":"integer"}]},{"type":"null"}]},"expires_at":{"description":"Unix timestamp when this session expires (24 hours after creation)","type":"number"},"created_at":{"description":"Unix timestamp when this session was created","type":"number"},"metadata":{"description":"Arbitrary key-value metadata attached to the session","nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"additionalProperties":false}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"getV1CheckoutSessions","description":"List checkout sessions, newest first. Filter with `status=complete` and `created_gte` to reconcile recent paid orders, for example a shop that books shipping after payment polls `status=complete&created_gte=<one hour ago>` and books every session it has not seen. Page with `starting_after` while `has_more` is true.","tags":["Checkout Sessions"],"security":[{"bearerAuth":[]}]}},"/v1/checkout/sessions/{id}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"A checkout session represents a single payment or subscription signup flow","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the checkout session","type":"string"},"object":{"const":"checkout.session","type":"string"},"livemode":{"description":"Whether this is a live mode session (true) or test mode (false)","type":"boolean"},"amount":{"description":"Total amount to charge now, in the smallest currency unit, after any discount. 0 for trial/setup checkouts.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total amount to charge now, in the smallest currency unit, after any discount. 0 for trial/setup checkouts.","type":"integer"}]},"amount_subtotal":{"description":"Amount before any discount, in the smallest currency unit (equals amount + discount_amount).","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Amount before any discount, in the smallest currency unit (equals amount + discount_amount).","type":"integer"}]},"discount_amount":{"description":"Discount applied to the amount charged now, in the smallest currency unit. 0 when no code is applied, or for trial/setup checkouts where the discount applies to the first charge after the trial.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Discount applied to the amount charged now, in the smallest currency unit. 0 when no code is applied, or for trial/setup checkouts where the discount applies to the first charge after the trial.","type":"integer"}]},"promotion_code_id":{"nullable":true,"anyOf":[{"description":"ID of the applied promotion code, if any. Set even for trial/setup checkouts where discount_amount is 0.","type":"string"},{"type":"null"}]},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"status":{"description":"Current status of the checkout session","anyOf":[{"const":"open","type":"string"},{"const":"complete","type":"string"},{"const":"expired","type":"string"}]},"url":{"description":"URL to redirect the customer to for payment","type":"string"},"short_url":{"description":"Short URL for SMS and compact sharing","type":"string"},"success_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to after successful payment","type":"string"},{"type":"null"}]},"cancel_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to if the customer cancels","type":"string"},{"type":"null"}]},"save_payment_method":{"description":"Whether to save the payment method for future use","type":"boolean"},"customer":{"nullable":true,"anyOf":[{"description":"ID of the customer, if linked","type":"string"},{"type":"null"}]},"product":{"nullable":true,"anyOf":[{"description":"ID of the primary product, if this is a product-based checkout","type":"string"},{"type":"null"}]},"subscription":{"nullable":true,"anyOf":[{"description":"ID of the subscription created by this checkout, if applicable","type":"string"},{"type":"null"}]},"payment_intent":{"nullable":true,"anyOf":[{"description":"ID of the payment intent created after payment completes","type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"description":"ID of the saved payment method, if save_payment_method was true","type":"string"},{"type":"null"}]},"customer_email":{"nullable":true,"anyOf":[{"description":"Pre-filled customer email for the checkout form","type":"string"},{"type":"null"}]},"customer_name":{"nullable":true,"anyOf":[{"description":"Pre-filled customer name for the checkout form","type":"string"},{"type":"null"}]},"customer_phone":{"nullable":true,"anyOf":[{"description":"Pre-filled customer phone for the checkout form","type":"string"},{"type":"null"}]},"payment_status":{"description":"Whether the money has arrived. `status: complete` means the buyer finished the checkout; for a bank claim (krafa) that is when the claim is issued, and the session reads `awaiting_claim` until the buyer pays it in their bank (then `paid`, and `payment_intent.captured` fires). `unpaid`: not complete, or the payment failed or was cancelled (e.g. a krafa cancelled at the bank). `no_payment_required`: complete with nothing to pay. Book shipping on `paid`.","anyOf":[{"const":"paid","type":"string"},{"const":"awaiting_claim","type":"string"},{"const":"unpaid","type":"string"},{"const":"no_payment_required","type":"string"}]},"locale":{"nullable":true,"anyOf":[{"description":"Language the checkout is shown in; null when the buyer's browser decides","anyOf":[{"const":"is","type":"string"},{"const":"en","type":"string"}]},{"type":"null"}]},"items":{"description":"Line items in this checkout session. Empty array for simple amount-based checkouts.","type":"array","items":{"description":"A line item in the checkout session","type":"object","required":["id","product_id","variant_id","description","quantity","unit_amount","vat_rate"],"properties":{"id":{"description":"Unique identifier for the line item","type":"string"},"product_id":{"nullable":true,"anyOf":[{"description":"ID of the product this item references, if any","type":"string"},{"type":"null"}]},"variant_id":{"nullable":true,"anyOf":[{"description":"ID of the product variant bought, when the product has variants","type":"string"},{"type":"null"}]},"description":{"description":"Human-readable description of the line item. For a variant it names the choice, e.g. \"Hettupeysa, Stærð: M\"","type":"string"},"quantity":{"description":"Number of units","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of units","type":"integer"}]},"unit_amount":{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","type":"integer"}]},"vat_rate":{"description":"VAT rate as an integer percentage: 0, 11, or 24","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate as an integer percentage: 0, 11, or 24","type":"integer"}]}}}},"form_fields":{"description":"Custom form fields to collect during checkout. null = default (name + email), empty array = skip customer info collection. The customer's answers to your own fields are returned in custom_fields.","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"custom_fields":{"description":"Answers the customer entered for your custom form_fields, keyed by field name (for example {\"Gift message\": \"Happy birthday\"}). Known fields (name, email, phone, nationalId) are not included here; name, email and phone are returned in customer_name, customer_email and customer_phone. Values are always strings. null until the customer submits the customer info step, or when the session has no custom fields.","nullable":true,"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},{"type":"null"}]},"allow_custom_amount":{"description":"Whether the customer can enter a custom amount (pay-what-you-want)","type":"boolean"},"minimum_amount":{"nullable":true,"anyOf":[{"description":"Minimum amount the customer must pay when allow_custom_amount is true","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Minimum amount the customer must pay when allow_custom_amount is true","type":"integer"}]},{"type":"null"}]},"expires_at":{"description":"Unix timestamp when this session expires (24 hours after creation)","type":"number"},"created_at":{"description":"Unix timestamp when this session was created","type":"number"},"metadata":{"description":"Arbitrary key-value metadata attached to the session","nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"required":["id","object","livemode","amount","amount_subtotal","discount_amount","promotion_code_id","currency","status","url","short_url","success_url","cancel_url","save_payment_method","customer","product","subscription","payment_intent","payment_method","customer_email","customer_name","customer_phone","payment_status","locale","items","form_fields","custom_fields","allow_custom_amount","minimum_amount","expires_at","created_at","metadata"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the checkout session","type":"string"},"object":{"const":"checkout.session","type":"string"},"livemode":{"description":"Whether this is a live mode session (true) or test mode (false)","type":"boolean"},"amount":{"description":"Total amount to charge now, in the smallest currency unit, after any discount. 0 for trial/setup checkouts.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total amount to charge now, in the smallest currency unit, after any discount. 0 for trial/setup checkouts.","type":"integer"}]},"amount_subtotal":{"description":"Amount before any discount, in the smallest currency unit (equals amount + discount_amount).","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Amount before any discount, in the smallest currency unit (equals amount + discount_amount).","type":"integer"}]},"discount_amount":{"description":"Discount applied to the amount charged now, in the smallest currency unit. 0 when no code is applied, or for trial/setup checkouts where the discount applies to the first charge after the trial.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Discount applied to the amount charged now, in the smallest currency unit. 0 when no code is applied, or for trial/setup checkouts where the discount applies to the first charge after the trial.","type":"integer"}]},"promotion_code_id":{"nullable":true,"anyOf":[{"description":"ID of the applied promotion code, if any. Set even for trial/setup checkouts where discount_amount is 0.","type":"string"},{"type":"null"}]},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"status":{"description":"Current status of the checkout session","anyOf":[{"const":"open","type":"string"},{"const":"complete","type":"string"},{"const":"expired","type":"string"}]},"url":{"description":"URL to redirect the customer to for payment","type":"string"},"short_url":{"description":"Short URL for SMS and compact sharing","type":"string"},"success_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to after successful payment","type":"string"},{"type":"null"}]},"cancel_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to if the customer cancels","type":"string"},{"type":"null"}]},"save_payment_method":{"description":"Whether to save the payment method for future use","type":"boolean"},"customer":{"nullable":true,"anyOf":[{"description":"ID of the customer, if linked","type":"string"},{"type":"null"}]},"product":{"nullable":true,"anyOf":[{"description":"ID of the primary product, if this is a product-based checkout","type":"string"},{"type":"null"}]},"subscription":{"nullable":true,"anyOf":[{"description":"ID of the subscription created by this checkout, if applicable","type":"string"},{"type":"null"}]},"payment_intent":{"nullable":true,"anyOf":[{"description":"ID of the payment intent created after payment completes","type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"description":"ID of the saved payment method, if save_payment_method was true","type":"string"},{"type":"null"}]},"customer_email":{"nullable":true,"anyOf":[{"description":"Pre-filled customer email for the checkout form","type":"string"},{"type":"null"}]},"customer_name":{"nullable":true,"anyOf":[{"description":"Pre-filled customer name for the checkout form","type":"string"},{"type":"null"}]},"customer_phone":{"nullable":true,"anyOf":[{"description":"Pre-filled customer phone for the checkout form","type":"string"},{"type":"null"}]},"payment_status":{"description":"Whether the money has arrived. `status: complete` means the buyer finished the checkout; for a bank claim (krafa) that is when the claim is issued, and the session reads `awaiting_claim` until the buyer pays it in their bank (then `paid`, and `payment_intent.captured` fires). `unpaid`: not complete, or the payment failed or was cancelled (e.g. a krafa cancelled at the bank). `no_payment_required`: complete with nothing to pay. Book shipping on `paid`.","anyOf":[{"const":"paid","type":"string"},{"const":"awaiting_claim","type":"string"},{"const":"unpaid","type":"string"},{"const":"no_payment_required","type":"string"}]},"locale":{"nullable":true,"anyOf":[{"description":"Language the checkout is shown in; null when the buyer's browser decides","anyOf":[{"const":"is","type":"string"},{"const":"en","type":"string"}]},{"type":"null"}]},"items":{"description":"Line items in this checkout session. Empty array for simple amount-based checkouts.","type":"array","items":{"description":"A line item in the checkout session","type":"object","required":["id","product_id","variant_id","description","quantity","unit_amount","vat_rate"],"properties":{"id":{"description":"Unique identifier for the line item","type":"string"},"product_id":{"nullable":true,"anyOf":[{"description":"ID of the product this item references, if any","type":"string"},{"type":"null"}]},"variant_id":{"nullable":true,"anyOf":[{"description":"ID of the product variant bought, when the product has variants","type":"string"},{"type":"null"}]},"description":{"description":"Human-readable description of the line item. For a variant it names the choice, e.g. \"Hettupeysa, Stærð: M\"","type":"string"},"quantity":{"description":"Number of units","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of units","type":"integer"}]},"unit_amount":{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","type":"integer"}]},"vat_rate":{"description":"VAT rate as an integer percentage: 0, 11, or 24","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate as an integer percentage: 0, 11, or 24","type":"integer"}]}}}},"form_fields":{"description":"Custom form fields to collect during checkout. null = default (name + email), empty array = skip customer info collection. The customer's answers to your own fields are returned in custom_fields.","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"custom_fields":{"description":"Answers the customer entered for your custom form_fields, keyed by field name (for example {\"Gift message\": \"Happy birthday\"}). Known fields (name, email, phone, nationalId) are not included here; name, email and phone are returned in customer_name, customer_email and customer_phone. Values are always strings. null until the customer submits the customer info step, or when the session has no custom fields.","nullable":true,"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},{"type":"null"}]},"allow_custom_amount":{"description":"Whether the customer can enter a custom amount (pay-what-you-want)","type":"boolean"},"minimum_amount":{"nullable":true,"anyOf":[{"description":"Minimum amount the customer must pay when allow_custom_amount is true","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Minimum amount the customer must pay when allow_custom_amount is true","type":"integer"}]},{"type":"null"}]},"expires_at":{"description":"Unix timestamp when this session expires (24 hours after creation)","type":"number"},"created_at":{"description":"Unix timestamp when this session was created","type":"number"},"metadata":{"description":"Arbitrary key-value metadata attached to the session","nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"required":["id","object","livemode","amount","amount_subtotal","discount_amount","promotion_code_id","currency","status","url","short_url","success_url","cancel_url","save_payment_method","customer","product","subscription","payment_intent","payment_method","customer_email","customer_name","customer_phone","payment_status","locale","items","form_fields","custom_fields","allow_custom_amount","minimum_amount","expires_at","created_at","metadata"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the checkout session","type":"string"},"object":{"const":"checkout.session","type":"string"},"livemode":{"description":"Whether this is a live mode session (true) or test mode (false)","type":"boolean"},"amount":{"description":"Total amount to charge now, in the smallest currency unit, after any discount. 0 for trial/setup checkouts.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total amount to charge now, in the smallest currency unit, after any discount. 0 for trial/setup checkouts.","type":"integer"}]},"amount_subtotal":{"description":"Amount before any discount, in the smallest currency unit (equals amount + discount_amount).","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Amount before any discount, in the smallest currency unit (equals amount + discount_amount).","type":"integer"}]},"discount_amount":{"description":"Discount applied to the amount charged now, in the smallest currency unit. 0 when no code is applied, or for trial/setup checkouts where the discount applies to the first charge after the trial.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Discount applied to the amount charged now, in the smallest currency unit. 0 when no code is applied, or for trial/setup checkouts where the discount applies to the first charge after the trial.","type":"integer"}]},"promotion_code_id":{"nullable":true,"anyOf":[{"description":"ID of the applied promotion code, if any. Set even for trial/setup checkouts where discount_amount is 0.","type":"string"},{"type":"null"}]},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"status":{"description":"Current status of the checkout session","anyOf":[{"const":"open","type":"string"},{"const":"complete","type":"string"},{"const":"expired","type":"string"}]},"url":{"description":"URL to redirect the customer to for payment","type":"string"},"short_url":{"description":"Short URL for SMS and compact sharing","type":"string"},"success_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to after successful payment","type":"string"},{"type":"null"}]},"cancel_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to if the customer cancels","type":"string"},{"type":"null"}]},"save_payment_method":{"description":"Whether to save the payment method for future use","type":"boolean"},"customer":{"nullable":true,"anyOf":[{"description":"ID of the customer, if linked","type":"string"},{"type":"null"}]},"product":{"nullable":true,"anyOf":[{"description":"ID of the primary product, if this is a product-based checkout","type":"string"},{"type":"null"}]},"subscription":{"nullable":true,"anyOf":[{"description":"ID of the subscription created by this checkout, if applicable","type":"string"},{"type":"null"}]},"payment_intent":{"nullable":true,"anyOf":[{"description":"ID of the payment intent created after payment completes","type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"description":"ID of the saved payment method, if save_payment_method was true","type":"string"},{"type":"null"}]},"customer_email":{"nullable":true,"anyOf":[{"description":"Pre-filled customer email for the checkout form","type":"string"},{"type":"null"}]},"customer_name":{"nullable":true,"anyOf":[{"description":"Pre-filled customer name for the checkout form","type":"string"},{"type":"null"}]},"customer_phone":{"nullable":true,"anyOf":[{"description":"Pre-filled customer phone for the checkout form","type":"string"},{"type":"null"}]},"payment_status":{"description":"Whether the money has arrived. `status: complete` means the buyer finished the checkout; for a bank claim (krafa) that is when the claim is issued, and the session reads `awaiting_claim` until the buyer pays it in their bank (then `paid`, and `payment_intent.captured` fires). `unpaid`: not complete, or the payment failed or was cancelled (e.g. a krafa cancelled at the bank). `no_payment_required`: complete with nothing to pay. Book shipping on `paid`.","anyOf":[{"const":"paid","type":"string"},{"const":"awaiting_claim","type":"string"},{"const":"unpaid","type":"string"},{"const":"no_payment_required","type":"string"}]},"locale":{"nullable":true,"anyOf":[{"description":"Language the checkout is shown in; null when the buyer's browser decides","anyOf":[{"const":"is","type":"string"},{"const":"en","type":"string"}]},{"type":"null"}]},"items":{"description":"Line items in this checkout session. Empty array for simple amount-based checkouts.","type":"array","items":{"description":"A line item in the checkout session","type":"object","required":["id","product_id","variant_id","description","quantity","unit_amount","vat_rate"],"properties":{"id":{"description":"Unique identifier for the line item","type":"string"},"product_id":{"nullable":true,"anyOf":[{"description":"ID of the product this item references, if any","type":"string"},{"type":"null"}]},"variant_id":{"nullable":true,"anyOf":[{"description":"ID of the product variant bought, when the product has variants","type":"string"},{"type":"null"}]},"description":{"description":"Human-readable description of the line item. For a variant it names the choice, e.g. \"Hettupeysa, Stærð: M\"","type":"string"},"quantity":{"description":"Number of units","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of units","type":"integer"}]},"unit_amount":{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","type":"integer"}]},"vat_rate":{"description":"VAT rate as an integer percentage: 0, 11, or 24","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate as an integer percentage: 0, 11, or 24","type":"integer"}]}}}},"form_fields":{"description":"Custom form fields to collect during checkout. null = default (name + email), empty array = skip customer info collection. The customer's answers to your own fields are returned in custom_fields.","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"custom_fields":{"description":"Answers the customer entered for your custom form_fields, keyed by field name (for example {\"Gift message\": \"Happy birthday\"}). Known fields (name, email, phone, nationalId) are not included here; name, email and phone are returned in customer_name, customer_email and customer_phone. Values are always strings. null until the customer submits the customer info step, or when the session has no custom fields.","nullable":true,"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},{"type":"null"}]},"allow_custom_amount":{"description":"Whether the customer can enter a custom amount (pay-what-you-want)","type":"boolean"},"minimum_amount":{"nullable":true,"anyOf":[{"description":"Minimum amount the customer must pay when allow_custom_amount is true","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Minimum amount the customer must pay when allow_custom_amount is true","type":"integer"}]},{"type":"null"}]},"expires_at":{"description":"Unix timestamp when this session expires (24 hours after creation)","type":"number"},"created_at":{"description":"Unix timestamp when this session was created","type":"number"},"metadata":{"description":"Arbitrary key-value metadata attached to the session","nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"required":["id","object","livemode","amount","amount_subtotal","discount_amount","promotion_code_id","currency","status","url","short_url","success_url","cancel_url","save_payment_method","customer","product","subscription","payment_intent","payment_method","customer_email","customer_name","customer_phone","payment_status","locale","items","form_fields","custom_fields","allow_custom_amount","minimum_amount","expires_at","created_at","metadata"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"getV1CheckoutSessionsById","description":"Retrieve a checkout session by ID","tags":["Checkout Sessions"],"security":[{"bearerAuth":[]}]}},"/v1/billing-portal/sessions":{"post":{"parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"billing_portal.session","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"subscription":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string"},"return_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"allow_cancel":{"type":"boolean"},"allow_update_payment_method":{"type":"boolean"},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"expired","type":"string"}]},"expires_at":{"type":"number"},"created_at":{"type":"number"}},"required":["id","object","livemode","customer","subscription","url","return_url","allow_cancel","allow_update_payment_method","status","expires_at","created_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"billing_portal.session","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"subscription":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string"},"return_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"allow_cancel":{"type":"boolean"},"allow_update_payment_method":{"type":"boolean"},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"expired","type":"string"}]},"expires_at":{"type":"number"},"created_at":{"type":"number"}},"required":["id","object","livemode","customer","subscription","url","return_url","allow_cancel","allow_update_payment_method","status","expires_at","created_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"billing_portal.session","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"subscription":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string"},"return_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"allow_cancel":{"type":"boolean"},"allow_update_payment_method":{"type":"boolean"},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"expired","type":"string"}]},"expires_at":{"type":"number"},"created_at":{"type":"number"}},"required":["id","object","livemode","customer","subscription","url","return_url","allow_cancel","allow_update_payment_method","status","expires_at","created_at"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1Billing-portalSessions","description":"Create a new billing portal session","tags":["Billing Portal"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["customer","allow_cancel","allow_update_payment_method","expires_in"],"properties":{"customer":{"format":"uuid","type":"string"},"subscription":{"format":"uuid","type":"string"},"return_url":{"format":"uri","type":"string"},"allow_cancel":{"default":true,"type":"boolean"},"allow_update_payment_method":{"default":true,"type":"boolean"},"expires_in":{"minimum":1,"maximum":604800,"default":1800,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":604800,"default":1800,"type":"integer"}]}}}},"multipart/form-data":{"schema":{"type":"object","required":["customer","allow_cancel","allow_update_payment_method","expires_in"],"properties":{"customer":{"format":"uuid","type":"string"},"subscription":{"format":"uuid","type":"string"},"return_url":{"format":"uri","type":"string"},"allow_cancel":{"default":true,"type":"boolean"},"allow_update_payment_method":{"default":true,"type":"boolean"},"expires_in":{"minimum":1,"maximum":604800,"default":1800,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":604800,"default":1800,"type":"integer"}]}}}},"text/plain":{"schema":{"type":"object","required":["customer","allow_cancel","allow_update_payment_method","expires_in"],"properties":{"customer":{"format":"uuid","type":"string"},"subscription":{"format":"uuid","type":"string"},"return_url":{"format":"uri","type":"string"},"allow_cancel":{"default":true,"type":"boolean"},"allow_update_payment_method":{"default":true,"type":"boolean"},"expires_in":{"minimum":1,"maximum":604800,"default":1800,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":604800,"default":1800,"type":"integer"}]}}}}}}}},"/v1/billing-portal/sessions/{id}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"billing_portal.session","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"subscription":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string"},"return_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"allow_cancel":{"type":"boolean"},"allow_update_payment_method":{"type":"boolean"},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"expired","type":"string"}]},"expires_at":{"type":"number"},"created_at":{"type":"number"}},"required":["id","object","livemode","customer","subscription","url","return_url","allow_cancel","allow_update_payment_method","status","expires_at","created_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"billing_portal.session","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"subscription":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string"},"return_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"allow_cancel":{"type":"boolean"},"allow_update_payment_method":{"type":"boolean"},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"expired","type":"string"}]},"expires_at":{"type":"number"},"created_at":{"type":"number"}},"required":["id","object","livemode","customer","subscription","url","return_url","allow_cancel","allow_update_payment_method","status","expires_at","created_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"billing_portal.session","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"subscription":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string"},"return_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"allow_cancel":{"type":"boolean"},"allow_update_payment_method":{"type":"boolean"},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"expired","type":"string"}]},"expires_at":{"type":"number"},"created_at":{"type":"number"}},"required":["id","object","livemode","customer","subscription","url","return_url","allow_cancel","allow_update_payment_method","status","expires_at","created_at"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"getV1Billing-portalSessionsById","description":"Retrieve a billing portal session by ID","tags":["Billing Portal"],"security":[{"bearerAuth":[]}]}},"/v1/customers/":{"post":{"parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"customer","type":"string"},"livemode":{"type":"boolean"},"external_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"national_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_methods":{"type":"array","items":{"type":"object","required":["id","object","type","status","created_at"],"properties":{"id":{"type":"string"},"object":{"const":"payment_method","type":"string"},"type":{"type":"string"},"card":{"type":"object","required":["brand","last4","exp_month","exp_year"],"properties":{"brand":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"exp_year":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]}}},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"revoked","type":"string"}]},"created_at":{"type":"number"}}}},"created_at":{"type":"number"}},"required":["id","object","livemode","external_id","email","name","phone","national_id","created_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"customer","type":"string"},"livemode":{"type":"boolean"},"external_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"national_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_methods":{"type":"array","items":{"type":"object","required":["id","object","type","status","created_at"],"properties":{"id":{"type":"string"},"object":{"const":"payment_method","type":"string"},"type":{"type":"string"},"card":{"type":"object","required":["brand","last4","exp_month","exp_year"],"properties":{"brand":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"exp_year":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]}}},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"revoked","type":"string"}]},"created_at":{"type":"number"}}}},"created_at":{"type":"number"}},"required":["id","object","livemode","external_id","email","name","phone","national_id","created_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"customer","type":"string"},"livemode":{"type":"boolean"},"external_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"national_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_methods":{"type":"array","items":{"type":"object","required":["id","object","type","status","created_at"],"properties":{"id":{"type":"string"},"object":{"const":"payment_method","type":"string"},"type":{"type":"string"},"card":{"type":"object","required":["brand","last4","exp_month","exp_year"],"properties":{"brand":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"exp_year":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]}}},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"revoked","type":"string"}]},"created_at":{"type":"number"}}}},"created_at":{"type":"number"}},"required":["id","object","livemode","external_id","email","name","phone","national_id","created_at"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"409":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1Customers","description":"Create a new customer","tags":["Customers"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"external_id":{"maxLength":255,"type":"string"},"email":{"format":"email","maxLength":255,"type":"string"},"name":{"maxLength":255,"type":"string"},"phone":{"maxLength":50,"type":"string"},"national_id":{"maxLength":10,"type":"string"},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"external_id":{"maxLength":255,"type":"string"},"email":{"format":"email","maxLength":255,"type":"string"},"name":{"maxLength":255,"type":"string"},"phone":{"maxLength":50,"type":"string"},"national_id":{"maxLength":10,"type":"string"},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}}}}},"text/plain":{"schema":{"type":"object","properties":{"external_id":{"maxLength":255,"type":"string"},"email":{"format":"email","maxLength":255,"type":"string"},"name":{"maxLength":255,"type":"string"},"phone":{"maxLength":50,"type":"string"},"national_id":{"maxLength":10,"type":"string"},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}}}}}}}},"get":{"parameters":[{"schema":{"type":"string"},"in":"query","name":"external_id","required":false},{"schema":{"minimum":1,"maximum":100,"default":10,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100,"default":10,"type":"integer"}]},"in":"query","name":"limit","required":true},{"description":"Customer id to page after (see has_more)","schema":{"type":"string","format":"uuid"},"in":"query","name":"starting_after","required":false}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","livemode","external_id","email","name","phone","national_id","created_at"],"properties":{"id":{"type":"string"},"object":{"const":"customer","type":"string"},"livemode":{"type":"boolean"},"external_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"national_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_methods":{"type":"array","items":{"type":"object","required":["id","object","type","status","created_at"],"properties":{"id":{"type":"string"},"object":{"const":"payment_method","type":"string"},"type":{"type":"string"},"card":{"type":"object","required":["brand","last4","exp_month","exp_year"],"properties":{"brand":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"exp_year":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]}}},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"revoked","type":"string"}]},"created_at":{"type":"number"}}}},"created_at":{"type":"number"}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","livemode","external_id","email","name","phone","national_id","created_at"],"properties":{"id":{"type":"string"},"object":{"const":"customer","type":"string"},"livemode":{"type":"boolean"},"external_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"national_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_methods":{"type":"array","items":{"type":"object","required":["id","object","type","status","created_at"],"properties":{"id":{"type":"string"},"object":{"const":"payment_method","type":"string"},"type":{"type":"string"},"card":{"type":"object","required":["brand","last4","exp_month","exp_year"],"properties":{"brand":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"exp_year":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]}}},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"revoked","type":"string"}]},"created_at":{"type":"number"}}}},"created_at":{"type":"number"}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}},"text/plain":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","livemode","external_id","email","name","phone","national_id","created_at"],"properties":{"id":{"type":"string"},"object":{"const":"customer","type":"string"},"livemode":{"type":"boolean"},"external_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"national_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_methods":{"type":"array","items":{"type":"object","required":["id","object","type","status","created_at"],"properties":{"id":{"type":"string"},"object":{"const":"payment_method","type":"string"},"type":{"type":"string"},"card":{"type":"object","required":["brand","last4","exp_month","exp_year"],"properties":{"brand":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"exp_year":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]}}},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"revoked","type":"string"}]},"created_at":{"type":"number"}}}},"created_at":{"type":"number"}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"getV1Customers","description":"List all customers. Optionally filter by external_id. Page with starting_after.","tags":["Customers"],"security":[{"bearerAuth":[]}]}},"/v1/customers/{id}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"customer","type":"string"},"livemode":{"type":"boolean"},"external_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"national_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_methods":{"type":"array","items":{"type":"object","required":["id","object","type","status","created_at"],"properties":{"id":{"type":"string"},"object":{"const":"payment_method","type":"string"},"type":{"type":"string"},"card":{"type":"object","required":["brand","last4","exp_month","exp_year"],"properties":{"brand":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"exp_year":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]}}},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"revoked","type":"string"}]},"created_at":{"type":"number"}}}},"created_at":{"type":"number"}},"required":["id","object","livemode","external_id","email","name","phone","national_id","created_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"customer","type":"string"},"livemode":{"type":"boolean"},"external_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"national_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_methods":{"type":"array","items":{"type":"object","required":["id","object","type","status","created_at"],"properties":{"id":{"type":"string"},"object":{"const":"payment_method","type":"string"},"type":{"type":"string"},"card":{"type":"object","required":["brand","last4","exp_month","exp_year"],"properties":{"brand":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"exp_year":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]}}},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"revoked","type":"string"}]},"created_at":{"type":"number"}}}},"created_at":{"type":"number"}},"required":["id","object","livemode","external_id","email","name","phone","national_id","created_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"customer","type":"string"},"livemode":{"type":"boolean"},"external_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"national_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_methods":{"type":"array","items":{"type":"object","required":["id","object","type","status","created_at"],"properties":{"id":{"type":"string"},"object":{"const":"payment_method","type":"string"},"type":{"type":"string"},"card":{"type":"object","required":["brand","last4","exp_month","exp_year"],"properties":{"brand":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"exp_year":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]}}},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"revoked","type":"string"}]},"created_at":{"type":"number"}}}},"created_at":{"type":"number"}},"required":["id","object","livemode","external_id","email","name","phone","national_id","created_at"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"getV1CustomersById","description":"Retrieve a customer by ID, including their payment methods","tags":["Customers"],"security":[{"bearerAuth":[]}]},"patch":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"customer","type":"string"},"livemode":{"type":"boolean"},"external_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"national_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_methods":{"type":"array","items":{"type":"object","required":["id","object","type","status","created_at"],"properties":{"id":{"type":"string"},"object":{"const":"payment_method","type":"string"},"type":{"type":"string"},"card":{"type":"object","required":["brand","last4","exp_month","exp_year"],"properties":{"brand":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"exp_year":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]}}},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"revoked","type":"string"}]},"created_at":{"type":"number"}}}},"created_at":{"type":"number"}},"required":["id","object","livemode","external_id","email","name","phone","national_id","created_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"customer","type":"string"},"livemode":{"type":"boolean"},"external_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"national_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_methods":{"type":"array","items":{"type":"object","required":["id","object","type","status","created_at"],"properties":{"id":{"type":"string"},"object":{"const":"payment_method","type":"string"},"type":{"type":"string"},"card":{"type":"object","required":["brand","last4","exp_month","exp_year"],"properties":{"brand":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"exp_year":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]}}},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"revoked","type":"string"}]},"created_at":{"type":"number"}}}},"created_at":{"type":"number"}},"required":["id","object","livemode","external_id","email","name","phone","national_id","created_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"customer","type":"string"},"livemode":{"type":"boolean"},"external_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"national_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_methods":{"type":"array","items":{"type":"object","required":["id","object","type","status","created_at"],"properties":{"id":{"type":"string"},"object":{"const":"payment_method","type":"string"},"type":{"type":"string"},"card":{"type":"object","required":["brand","last4","exp_month","exp_year"],"properties":{"brand":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"exp_year":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]}}},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"revoked","type":"string"}]},"created_at":{"type":"number"}}}},"created_at":{"type":"number"}},"required":["id","object","livemode","external_id","email","name","phone","national_id","created_at"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"409":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"patchV1CustomersById","description":"Update a customer","tags":["Customers"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"external_id":{"maxLength":255,"type":"string"},"email":{"format":"email","maxLength":255,"type":"string"},"name":{"maxLength":255,"type":"string"},"phone":{"maxLength":50,"type":"string"},"national_id":{"maxLength":10,"type":"string"},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"external_id":{"maxLength":255,"type":"string"},"email":{"format":"email","maxLength":255,"type":"string"},"name":{"maxLength":255,"type":"string"},"phone":{"maxLength":50,"type":"string"},"national_id":{"maxLength":10,"type":"string"},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}}}}},"text/plain":{"schema":{"type":"object","properties":{"external_id":{"maxLength":255,"type":"string"},"email":{"format":"email","maxLength":255,"type":"string"},"name":{"maxLength":255,"type":"string"},"phone":{"maxLength":50,"type":"string"},"national_id":{"maxLength":10,"type":"string"},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}}}}}}}},"delete":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"customer","type":"string"},"deleted":{"const":true,"type":"boolean"}},"required":["id","object","deleted"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"customer","type":"string"},"deleted":{"const":true,"type":"boolean"}},"required":["id","object","deleted"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"customer","type":"string"},"deleted":{"const":true,"type":"boolean"}},"required":["id","object","deleted"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"409":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"deleteV1CustomersById","description":"Delete a customer and revoke their payment methods. Customers with payment history (checkout sessions or payments) cannot be deleted and return 409 `customer_has_payment_history`.","tags":["Customers"],"security":[{"bearerAuth":[]}]}},"/v1/payment-methods/":{"post":{"parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"payment_method","type":"string"},"livemode":{"type":"boolean"},"type":{"type":"string"},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"card":{"type":"object","required":["brand","last4","exp_month","exp_year"],"properties":{"brand":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"exp_year":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]}}},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"revoked","type":"string"}]},"created_at":{"type":"number"}},"required":["id","object","livemode","type","customer","status","created_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"payment_method","type":"string"},"livemode":{"type":"boolean"},"type":{"type":"string"},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"card":{"type":"object","required":["brand","last4","exp_month","exp_year"],"properties":{"brand":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"exp_year":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]}}},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"revoked","type":"string"}]},"created_at":{"type":"number"}},"required":["id","object","livemode","type","customer","status","created_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"payment_method","type":"string"},"livemode":{"type":"boolean"},"type":{"type":"string"},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"card":{"type":"object","required":["brand","last4","exp_month","exp_year"],"properties":{"brand":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"exp_year":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]}}},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"revoked","type":"string"}]},"created_at":{"type":"number"}},"required":["id","object","livemode","type","customer","status","created_at"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1Payment-methods","description":"Create a bank claim payment method for a customer","tags":["Payment Methods"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["customer","type","provider"],"properties":{"customer":{"format":"uuid","type":"string"},"type":{"const":"bank_claim","type":"string"},"provider":{"description":"Payment provider name (must match a configured merchant payment provider)","anyOf":[{"const":"verifone","type":"string"},{"const":"straumur","type":"string"},{"const":"rapyd","type":"string"},{"const":"kling_claims","type":"string"},{"const":"arion_claims","type":"string"},{"const":"landsbanki_claims","type":"string"}]},"payor_kennitala":{"minLength":10,"maxLength":10,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["customer","type","provider"],"properties":{"customer":{"format":"uuid","type":"string"},"type":{"const":"bank_claim","type":"string"},"provider":{"description":"Payment provider name (must match a configured merchant payment provider)","anyOf":[{"const":"verifone","type":"string"},{"const":"straumur","type":"string"},{"const":"rapyd","type":"string"},{"const":"kling_claims","type":"string"},{"const":"arion_claims","type":"string"},{"const":"landsbanki_claims","type":"string"}]},"payor_kennitala":{"minLength":10,"maxLength":10,"type":"string"}}}},"text/plain":{"schema":{"type":"object","required":["customer","type","provider"],"properties":{"customer":{"format":"uuid","type":"string"},"type":{"const":"bank_claim","type":"string"},"provider":{"description":"Payment provider name (must match a configured merchant payment provider)","anyOf":[{"const":"verifone","type":"string"},{"const":"straumur","type":"string"},{"const":"rapyd","type":"string"},{"const":"kling_claims","type":"string"},{"const":"arion_claims","type":"string"},{"const":"landsbanki_claims","type":"string"}]},"payor_kennitala":{"minLength":10,"maxLength":10,"type":"string"}}}}}}}},"/v1/payment-methods/{id}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"payment_method","type":"string"},"livemode":{"type":"boolean"},"type":{"type":"string"},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"card":{"type":"object","required":["brand","last4","exp_month","exp_year"],"properties":{"brand":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"exp_year":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]}}},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"revoked","type":"string"}]},"created_at":{"type":"number"}},"required":["id","object","livemode","type","customer","status","created_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"payment_method","type":"string"},"livemode":{"type":"boolean"},"type":{"type":"string"},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"card":{"type":"object","required":["brand","last4","exp_month","exp_year"],"properties":{"brand":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"exp_year":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]}}},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"revoked","type":"string"}]},"created_at":{"type":"number"}},"required":["id","object","livemode","type","customer","status","created_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"payment_method","type":"string"},"livemode":{"type":"boolean"},"type":{"type":"string"},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"card":{"type":"object","required":["brand","last4","exp_month","exp_year"],"properties":{"brand":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"exp_year":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]}}},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"revoked","type":"string"}]},"created_at":{"type":"number"}},"required":["id","object","livemode","type","customer","status","created_at"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"getV1Payment-methodsById","description":"Retrieve a payment method by ID","tags":["Payment Methods"],"security":[{"bearerAuth":[]}]},"delete":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"payment_method","type":"string"},"livemode":{"type":"boolean"},"type":{"type":"string"},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"card":{"type":"object","required":["brand","last4","exp_month","exp_year"],"properties":{"brand":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"exp_year":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]}}},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"revoked","type":"string"}]},"created_at":{"type":"number"}},"required":["id","object","livemode","type","customer","status","created_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"payment_method","type":"string"},"livemode":{"type":"boolean"},"type":{"type":"string"},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"card":{"type":"object","required":["brand","last4","exp_month","exp_year"],"properties":{"brand":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"exp_year":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]}}},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"revoked","type":"string"}]},"created_at":{"type":"number"}},"required":["id","object","livemode","type","customer","status","created_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"payment_method","type":"string"},"livemode":{"type":"boolean"},"type":{"type":"string"},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"card":{"type":"object","required":["brand","last4","exp_month","exp_year"],"properties":{"brand":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"exp_month":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"exp_year":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]}}},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"revoked","type":"string"}]},"created_at":{"type":"number"}},"required":["id","object","livemode","type","customer","status","created_at"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"deleteV1Payment-methodsById","description":"Revoke a payment method","tags":["Payment Methods"],"security":[{"bearerAuth":[]}]}},"/v1/payment-methods/setup":{"post":{"parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"setup_session","type":"string"},"url":{"type":"string"},"customer":{"type":"string"},"expires_at":{"type":"number"},"created_at":{"type":"number"}},"required":["id","object","url","customer","expires_at","created_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"setup_session","type":"string"},"url":{"type":"string"},"customer":{"type":"string"},"expires_at":{"type":"number"},"created_at":{"type":"number"}},"required":["id","object","url","customer","expires_at","created_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"setup_session","type":"string"},"url":{"type":"string"},"customer":{"type":"string"},"expires_at":{"type":"number"},"created_at":{"type":"number"}},"required":["id","object","url","customer","expires_at","created_at"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1Payment-methodsSetup","description":"Create a setup session to add a payment method","tags":["Payment Methods"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["customer_id","success_url"],"properties":{"customer_id":{"format":"uuid","type":"string"},"success_url":{"format":"uri","type":"string"},"cancel_url":{"format":"uri","type":"string"},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["customer_id","success_url"],"properties":{"customer_id":{"format":"uuid","type":"string"},"success_url":{"format":"uri","type":"string"},"cancel_url":{"format":"uri","type":"string"},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}}}}},"text/plain":{"schema":{"type":"object","required":["customer_id","success_url"],"properties":{"customer_id":{"format":"uuid","type":"string"},"success_url":{"format":"uri","type":"string"},"cancel_url":{"format":"uri","type":"string"},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}}}}}}}}},"/v1/payment-intents/":{"post":{"parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1Payment-intents","description":"Create and charge a payment intent","tags":["Payment Intents"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["amount","currency","customer","payment_method","capture"],"properties":{"amount":{"minimum":1,"maximum":2147483647,"description":"Amount in ISK (integer, zero-decimal)","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"description":"Amount in ISK (integer, zero-decimal)","type":"integer"}]},"currency":{"minLength":3,"maxLength":3,"default":"ISK","description":"Three-letter ISO currency code","type":"string"},"customer":{"format":"uuid","description":"ID of the customer to charge","type":"string"},"payment_method":{"format":"uuid","description":"ID of the payment method to use","type":"string"},"capture":{"default":true,"description":"Whether to immediately capture the payment. Set to false for auth-only.","type":"boolean"},"payment_method_type":{"description":"Payment method type. Defaults to card.","anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"description":{"maxLength":500,"description":"Internal description for this payment","type":"string"},"statement_descriptor":{"maxLength":22,"description":"Text that appears on the customer's bank statement","type":"string"},"metadata":{"description":"Arbitrary key-value pairs for your own use","type":"object","patternProperties":{"^(.*)$":{}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["amount","currency","customer","payment_method","capture"],"properties":{"amount":{"minimum":1,"maximum":2147483647,"description":"Amount in ISK (integer, zero-decimal)","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"description":"Amount in ISK (integer, zero-decimal)","type":"integer"}]},"currency":{"minLength":3,"maxLength":3,"default":"ISK","description":"Three-letter ISO currency code","type":"string"},"customer":{"format":"uuid","description":"ID of the customer to charge","type":"string"},"payment_method":{"format":"uuid","description":"ID of the payment method to use","type":"string"},"capture":{"default":true,"description":"Whether to immediately capture the payment. Set to false for auth-only.","type":"boolean"},"payment_method_type":{"description":"Payment method type. Defaults to card.","anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"description":{"maxLength":500,"description":"Internal description for this payment","type":"string"},"statement_descriptor":{"maxLength":22,"description":"Text that appears on the customer's bank statement","type":"string"},"metadata":{"description":"Arbitrary key-value pairs for your own use","type":"object","patternProperties":{"^(.*)$":{}}}}}},"text/plain":{"schema":{"type":"object","required":["amount","currency","customer","payment_method","capture"],"properties":{"amount":{"minimum":1,"maximum":2147483647,"description":"Amount in ISK (integer, zero-decimal)","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"description":"Amount in ISK (integer, zero-decimal)","type":"integer"}]},"currency":{"minLength":3,"maxLength":3,"default":"ISK","description":"Three-letter ISO currency code","type":"string"},"customer":{"format":"uuid","description":"ID of the customer to charge","type":"string"},"payment_method":{"format":"uuid","description":"ID of the payment method to use","type":"string"},"capture":{"default":true,"description":"Whether to immediately capture the payment. Set to false for auth-only.","type":"boolean"},"payment_method_type":{"description":"Payment method type. Defaults to card.","anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"description":{"maxLength":500,"description":"Internal description for this payment","type":"string"},"statement_descriptor":{"maxLength":22,"description":"Text that appears on the customer's bank statement","type":"string"},"metadata":{"description":"Arbitrary key-value pairs for your own use","type":"object","patternProperties":{"^(.*)$":{}}}}}}}}},"get":{"parameters":[{"description":"Max results to return","schema":{"minimum":1,"maximum":100,"default":20,"anyOf":[{"format":"numeric","default":0,"type":"string"},{"minimum":1,"maximum":100,"default":20,"description":"Max results to return","type":"number"}]},"in":"query","name":"limit","required":true},{"description":"Filter by payment status (e.g. captured, failed, refunded)","schema":{"type":"string"},"in":"query","name":"status","required":false},{"description":"Filter by customer ID","schema":{"type":"string","format":"uuid"},"in":"query","name":"customer","required":false},{"description":"Filter by subscription ID","schema":{"type":"string","format":"uuid"},"in":"query","name":"subscription","required":false}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"],"properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"additionalProperties":false}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"],"properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"additionalProperties":false}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}},"text/plain":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"],"properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"additionalProperties":false}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}}}}},"operationId":"getV1Payment-intents","description":"List payment intents, newest first","tags":["Payment Intents"],"security":[{"bearerAuth":[]}]}},"/v1/payment-intents/{id}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"getV1Payment-intentsById","description":"Retrieve a payment intent by ID","tags":["Payment Intents"],"security":[{"bearerAuth":[]}]}},"/v1/payment-intents/{id}/receipt":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"receipt","type":"string"},"livemode":{"type":"boolean"},"document_type":{"anyOf":[{"const":"reikningur","type":"string"},{"const":"kvittun","type":"string"}]},"receipt_number":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment":{"type":"object","required":["id","amount","vat_amount","currency","status","refunded_amount","created_at","updated_at","customer_name","customer_email","customer_phone","customer_national_id","billing_address"],"properties":{"id":{"type":"string"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"vat_amount":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"currency":{"type":"string"},"status":{"type":"string"},"refunded_amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"},"customer_name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"customer_email":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"customer_phone":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"customer_national_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"billing_address":{"nullable":true,"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"type":"string"},"city":{"type":"string"},"postal_code":{"type":"string"},"country":{"type":"string"}}},{"type":"null"}]}}},"merchant":{"type":"object","required":["id","name","kennitala","vat_number","logo_url","phone","website","legal_address"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"kennitala":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"vat_number":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"logo_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"legal_address":{"nullable":true,"anyOf":[{"type":"object","properties":{"street":{"type":"string"},"city":{"type":"string"},"postal_code":{"type":"string"},"country":{"type":"string"}}},{"type":"null"}]}}},"claim":{"nullable":true,"anyOf":[{"type":"object","required":["id","status","amount","due_date","final_due_date","bank_claim_id","payor_kennitala"],"properties":{"id":{"type":"string"},"status":{"type":"string"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"due_date":{"type":"number"},"final_due_date":{"type":"number"},"bank_claim_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payor_kennitala":{"type":"string"}}},{"type":"null"}]},"items":{"type":"array","items":{"type":"object","required":["id","description","quantity","unit_amount","vat_rate","line_total_gross","discount_amount","line_total_charged","line_total_net"],"properties":{"id":{"type":"string"},"description":{"type":"string"},"quantity":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"unit_amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"vat_rate":{"description":"VAT rate as integer percentage: 0, 11, or 24.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate as integer percentage: 0, 11, or 24.","type":"integer"}]},"line_total_gross":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"discount_amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"line_total_charged":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"line_total_net":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}}}}},"required":["object","livemode","document_type","receipt_number","receipt_url","receipt_pdf_url","payment","merchant","claim","items"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"object":{"const":"receipt","type":"string"},"livemode":{"type":"boolean"},"document_type":{"anyOf":[{"const":"reikningur","type":"string"},{"const":"kvittun","type":"string"}]},"receipt_number":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment":{"type":"object","required":["id","amount","vat_amount","currency","status","refunded_amount","created_at","updated_at","customer_name","customer_email","customer_phone","customer_national_id","billing_address"],"properties":{"id":{"type":"string"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"vat_amount":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"currency":{"type":"string"},"status":{"type":"string"},"refunded_amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"},"customer_name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"customer_email":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"customer_phone":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"customer_national_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"billing_address":{"nullable":true,"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"type":"string"},"city":{"type":"string"},"postal_code":{"type":"string"},"country":{"type":"string"}}},{"type":"null"}]}}},"merchant":{"type":"object","required":["id","name","kennitala","vat_number","logo_url","phone","website","legal_address"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"kennitala":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"vat_number":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"logo_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"legal_address":{"nullable":true,"anyOf":[{"type":"object","properties":{"street":{"type":"string"},"city":{"type":"string"},"postal_code":{"type":"string"},"country":{"type":"string"}}},{"type":"null"}]}}},"claim":{"nullable":true,"anyOf":[{"type":"object","required":["id","status","amount","due_date","final_due_date","bank_claim_id","payor_kennitala"],"properties":{"id":{"type":"string"},"status":{"type":"string"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"due_date":{"type":"number"},"final_due_date":{"type":"number"},"bank_claim_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payor_kennitala":{"type":"string"}}},{"type":"null"}]},"items":{"type":"array","items":{"type":"object","required":["id","description","quantity","unit_amount","vat_rate","line_total_gross","discount_amount","line_total_charged","line_total_net"],"properties":{"id":{"type":"string"},"description":{"type":"string"},"quantity":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"unit_amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"vat_rate":{"description":"VAT rate as integer percentage: 0, 11, or 24.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate as integer percentage: 0, 11, or 24.","type":"integer"}]},"line_total_gross":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"discount_amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"line_total_charged":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"line_total_net":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}}}}},"required":["object","livemode","document_type","receipt_number","receipt_url","receipt_pdf_url","payment","merchant","claim","items"]}},"text/plain":{"schema":{"type":"object","properties":{"object":{"const":"receipt","type":"string"},"livemode":{"type":"boolean"},"document_type":{"anyOf":[{"const":"reikningur","type":"string"},{"const":"kvittun","type":"string"}]},"receipt_number":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment":{"type":"object","required":["id","amount","vat_amount","currency","status","refunded_amount","created_at","updated_at","customer_name","customer_email","customer_phone","customer_national_id","billing_address"],"properties":{"id":{"type":"string"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"vat_amount":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"currency":{"type":"string"},"status":{"type":"string"},"refunded_amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"},"customer_name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"customer_email":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"customer_phone":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"customer_national_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"billing_address":{"nullable":true,"anyOf":[{"type":"object","properties":{"line1":{"type":"string"},"line2":{"type":"string"},"city":{"type":"string"},"postal_code":{"type":"string"},"country":{"type":"string"}}},{"type":"null"}]}}},"merchant":{"type":"object","required":["id","name","kennitala","vat_number","logo_url","phone","website","legal_address"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"kennitala":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"vat_number":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"logo_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"legal_address":{"nullable":true,"anyOf":[{"type":"object","properties":{"street":{"type":"string"},"city":{"type":"string"},"postal_code":{"type":"string"},"country":{"type":"string"}}},{"type":"null"}]}}},"claim":{"nullable":true,"anyOf":[{"type":"object","required":["id","status","amount","due_date","final_due_date","bank_claim_id","payor_kennitala"],"properties":{"id":{"type":"string"},"status":{"type":"string"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"due_date":{"type":"number"},"final_due_date":{"type":"number"},"bank_claim_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payor_kennitala":{"type":"string"}}},{"type":"null"}]},"items":{"type":"array","items":{"type":"object","required":["id","description","quantity","unit_amount","vat_rate","line_total_gross","discount_amount","line_total_charged","line_total_net"],"properties":{"id":{"type":"string"},"description":{"type":"string"},"quantity":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"unit_amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"vat_rate":{"description":"VAT rate as integer percentage: 0, 11, or 24.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate as integer percentage: 0, 11, or 24.","type":"integer"}]},"line_total_gross":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"discount_amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"line_total_charged":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"line_total_net":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}}}}},"required":["object","livemode","document_type","receipt_number","receipt_url","receipt_pdf_url","payment","merchant","claim","items"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"409":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"getV1Payment-intentsByIdReceipt","description":"Fetch the full receipt payload for a payment intent — document type (kvittun/reikningur), receipt number, hosted/PDF URLs, line items with VAT breakdown, and merchant/customer blocks. Use this when you want to render your own receipt template; otherwise the `receipt_url`/`receipt_pdf_url` on the payment intent are enough.","tags":["Payment Intents"],"security":[{"bearerAuth":[]}]}},"/v1/payment-intents/{id}/capture":{"post":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1Payment-intentsByIdCapture","description":"Capture an authorized payment","tags":["Payment Intents"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"amount":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]}}}},"text/plain":{"schema":{"type":"object","properties":{"amount":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]}}}}}}}},"/v1/payment-intents/{id}/cancel":{"post":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1Payment-intentsByIdCancel","description":"Cancel an authorized payment","tags":["Payment Intents"],"security":[{"bearerAuth":[]}]}},"/v1/payment-intents/{id}/refund":{"post":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1Payment-intentsByIdRefund","description":"Refund a captured payment","tags":["Payment Intents"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"reason":{"maxLength":500,"type":"string"},"currency":{"minLength":3,"maxLength":3,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"amount":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"reason":{"maxLength":500,"type":"string"},"currency":{"minLength":3,"maxLength":3,"type":"string"}}}},"text/plain":{"schema":{"type":"object","properties":{"amount":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"reason":{"maxLength":500,"type":"string"},"currency":{"minLength":3,"maxLength":3,"type":"string"}}}}}}}},"/v1/products/":{"post":{"parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"product","type":"string"},"livemode":{"type":"boolean"},"code":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_rate":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"image_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"anyOf":[{"const":"one_time","type":"string"},{"const":"subscription","type":"string"}]},"billing_interval":{"nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"trial_days":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"barcode":{"nullable":true,"anyOf":[{"description":"EAN/UPC/QR value scanned at the counter; unique per merchant","type":"string"},{"type":"null"}]},"favorite":{"description":"Pinned to the top of the app's product library","type":"boolean"},"sort_order":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"tile_color":{"nullable":true,"anyOf":[{"description":"Hex colour for the POS tile; derived from the name when null","type":"string"},{"type":"null"}]},"options":{"description":"Options a buyer picks from (e.g. size). Empty for a product without variants","type":"array","items":{"description":"An option a buyer picks from","type":"object","required":["name","values"],"properties":{"name":{"description":"Option name as the buyer reads it, e.g. \"Stærð\"","type":"string"},"values":{"description":"Values in display order, e.g. [\"S\", \"M\", \"L\"]","type":"array","items":{"type":"string"}}}}},"variants":{"description":"Active variants in display order. Empty for a product without variants; when not empty, a checkout line for this product must name one (variant_id)","type":"array","items":{"description":"One sellable combination of a product's options. Stock per variant comes from the Lager app, under the product's stock.variants","type":"object","required":["id","object","product_id","option_values","label","amount","own_amount","sku","position","status","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"product.variant","type":"string"},"product_id":{"type":"string"},"option_values":{"description":"The value chosen for each option, e.g. {\"Stærð\": \"M\"}","additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"label":{"description":"The choice as one line, e.g. \"Stærð: M\"","type":"string"},"amount":{"description":"Unit price: the variant's own, or the product's when it has none","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Unit price: the variant's own, or the product's when it has none","type":"integer"}]},"own_amount":{"nullable":true,"anyOf":[{"description":"The variant's own price; null means it sells at the product's price","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The variant's own price; null means it sells at the product's price","type":"integer"}]},{"type":"null"}]},"sku":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"description":"Display order","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Display order","type":"integer"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}},"stock":{"description":"Stock counts, present only when the Lager (stock) app is enabled for the merchant","type":"object","required":["quantity","low_stock_threshold","low"],"properties":{"quantity":{"description":"On the shelf now. May be negative: the shop sold something the count said it did not have","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"On the shelf now. May be negative: the shop sold something the count said it did not have","type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"description":"At or below this the product reads as low; null means the merchant set no threshold","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"At or below this the product reads as low; null means the merchant set no threshold","type":"integer"}]},{"type":"null"}]},"low":{"description":"Threshold is set and quantity is at or below it","type":"boolean"},"variants":{"description":"Counted variants keyed by variant id. A variant missing here is not counted, so it is never sold out; one at 0 or below is sold out and checkout refuses it","type":"object","patternProperties":{"^(.*)$":{"type":"object","required":["quantity","low_stock_threshold","low"],"properties":{"quantity":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"low":{"type":"boolean"}}}}}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","code","name","description","amount","currency","vat_rate","image_url","type","billing_interval","billing_interval_count","trial_days","status","metadata","barcode","favorite","sort_order","tile_color","options","variants","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"product","type":"string"},"livemode":{"type":"boolean"},"code":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_rate":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"image_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"anyOf":[{"const":"one_time","type":"string"},{"const":"subscription","type":"string"}]},"billing_interval":{"nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"trial_days":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"barcode":{"nullable":true,"anyOf":[{"description":"EAN/UPC/QR value scanned at the counter; unique per merchant","type":"string"},{"type":"null"}]},"favorite":{"description":"Pinned to the top of the app's product library","type":"boolean"},"sort_order":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"tile_color":{"nullable":true,"anyOf":[{"description":"Hex colour for the POS tile; derived from the name when null","type":"string"},{"type":"null"}]},"options":{"description":"Options a buyer picks from (e.g. size). Empty for a product without variants","type":"array","items":{"description":"An option a buyer picks from","type":"object","required":["name","values"],"properties":{"name":{"description":"Option name as the buyer reads it, e.g. \"Stærð\"","type":"string"},"values":{"description":"Values in display order, e.g. [\"S\", \"M\", \"L\"]","type":"array","items":{"type":"string"}}}}},"variants":{"description":"Active variants in display order. Empty for a product without variants; when not empty, a checkout line for this product must name one (variant_id)","type":"array","items":{"description":"One sellable combination of a product's options. Stock per variant comes from the Lager app, under the product's stock.variants","type":"object","required":["id","object","product_id","option_values","label","amount","own_amount","sku","position","status","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"product.variant","type":"string"},"product_id":{"type":"string"},"option_values":{"description":"The value chosen for each option, e.g. {\"Stærð\": \"M\"}","additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"label":{"description":"The choice as one line, e.g. \"Stærð: M\"","type":"string"},"amount":{"description":"Unit price: the variant's own, or the product's when it has none","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Unit price: the variant's own, or the product's when it has none","type":"integer"}]},"own_amount":{"nullable":true,"anyOf":[{"description":"The variant's own price; null means it sells at the product's price","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The variant's own price; null means it sells at the product's price","type":"integer"}]},{"type":"null"}]},"sku":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"description":"Display order","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Display order","type":"integer"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}},"stock":{"description":"Stock counts, present only when the Lager (stock) app is enabled for the merchant","type":"object","required":["quantity","low_stock_threshold","low"],"properties":{"quantity":{"description":"On the shelf now. May be negative: the shop sold something the count said it did not have","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"On the shelf now. May be negative: the shop sold something the count said it did not have","type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"description":"At or below this the product reads as low; null means the merchant set no threshold","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"At or below this the product reads as low; null means the merchant set no threshold","type":"integer"}]},{"type":"null"}]},"low":{"description":"Threshold is set and quantity is at or below it","type":"boolean"},"variants":{"description":"Counted variants keyed by variant id. A variant missing here is not counted, so it is never sold out; one at 0 or below is sold out and checkout refuses it","type":"object","patternProperties":{"^(.*)$":{"type":"object","required":["quantity","low_stock_threshold","low"],"properties":{"quantity":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"low":{"type":"boolean"}}}}}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","code","name","description","amount","currency","vat_rate","image_url","type","billing_interval","billing_interval_count","trial_days","status","metadata","barcode","favorite","sort_order","tile_color","options","variants","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"product","type":"string"},"livemode":{"type":"boolean"},"code":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_rate":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"image_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"anyOf":[{"const":"one_time","type":"string"},{"const":"subscription","type":"string"}]},"billing_interval":{"nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"trial_days":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"barcode":{"nullable":true,"anyOf":[{"description":"EAN/UPC/QR value scanned at the counter; unique per merchant","type":"string"},{"type":"null"}]},"favorite":{"description":"Pinned to the top of the app's product library","type":"boolean"},"sort_order":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"tile_color":{"nullable":true,"anyOf":[{"description":"Hex colour for the POS tile; derived from the name when null","type":"string"},{"type":"null"}]},"options":{"description":"Options a buyer picks from (e.g. size). Empty for a product without variants","type":"array","items":{"description":"An option a buyer picks from","type":"object","required":["name","values"],"properties":{"name":{"description":"Option name as the buyer reads it, e.g. \"Stærð\"","type":"string"},"values":{"description":"Values in display order, e.g. [\"S\", \"M\", \"L\"]","type":"array","items":{"type":"string"}}}}},"variants":{"description":"Active variants in display order. Empty for a product without variants; when not empty, a checkout line for this product must name one (variant_id)","type":"array","items":{"description":"One sellable combination of a product's options. Stock per variant comes from the Lager app, under the product's stock.variants","type":"object","required":["id","object","product_id","option_values","label","amount","own_amount","sku","position","status","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"product.variant","type":"string"},"product_id":{"type":"string"},"option_values":{"description":"The value chosen for each option, e.g. {\"Stærð\": \"M\"}","additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"label":{"description":"The choice as one line, e.g. \"Stærð: M\"","type":"string"},"amount":{"description":"Unit price: the variant's own, or the product's when it has none","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Unit price: the variant's own, or the product's when it has none","type":"integer"}]},"own_amount":{"nullable":true,"anyOf":[{"description":"The variant's own price; null means it sells at the product's price","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The variant's own price; null means it sells at the product's price","type":"integer"}]},{"type":"null"}]},"sku":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"description":"Display order","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Display order","type":"integer"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}},"stock":{"description":"Stock counts, present only when the Lager (stock) app is enabled for the merchant","type":"object","required":["quantity","low_stock_threshold","low"],"properties":{"quantity":{"description":"On the shelf now. May be negative: the shop sold something the count said it did not have","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"On the shelf now. May be negative: the shop sold something the count said it did not have","type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"description":"At or below this the product reads as low; null means the merchant set no threshold","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"At or below this the product reads as low; null means the merchant set no threshold","type":"integer"}]},{"type":"null"}]},"low":{"description":"Threshold is set and quantity is at or below it","type":"boolean"},"variants":{"description":"Counted variants keyed by variant id. A variant missing here is not counted, so it is never sold out; one at 0 or below is sold out and checkout refuses it","type":"object","patternProperties":{"^(.*)$":{"type":"object","required":["quantity","low_stock_threshold","low"],"properties":{"quantity":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"low":{"type":"boolean"}}}}}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","code","name","description","amount","currency","vat_rate","image_url","type","billing_interval","billing_interval_count","trial_days","status","metadata","barcode","favorite","sort_order","tile_color","options","variants","created_at","updated_at"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"409":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1Products","description":"Create a new product","tags":["Products"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["code","name","amount","currency","vat_rate","type"],"properties":{"code":{"minLength":1,"maxLength":100,"type":"string"},"name":{"minLength":1,"maxLength":255,"type":"string"},"description":{"type":"string"},"amount":{"minimum":1,"maximum":2147483647,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"type":"integer"}]},"currency":{"minLength":3,"maxLength":3,"default":"ISK","type":"string"},"vat_rate":{"default":24,"anyOf":[{"format":"integer","default":0,"type":"string"},{"default":24,"type":"integer"}]},"image_url":{"type":"string"},"type":{"anyOf":[{"const":"one_time","type":"string"},{"const":"subscription","type":"string"}]},"billing_interval":{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},"billing_interval_count":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"trial_days":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}},"barcode":{"minLength":3,"maxLength":64,"type":"string"},"favorite":{"type":"boolean"},"sort_order":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"tile_color":{"pattern":"^#[0-9A-Fa-f]{6}$","type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["code","name","amount","currency","vat_rate","type"],"properties":{"code":{"minLength":1,"maxLength":100,"type":"string"},"name":{"minLength":1,"maxLength":255,"type":"string"},"description":{"type":"string"},"amount":{"minimum":1,"maximum":2147483647,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"type":"integer"}]},"currency":{"minLength":3,"maxLength":3,"default":"ISK","type":"string"},"vat_rate":{"default":24,"anyOf":[{"format":"integer","default":0,"type":"string"},{"default":24,"type":"integer"}]},"image_url":{"type":"string"},"type":{"anyOf":[{"const":"one_time","type":"string"},{"const":"subscription","type":"string"}]},"billing_interval":{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},"billing_interval_count":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"trial_days":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}},"barcode":{"minLength":3,"maxLength":64,"type":"string"},"favorite":{"type":"boolean"},"sort_order":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"tile_color":{"pattern":"^#[0-9A-Fa-f]{6}$","type":"string"}}}},"text/plain":{"schema":{"type":"object","required":["code","name","amount","currency","vat_rate","type"],"properties":{"code":{"minLength":1,"maxLength":100,"type":"string"},"name":{"minLength":1,"maxLength":255,"type":"string"},"description":{"type":"string"},"amount":{"minimum":1,"maximum":2147483647,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"type":"integer"}]},"currency":{"minLength":3,"maxLength":3,"default":"ISK","type":"string"},"vat_rate":{"default":24,"anyOf":[{"format":"integer","default":0,"type":"string"},{"default":24,"type":"integer"}]},"image_url":{"type":"string"},"type":{"anyOf":[{"const":"one_time","type":"string"},{"const":"subscription","type":"string"}]},"billing_interval":{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},"billing_interval_count":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"trial_days":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}},"barcode":{"minLength":3,"maxLength":64,"type":"string"},"favorite":{"type":"boolean"},"sort_order":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"tile_color":{"pattern":"^#[0-9A-Fa-f]{6}$","type":"string"}}}}}}},"get":{"parameters":[{"schema":{"minimum":1,"maximum":500,"default":10,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":500,"default":10,"type":"integer"}]},"in":"query","name":"limit","required":true},{"schema":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"in":"query","name":"status","required":false},{"schema":{"anyOf":[{"const":"one_time","type":"string"},{"const":"subscription","type":"string"}]},"in":"query","name":"type","required":false},{"description":"Exact barcode match; the POS scan lookup","schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"barcode","required":false},{"description":"Only active one-time products the merchant made themselves: the POS catalogue","schema":{"type":"boolean"},"in":"query","name":"sellable","required":false}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","livemode","code","name","description","amount","currency","vat_rate","image_url","type","billing_interval","billing_interval_count","trial_days","status","metadata","barcode","favorite","sort_order","tile_color","options","variants","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"product","type":"string"},"livemode":{"type":"boolean"},"code":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_rate":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"image_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"anyOf":[{"const":"one_time","type":"string"},{"const":"subscription","type":"string"}]},"billing_interval":{"nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"trial_days":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"barcode":{"nullable":true,"anyOf":[{"description":"EAN/UPC/QR value scanned at the counter; unique per merchant","type":"string"},{"type":"null"}]},"favorite":{"description":"Pinned to the top of the app's product library","type":"boolean"},"sort_order":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"tile_color":{"nullable":true,"anyOf":[{"description":"Hex colour for the POS tile; derived from the name when null","type":"string"},{"type":"null"}]},"options":{"description":"Options a buyer picks from (e.g. size). Empty for a product without variants","type":"array","items":{"description":"An option a buyer picks from","type":"object","required":["name","values"],"properties":{"name":{"description":"Option name as the buyer reads it, e.g. \"Stærð\"","type":"string"},"values":{"description":"Values in display order, e.g. [\"S\", \"M\", \"L\"]","type":"array","items":{"type":"string"}}}}},"variants":{"description":"Active variants in display order. Empty for a product without variants; when not empty, a checkout line for this product must name one (variant_id)","type":"array","items":{"description":"One sellable combination of a product's options. Stock per variant comes from the Lager app, under the product's stock.variants","type":"object","required":["id","object","product_id","option_values","label","amount","own_amount","sku","position","status","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"product.variant","type":"string"},"product_id":{"type":"string"},"option_values":{"description":"The value chosen for each option, e.g. {\"Stærð\": \"M\"}","additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"label":{"description":"The choice as one line, e.g. \"Stærð: M\"","type":"string"},"amount":{"description":"Unit price: the variant's own, or the product's when it has none","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Unit price: the variant's own, or the product's when it has none","type":"integer"}]},"own_amount":{"nullable":true,"anyOf":[{"description":"The variant's own price; null means it sells at the product's price","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The variant's own price; null means it sells at the product's price","type":"integer"}]},{"type":"null"}]},"sku":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"description":"Display order","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Display order","type":"integer"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}},"stock":{"description":"Stock counts, present only when the Lager (stock) app is enabled for the merchant","type":"object","required":["quantity","low_stock_threshold","low"],"properties":{"quantity":{"description":"On the shelf now. May be negative: the shop sold something the count said it did not have","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"On the shelf now. May be negative: the shop sold something the count said it did not have","type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"description":"At or below this the product reads as low; null means the merchant set no threshold","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"At or below this the product reads as low; null means the merchant set no threshold","type":"integer"}]},{"type":"null"}]},"low":{"description":"Threshold is set and quantity is at or below it","type":"boolean"},"variants":{"description":"Counted variants keyed by variant id. A variant missing here is not counted, so it is never sold out; one at 0 or below is sold out and checkout refuses it","type":"object","patternProperties":{"^(.*)$":{"type":"object","required":["quantity","low_stock_threshold","low"],"properties":{"quantity":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"low":{"type":"boolean"}}}}}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","livemode","code","name","description","amount","currency","vat_rate","image_url","type","billing_interval","billing_interval_count","trial_days","status","metadata","barcode","favorite","sort_order","tile_color","options","variants","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"product","type":"string"},"livemode":{"type":"boolean"},"code":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_rate":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"image_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"anyOf":[{"const":"one_time","type":"string"},{"const":"subscription","type":"string"}]},"billing_interval":{"nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"trial_days":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"barcode":{"nullable":true,"anyOf":[{"description":"EAN/UPC/QR value scanned at the counter; unique per merchant","type":"string"},{"type":"null"}]},"favorite":{"description":"Pinned to the top of the app's product library","type":"boolean"},"sort_order":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"tile_color":{"nullable":true,"anyOf":[{"description":"Hex colour for the POS tile; derived from the name when null","type":"string"},{"type":"null"}]},"options":{"description":"Options a buyer picks from (e.g. size). Empty for a product without variants","type":"array","items":{"description":"An option a buyer picks from","type":"object","required":["name","values"],"properties":{"name":{"description":"Option name as the buyer reads it, e.g. \"Stærð\"","type":"string"},"values":{"description":"Values in display order, e.g. [\"S\", \"M\", \"L\"]","type":"array","items":{"type":"string"}}}}},"variants":{"description":"Active variants in display order. Empty for a product without variants; when not empty, a checkout line for this product must name one (variant_id)","type":"array","items":{"description":"One sellable combination of a product's options. Stock per variant comes from the Lager app, under the product's stock.variants","type":"object","required":["id","object","product_id","option_values","label","amount","own_amount","sku","position","status","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"product.variant","type":"string"},"product_id":{"type":"string"},"option_values":{"description":"The value chosen for each option, e.g. {\"Stærð\": \"M\"}","additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"label":{"description":"The choice as one line, e.g. \"Stærð: M\"","type":"string"},"amount":{"description":"Unit price: the variant's own, or the product's when it has none","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Unit price: the variant's own, or the product's when it has none","type":"integer"}]},"own_amount":{"nullable":true,"anyOf":[{"description":"The variant's own price; null means it sells at the product's price","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The variant's own price; null means it sells at the product's price","type":"integer"}]},{"type":"null"}]},"sku":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"description":"Display order","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Display order","type":"integer"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}},"stock":{"description":"Stock counts, present only when the Lager (stock) app is enabled for the merchant","type":"object","required":["quantity","low_stock_threshold","low"],"properties":{"quantity":{"description":"On the shelf now. May be negative: the shop sold something the count said it did not have","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"On the shelf now. May be negative: the shop sold something the count said it did not have","type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"description":"At or below this the product reads as low; null means the merchant set no threshold","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"At or below this the product reads as low; null means the merchant set no threshold","type":"integer"}]},{"type":"null"}]},"low":{"description":"Threshold is set and quantity is at or below it","type":"boolean"},"variants":{"description":"Counted variants keyed by variant id. A variant missing here is not counted, so it is never sold out; one at 0 or below is sold out and checkout refuses it","type":"object","patternProperties":{"^(.*)$":{"type":"object","required":["quantity","low_stock_threshold","low"],"properties":{"quantity":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"low":{"type":"boolean"}}}}}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}},"text/plain":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","livemode","code","name","description","amount","currency","vat_rate","image_url","type","billing_interval","billing_interval_count","trial_days","status","metadata","barcode","favorite","sort_order","tile_color","options","variants","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"product","type":"string"},"livemode":{"type":"boolean"},"code":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_rate":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"image_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"anyOf":[{"const":"one_time","type":"string"},{"const":"subscription","type":"string"}]},"billing_interval":{"nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"trial_days":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"barcode":{"nullable":true,"anyOf":[{"description":"EAN/UPC/QR value scanned at the counter; unique per merchant","type":"string"},{"type":"null"}]},"favorite":{"description":"Pinned to the top of the app's product library","type":"boolean"},"sort_order":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"tile_color":{"nullable":true,"anyOf":[{"description":"Hex colour for the POS tile; derived from the name when null","type":"string"},{"type":"null"}]},"options":{"description":"Options a buyer picks from (e.g. size). Empty for a product without variants","type":"array","items":{"description":"An option a buyer picks from","type":"object","required":["name","values"],"properties":{"name":{"description":"Option name as the buyer reads it, e.g. \"Stærð\"","type":"string"},"values":{"description":"Values in display order, e.g. [\"S\", \"M\", \"L\"]","type":"array","items":{"type":"string"}}}}},"variants":{"description":"Active variants in display order. Empty for a product without variants; when not empty, a checkout line for this product must name one (variant_id)","type":"array","items":{"description":"One sellable combination of a product's options. Stock per variant comes from the Lager app, under the product's stock.variants","type":"object","required":["id","object","product_id","option_values","label","amount","own_amount","sku","position","status","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"product.variant","type":"string"},"product_id":{"type":"string"},"option_values":{"description":"The value chosen for each option, e.g. {\"Stærð\": \"M\"}","additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"label":{"description":"The choice as one line, e.g. \"Stærð: M\"","type":"string"},"amount":{"description":"Unit price: the variant's own, or the product's when it has none","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Unit price: the variant's own, or the product's when it has none","type":"integer"}]},"own_amount":{"nullable":true,"anyOf":[{"description":"The variant's own price; null means it sells at the product's price","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The variant's own price; null means it sells at the product's price","type":"integer"}]},{"type":"null"}]},"sku":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"description":"Display order","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Display order","type":"integer"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}},"stock":{"description":"Stock counts, present only when the Lager (stock) app is enabled for the merchant","type":"object","required":["quantity","low_stock_threshold","low"],"properties":{"quantity":{"description":"On the shelf now. May be negative: the shop sold something the count said it did not have","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"On the shelf now. May be negative: the shop sold something the count said it did not have","type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"description":"At or below this the product reads as low; null means the merchant set no threshold","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"At or below this the product reads as low; null means the merchant set no threshold","type":"integer"}]},{"type":"null"}]},"low":{"description":"Threshold is set and quantity is at or below it","type":"boolean"},"variants":{"description":"Counted variants keyed by variant id. A variant missing here is not counted, so it is never sold out; one at 0 or below is sold out and checkout refuses it","type":"object","patternProperties":{"^(.*)$":{"type":"object","required":["quantity","low_stock_threshold","low"],"properties":{"quantity":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"low":{"type":"boolean"}}}}}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}}}}},"operationId":"getV1Products","description":"List all products. Includes any product Kling created for its own use, such as the billing product behind a recurring contribution page, so that every product_id on a subscription resolves here. Those are not editable: see the update and archive endpoints. When the Lager (stock) app is enabled for the merchant, every product also carries a stock object with quantity, low_stock_threshold and low; without the app there is no stock key at all.","tags":["Products"],"security":[{"bearerAuth":[]}]}},"/v1/products/{id}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"product","type":"string"},"livemode":{"type":"boolean"},"code":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_rate":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"image_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"anyOf":[{"const":"one_time","type":"string"},{"const":"subscription","type":"string"}]},"billing_interval":{"nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"trial_days":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"barcode":{"nullable":true,"anyOf":[{"description":"EAN/UPC/QR value scanned at the counter; unique per merchant","type":"string"},{"type":"null"}]},"favorite":{"description":"Pinned to the top of the app's product library","type":"boolean"},"sort_order":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"tile_color":{"nullable":true,"anyOf":[{"description":"Hex colour for the POS tile; derived from the name when null","type":"string"},{"type":"null"}]},"options":{"description":"Options a buyer picks from (e.g. size). Empty for a product without variants","type":"array","items":{"description":"An option a buyer picks from","type":"object","required":["name","values"],"properties":{"name":{"description":"Option name as the buyer reads it, e.g. \"Stærð\"","type":"string"},"values":{"description":"Values in display order, e.g. [\"S\", \"M\", \"L\"]","type":"array","items":{"type":"string"}}}}},"variants":{"description":"Active variants in display order. Empty for a product without variants; when not empty, a checkout line for this product must name one (variant_id)","type":"array","items":{"description":"One sellable combination of a product's options. Stock per variant comes from the Lager app, under the product's stock.variants","type":"object","required":["id","object","product_id","option_values","label","amount","own_amount","sku","position","status","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"product.variant","type":"string"},"product_id":{"type":"string"},"option_values":{"description":"The value chosen for each option, e.g. {\"Stærð\": \"M\"}","additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"label":{"description":"The choice as one line, e.g. \"Stærð: M\"","type":"string"},"amount":{"description":"Unit price: the variant's own, or the product's when it has none","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Unit price: the variant's own, or the product's when it has none","type":"integer"}]},"own_amount":{"nullable":true,"anyOf":[{"description":"The variant's own price; null means it sells at the product's price","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The variant's own price; null means it sells at the product's price","type":"integer"}]},{"type":"null"}]},"sku":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"description":"Display order","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Display order","type":"integer"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}},"stock":{"description":"Stock counts, present only when the Lager (stock) app is enabled for the merchant","type":"object","required":["quantity","low_stock_threshold","low"],"properties":{"quantity":{"description":"On the shelf now. May be negative: the shop sold something the count said it did not have","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"On the shelf now. May be negative: the shop sold something the count said it did not have","type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"description":"At or below this the product reads as low; null means the merchant set no threshold","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"At or below this the product reads as low; null means the merchant set no threshold","type":"integer"}]},{"type":"null"}]},"low":{"description":"Threshold is set and quantity is at or below it","type":"boolean"},"variants":{"description":"Counted variants keyed by variant id. A variant missing here is not counted, so it is never sold out; one at 0 or below is sold out and checkout refuses it","type":"object","patternProperties":{"^(.*)$":{"type":"object","required":["quantity","low_stock_threshold","low"],"properties":{"quantity":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"low":{"type":"boolean"}}}}}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","code","name","description","amount","currency","vat_rate","image_url","type","billing_interval","billing_interval_count","trial_days","status","metadata","barcode","favorite","sort_order","tile_color","options","variants","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"product","type":"string"},"livemode":{"type":"boolean"},"code":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_rate":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"image_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"anyOf":[{"const":"one_time","type":"string"},{"const":"subscription","type":"string"}]},"billing_interval":{"nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"trial_days":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"barcode":{"nullable":true,"anyOf":[{"description":"EAN/UPC/QR value scanned at the counter; unique per merchant","type":"string"},{"type":"null"}]},"favorite":{"description":"Pinned to the top of the app's product library","type":"boolean"},"sort_order":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"tile_color":{"nullable":true,"anyOf":[{"description":"Hex colour for the POS tile; derived from the name when null","type":"string"},{"type":"null"}]},"options":{"description":"Options a buyer picks from (e.g. size). Empty for a product without variants","type":"array","items":{"description":"An option a buyer picks from","type":"object","required":["name","values"],"properties":{"name":{"description":"Option name as the buyer reads it, e.g. \"Stærð\"","type":"string"},"values":{"description":"Values in display order, e.g. [\"S\", \"M\", \"L\"]","type":"array","items":{"type":"string"}}}}},"variants":{"description":"Active variants in display order. Empty for a product without variants; when not empty, a checkout line for this product must name one (variant_id)","type":"array","items":{"description":"One sellable combination of a product's options. Stock per variant comes from the Lager app, under the product's stock.variants","type":"object","required":["id","object","product_id","option_values","label","amount","own_amount","sku","position","status","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"product.variant","type":"string"},"product_id":{"type":"string"},"option_values":{"description":"The value chosen for each option, e.g. {\"Stærð\": \"M\"}","additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"label":{"description":"The choice as one line, e.g. \"Stærð: M\"","type":"string"},"amount":{"description":"Unit price: the variant's own, or the product's when it has none","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Unit price: the variant's own, or the product's when it has none","type":"integer"}]},"own_amount":{"nullable":true,"anyOf":[{"description":"The variant's own price; null means it sells at the product's price","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The variant's own price; null means it sells at the product's price","type":"integer"}]},{"type":"null"}]},"sku":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"description":"Display order","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Display order","type":"integer"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}},"stock":{"description":"Stock counts, present only when the Lager (stock) app is enabled for the merchant","type":"object","required":["quantity","low_stock_threshold","low"],"properties":{"quantity":{"description":"On the shelf now. May be negative: the shop sold something the count said it did not have","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"On the shelf now. May be negative: the shop sold something the count said it did not have","type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"description":"At or below this the product reads as low; null means the merchant set no threshold","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"At or below this the product reads as low; null means the merchant set no threshold","type":"integer"}]},{"type":"null"}]},"low":{"description":"Threshold is set and quantity is at or below it","type":"boolean"},"variants":{"description":"Counted variants keyed by variant id. A variant missing here is not counted, so it is never sold out; one at 0 or below is sold out and checkout refuses it","type":"object","patternProperties":{"^(.*)$":{"type":"object","required":["quantity","low_stock_threshold","low"],"properties":{"quantity":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"low":{"type":"boolean"}}}}}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","code","name","description","amount","currency","vat_rate","image_url","type","billing_interval","billing_interval_count","trial_days","status","metadata","barcode","favorite","sort_order","tile_color","options","variants","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"product","type":"string"},"livemode":{"type":"boolean"},"code":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_rate":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"image_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"anyOf":[{"const":"one_time","type":"string"},{"const":"subscription","type":"string"}]},"billing_interval":{"nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"trial_days":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"barcode":{"nullable":true,"anyOf":[{"description":"EAN/UPC/QR value scanned at the counter; unique per merchant","type":"string"},{"type":"null"}]},"favorite":{"description":"Pinned to the top of the app's product library","type":"boolean"},"sort_order":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"tile_color":{"nullable":true,"anyOf":[{"description":"Hex colour for the POS tile; derived from the name when null","type":"string"},{"type":"null"}]},"options":{"description":"Options a buyer picks from (e.g. size). Empty for a product without variants","type":"array","items":{"description":"An option a buyer picks from","type":"object","required":["name","values"],"properties":{"name":{"description":"Option name as the buyer reads it, e.g. \"Stærð\"","type":"string"},"values":{"description":"Values in display order, e.g. [\"S\", \"M\", \"L\"]","type":"array","items":{"type":"string"}}}}},"variants":{"description":"Active variants in display order. Empty for a product without variants; when not empty, a checkout line for this product must name one (variant_id)","type":"array","items":{"description":"One sellable combination of a product's options. Stock per variant comes from the Lager app, under the product's stock.variants","type":"object","required":["id","object","product_id","option_values","label","amount","own_amount","sku","position","status","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"product.variant","type":"string"},"product_id":{"type":"string"},"option_values":{"description":"The value chosen for each option, e.g. {\"Stærð\": \"M\"}","additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"label":{"description":"The choice as one line, e.g. \"Stærð: M\"","type":"string"},"amount":{"description":"Unit price: the variant's own, or the product's when it has none","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Unit price: the variant's own, or the product's when it has none","type":"integer"}]},"own_amount":{"nullable":true,"anyOf":[{"description":"The variant's own price; null means it sells at the product's price","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The variant's own price; null means it sells at the product's price","type":"integer"}]},{"type":"null"}]},"sku":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"description":"Display order","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Display order","type":"integer"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}},"stock":{"description":"Stock counts, present only when the Lager (stock) app is enabled for the merchant","type":"object","required":["quantity","low_stock_threshold","low"],"properties":{"quantity":{"description":"On the shelf now. May be negative: the shop sold something the count said it did not have","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"On the shelf now. May be negative: the shop sold something the count said it did not have","type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"description":"At or below this the product reads as low; null means the merchant set no threshold","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"At or below this the product reads as low; null means the merchant set no threshold","type":"integer"}]},{"type":"null"}]},"low":{"description":"Threshold is set and quantity is at or below it","type":"boolean"},"variants":{"description":"Counted variants keyed by variant id. A variant missing here is not counted, so it is never sold out; one at 0 or below is sold out and checkout refuses it","type":"object","patternProperties":{"^(.*)$":{"type":"object","required":["quantity","low_stock_threshold","low"],"properties":{"quantity":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"low":{"type":"boolean"}}}}}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","code","name","description","amount","currency","vat_rate","image_url","type","billing_interval","billing_interval_count","trial_days","status","metadata","barcode","favorite","sort_order","tile_color","options","variants","created_at","updated_at"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"getV1ProductsById","description":"Retrieve a product by ID, with its options and active variants. Carries the same stock object as the list when the Lager (stock) app is enabled.","tags":["Products"],"security":[{"bearerAuth":[]}]},"patch":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"product","type":"string"},"livemode":{"type":"boolean"},"code":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_rate":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"image_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"anyOf":[{"const":"one_time","type":"string"},{"const":"subscription","type":"string"}]},"billing_interval":{"nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"trial_days":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"barcode":{"nullable":true,"anyOf":[{"description":"EAN/UPC/QR value scanned at the counter; unique per merchant","type":"string"},{"type":"null"}]},"favorite":{"description":"Pinned to the top of the app's product library","type":"boolean"},"sort_order":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"tile_color":{"nullable":true,"anyOf":[{"description":"Hex colour for the POS tile; derived from the name when null","type":"string"},{"type":"null"}]},"options":{"description":"Options a buyer picks from (e.g. size). Empty for a product without variants","type":"array","items":{"description":"An option a buyer picks from","type":"object","required":["name","values"],"properties":{"name":{"description":"Option name as the buyer reads it, e.g. \"Stærð\"","type":"string"},"values":{"description":"Values in display order, e.g. [\"S\", \"M\", \"L\"]","type":"array","items":{"type":"string"}}}}},"variants":{"description":"Active variants in display order. Empty for a product without variants; when not empty, a checkout line for this product must name one (variant_id)","type":"array","items":{"description":"One sellable combination of a product's options. Stock per variant comes from the Lager app, under the product's stock.variants","type":"object","required":["id","object","product_id","option_values","label","amount","own_amount","sku","position","status","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"product.variant","type":"string"},"product_id":{"type":"string"},"option_values":{"description":"The value chosen for each option, e.g. {\"Stærð\": \"M\"}","additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"label":{"description":"The choice as one line, e.g. \"Stærð: M\"","type":"string"},"amount":{"description":"Unit price: the variant's own, or the product's when it has none","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Unit price: the variant's own, or the product's when it has none","type":"integer"}]},"own_amount":{"nullable":true,"anyOf":[{"description":"The variant's own price; null means it sells at the product's price","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The variant's own price; null means it sells at the product's price","type":"integer"}]},{"type":"null"}]},"sku":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"description":"Display order","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Display order","type":"integer"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}},"stock":{"description":"Stock counts, present only when the Lager (stock) app is enabled for the merchant","type":"object","required":["quantity","low_stock_threshold","low"],"properties":{"quantity":{"description":"On the shelf now. May be negative: the shop sold something the count said it did not have","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"On the shelf now. May be negative: the shop sold something the count said it did not have","type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"description":"At or below this the product reads as low; null means the merchant set no threshold","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"At or below this the product reads as low; null means the merchant set no threshold","type":"integer"}]},{"type":"null"}]},"low":{"description":"Threshold is set and quantity is at or below it","type":"boolean"},"variants":{"description":"Counted variants keyed by variant id. A variant missing here is not counted, so it is never sold out; one at 0 or below is sold out and checkout refuses it","type":"object","patternProperties":{"^(.*)$":{"type":"object","required":["quantity","low_stock_threshold","low"],"properties":{"quantity":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"low":{"type":"boolean"}}}}}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","code","name","description","amount","currency","vat_rate","image_url","type","billing_interval","billing_interval_count","trial_days","status","metadata","barcode","favorite","sort_order","tile_color","options","variants","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"product","type":"string"},"livemode":{"type":"boolean"},"code":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_rate":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"image_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"anyOf":[{"const":"one_time","type":"string"},{"const":"subscription","type":"string"}]},"billing_interval":{"nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"trial_days":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"barcode":{"nullable":true,"anyOf":[{"description":"EAN/UPC/QR value scanned at the counter; unique per merchant","type":"string"},{"type":"null"}]},"favorite":{"description":"Pinned to the top of the app's product library","type":"boolean"},"sort_order":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"tile_color":{"nullable":true,"anyOf":[{"description":"Hex colour for the POS tile; derived from the name when null","type":"string"},{"type":"null"}]},"options":{"description":"Options a buyer picks from (e.g. size). Empty for a product without variants","type":"array","items":{"description":"An option a buyer picks from","type":"object","required":["name","values"],"properties":{"name":{"description":"Option name as the buyer reads it, e.g. \"Stærð\"","type":"string"},"values":{"description":"Values in display order, e.g. [\"S\", \"M\", \"L\"]","type":"array","items":{"type":"string"}}}}},"variants":{"description":"Active variants in display order. Empty for a product without variants; when not empty, a checkout line for this product must name one (variant_id)","type":"array","items":{"description":"One sellable combination of a product's options. Stock per variant comes from the Lager app, under the product's stock.variants","type":"object","required":["id","object","product_id","option_values","label","amount","own_amount","sku","position","status","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"product.variant","type":"string"},"product_id":{"type":"string"},"option_values":{"description":"The value chosen for each option, e.g. {\"Stærð\": \"M\"}","additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"label":{"description":"The choice as one line, e.g. \"Stærð: M\"","type":"string"},"amount":{"description":"Unit price: the variant's own, or the product's when it has none","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Unit price: the variant's own, or the product's when it has none","type":"integer"}]},"own_amount":{"nullable":true,"anyOf":[{"description":"The variant's own price; null means it sells at the product's price","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The variant's own price; null means it sells at the product's price","type":"integer"}]},{"type":"null"}]},"sku":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"description":"Display order","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Display order","type":"integer"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}},"stock":{"description":"Stock counts, present only when the Lager (stock) app is enabled for the merchant","type":"object","required":["quantity","low_stock_threshold","low"],"properties":{"quantity":{"description":"On the shelf now. May be negative: the shop sold something the count said it did not have","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"On the shelf now. May be negative: the shop sold something the count said it did not have","type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"description":"At or below this the product reads as low; null means the merchant set no threshold","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"At or below this the product reads as low; null means the merchant set no threshold","type":"integer"}]},{"type":"null"}]},"low":{"description":"Threshold is set and quantity is at or below it","type":"boolean"},"variants":{"description":"Counted variants keyed by variant id. A variant missing here is not counted, so it is never sold out; one at 0 or below is sold out and checkout refuses it","type":"object","patternProperties":{"^(.*)$":{"type":"object","required":["quantity","low_stock_threshold","low"],"properties":{"quantity":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"low":{"type":"boolean"}}}}}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","code","name","description","amount","currency","vat_rate","image_url","type","billing_interval","billing_interval_count","trial_days","status","metadata","barcode","favorite","sort_order","tile_color","options","variants","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"product","type":"string"},"livemode":{"type":"boolean"},"code":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_rate":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"image_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"anyOf":[{"const":"one_time","type":"string"},{"const":"subscription","type":"string"}]},"billing_interval":{"nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"trial_days":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"barcode":{"nullable":true,"anyOf":[{"description":"EAN/UPC/QR value scanned at the counter; unique per merchant","type":"string"},{"type":"null"}]},"favorite":{"description":"Pinned to the top of the app's product library","type":"boolean"},"sort_order":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"tile_color":{"nullable":true,"anyOf":[{"description":"Hex colour for the POS tile; derived from the name when null","type":"string"},{"type":"null"}]},"options":{"description":"Options a buyer picks from (e.g. size). Empty for a product without variants","type":"array","items":{"description":"An option a buyer picks from","type":"object","required":["name","values"],"properties":{"name":{"description":"Option name as the buyer reads it, e.g. \"Stærð\"","type":"string"},"values":{"description":"Values in display order, e.g. [\"S\", \"M\", \"L\"]","type":"array","items":{"type":"string"}}}}},"variants":{"description":"Active variants in display order. Empty for a product without variants; when not empty, a checkout line for this product must name one (variant_id)","type":"array","items":{"description":"One sellable combination of a product's options. Stock per variant comes from the Lager app, under the product's stock.variants","type":"object","required":["id","object","product_id","option_values","label","amount","own_amount","sku","position","status","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"product.variant","type":"string"},"product_id":{"type":"string"},"option_values":{"description":"The value chosen for each option, e.g. {\"Stærð\": \"M\"}","additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"label":{"description":"The choice as one line, e.g. \"Stærð: M\"","type":"string"},"amount":{"description":"Unit price: the variant's own, or the product's when it has none","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Unit price: the variant's own, or the product's when it has none","type":"integer"}]},"own_amount":{"nullable":true,"anyOf":[{"description":"The variant's own price; null means it sells at the product's price","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The variant's own price; null means it sells at the product's price","type":"integer"}]},{"type":"null"}]},"sku":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"description":"Display order","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Display order","type":"integer"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}},"stock":{"description":"Stock counts, present only when the Lager (stock) app is enabled for the merchant","type":"object","required":["quantity","low_stock_threshold","low"],"properties":{"quantity":{"description":"On the shelf now. May be negative: the shop sold something the count said it did not have","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"On the shelf now. May be negative: the shop sold something the count said it did not have","type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"description":"At or below this the product reads as low; null means the merchant set no threshold","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"At or below this the product reads as low; null means the merchant set no threshold","type":"integer"}]},{"type":"null"}]},"low":{"description":"Threshold is set and quantity is at or below it","type":"boolean"},"variants":{"description":"Counted variants keyed by variant id. A variant missing here is not counted, so it is never sold out; one at 0 or below is sold out and checkout refuses it","type":"object","patternProperties":{"^(.*)$":{"type":"object","required":["quantity","low_stock_threshold","low"],"properties":{"quantity":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"low":{"type":"boolean"}}}}}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","code","name","description","amount","currency","vat_rate","image_url","type","billing_interval","billing_interval_count","trial_days","status","metadata","barcode","favorite","sort_order","tile_color","options","variants","created_at","updated_at"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"409":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"patchV1ProductsById","description":"Update a product. options replaces the product's options (one-time products only; null or [] clears them): a variant whose values no longer fit is archived, not deleted. amount and vat_rate can be changed on a one-time product at any time, and on a subscription product only while no trialing, active or past-due subscription bills it (otherwise 409 product_amount_locked). Products Kling created for its own use are rejected with product_is_managed: a recurring contribution page bills through a product carrying its cadence and VAT rate, shared by every page with the same combination and by every subscription on them, so editing or archiving one would change what existing supporters are billed and what their receipts say.","tags":["Products"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"description":{"type":"string"},"image_url":{"type":"string"},"currency":{"minLength":3,"maxLength":3,"type":"string"},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}},"amount":{"minimum":1,"maximum":2147483647,"description":"New price, VAT-inclusive, in the currency's minor unit. On a one-time product it applies to checkouts created from now on; checkout sessions already created keep the price they were created with. On a subscription product it is refused with product_amount_locked (409) while any trialing, active or past-due subscription bills the product, because renewals bill the product's current amount.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"description":"New price, VAT-inclusive, in the currency's minor unit. On a one-time product it applies to checkouts created from now on; checkout sessions already created keep the price they were created with. On a subscription product it is refused with product_amount_locked (409) while any trialing, active or past-due subscription bills the product, because renewals bill the product's current amount.","type":"integer"}]},"vat_rate":{"description":"New VAT rate: 0, 11 or 24. Same rules as amount.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"New VAT rate: 0, 11 or 24. Same rules as amount.","type":"integer"}]},"barcode":{"nullable":true,"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}]},"favorite":{"type":"boolean"},"sort_order":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"tile_color":{"nullable":true,"anyOf":[{"pattern":"^#[0-9A-Fa-f]{6}$","type":"string"},{"type":"null"}]},"options":{"nullable":true,"anyOf":[{"maxItems":3,"description":"Options a buyer picks from, at most 3. One-time products only. Replaces the list; null or [] clears it. Variants whose values no longer fit are archived.","type":"array","items":{"type":"object","required":["name","values"],"properties":{"name":{"minLength":1,"maxLength":50,"description":"Option name as the buyer reads it, e.g. \"Stærð\"","type":"string"},"values":{"minItems":1,"maxItems":50,"description":"Values in display order","type":"array","items":{"minLength":1,"maxLength":50,"type":"string"}}}}},{"type":"null"}]}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"description":{"type":"string"},"image_url":{"type":"string"},"currency":{"minLength":3,"maxLength":3,"type":"string"},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}},"amount":{"minimum":1,"maximum":2147483647,"description":"New price, VAT-inclusive, in the currency's minor unit. On a one-time product it applies to checkouts created from now on; checkout sessions already created keep the price they were created with. On a subscription product it is refused with product_amount_locked (409) while any trialing, active or past-due subscription bills the product, because renewals bill the product's current amount.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"description":"New price, VAT-inclusive, in the currency's minor unit. On a one-time product it applies to checkouts created from now on; checkout sessions already created keep the price they were created with. On a subscription product it is refused with product_amount_locked (409) while any trialing, active or past-due subscription bills the product, because renewals bill the product's current amount.","type":"integer"}]},"vat_rate":{"description":"New VAT rate: 0, 11 or 24. Same rules as amount.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"New VAT rate: 0, 11 or 24. Same rules as amount.","type":"integer"}]},"barcode":{"nullable":true,"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}]},"favorite":{"type":"boolean"},"sort_order":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"tile_color":{"nullable":true,"anyOf":[{"pattern":"^#[0-9A-Fa-f]{6}$","type":"string"},{"type":"null"}]},"options":{"nullable":true,"anyOf":[{"maxItems":3,"description":"Options a buyer picks from, at most 3. One-time products only. Replaces the list; null or [] clears it. Variants whose values no longer fit are archived.","type":"array","items":{"type":"object","required":["name","values"],"properties":{"name":{"minLength":1,"maxLength":50,"description":"Option name as the buyer reads it, e.g. \"Stærð\"","type":"string"},"values":{"minItems":1,"maxItems":50,"description":"Values in display order","type":"array","items":{"minLength":1,"maxLength":50,"type":"string"}}}}},{"type":"null"}]}}}},"text/plain":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"description":{"type":"string"},"image_url":{"type":"string"},"currency":{"minLength":3,"maxLength":3,"type":"string"},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}},"amount":{"minimum":1,"maximum":2147483647,"description":"New price, VAT-inclusive, in the currency's minor unit. On a one-time product it applies to checkouts created from now on; checkout sessions already created keep the price they were created with. On a subscription product it is refused with product_amount_locked (409) while any trialing, active or past-due subscription bills the product, because renewals bill the product's current amount.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"description":"New price, VAT-inclusive, in the currency's minor unit. On a one-time product it applies to checkouts created from now on; checkout sessions already created keep the price they were created with. On a subscription product it is refused with product_amount_locked (409) while any trialing, active or past-due subscription bills the product, because renewals bill the product's current amount.","type":"integer"}]},"vat_rate":{"description":"New VAT rate: 0, 11 or 24. Same rules as amount.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"New VAT rate: 0, 11 or 24. Same rules as amount.","type":"integer"}]},"barcode":{"nullable":true,"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}]},"favorite":{"type":"boolean"},"sort_order":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"tile_color":{"nullable":true,"anyOf":[{"pattern":"^#[0-9A-Fa-f]{6}$","type":"string"},{"type":"null"}]},"options":{"nullable":true,"anyOf":[{"maxItems":3,"description":"Options a buyer picks from, at most 3. One-time products only. Replaces the list; null or [] clears it. Variants whose values no longer fit are archived.","type":"array","items":{"type":"object","required":["name","values"],"properties":{"name":{"minLength":1,"maxLength":50,"description":"Option name as the buyer reads it, e.g. \"Stærð\"","type":"string"},"values":{"minItems":1,"maxItems":50,"description":"Values in display order","type":"array","items":{"minLength":1,"maxLength":50,"type":"string"}}}}},{"type":"null"}]}}}}}}}},"/v1/products/{id}/archive":{"post":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"product","type":"string"},"livemode":{"type":"boolean"},"code":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_rate":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"image_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"anyOf":[{"const":"one_time","type":"string"},{"const":"subscription","type":"string"}]},"billing_interval":{"nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"trial_days":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"barcode":{"nullable":true,"anyOf":[{"description":"EAN/UPC/QR value scanned at the counter; unique per merchant","type":"string"},{"type":"null"}]},"favorite":{"description":"Pinned to the top of the app's product library","type":"boolean"},"sort_order":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"tile_color":{"nullable":true,"anyOf":[{"description":"Hex colour for the POS tile; derived from the name when null","type":"string"},{"type":"null"}]},"options":{"description":"Options a buyer picks from (e.g. size). Empty for a product without variants","type":"array","items":{"description":"An option a buyer picks from","type":"object","required":["name","values"],"properties":{"name":{"description":"Option name as the buyer reads it, e.g. \"Stærð\"","type":"string"},"values":{"description":"Values in display order, e.g. [\"S\", \"M\", \"L\"]","type":"array","items":{"type":"string"}}}}},"variants":{"description":"Active variants in display order. Empty for a product without variants; when not empty, a checkout line for this product must name one (variant_id)","type":"array","items":{"description":"One sellable combination of a product's options. Stock per variant comes from the Lager app, under the product's stock.variants","type":"object","required":["id","object","product_id","option_values","label","amount","own_amount","sku","position","status","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"product.variant","type":"string"},"product_id":{"type":"string"},"option_values":{"description":"The value chosen for each option, e.g. {\"Stærð\": \"M\"}","additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"label":{"description":"The choice as one line, e.g. \"Stærð: M\"","type":"string"},"amount":{"description":"Unit price: the variant's own, or the product's when it has none","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Unit price: the variant's own, or the product's when it has none","type":"integer"}]},"own_amount":{"nullable":true,"anyOf":[{"description":"The variant's own price; null means it sells at the product's price","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The variant's own price; null means it sells at the product's price","type":"integer"}]},{"type":"null"}]},"sku":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"description":"Display order","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Display order","type":"integer"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}},"stock":{"description":"Stock counts, present only when the Lager (stock) app is enabled for the merchant","type":"object","required":["quantity","low_stock_threshold","low"],"properties":{"quantity":{"description":"On the shelf now. May be negative: the shop sold something the count said it did not have","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"On the shelf now. May be negative: the shop sold something the count said it did not have","type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"description":"At or below this the product reads as low; null means the merchant set no threshold","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"At or below this the product reads as low; null means the merchant set no threshold","type":"integer"}]},{"type":"null"}]},"low":{"description":"Threshold is set and quantity is at or below it","type":"boolean"},"variants":{"description":"Counted variants keyed by variant id. A variant missing here is not counted, so it is never sold out; one at 0 or below is sold out and checkout refuses it","type":"object","patternProperties":{"^(.*)$":{"type":"object","required":["quantity","low_stock_threshold","low"],"properties":{"quantity":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"low":{"type":"boolean"}}}}}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","code","name","description","amount","currency","vat_rate","image_url","type","billing_interval","billing_interval_count","trial_days","status","metadata","barcode","favorite","sort_order","tile_color","options","variants","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"product","type":"string"},"livemode":{"type":"boolean"},"code":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_rate":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"image_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"anyOf":[{"const":"one_time","type":"string"},{"const":"subscription","type":"string"}]},"billing_interval":{"nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"trial_days":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"barcode":{"nullable":true,"anyOf":[{"description":"EAN/UPC/QR value scanned at the counter; unique per merchant","type":"string"},{"type":"null"}]},"favorite":{"description":"Pinned to the top of the app's product library","type":"boolean"},"sort_order":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"tile_color":{"nullable":true,"anyOf":[{"description":"Hex colour for the POS tile; derived from the name when null","type":"string"},{"type":"null"}]},"options":{"description":"Options a buyer picks from (e.g. size). Empty for a product without variants","type":"array","items":{"description":"An option a buyer picks from","type":"object","required":["name","values"],"properties":{"name":{"description":"Option name as the buyer reads it, e.g. \"Stærð\"","type":"string"},"values":{"description":"Values in display order, e.g. [\"S\", \"M\", \"L\"]","type":"array","items":{"type":"string"}}}}},"variants":{"description":"Active variants in display order. Empty for a product without variants; when not empty, a checkout line for this product must name one (variant_id)","type":"array","items":{"description":"One sellable combination of a product's options. Stock per variant comes from the Lager app, under the product's stock.variants","type":"object","required":["id","object","product_id","option_values","label","amount","own_amount","sku","position","status","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"product.variant","type":"string"},"product_id":{"type":"string"},"option_values":{"description":"The value chosen for each option, e.g. {\"Stærð\": \"M\"}","additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"label":{"description":"The choice as one line, e.g. \"Stærð: M\"","type":"string"},"amount":{"description":"Unit price: the variant's own, or the product's when it has none","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Unit price: the variant's own, or the product's when it has none","type":"integer"}]},"own_amount":{"nullable":true,"anyOf":[{"description":"The variant's own price; null means it sells at the product's price","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The variant's own price; null means it sells at the product's price","type":"integer"}]},{"type":"null"}]},"sku":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"description":"Display order","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Display order","type":"integer"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}},"stock":{"description":"Stock counts, present only when the Lager (stock) app is enabled for the merchant","type":"object","required":["quantity","low_stock_threshold","low"],"properties":{"quantity":{"description":"On the shelf now. May be negative: the shop sold something the count said it did not have","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"On the shelf now. May be negative: the shop sold something the count said it did not have","type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"description":"At or below this the product reads as low; null means the merchant set no threshold","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"At or below this the product reads as low; null means the merchant set no threshold","type":"integer"}]},{"type":"null"}]},"low":{"description":"Threshold is set and quantity is at or below it","type":"boolean"},"variants":{"description":"Counted variants keyed by variant id. A variant missing here is not counted, so it is never sold out; one at 0 or below is sold out and checkout refuses it","type":"object","patternProperties":{"^(.*)$":{"type":"object","required":["quantity","low_stock_threshold","low"],"properties":{"quantity":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"low":{"type":"boolean"}}}}}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","code","name","description","amount","currency","vat_rate","image_url","type","billing_interval","billing_interval_count","trial_days","status","metadata","barcode","favorite","sort_order","tile_color","options","variants","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"product","type":"string"},"livemode":{"type":"boolean"},"code":{"type":"string"},"name":{"type":"string"},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_rate":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"image_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"anyOf":[{"const":"one_time","type":"string"},{"const":"subscription","type":"string"}]},"billing_interval":{"nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"trial_days":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"barcode":{"nullable":true,"anyOf":[{"description":"EAN/UPC/QR value scanned at the counter; unique per merchant","type":"string"},{"type":"null"}]},"favorite":{"description":"Pinned to the top of the app's product library","type":"boolean"},"sort_order":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"tile_color":{"nullable":true,"anyOf":[{"description":"Hex colour for the POS tile; derived from the name when null","type":"string"},{"type":"null"}]},"options":{"description":"Options a buyer picks from (e.g. size). Empty for a product without variants","type":"array","items":{"description":"An option a buyer picks from","type":"object","required":["name","values"],"properties":{"name":{"description":"Option name as the buyer reads it, e.g. \"Stærð\"","type":"string"},"values":{"description":"Values in display order, e.g. [\"S\", \"M\", \"L\"]","type":"array","items":{"type":"string"}}}}},"variants":{"description":"Active variants in display order. Empty for a product without variants; when not empty, a checkout line for this product must name one (variant_id)","type":"array","items":{"description":"One sellable combination of a product's options. Stock per variant comes from the Lager app, under the product's stock.variants","type":"object","required":["id","object","product_id","option_values","label","amount","own_amount","sku","position","status","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"product.variant","type":"string"},"product_id":{"type":"string"},"option_values":{"description":"The value chosen for each option, e.g. {\"Stærð\": \"M\"}","additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"label":{"description":"The choice as one line, e.g. \"Stærð: M\"","type":"string"},"amount":{"description":"Unit price: the variant's own, or the product's when it has none","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Unit price: the variant's own, or the product's when it has none","type":"integer"}]},"own_amount":{"nullable":true,"anyOf":[{"description":"The variant's own price; null means it sells at the product's price","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The variant's own price; null means it sells at the product's price","type":"integer"}]},{"type":"null"}]},"sku":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"description":"Display order","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Display order","type":"integer"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}},"stock":{"description":"Stock counts, present only when the Lager (stock) app is enabled for the merchant","type":"object","required":["quantity","low_stock_threshold","low"],"properties":{"quantity":{"description":"On the shelf now. May be negative: the shop sold something the count said it did not have","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"On the shelf now. May be negative: the shop sold something the count said it did not have","type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"description":"At or below this the product reads as low; null means the merchant set no threshold","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"At or below this the product reads as low; null means the merchant set no threshold","type":"integer"}]},{"type":"null"}]},"low":{"description":"Threshold is set and quantity is at or below it","type":"boolean"},"variants":{"description":"Counted variants keyed by variant id. A variant missing here is not counted, so it is never sold out; one at 0 or below is sold out and checkout refuses it","type":"object","patternProperties":{"^(.*)$":{"type":"object","required":["quantity","low_stock_threshold","low"],"properties":{"quantity":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"low":{"type":"boolean"}}}}}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","code","name","description","amount","currency","vat_rate","image_url","type","billing_interval","billing_interval_count","trial_days","status","metadata","barcode","favorite","sort_order","tile_color","options","variants","created_at","updated_at"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1ProductsByIdArchive","description":"Archive a product. Products Kling created for its own use are rejected with product_is_managed: a recurring contribution page bills through a product carrying its cadence and VAT rate, shared by every page with the same combination and by every subscription on them, so editing or archiving one would change what existing supporters are billed and what their receipts say.","tags":["Products"],"security":[{"bearerAuth":[]}]}},"/v1/products/{id}/variants":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"description":"Which variants; default active","schema":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"},{"const":"all","type":"string"}]},"in":"query","name":"status","required":false}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"description":"One sellable combination of a product's options. Stock per variant comes from the Lager app, under the product's stock.variants","type":"object","required":["id","object","product_id","option_values","label","amount","own_amount","sku","position","status","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"product.variant","type":"string"},"product_id":{"type":"string"},"option_values":{"description":"The value chosen for each option, e.g. {\"Stærð\": \"M\"}","additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"label":{"description":"The choice as one line, e.g. \"Stærð: M\"","type":"string"},"amount":{"description":"Unit price: the variant's own, or the product's when it has none","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Unit price: the variant's own, or the product's when it has none","type":"integer"}]},"own_amount":{"nullable":true,"anyOf":[{"description":"The variant's own price; null means it sells at the product's price","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The variant's own price; null means it sells at the product's price","type":"integer"}]},{"type":"null"}]},"sku":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"description":"Display order","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Display order","type":"integer"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"description":"One sellable combination of a product's options. Stock per variant comes from the Lager app, under the product's stock.variants","type":"object","required":["id","object","product_id","option_values","label","amount","own_amount","sku","position","status","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"product.variant","type":"string"},"product_id":{"type":"string"},"option_values":{"description":"The value chosen for each option, e.g. {\"Stærð\": \"M\"}","additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"label":{"description":"The choice as one line, e.g. \"Stærð: M\"","type":"string"},"amount":{"description":"Unit price: the variant's own, or the product's when it has none","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Unit price: the variant's own, or the product's when it has none","type":"integer"}]},"own_amount":{"nullable":true,"anyOf":[{"description":"The variant's own price; null means it sells at the product's price","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The variant's own price; null means it sells at the product's price","type":"integer"}]},{"type":"null"}]},"sku":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"description":"Display order","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Display order","type":"integer"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}},"text/plain":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"description":"One sellable combination of a product's options. Stock per variant comes from the Lager app, under the product's stock.variants","type":"object","required":["id","object","product_id","option_values","label","amount","own_amount","sku","position","status","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"product.variant","type":"string"},"product_id":{"type":"string"},"option_values":{"description":"The value chosen for each option, e.g. {\"Stærð\": \"M\"}","additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"label":{"description":"The choice as one line, e.g. \"Stærð: M\"","type":"string"},"amount":{"description":"Unit price: the variant's own, or the product's when it has none","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Unit price: the variant's own, or the product's when it has none","type":"integer"}]},"own_amount":{"nullable":true,"anyOf":[{"description":"The variant's own price; null means it sells at the product's price","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The variant's own price; null means it sells at the product's price","type":"integer"}]},{"type":"null"}]},"sku":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"description":"Display order","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Display order","type":"integer"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"getV1ProductsByIdVariants","summary":"List a product's variants","description":"The product's variants in display order. Active by default; archived variants are kept so old checkout lines and payments still resolve.","tags":["Products"],"security":[{"bearerAuth":[]}]},"post":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"One sellable combination of a product's options. Stock per variant comes from the Lager app, under the product's stock.variants","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"product.variant","type":"string"},"product_id":{"type":"string"},"option_values":{"description":"The value chosen for each option, e.g. {\"Stærð\": \"M\"}","additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"label":{"description":"The choice as one line, e.g. \"Stærð: M\"","type":"string"},"amount":{"description":"Unit price: the variant's own, or the product's when it has none","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Unit price: the variant's own, or the product's when it has none","type":"integer"}]},"own_amount":{"nullable":true,"anyOf":[{"description":"The variant's own price; null means it sells at the product's price","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The variant's own price; null means it sells at the product's price","type":"integer"}]},{"type":"null"}]},"sku":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"description":"Display order","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Display order","type":"integer"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","product_id","option_values","label","amount","own_amount","sku","position","status","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"product.variant","type":"string"},"product_id":{"type":"string"},"option_values":{"description":"The value chosen for each option, e.g. {\"Stærð\": \"M\"}","additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"label":{"description":"The choice as one line, e.g. \"Stærð: M\"","type":"string"},"amount":{"description":"Unit price: the variant's own, or the product's when it has none","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Unit price: the variant's own, or the product's when it has none","type":"integer"}]},"own_amount":{"nullable":true,"anyOf":[{"description":"The variant's own price; null means it sells at the product's price","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The variant's own price; null means it sells at the product's price","type":"integer"}]},{"type":"null"}]},"sku":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"description":"Display order","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Display order","type":"integer"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","product_id","option_values","label","amount","own_amount","sku","position","status","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"product.variant","type":"string"},"product_id":{"type":"string"},"option_values":{"description":"The value chosen for each option, e.g. {\"Stærð\": \"M\"}","additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"label":{"description":"The choice as one line, e.g. \"Stærð: M\"","type":"string"},"amount":{"description":"Unit price: the variant's own, or the product's when it has none","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Unit price: the variant's own, or the product's when it has none","type":"integer"}]},"own_amount":{"nullable":true,"anyOf":[{"description":"The variant's own price; null means it sells at the product's price","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The variant's own price; null means it sells at the product's price","type":"integer"}]},{"type":"null"}]},"sku":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"description":"Display order","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Display order","type":"integer"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","product_id","option_values","label","amount","own_amount","sku","position","status","created_at","updated_at"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"409":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1ProductsByIdVariants","summary":"Create a variant","description":"Add a sellable combination of the product's options (set the options first with PATCH /v1/products/{id}). 409 variant_exists when an active variant already has these values, 409 variant_sku_taken for a used sku, 400 variants_not_supported_for_subscriptions on a subscription product. Stock is counted by the Lager app, not here.","tags":["Products"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["option_values"],"properties":{"option_values":{"description":"One value per product option, e.g. {\"Stærð\": \"M\"}. Every option needs a value from its list.","additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"amount":{"nullable":true,"anyOf":[{"minimum":1,"maximum":2147483647,"description":"Own unit price, VAT-inclusive. Omit or null to sell at the product's price.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"description":"Own unit price, VAT-inclusive. Omit or null to sell at the product's price.","type":"integer"}]},{"type":"null"}]},"sku":{"nullable":true,"anyOf":[{"minLength":1,"maxLength":64,"description":"Unique per merchant while set","type":"string"},{"type":"null"}]},"position":{"minimum":0,"description":"Display order; defaults to after the existing variants","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"Display order; defaults to after the existing variants","type":"integer"}]}}}},"multipart/form-data":{"schema":{"type":"object","required":["option_values"],"properties":{"option_values":{"description":"One value per product option, e.g. {\"Stærð\": \"M\"}. Every option needs a value from its list.","additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"amount":{"nullable":true,"anyOf":[{"minimum":1,"maximum":2147483647,"description":"Own unit price, VAT-inclusive. Omit or null to sell at the product's price.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"description":"Own unit price, VAT-inclusive. Omit or null to sell at the product's price.","type":"integer"}]},{"type":"null"}]},"sku":{"nullable":true,"anyOf":[{"minLength":1,"maxLength":64,"description":"Unique per merchant while set","type":"string"},{"type":"null"}]},"position":{"minimum":0,"description":"Display order; defaults to after the existing variants","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"Display order; defaults to after the existing variants","type":"integer"}]}}}},"text/plain":{"schema":{"type":"object","required":["option_values"],"properties":{"option_values":{"description":"One value per product option, e.g. {\"Stærð\": \"M\"}. Every option needs a value from its list.","additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"amount":{"nullable":true,"anyOf":[{"minimum":1,"maximum":2147483647,"description":"Own unit price, VAT-inclusive. Omit or null to sell at the product's price.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"description":"Own unit price, VAT-inclusive. Omit or null to sell at the product's price.","type":"integer"}]},{"type":"null"}]},"sku":{"nullable":true,"anyOf":[{"minLength":1,"maxLength":64,"description":"Unique per merchant while set","type":"string"},{"type":"null"}]},"position":{"minimum":0,"description":"Display order; defaults to after the existing variants","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"Display order; defaults to after the existing variants","type":"integer"}]}}}}}}}},"/v1/products/{id}/variants/{variant_id}":{"patch":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"variant_id","required":true}],"responses":{"200":{"description":"One sellable combination of a product's options. Stock per variant comes from the Lager app, under the product's stock.variants","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"product.variant","type":"string"},"product_id":{"type":"string"},"option_values":{"description":"The value chosen for each option, e.g. {\"Stærð\": \"M\"}","additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"label":{"description":"The choice as one line, e.g. \"Stærð: M\"","type":"string"},"amount":{"description":"Unit price: the variant's own, or the product's when it has none","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Unit price: the variant's own, or the product's when it has none","type":"integer"}]},"own_amount":{"nullable":true,"anyOf":[{"description":"The variant's own price; null means it sells at the product's price","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The variant's own price; null means it sells at the product's price","type":"integer"}]},{"type":"null"}]},"sku":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"description":"Display order","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Display order","type":"integer"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","product_id","option_values","label","amount","own_amount","sku","position","status","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"product.variant","type":"string"},"product_id":{"type":"string"},"option_values":{"description":"The value chosen for each option, e.g. {\"Stærð\": \"M\"}","additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"label":{"description":"The choice as one line, e.g. \"Stærð: M\"","type":"string"},"amount":{"description":"Unit price: the variant's own, or the product's when it has none","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Unit price: the variant's own, or the product's when it has none","type":"integer"}]},"own_amount":{"nullable":true,"anyOf":[{"description":"The variant's own price; null means it sells at the product's price","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The variant's own price; null means it sells at the product's price","type":"integer"}]},{"type":"null"}]},"sku":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"description":"Display order","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Display order","type":"integer"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","product_id","option_values","label","amount","own_amount","sku","position","status","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"product.variant","type":"string"},"product_id":{"type":"string"},"option_values":{"description":"The value chosen for each option, e.g. {\"Stærð\": \"M\"}","additionalProperties":{"type":"string"},"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"label":{"description":"The choice as one line, e.g. \"Stærð: M\"","type":"string"},"amount":{"description":"Unit price: the variant's own, or the product's when it has none","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Unit price: the variant's own, or the product's when it has none","type":"integer"}]},"own_amount":{"nullable":true,"anyOf":[{"description":"The variant's own price; null means it sells at the product's price","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The variant's own price; null means it sells at the product's price","type":"integer"}]},{"type":"null"}]},"sku":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"description":"Display order","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Display order","type":"integer"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","product_id","option_values","label","amount","own_amount","sku","position","status","created_at","updated_at"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"409":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"patchV1ProductsByIdVariantsByVariant_id","summary":"Update a variant","description":"Change a variant's price, sku, order or status. Only the fields sent change. Restoring an archived variant whose values are no longer among the product's options is refused with variant_options_changed.","tags":["Products"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"nullable":true,"anyOf":[{"minimum":1,"maximum":2147483647,"description":"Own unit price; null sells at the product's price","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"description":"Own unit price; null sells at the product's price","type":"integer"}]},{"type":"null"}]},"sku":{"nullable":true,"anyOf":[{"minLength":1,"maxLength":64,"type":"string"},{"type":"null"}]},"position":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]},"status":{"description":"archived stops selling it; lines already sold keep pointing at it","anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"amount":{"nullable":true,"anyOf":[{"minimum":1,"maximum":2147483647,"description":"Own unit price; null sells at the product's price","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"description":"Own unit price; null sells at the product's price","type":"integer"}]},{"type":"null"}]},"sku":{"nullable":true,"anyOf":[{"minLength":1,"maxLength":64,"type":"string"},{"type":"null"}]},"position":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]},"status":{"description":"archived stops selling it; lines already sold keep pointing at it","anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]}}}},"text/plain":{"schema":{"type":"object","properties":{"amount":{"nullable":true,"anyOf":[{"minimum":1,"maximum":2147483647,"description":"Own unit price; null sells at the product's price","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"description":"Own unit price; null sells at the product's price","type":"integer"}]},{"type":"null"}]},"sku":{"nullable":true,"anyOf":[{"minLength":1,"maxLength":64,"type":"string"},{"type":"null"}]},"position":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]},"status":{"description":"archived stops selling it; lines already sold keep pointing at it","anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]}}}}}}}},"/v1/subscriptions/":{"post":{"parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"subscription","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"product":{"type":"string"},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"const":"trialing","type":"string"},{"const":"active","type":"string"},{"const":"past_due","type":"string"},{"const":"canceled","type":"string"}]},"collection_method":{"anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"current_period_start":{"type":"number"},"current_period_end":{"type":"number"},"trial_start":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"trial_end":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"ended_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}},"required":["id","object","livemode","customer","product","payment_method","status","collection_method","current_period_start","current_period_end","trial_start","trial_end","cancel_at_period_end","canceled_at","ended_at","metadata","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"subscription","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"product":{"type":"string"},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"const":"trialing","type":"string"},{"const":"active","type":"string"},{"const":"past_due","type":"string"},{"const":"canceled","type":"string"}]},"collection_method":{"anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"current_period_start":{"type":"number"},"current_period_end":{"type":"number"},"trial_start":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"trial_end":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"ended_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}},"required":["id","object","livemode","customer","product","payment_method","status","collection_method","current_period_start","current_period_end","trial_start","trial_end","cancel_at_period_end","canceled_at","ended_at","metadata","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"subscription","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"product":{"type":"string"},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"const":"trialing","type":"string"},{"const":"active","type":"string"},{"const":"past_due","type":"string"},{"const":"canceled","type":"string"}]},"collection_method":{"anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"current_period_start":{"type":"number"},"current_period_end":{"type":"number"},"trial_start":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"trial_end":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"ended_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}},"required":["id","object","livemode","customer","product","payment_method","status","collection_method","current_period_start","current_period_end","trial_start","trial_end","cancel_at_period_end","canceled_at","ended_at","metadata","created_at","updated_at"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1Subscriptions","description":"Create a new subscription","tags":["Subscriptions"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["customer_id","product_id","collection_method"],"properties":{"customer_id":{"format":"uuid","type":"string"},"product_id":{"format":"uuid","type":"string"},"payment_method_id":{"format":"uuid","type":"string"},"collection_method":{"default":"card","anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["customer_id","product_id","collection_method"],"properties":{"customer_id":{"format":"uuid","type":"string"},"product_id":{"format":"uuid","type":"string"},"payment_method_id":{"format":"uuid","type":"string"},"collection_method":{"default":"card","anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}}}}},"text/plain":{"schema":{"type":"object","required":["customer_id","product_id","collection_method"],"properties":{"customer_id":{"format":"uuid","type":"string"},"product_id":{"format":"uuid","type":"string"},"payment_method_id":{"format":"uuid","type":"string"},"collection_method":{"default":"card","anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}}}}}}}},"get":{"parameters":[{"schema":{"minimum":1,"maximum":100,"default":10,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100,"default":10,"type":"integer"}]},"in":"query","name":"limit","required":true},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"customer","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"product","required":false},{"schema":{"anyOf":[{"const":"trialing","type":"string"},{"const":"active","type":"string"},{"const":"past_due","type":"string"},{"const":"canceled","type":"string"}]},"in":"query","name":"status","required":false},{"schema":{"anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"in":"query","name":"collection_method","required":false},{"description":"Inclusive (YYYY-MM-DD)","schema":{"type":"string","format":"date"},"in":"query","name":"created_after","required":false},{"description":"Inclusive (YYYY-MM-DD)","schema":{"type":"string","format":"date"},"in":"query","name":"created_before","required":false},{"description":"Inclusive (YYYY-MM-DD)","schema":{"type":"string","format":"date"},"in":"query","name":"canceled_after","required":false},{"description":"Inclusive (YYYY-MM-DD)","schema":{"type":"string","format":"date"},"in":"query","name":"canceled_before","required":false},{"description":"Subscription id to page after (see has_more)","schema":{"type":"string","format":"uuid"},"in":"query","name":"starting_after","required":false}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","livemode","customer","product","payment_method","status","collection_method","current_period_start","current_period_end","trial_start","trial_end","cancel_at_period_end","canceled_at","ended_at","metadata","created_at","updated_at","customer_details","product_details"],"properties":{"id":{"type":"string"},"object":{"const":"subscription","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"product":{"type":"string"},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"const":"trialing","type":"string"},{"const":"active","type":"string"},{"const":"past_due","type":"string"},{"const":"canceled","type":"string"}]},"collection_method":{"anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"current_period_start":{"type":"number"},"current_period_end":{"type":"number"},"trial_start":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"trial_end":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"ended_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"},"customer_details":{"type":"object","required":["id","email","name"],"properties":{"id":{"type":"string"},"email":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}}},"product_details":{"type":"object","required":["id","code","name","amount","currency","type","billing_interval","billing_interval_count"],"properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"type":{"anyOf":[{"const":"one_time","type":"string"},{"const":"subscription","type":"string"}]},"billing_interval":{"nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]}}}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","livemode","customer","product","payment_method","status","collection_method","current_period_start","current_period_end","trial_start","trial_end","cancel_at_period_end","canceled_at","ended_at","metadata","created_at","updated_at","customer_details","product_details"],"properties":{"id":{"type":"string"},"object":{"const":"subscription","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"product":{"type":"string"},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"const":"trialing","type":"string"},{"const":"active","type":"string"},{"const":"past_due","type":"string"},{"const":"canceled","type":"string"}]},"collection_method":{"anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"current_period_start":{"type":"number"},"current_period_end":{"type":"number"},"trial_start":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"trial_end":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"ended_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"},"customer_details":{"type":"object","required":["id","email","name"],"properties":{"id":{"type":"string"},"email":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}}},"product_details":{"type":"object","required":["id","code","name","amount","currency","type","billing_interval","billing_interval_count"],"properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"type":{"anyOf":[{"const":"one_time","type":"string"},{"const":"subscription","type":"string"}]},"billing_interval":{"nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]}}}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}},"text/plain":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","livemode","customer","product","payment_method","status","collection_method","current_period_start","current_period_end","trial_start","trial_end","cancel_at_period_end","canceled_at","ended_at","metadata","created_at","updated_at","customer_details","product_details"],"properties":{"id":{"type":"string"},"object":{"const":"subscription","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"product":{"type":"string"},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"const":"trialing","type":"string"},{"const":"active","type":"string"},{"const":"past_due","type":"string"},{"const":"canceled","type":"string"}]},"collection_method":{"anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"current_period_start":{"type":"number"},"current_period_end":{"type":"number"},"trial_start":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"trial_end":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"ended_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"},"customer_details":{"type":"object","required":["id","email","name"],"properties":{"id":{"type":"string"},"email":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}}},"product_details":{"type":"object","required":["id","code","name","amount","currency","type","billing_interval","billing_interval_count"],"properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"type":{"anyOf":[{"const":"one_time","type":"string"},{"const":"subscription","type":"string"}]},"billing_interval":{"nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]}}}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"getV1Subscriptions","description":"List all subscriptions","tags":["Subscriptions"],"security":[{"bearerAuth":[]}]}},"/v1/subscriptions/{id}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"subscription","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"product":{"type":"string"},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"const":"trialing","type":"string"},{"const":"active","type":"string"},{"const":"past_due","type":"string"},{"const":"canceled","type":"string"}]},"collection_method":{"anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"current_period_start":{"type":"number"},"current_period_end":{"type":"number"},"trial_start":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"trial_end":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"ended_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"},"customer_details":{"type":"object","required":["id","email","name","environment"],"properties":{"id":{"type":"string"},"email":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"environment":{"type":"string"}}},"product_details":{"type":"object","required":["id","code","name","amount","currency","type","billing_interval","billing_interval_count"],"properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"type":{"anyOf":[{"const":"one_time","type":"string"},{"const":"subscription","type":"string"}]},"billing_interval":{"nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]}}},"payments":{"type":"array","items":{"type":"object","required":["id","object","amount","currency","vat_amount","status","billing_reason","period_start","period_end","created_at"],"properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"status":{"type":"string"},"billing_reason":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"period_start":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"period_end":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"created_at":{"type":"number"}}}}},"required":["id","object","livemode","customer","product","payment_method","status","collection_method","current_period_start","current_period_end","trial_start","trial_end","cancel_at_period_end","canceled_at","ended_at","metadata","created_at","updated_at","customer_details","product_details","payments"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"subscription","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"product":{"type":"string"},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"const":"trialing","type":"string"},{"const":"active","type":"string"},{"const":"past_due","type":"string"},{"const":"canceled","type":"string"}]},"collection_method":{"anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"current_period_start":{"type":"number"},"current_period_end":{"type":"number"},"trial_start":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"trial_end":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"ended_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"},"customer_details":{"type":"object","required":["id","email","name","environment"],"properties":{"id":{"type":"string"},"email":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"environment":{"type":"string"}}},"product_details":{"type":"object","required":["id","code","name","amount","currency","type","billing_interval","billing_interval_count"],"properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"type":{"anyOf":[{"const":"one_time","type":"string"},{"const":"subscription","type":"string"}]},"billing_interval":{"nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]}}},"payments":{"type":"array","items":{"type":"object","required":["id","object","amount","currency","vat_amount","status","billing_reason","period_start","period_end","created_at"],"properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"status":{"type":"string"},"billing_reason":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"period_start":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"period_end":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"created_at":{"type":"number"}}}}},"required":["id","object","livemode","customer","product","payment_method","status","collection_method","current_period_start","current_period_end","trial_start","trial_end","cancel_at_period_end","canceled_at","ended_at","metadata","created_at","updated_at","customer_details","product_details","payments"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"subscription","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"product":{"type":"string"},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"const":"trialing","type":"string"},{"const":"active","type":"string"},{"const":"past_due","type":"string"},{"const":"canceled","type":"string"}]},"collection_method":{"anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"current_period_start":{"type":"number"},"current_period_end":{"type":"number"},"trial_start":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"trial_end":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"ended_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"},"customer_details":{"type":"object","required":["id","email","name","environment"],"properties":{"id":{"type":"string"},"email":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"environment":{"type":"string"}}},"product_details":{"type":"object","required":["id","code","name","amount","currency","type","billing_interval","billing_interval_count"],"properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"type":{"anyOf":[{"const":"one_time","type":"string"},{"const":"subscription","type":"string"}]},"billing_interval":{"nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]}}},"payments":{"type":"array","items":{"type":"object","required":["id","object","amount","currency","vat_amount","status","billing_reason","period_start","period_end","created_at"],"properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"status":{"type":"string"},"billing_reason":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"period_start":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"period_end":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"created_at":{"type":"number"}}}}},"required":["id","object","livemode","customer","product","payment_method","status","collection_method","current_period_start","current_period_end","trial_start","trial_end","cancel_at_period_end","canceled_at","ended_at","metadata","created_at","updated_at","customer_details","product_details","payments"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"getV1SubscriptionsById","description":"Retrieve a subscription by ID","tags":["Subscriptions"],"security":[{"bearerAuth":[]}]}},"/v1/subscriptions/{id}/cancel":{"post":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"subscription","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"product":{"type":"string"},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"const":"trialing","type":"string"},{"const":"active","type":"string"},{"const":"past_due","type":"string"},{"const":"canceled","type":"string"}]},"collection_method":{"anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"current_period_start":{"type":"number"},"current_period_end":{"type":"number"},"trial_start":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"trial_end":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"ended_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","customer","product","payment_method","status","collection_method","current_period_start","current_period_end","trial_start","trial_end","cancel_at_period_end","canceled_at","ended_at","metadata","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"subscription","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"product":{"type":"string"},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"const":"trialing","type":"string"},{"const":"active","type":"string"},{"const":"past_due","type":"string"},{"const":"canceled","type":"string"}]},"collection_method":{"anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"current_period_start":{"type":"number"},"current_period_end":{"type":"number"},"trial_start":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"trial_end":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"ended_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","customer","product","payment_method","status","collection_method","current_period_start","current_period_end","trial_start","trial_end","cancel_at_period_end","canceled_at","ended_at","metadata","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"subscription","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"product":{"type":"string"},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"const":"trialing","type":"string"},{"const":"active","type":"string"},{"const":"past_due","type":"string"},{"const":"canceled","type":"string"}]},"collection_method":{"anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"current_period_start":{"type":"number"},"current_period_end":{"type":"number"},"trial_start":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"trial_end":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"ended_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","customer","product","payment_method","status","collection_method","current_period_start","current_period_end","trial_start","trial_end","cancel_at_period_end","canceled_at","ended_at","metadata","created_at","updated_at"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1SubscriptionsByIdCancel","description":"Cancel a subscription","tags":["Subscriptions"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["cancel_immediately"],"properties":{"cancel_immediately":{"default":false,"type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","required":["cancel_immediately"],"properties":{"cancel_immediately":{"default":false,"type":"boolean"}}}},"text/plain":{"schema":{"type":"object","required":["cancel_immediately"],"properties":{"cancel_immediately":{"default":false,"type":"boolean"}}}}}}}},"/v1/subscriptions/{id}/reactivate":{"post":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"subscription","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"product":{"type":"string"},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"const":"trialing","type":"string"},{"const":"active","type":"string"},{"const":"past_due","type":"string"},{"const":"canceled","type":"string"}]},"collection_method":{"anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"current_period_start":{"type":"number"},"current_period_end":{"type":"number"},"trial_start":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"trial_end":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"ended_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","customer","product","payment_method","status","collection_method","current_period_start","current_period_end","trial_start","trial_end","cancel_at_period_end","canceled_at","ended_at","metadata","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"subscription","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"product":{"type":"string"},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"const":"trialing","type":"string"},{"const":"active","type":"string"},{"const":"past_due","type":"string"},{"const":"canceled","type":"string"}]},"collection_method":{"anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"current_period_start":{"type":"number"},"current_period_end":{"type":"number"},"trial_start":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"trial_end":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"ended_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","customer","product","payment_method","status","collection_method","current_period_start","current_period_end","trial_start","trial_end","cancel_at_period_end","canceled_at","ended_at","metadata","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"subscription","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"product":{"type":"string"},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"const":"trialing","type":"string"},{"const":"active","type":"string"},{"const":"past_due","type":"string"},{"const":"canceled","type":"string"}]},"collection_method":{"anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"current_period_start":{"type":"number"},"current_period_end":{"type":"number"},"trial_start":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"trial_end":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"ended_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","customer","product","payment_method","status","collection_method","current_period_start","current_period_end","trial_start","trial_end","cancel_at_period_end","canceled_at","ended_at","metadata","created_at","updated_at"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1SubscriptionsByIdReactivate","description":"Reactivate a subscription","tags":["Subscriptions"],"security":[{"bearerAuth":[]}]}},"/v1/subscriptions/{id}/discount":{"post":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"subscription","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"product":{"type":"string"},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"const":"trialing","type":"string"},{"const":"active","type":"string"},{"const":"past_due","type":"string"},{"const":"canceled","type":"string"}]},"collection_method":{"anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"current_period_start":{"type":"number"},"current_period_end":{"type":"number"},"trial_start":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"trial_end":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"ended_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"},"discount":{"type":"object","required":["coupon_id","coupon_name","type","value","duration","promotion_code","started_at"],"properties":{"coupon_id":{"type":"string"},"coupon_name":{"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"promotion_code":{"type":"string"},"started_at":{"type":"number"}}}},"required":["id","object","livemode","customer","product","payment_method","status","collection_method","current_period_start","current_period_end","trial_start","trial_end","cancel_at_period_end","canceled_at","ended_at","metadata","created_at","updated_at","discount"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"subscription","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"product":{"type":"string"},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"const":"trialing","type":"string"},{"const":"active","type":"string"},{"const":"past_due","type":"string"},{"const":"canceled","type":"string"}]},"collection_method":{"anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"current_period_start":{"type":"number"},"current_period_end":{"type":"number"},"trial_start":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"trial_end":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"ended_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"},"discount":{"type":"object","required":["coupon_id","coupon_name","type","value","duration","promotion_code","started_at"],"properties":{"coupon_id":{"type":"string"},"coupon_name":{"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"promotion_code":{"type":"string"},"started_at":{"type":"number"}}}},"required":["id","object","livemode","customer","product","payment_method","status","collection_method","current_period_start","current_period_end","trial_start","trial_end","cancel_at_period_end","canceled_at","ended_at","metadata","created_at","updated_at","discount"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"subscription","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"product":{"type":"string"},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"const":"trialing","type":"string"},{"const":"active","type":"string"},{"const":"past_due","type":"string"},{"const":"canceled","type":"string"}]},"collection_method":{"anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"current_period_start":{"type":"number"},"current_period_end":{"type":"number"},"trial_start":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"trial_end":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"ended_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"},"discount":{"type":"object","required":["coupon_id","coupon_name","type","value","duration","promotion_code","started_at"],"properties":{"coupon_id":{"type":"string"},"coupon_name":{"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"promotion_code":{"type":"string"},"started_at":{"type":"number"}}}},"required":["id","object","livemode","customer","product","payment_method","status","collection_method","current_period_start","current_period_end","trial_start","trial_end","cancel_at_period_end","canceled_at","ended_at","metadata","created_at","updated_at","discount"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1SubscriptionsByIdDiscount","description":"Apply a discount to a subscription","tags":["Subscriptions"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["promotion_code"],"properties":{"promotion_code":{"minLength":1,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["promotion_code"],"properties":{"promotion_code":{"minLength":1,"type":"string"}}}},"text/plain":{"schema":{"type":"object","required":["promotion_code"],"properties":{"promotion_code":{"minLength":1,"type":"string"}}}}}}},"delete":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"subscription","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"product":{"type":"string"},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"const":"trialing","type":"string"},{"const":"active","type":"string"},{"const":"past_due","type":"string"},{"const":"canceled","type":"string"}]},"collection_method":{"anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"current_period_start":{"type":"number"},"current_period_end":{"type":"number"},"trial_start":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"trial_end":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"ended_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","customer","product","payment_method","status","collection_method","current_period_start","current_period_end","trial_start","trial_end","cancel_at_period_end","canceled_at","ended_at","metadata","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"subscription","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"product":{"type":"string"},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"const":"trialing","type":"string"},{"const":"active","type":"string"},{"const":"past_due","type":"string"},{"const":"canceled","type":"string"}]},"collection_method":{"anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"current_period_start":{"type":"number"},"current_period_end":{"type":"number"},"trial_start":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"trial_end":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"ended_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","customer","product","payment_method","status","collection_method","current_period_start","current_period_end","trial_start","trial_end","cancel_at_period_end","canceled_at","ended_at","metadata","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"subscription","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"product":{"type":"string"},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"const":"trialing","type":"string"},{"const":"active","type":"string"},{"const":"past_due","type":"string"},{"const":"canceled","type":"string"}]},"collection_method":{"anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"current_period_start":{"type":"number"},"current_period_end":{"type":"number"},"trial_start":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"trial_end":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"ended_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","customer","product","payment_method","status","collection_method","current_period_start","current_period_end","trial_start","trial_end","cancel_at_period_end","canceled_at","ended_at","metadata","created_at","updated_at"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"deleteV1SubscriptionsByIdDiscount","description":"Remove discount from a subscription","tags":["Subscriptions"],"security":[{"bearerAuth":[]}]}},"/v1/reports/revenue":{"get":{"parameters":[{"description":"Inclusive start date (YYYY-MM-DD)","schema":{"type":"string","format":"date"},"in":"query","name":"from","required":false},{"description":"Inclusive end date (YYYY-MM-DD)","schema":{"type":"string","format":"date"},"in":"query","name":"to","required":false},{"schema":{"anyOf":[{"const":"month","type":"string"},{"const":"year","type":"string"}]},"in":"query","name":"interval","required":false}],"operationId":"getV1ReportsRevenue","tags":["Reports"],"summary":"Revenue by period","responses":{"200":{}}}},"/v1/reports/mrr":{"get":{"operationId":"getV1ReportsMrr","tags":["Reports"],"summary":"Monthly recurring revenue","responses":{"200":{}}}},"/v1/reports/subscriptions":{"get":{"operationId":"getV1ReportsSubscriptions","tags":["Reports"],"summary":"Subscription base breakdown","responses":{"200":{}}}},"/v1/reports/subscription-movement":{"get":{"parameters":[{"description":"Inclusive start date (YYYY-MM-DD)","schema":{"type":"string","format":"date"},"in":"query","name":"from","required":false},{"description":"Inclusive end date (YYYY-MM-DD)","schema":{"type":"string","format":"date"},"in":"query","name":"to","required":false},{"schema":{"anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"in":"query","name":"collection_method","required":false}],"operationId":"getV1ReportsSubscription-movement","tags":["Reports"],"summary":"Subscription base movement by month","responses":{"200":{}}}},"/v1/reports/cohort-retention":{"get":{"parameters":[{"description":"Inclusive start date (YYYY-MM-DD)","schema":{"type":"string","format":"date"},"in":"query","name":"from","required":false},{"description":"Inclusive end date (YYYY-MM-DD)","schema":{"type":"string","format":"date"},"in":"query","name":"to","required":false},{"schema":{"minimum":1,"maximum":60,"anyOf":[{"format":"numeric","default":0,"type":"string"},{"minimum":1,"maximum":60,"type":"number"}]},"in":"query","name":"months","required":false},{"schema":{"anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"in":"query","name":"collection_method","required":false}],"operationId":"getV1ReportsCohort-retention","tags":["Reports"],"summary":"Retention by signup cohort","responses":{"200":{}}}},"/v1/reports/payment-outcomes":{"get":{"parameters":[{"description":"Inclusive start date (YYYY-MM-DD)","schema":{"type":"string","format":"date"},"in":"query","name":"from","required":false},{"description":"Inclusive end date (YYYY-MM-DD)","schema":{"type":"string","format":"date"},"in":"query","name":"to","required":false}],"operationId":"getV1ReportsPayment-outcomes","tags":["Reports"],"summary":"Payment success vs failure by month","responses":{"200":{}}}},"/v1/reports/top-customers":{"get":{"parameters":[{"description":"Inclusive start date (YYYY-MM-DD)","schema":{"type":"string","format":"date"},"in":"query","name":"from","required":false},{"description":"Inclusive end date (YYYY-MM-DD)","schema":{"type":"string","format":"date"},"in":"query","name":"to","required":false},{"schema":{"minimum":1,"maximum":100,"anyOf":[{"format":"numeric","default":0,"type":"string"},{"minimum":1,"maximum":100,"type":"number"}]},"in":"query","name":"limit","required":false}],"operationId":"getV1ReportsTop-customers","tags":["Reports"],"summary":"Top customers by net volume","responses":{"200":{}}}},"/v1/terminal/sessions":{"post":{"parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"sdk_data":{"type":"string"},"installation_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["sdk_data","installation_id"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"sdk_data":{"type":"string"},"installation_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["sdk_data","installation_id"]}},"text/plain":{"schema":{"type":"object","properties":{"sdk_data":{"type":"string"},"installation_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["sdk_data","installation_id"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"const":"invalid_request_error","type":"string"},"code":{"const":"invalid_setup_token","type":"string"},"message":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"const":"invalid_request_error","type":"string"},"code":{"const":"invalid_setup_token","type":"string"},"message":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"const":"invalid_request_error","type":"string"},"code":{"const":"invalid_setup_token","type":"string"},"message":{"type":"string"}}}},"required":["error"]}}}},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"const":"api_error","type":"string"},"code":{"const":"tap_to_pay_not_enabled","type":"string"},"message":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"const":"api_error","type":"string"},"code":{"const":"tap_to_pay_not_enabled","type":"string"},"message":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"const":"api_error","type":"string"},"code":{"const":"tap_to_pay_not_enabled","type":"string"},"message":{"type":"string"}}}},"required":["error"]}}}},"502":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"const":"api_error","type":"string"},"code":{"const":"terminal_provider_unreachable","type":"string"},"message":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"const":"api_error","type":"string"},"code":{"const":"terminal_provider_unreachable","type":"string"},"message":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"const":"api_error","type":"string"},"code":{"const":"terminal_provider_unreachable","type":"string"},"message":{"type":"string"}}}},"required":["error"]}}}},"503":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"const":"api_error","type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"const":"api_error","type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"const":"api_error","type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1TerminalSessions","tags":["Terminal"],"summary":"Create a Tap to Pay SDK session","description":"Exchanges an Adyen POS Mobile SDK setup token for session data (sdk_data, installation_id) via the Straumur/Adyen Soft POS Configuration API. Returns 503 terminal_sessions_not_configured until the environment has provider credentials.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["setup_token"],"properties":{"setup_token":{"minLength":1,"maxLength":50000,"description":"Setup token produced on-device by the Adyen POS Mobile SDK","type":"string"},"platform":{"description":"Device platform, informational for now","anyOf":[{"const":"ios","type":"string"},{"const":"android","type":"string"}]},"device_model":{"maxLength":64,"description":"Forwarded to Straumur for support","type":"string"},"os_version":{"maxLength":32,"type":"string"},"app_version":{"maxLength":32,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["setup_token"],"properties":{"setup_token":{"minLength":1,"maxLength":50000,"description":"Setup token produced on-device by the Adyen POS Mobile SDK","type":"string"},"platform":{"description":"Device platform, informational for now","anyOf":[{"const":"ios","type":"string"},{"const":"android","type":"string"}]},"device_model":{"maxLength":64,"description":"Forwarded to Straumur for support","type":"string"},"os_version":{"maxLength":32,"type":"string"},"app_version":{"maxLength":32,"type":"string"}}}},"text/plain":{"schema":{"type":"object","required":["setup_token"],"properties":{"setup_token":{"minLength":1,"maxLength":50000,"description":"Setup token produced on-device by the Adyen POS Mobile SDK","type":"string"},"platform":{"description":"Device platform, informational for now","anyOf":[{"const":"ios","type":"string"},{"const":"android","type":"string"}]},"device_model":{"maxLength":64,"description":"Forwarded to Straumur for support","type":"string"},"os_version":{"maxLength":32,"type":"string"},"app_version":{"maxLength":32,"type":"string"}}}}}}}},"/v1/terminal/payments":{"post":{"parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"payment_intent_id":{"description":"Kling payment intent to settle with the result endpoint","type":"string"},"amount":{"description":"Amount in minor units (ISK is zero-decimal)","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Amount in minor units (ISK is zero-decimal)","type":"integer"}]},"currency":{"type":"string"},"sale_id":{"description":"Terminal API SaleID used in the request","type":"string"},"service_id":{"description":"Terminal API ServiceID (unique per request, max 10 chars)","type":"string"},"poi_id":{"description":"Terminal API POIID — the device's Adyen installation id","type":"string"},"nexo_request":{"description":"Complete Terminal API SaleToPOIRequest. Pass to the POS SDK's performTransaction without modification.","type":"object","patternProperties":{"^(.*)$":{}}}},"required":["payment_intent_id","amount","currency","sale_id","service_id","poi_id","nexo_request"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"payment_intent_id":{"description":"Kling payment intent to settle with the result endpoint","type":"string"},"amount":{"description":"Amount in minor units (ISK is zero-decimal)","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Amount in minor units (ISK is zero-decimal)","type":"integer"}]},"currency":{"type":"string"},"sale_id":{"description":"Terminal API SaleID used in the request","type":"string"},"service_id":{"description":"Terminal API ServiceID (unique per request, max 10 chars)","type":"string"},"poi_id":{"description":"Terminal API POIID — the device's Adyen installation id","type":"string"},"nexo_request":{"description":"Complete Terminal API SaleToPOIRequest. Pass to the POS SDK's performTransaction without modification.","type":"object","patternProperties":{"^(.*)$":{}}}},"required":["payment_intent_id","amount","currency","sale_id","service_id","poi_id","nexo_request"]}},"text/plain":{"schema":{"type":"object","properties":{"payment_intent_id":{"description":"Kling payment intent to settle with the result endpoint","type":"string"},"amount":{"description":"Amount in minor units (ISK is zero-decimal)","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Amount in minor units (ISK is zero-decimal)","type":"integer"}]},"currency":{"type":"string"},"sale_id":{"description":"Terminal API SaleID used in the request","type":"string"},"service_id":{"description":"Terminal API ServiceID (unique per request, max 10 chars)","type":"string"},"poi_id":{"description":"Terminal API POIID — the device's Adyen installation id","type":"string"},"nexo_request":{"description":"Complete Terminal API SaleToPOIRequest. Pass to the POS SDK's performTransaction without modification.","type":"object","patternProperties":{"^(.*)$":{}}}},"required":["payment_intent_id","amount","currency","sale_id","service_id","poi_id","nexo_request"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"502":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"503":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1TerminalPayments","tags":["Terminal"],"summary":"Start a Tap to Pay payment","description":"Creates a card-present payment intent and returns the Terminal API (Nexo) PaymentRequest to hand to the POS SDK. Post the SDK's Payment.Response back to /v1/terminal/payments/{id}/result.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["amount","installation_id"],"properties":{"amount":{"minimum":1,"maximum":2147483647,"description":"Amount in minor units (ISK is zero-decimal, so whole krónur)","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"description":"Amount in minor units (ISK is zero-decimal, so whole krónur)","type":"integer"}]},"currency":{"minLength":3,"maxLength":3,"description":"Three-letter ISO code. Defaults to the merchant's currency.","type":"string"},"installation_id":{"minLength":1,"maxLength":128,"description":"Adyen installation id of this device, from POST /v1/terminal/sessions. Becomes the Terminal API POIID.","type":"string"},"description":{"maxLength":500,"type":"string"},"customer":{"format":"uuid","description":"Optional customer to attach the charge to","type":"string"},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}},"items":{"minItems":1,"maxItems":200,"description":"POS line items; their total must equal amount. Written to the receipt and the sales-by-product report.","type":"array","items":{"type":"object","required":["description","quantity","unit_amount","vat_rate"],"properties":{"description":{"minLength":1,"maxLength":500,"type":"string"},"quantity":{"minimum":1,"maximum":100000,"default":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100000,"default":1,"type":"integer"}]},"unit_amount":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"vat_rate":{"description":"VAT percentage: 0, 11, or 24","anyOf":[{"const":0,"type":"number"},{"const":11,"type":"number"},{"const":24,"type":"number"}]},"product_id":{"format":"uuid","type":"string"},"discount_amount":{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the line is charged at unit_amount * quantity - discount_amount.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the line is charged at unit_amount * quantity - discount_amount.","type":"integer"}]}}}},"discount_amount":{"minimum":0,"description":"Whole-sale discount in minor units. With items, amount must equal the sum of (unit_amount * quantity - line discount) less this.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"Whole-sale discount in minor units. With items, amount must equal the sum of (unit_amount * quantity - line discount) less this.","type":"integer"}]},"staff_id":{"format":"uuid","description":"Who rang the sale up, from GET /v1/pos/staff. Stamped on the intent as pos_staff_id / pos_staff_name. 400 invalid_staff when unknown or inactive.","type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["amount","installation_id"],"properties":{"amount":{"minimum":1,"maximum":2147483647,"description":"Amount in minor units (ISK is zero-decimal, so whole krónur)","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"description":"Amount in minor units (ISK is zero-decimal, so whole krónur)","type":"integer"}]},"currency":{"minLength":3,"maxLength":3,"description":"Three-letter ISO code. Defaults to the merchant's currency.","type":"string"},"installation_id":{"minLength":1,"maxLength":128,"description":"Adyen installation id of this device, from POST /v1/terminal/sessions. Becomes the Terminal API POIID.","type":"string"},"description":{"maxLength":500,"type":"string"},"customer":{"format":"uuid","description":"Optional customer to attach the charge to","type":"string"},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}},"items":{"minItems":1,"maxItems":200,"description":"POS line items; their total must equal amount. Written to the receipt and the sales-by-product report.","type":"array","items":{"type":"object","required":["description","quantity","unit_amount","vat_rate"],"properties":{"description":{"minLength":1,"maxLength":500,"type":"string"},"quantity":{"minimum":1,"maximum":100000,"default":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100000,"default":1,"type":"integer"}]},"unit_amount":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"vat_rate":{"description":"VAT percentage: 0, 11, or 24","anyOf":[{"const":0,"type":"number"},{"const":11,"type":"number"},{"const":24,"type":"number"}]},"product_id":{"format":"uuid","type":"string"},"discount_amount":{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the line is charged at unit_amount * quantity - discount_amount.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the line is charged at unit_amount * quantity - discount_amount.","type":"integer"}]}}}},"discount_amount":{"minimum":0,"description":"Whole-sale discount in minor units. With items, amount must equal the sum of (unit_amount * quantity - line discount) less this.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"Whole-sale discount in minor units. With items, amount must equal the sum of (unit_amount * quantity - line discount) less this.","type":"integer"}]},"staff_id":{"format":"uuid","description":"Who rang the sale up, from GET /v1/pos/staff. Stamped on the intent as pos_staff_id / pos_staff_name. 400 invalid_staff when unknown or inactive.","type":"string"}}}},"text/plain":{"schema":{"type":"object","required":["amount","installation_id"],"properties":{"amount":{"minimum":1,"maximum":2147483647,"description":"Amount in minor units (ISK is zero-decimal, so whole krónur)","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"description":"Amount in minor units (ISK is zero-decimal, so whole krónur)","type":"integer"}]},"currency":{"minLength":3,"maxLength":3,"description":"Three-letter ISO code. Defaults to the merchant's currency.","type":"string"},"installation_id":{"minLength":1,"maxLength":128,"description":"Adyen installation id of this device, from POST /v1/terminal/sessions. Becomes the Terminal API POIID.","type":"string"},"description":{"maxLength":500,"type":"string"},"customer":{"format":"uuid","description":"Optional customer to attach the charge to","type":"string"},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}},"items":{"minItems":1,"maxItems":200,"description":"POS line items; their total must equal amount. Written to the receipt and the sales-by-product report.","type":"array","items":{"type":"object","required":["description","quantity","unit_amount","vat_rate"],"properties":{"description":{"minLength":1,"maxLength":500,"type":"string"},"quantity":{"minimum":1,"maximum":100000,"default":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100000,"default":1,"type":"integer"}]},"unit_amount":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"vat_rate":{"description":"VAT percentage: 0, 11, or 24","anyOf":[{"const":0,"type":"number"},{"const":11,"type":"number"},{"const":24,"type":"number"}]},"product_id":{"format":"uuid","type":"string"},"discount_amount":{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the line is charged at unit_amount * quantity - discount_amount.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the line is charged at unit_amount * quantity - discount_amount.","type":"integer"}]}}}},"discount_amount":{"minimum":0,"description":"Whole-sale discount in minor units. With items, amount must equal the sum of (unit_amount * quantity - line discount) less this.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"Whole-sale discount in minor units. With items, amount must equal the sum of (unit_amount * quantity - line discount) less this.","type":"integer"}]},"staff_id":{"format":"uuid","description":"Who rang the sale up, from GET /v1/pos/staff. Stamped on the intent as pos_staff_id / pos_staff_name. 400 invalid_staff when unknown or inactive.","type":"string"}}}}}}}},"/v1/terminal/payments/{id}/result":{"post":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"payment_intent":{"type":"object","required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"],"properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"additionalProperties":false},"outcome":{"anyOf":[{"const":"approved","type":"string"},{"const":"declined","type":"string"},{"const":"canceled","type":"string"},{"const":"failed","type":"string"}]},"error":{"nullable":true,"anyOf":[{"type":"object","required":["code","message"],"properties":{"code":{"description":"Semantic code, e.g. card_declined_insufficient_funds","type":"string"},"message":{"type":"string"}}},{"type":"null"}]},"card":{"nullable":true,"anyOf":[{"type":"object","required":["brand","last4"],"properties":{"brand":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}}},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt. Offer it on every outcome.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"replayed":{"description":"True when the intent was already settled and this call changed nothing.","type":"boolean"}},"required":["payment_intent","outcome","error","card","receipt_url","receipt_pdf_url","replayed"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"payment_intent":{"type":"object","required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"],"properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"additionalProperties":false},"outcome":{"anyOf":[{"const":"approved","type":"string"},{"const":"declined","type":"string"},{"const":"canceled","type":"string"},{"const":"failed","type":"string"}]},"error":{"nullable":true,"anyOf":[{"type":"object","required":["code","message"],"properties":{"code":{"description":"Semantic code, e.g. card_declined_insufficient_funds","type":"string"},"message":{"type":"string"}}},{"type":"null"}]},"card":{"nullable":true,"anyOf":[{"type":"object","required":["brand","last4"],"properties":{"brand":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}}},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt. Offer it on every outcome.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"replayed":{"description":"True when the intent was already settled and this call changed nothing.","type":"boolean"}},"required":["payment_intent","outcome","error","card","receipt_url","receipt_pdf_url","replayed"]}},"text/plain":{"schema":{"type":"object","properties":{"payment_intent":{"type":"object","required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"],"properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"additionalProperties":false},"outcome":{"anyOf":[{"const":"approved","type":"string"},{"const":"declined","type":"string"},{"const":"canceled","type":"string"},{"const":"failed","type":"string"}]},"error":{"nullable":true,"anyOf":[{"type":"object","required":["code","message"],"properties":{"code":{"description":"Semantic code, e.g. card_declined_insufficient_funds","type":"string"},"message":{"type":"string"}}},{"type":"null"}]},"card":{"nullable":true,"anyOf":[{"type":"object","required":["brand","last4"],"properties":{"brand":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}}},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt. Offer it on every outcome.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"replayed":{"description":"True when the intent was already settled and this call changed nothing.","type":"boolean"}},"required":["payment_intent","outcome","error","card","receipt_url","receipt_pdf_url","replayed"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1TerminalPaymentsByIdResult","tags":["Terminal"],"summary":"Report a Tap to Pay result","description":"Settles a card-present payment intent from the Terminal API Payment.Response (or a client-reported timeout/cancel) and returns the intent plus the hosted receipt URL. Safe to retry: an already-settled intent is returned unchanged with replayed=true.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"nexo_response":{"description":"The Terminal API SaleToPOIResponse the SDK returned, forwarded unchanged.","type":"object","patternProperties":{"^(.*)$":{}}},"outcome":{"description":"Client-reported outcome when the SDK produced no Nexo response (read timeout, merchant cancel, SDK error).","anyOf":[{"const":"timeout","type":"string"},{"const":"canceled","type":"string"},{"const":"error","type":"string"}]},"error_message":{"maxLength":500,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"nexo_response":{"description":"The Terminal API SaleToPOIResponse the SDK returned, forwarded unchanged.","type":"object","patternProperties":{"^(.*)$":{}}},"outcome":{"description":"Client-reported outcome when the SDK produced no Nexo response (read timeout, merchant cancel, SDK error).","anyOf":[{"const":"timeout","type":"string"},{"const":"canceled","type":"string"},{"const":"error","type":"string"}]},"error_message":{"maxLength":500,"type":"string"}}}},"text/plain":{"schema":{"type":"object","properties":{"nexo_response":{"description":"The Terminal API SaleToPOIResponse the SDK returned, forwarded unchanged.","type":"object","patternProperties":{"^(.*)$":{}}},"outcome":{"description":"Client-reported outcome when the SDK produced no Nexo response (read timeout, merchant cancel, SDK error).","anyOf":[{"const":"timeout","type":"string"},{"const":"canceled","type":"string"},{"const":"error","type":"string"}]},"error_message":{"maxLength":500,"type":"string"}}}}}}}},"/v1/terminal/requests/":{"post":{"parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"description":"`tap_to_pay` = the phone opens the tap sheet, `qr` = the phone shows the payment link's QR code, `claim` = the customer types a kennitala on the phone and gets a krafa","anyOf":[{"const":"tap_to_pay","type":"string"},{"const":"qr","type":"string"},{"const":"claim","type":"string"}]},"payment_intent_id":{"nullable":true,"anyOf":[{"description":"Set for `tap_to_pay`; null for `qr` and `claim` until they complete","type":"string"},{"type":"null"}]},"payment_link":{"nullable":true,"anyOf":[{"type":"object","required":["id","url","status","amount","currency"],"properties":{"id":{"type":"string"},"url":{"description":"The hosted payment page; encode it as the QR code","type":"string"},"status":{"description":"`paid` once a payment went through, `inactive` when the sale was called off or the link expired","anyOf":[{"const":"open","type":"string"},{"const":"paid","type":"string"},{"const":"inactive","type":"string"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"}}},{"type":"null"}]},"status":{"anyOf":[{"const":"pending","type":"string"},{"const":"claimed","type":"string"},{"const":"completed","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"expired","type":"string"}]},"expires_at":{"description":"Unix seconds; a pending request the phone has not picked up by then expires","type":"number"}},"required":["id","kind","payment_intent_id","payment_link","status","expires_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"description":"`tap_to_pay` = the phone opens the tap sheet, `qr` = the phone shows the payment link's QR code, `claim` = the customer types a kennitala on the phone and gets a krafa","anyOf":[{"const":"tap_to_pay","type":"string"},{"const":"qr","type":"string"},{"const":"claim","type":"string"}]},"payment_intent_id":{"nullable":true,"anyOf":[{"description":"Set for `tap_to_pay`; null for `qr` and `claim` until they complete","type":"string"},{"type":"null"}]},"payment_link":{"nullable":true,"anyOf":[{"type":"object","required":["id","url","status","amount","currency"],"properties":{"id":{"type":"string"},"url":{"description":"The hosted payment page; encode it as the QR code","type":"string"},"status":{"description":"`paid` once a payment went through, `inactive` when the sale was called off or the link expired","anyOf":[{"const":"open","type":"string"},{"const":"paid","type":"string"},{"const":"inactive","type":"string"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"}}},{"type":"null"}]},"status":{"anyOf":[{"const":"pending","type":"string"},{"const":"claimed","type":"string"},{"const":"completed","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"expired","type":"string"}]},"expires_at":{"description":"Unix seconds; a pending request the phone has not picked up by then expires","type":"number"}},"required":["id","kind","payment_intent_id","payment_link","status","expires_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"description":"`tap_to_pay` = the phone opens the tap sheet, `qr` = the phone shows the payment link's QR code, `claim` = the customer types a kennitala on the phone and gets a krafa","anyOf":[{"const":"tap_to_pay","type":"string"},{"const":"qr","type":"string"},{"const":"claim","type":"string"}]},"payment_intent_id":{"nullable":true,"anyOf":[{"description":"Set for `tap_to_pay`; null for `qr` and `claim` until they complete","type":"string"},{"type":"null"}]},"payment_link":{"nullable":true,"anyOf":[{"type":"object","required":["id","url","status","amount","currency"],"properties":{"id":{"type":"string"},"url":{"description":"The hosted payment page; encode it as the QR code","type":"string"},"status":{"description":"`paid` once a payment went through, `inactive` when the sale was called off or the link expired","anyOf":[{"const":"open","type":"string"},{"const":"paid","type":"string"},{"const":"inactive","type":"string"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"}}},{"type":"null"}]},"status":{"anyOf":[{"const":"pending","type":"string"},{"const":"claimed","type":"string"},{"const":"completed","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"expired","type":"string"}]},"expires_at":{"description":"Unix seconds; a pending request the phone has not picked up by then expires","type":"number"}},"required":["id","kind","payment_intent_id","payment_link","status","expires_at"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"409":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1TerminalRequests","tags":["Terminal"],"summary":"Send a sale to a paired phone","description":"kind `tap_to_pay` (default) creates the pending intent, `qr` creates a one-time payment link (returned as payment_link, render its url as the QR code), `claim` creates nothing until the phone has the customer's kennitala. 409 terminal_busy while that phone still has a sale in flight. The request expires 90 seconds after creation if the phone does not pick it up.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["device_key_id","amount"],"properties":{"device_key_id":{"format":"uuid","description":"The paired phone: a payment device from GET /v1/pos-devices","type":"string"},"kind":{"description":"`tap_to_pay` = the phone opens the tap sheet, `qr` = the phone shows the payment link's QR code, `claim` = the customer types a kennitala on the phone and gets a krafa","anyOf":[{"const":"tap_to_pay","type":"string"},{"const":"qr","type":"string"},{"const":"claim","type":"string"}]},"amount":{"minimum":1,"maximum":2147483647,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"type":"integer"}]},"currency":{"minLength":3,"maxLength":3,"type":"string"},"description":{"maxLength":500,"type":"string"},"items":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","required":["description","quantity","unit_amount","vat_rate"],"properties":{"description":{"minLength":1,"maxLength":500,"type":"string"},"quantity":{"minimum":1,"maximum":100000,"default":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100000,"default":1,"type":"integer"}]},"unit_amount":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"vat_rate":{"anyOf":[{"const":0,"type":"number"},{"const":11,"type":"number"},{"const":24,"type":"number"}]},"product_id":{"format":"uuid","type":"string"},"discount_amount":{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the line is charged at unit_amount * quantity - discount_amount.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the line is charged at unit_amount * quantity - discount_amount.","type":"integer"}]}}}},"discount_amount":{"minimum":0,"description":"Whole-sale discount in minor units. With items, amount must equal the sum of (unit_amount * quantity - line discount) less this.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"Whole-sale discount in minor units. With items, amount must equal the sum of (unit_amount * quantity - line discount) less this.","type":"integer"}]},"staff_id":{"format":"uuid","description":"Who rang the sale up, from GET /v1/pos/staff. 400 invalid_staff when unknown or inactive.","type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["device_key_id","amount"],"properties":{"device_key_id":{"format":"uuid","description":"The paired phone: a payment device from GET /v1/pos-devices","type":"string"},"kind":{"description":"`tap_to_pay` = the phone opens the tap sheet, `qr` = the phone shows the payment link's QR code, `claim` = the customer types a kennitala on the phone and gets a krafa","anyOf":[{"const":"tap_to_pay","type":"string"},{"const":"qr","type":"string"},{"const":"claim","type":"string"}]},"amount":{"minimum":1,"maximum":2147483647,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"type":"integer"}]},"currency":{"minLength":3,"maxLength":3,"type":"string"},"description":{"maxLength":500,"type":"string"},"items":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","required":["description","quantity","unit_amount","vat_rate"],"properties":{"description":{"minLength":1,"maxLength":500,"type":"string"},"quantity":{"minimum":1,"maximum":100000,"default":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100000,"default":1,"type":"integer"}]},"unit_amount":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"vat_rate":{"anyOf":[{"const":0,"type":"number"},{"const":11,"type":"number"},{"const":24,"type":"number"}]},"product_id":{"format":"uuid","type":"string"},"discount_amount":{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the line is charged at unit_amount * quantity - discount_amount.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the line is charged at unit_amount * quantity - discount_amount.","type":"integer"}]}}}},"discount_amount":{"minimum":0,"description":"Whole-sale discount in minor units. With items, amount must equal the sum of (unit_amount * quantity - line discount) less this.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"Whole-sale discount in minor units. With items, amount must equal the sum of (unit_amount * quantity - line discount) less this.","type":"integer"}]},"staff_id":{"format":"uuid","description":"Who rang the sale up, from GET /v1/pos/staff. 400 invalid_staff when unknown or inactive.","type":"string"}}}},"text/plain":{"schema":{"type":"object","required":["device_key_id","amount"],"properties":{"device_key_id":{"format":"uuid","description":"The paired phone: a payment device from GET /v1/pos-devices","type":"string"},"kind":{"description":"`tap_to_pay` = the phone opens the tap sheet, `qr` = the phone shows the payment link's QR code, `claim` = the customer types a kennitala on the phone and gets a krafa","anyOf":[{"const":"tap_to_pay","type":"string"},{"const":"qr","type":"string"},{"const":"claim","type":"string"}]},"amount":{"minimum":1,"maximum":2147483647,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"type":"integer"}]},"currency":{"minLength":3,"maxLength":3,"type":"string"},"description":{"maxLength":500,"type":"string"},"items":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","required":["description","quantity","unit_amount","vat_rate"],"properties":{"description":{"minLength":1,"maxLength":500,"type":"string"},"quantity":{"minimum":1,"maximum":100000,"default":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100000,"default":1,"type":"integer"}]},"unit_amount":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"vat_rate":{"anyOf":[{"const":0,"type":"number"},{"const":11,"type":"number"},{"const":24,"type":"number"}]},"product_id":{"format":"uuid","type":"string"},"discount_amount":{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the line is charged at unit_amount * quantity - discount_amount.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the line is charged at unit_amount * quantity - discount_amount.","type":"integer"}]}}}},"discount_amount":{"minimum":0,"description":"Whole-sale discount in minor units. With items, amount must equal the sum of (unit_amount * quantity - line discount) less this.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"Whole-sale discount in minor units. With items, amount must equal the sum of (unit_amount * quantity - line discount) less this.","type":"integer"}]},"staff_id":{"format":"uuid","description":"Who rang the sale up, from GET /v1/pos/staff. 400 invalid_staff when unknown or inactive.","type":"string"}}}}}}}},"/v1/terminal/requests/next":{"get":{"parameters":[{"description":"This phone's Adyen installation id (the Terminal API POIID). Required when kinds includes tap_to_pay.","schema":{"type":"string","minLength":1,"maxLength":128},"in":"query","name":"installation_id","required":false},{"description":"Comma-separated kinds this phone takes, e.g. `qr,claim` for a phone without Tap to Pay, `tap_to_pay,qr,claim` for one with it. Omitted: tap_to_pay only.","schema":{"type":"string","maxLength":64},"in":"query","name":"kinds","required":false}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"description":"`tap_to_pay` = the phone opens the tap sheet, `qr` = the phone shows the payment link's QR code, `claim` = the customer types a kennitala on the phone and gets a krafa","anyOf":[{"const":"tap_to_pay","type":"string"},{"const":"qr","type":"string"},{"const":"claim","type":"string"}]},"payment_intent_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"items":{"type":"array","items":{"type":"object","required":["description","quantity","unit_amount","vat_rate","product_id","discount_amount"],"properties":{"description":{"type":"string"},"quantity":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"unit_amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"vat_rate":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"product_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"discount_amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}}}},"discount_amount":{"description":"Whole-sale discount, already subtracted from amount","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount, already subtracted from amount","type":"integer"}]},"staff_id":{"nullable":true,"anyOf":[{"description":"Who rang the sale up; pass it on when creating the claim","type":"string"},{"type":"null"}]},"payment_link":{"nullable":true,"anyOf":[{"type":"object","required":["id","url","status","amount","currency"],"properties":{"id":{"type":"string"},"url":{"description":"The hosted payment page; encode it as the QR code","type":"string"},"status":{"description":"`paid` once a payment went through, `inactive` when the sale was called off or the link expired","anyOf":[{"const":"open","type":"string"},{"const":"paid","type":"string"},{"const":"inactive","type":"string"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"}}},{"type":"null"}]},"sale_id":{"nullable":true,"anyOf":[{"description":"`tap_to_pay` only","type":"string"},{"type":"null"}]},"service_id":{"nullable":true,"anyOf":[{"description":"`tap_to_pay` only","type":"string"},{"type":"null"}]},"poi_id":{"nullable":true,"anyOf":[{"description":"`tap_to_pay` only","type":"string"},{"type":"null"}]},"nexo_request":{"nullable":true,"anyOf":[{"description":"`tap_to_pay` only: the Terminal API request to run","type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"required":["id","kind","payment_intent_id","amount","currency","description","items","discount_amount","staff_id","payment_link","sale_id","service_id","poi_id","nexo_request"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"description":"`tap_to_pay` = the phone opens the tap sheet, `qr` = the phone shows the payment link's QR code, `claim` = the customer types a kennitala on the phone and gets a krafa","anyOf":[{"const":"tap_to_pay","type":"string"},{"const":"qr","type":"string"},{"const":"claim","type":"string"}]},"payment_intent_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"items":{"type":"array","items":{"type":"object","required":["description","quantity","unit_amount","vat_rate","product_id","discount_amount"],"properties":{"description":{"type":"string"},"quantity":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"unit_amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"vat_rate":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"product_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"discount_amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}}}},"discount_amount":{"description":"Whole-sale discount, already subtracted from amount","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount, already subtracted from amount","type":"integer"}]},"staff_id":{"nullable":true,"anyOf":[{"description":"Who rang the sale up; pass it on when creating the claim","type":"string"},{"type":"null"}]},"payment_link":{"nullable":true,"anyOf":[{"type":"object","required":["id","url","status","amount","currency"],"properties":{"id":{"type":"string"},"url":{"description":"The hosted payment page; encode it as the QR code","type":"string"},"status":{"description":"`paid` once a payment went through, `inactive` when the sale was called off or the link expired","anyOf":[{"const":"open","type":"string"},{"const":"paid","type":"string"},{"const":"inactive","type":"string"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"}}},{"type":"null"}]},"sale_id":{"nullable":true,"anyOf":[{"description":"`tap_to_pay` only","type":"string"},{"type":"null"}]},"service_id":{"nullable":true,"anyOf":[{"description":"`tap_to_pay` only","type":"string"},{"type":"null"}]},"poi_id":{"nullable":true,"anyOf":[{"description":"`tap_to_pay` only","type":"string"},{"type":"null"}]},"nexo_request":{"nullable":true,"anyOf":[{"description":"`tap_to_pay` only: the Terminal API request to run","type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"required":["id","kind","payment_intent_id","amount","currency","description","items","discount_amount","staff_id","payment_link","sale_id","service_id","poi_id","nexo_request"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"description":"`tap_to_pay` = the phone opens the tap sheet, `qr` = the phone shows the payment link's QR code, `claim` = the customer types a kennitala on the phone and gets a krafa","anyOf":[{"const":"tap_to_pay","type":"string"},{"const":"qr","type":"string"},{"const":"claim","type":"string"}]},"payment_intent_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"items":{"type":"array","items":{"type":"object","required":["description","quantity","unit_amount","vat_rate","product_id","discount_amount"],"properties":{"description":{"type":"string"},"quantity":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"unit_amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"vat_rate":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"product_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"discount_amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}}}},"discount_amount":{"description":"Whole-sale discount, already subtracted from amount","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount, already subtracted from amount","type":"integer"}]},"staff_id":{"nullable":true,"anyOf":[{"description":"Who rang the sale up; pass it on when creating the claim","type":"string"},{"type":"null"}]},"payment_link":{"nullable":true,"anyOf":[{"type":"object","required":["id","url","status","amount","currency"],"properties":{"id":{"type":"string"},"url":{"description":"The hosted payment page; encode it as the QR code","type":"string"},"status":{"description":"`paid` once a payment went through, `inactive` when the sale was called off or the link expired","anyOf":[{"const":"open","type":"string"},{"const":"paid","type":"string"},{"const":"inactive","type":"string"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"}}},{"type":"null"}]},"sale_id":{"nullable":true,"anyOf":[{"description":"`tap_to_pay` only","type":"string"},{"type":"null"}]},"service_id":{"nullable":true,"anyOf":[{"description":"`tap_to_pay` only","type":"string"},{"type":"null"}]},"poi_id":{"nullable":true,"anyOf":[{"description":"`tap_to_pay` only","type":"string"},{"type":"null"}]},"nexo_request":{"nullable":true,"anyOf":[{"description":"`tap_to_pay` only: the Terminal API request to run","type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"required":["id","kind","payment_intent_id","amount","currency","description","items","discount_amount","staff_id","payment_link","sale_id","service_id","poi_id","nexo_request"]}}}},"204":{},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"502":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"503":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"getV1TerminalRequestsNext","tags":["Terminal"],"summary":"Claim the next sale for this phone","description":"Polled by a paired phone on its own key: a locked payment device, or any key that turned the terminal on with PATCH /v1/pos/terminal. Atomically claims the oldest pending request of the given kinds for that device, touches its last-seen stamp (so the iPad can show it online) and returns the sale; for tap_to_pay also the Terminal API request to run. 204 when nothing is waiting, 403 terminal_not_enabled when the key is no terminal.","security":[{"bearerAuth":[]}]}},"/v1/terminal/requests/{id}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"description":"`tap_to_pay` = the phone opens the tap sheet, `qr` = the phone shows the payment link's QR code, `claim` = the customer types a kennitala on the phone and gets a krafa","anyOf":[{"const":"tap_to_pay","type":"string"},{"const":"qr","type":"string"},{"const":"claim","type":"string"}]},"status":{"anyOf":[{"const":"pending","type":"string"},{"const":"claimed","type":"string"},{"const":"completed","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"expired","type":"string"}]},"expires_at":{"type":"number"},"claimed_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"completed_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"amount":{"nullable":true,"anyOf":[{"description":"The sale, minor units. Null only for requests created before kinds existed","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The sale, minor units. Null only for requests created before kinds existed","type":"integer"}]},{"type":"null"}]},"currency":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_intent":{"description":"`tap_to_pay`: from the start. `qr`: the intent that paid the link, once completed. `claim`: the claim's intent, once completed.","nullable":true,"anyOf":[{"type":"object","required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"],"properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"payment_link":{"nullable":true,"anyOf":[{"type":"object","required":["id","url","status","amount","currency"],"properties":{"id":{"type":"string"},"url":{"description":"The hosted payment page; encode it as the QR code","type":"string"},"status":{"description":"`paid` once a payment went through, `inactive` when the sale was called off or the link expired","anyOf":[{"const":"open","type":"string"},{"const":"paid","type":"string"},{"const":"inactive","type":"string"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"}}},{"type":"null"}]},"claim_id":{"nullable":true,"anyOf":[{"description":"`claim`: the krafa the phone created","type":"string"},{"type":"null"}]},"customer_kennitala":{"nullable":true,"anyOf":[{"description":"`claim`: the payor's kennitala","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt, set once the request is settled and has an intent","type":"string"},{"type":"null"}]},"outcome_uncertain":{"description":"`failed` only: nobody knows whether the card was charged (the phone stopped answering mid-sale). An approval may still arrive and be captured. Check the phone before charging again.","type":"boolean"}},"required":["id","kind","status","expires_at","claimed_at","completed_at","amount","currency","payment_intent","payment_link","claim_id","customer_kennitala","receipt_url","outcome_uncertain"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"description":"`tap_to_pay` = the phone opens the tap sheet, `qr` = the phone shows the payment link's QR code, `claim` = the customer types a kennitala on the phone and gets a krafa","anyOf":[{"const":"tap_to_pay","type":"string"},{"const":"qr","type":"string"},{"const":"claim","type":"string"}]},"status":{"anyOf":[{"const":"pending","type":"string"},{"const":"claimed","type":"string"},{"const":"completed","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"expired","type":"string"}]},"expires_at":{"type":"number"},"claimed_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"completed_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"amount":{"nullable":true,"anyOf":[{"description":"The sale, minor units. Null only for requests created before kinds existed","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The sale, minor units. Null only for requests created before kinds existed","type":"integer"}]},{"type":"null"}]},"currency":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_intent":{"description":"`tap_to_pay`: from the start. `qr`: the intent that paid the link, once completed. `claim`: the claim's intent, once completed.","nullable":true,"anyOf":[{"type":"object","required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"],"properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"payment_link":{"nullable":true,"anyOf":[{"type":"object","required":["id","url","status","amount","currency"],"properties":{"id":{"type":"string"},"url":{"description":"The hosted payment page; encode it as the QR code","type":"string"},"status":{"description":"`paid` once a payment went through, `inactive` when the sale was called off or the link expired","anyOf":[{"const":"open","type":"string"},{"const":"paid","type":"string"},{"const":"inactive","type":"string"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"}}},{"type":"null"}]},"claim_id":{"nullable":true,"anyOf":[{"description":"`claim`: the krafa the phone created","type":"string"},{"type":"null"}]},"customer_kennitala":{"nullable":true,"anyOf":[{"description":"`claim`: the payor's kennitala","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt, set once the request is settled and has an intent","type":"string"},{"type":"null"}]},"outcome_uncertain":{"description":"`failed` only: nobody knows whether the card was charged (the phone stopped answering mid-sale). An approval may still arrive and be captured. Check the phone before charging again.","type":"boolean"}},"required":["id","kind","status","expires_at","claimed_at","completed_at","amount","currency","payment_intent","payment_link","claim_id","customer_kennitala","receipt_url","outcome_uncertain"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"description":"`tap_to_pay` = the phone opens the tap sheet, `qr` = the phone shows the payment link's QR code, `claim` = the customer types a kennitala on the phone and gets a krafa","anyOf":[{"const":"tap_to_pay","type":"string"},{"const":"qr","type":"string"},{"const":"claim","type":"string"}]},"status":{"anyOf":[{"const":"pending","type":"string"},{"const":"claimed","type":"string"},{"const":"completed","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"expired","type":"string"}]},"expires_at":{"type":"number"},"claimed_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"completed_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"amount":{"nullable":true,"anyOf":[{"description":"The sale, minor units. Null only for requests created before kinds existed","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The sale, minor units. Null only for requests created before kinds existed","type":"integer"}]},{"type":"null"}]},"currency":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_intent":{"description":"`tap_to_pay`: from the start. `qr`: the intent that paid the link, once completed. `claim`: the claim's intent, once completed.","nullable":true,"anyOf":[{"type":"object","required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"],"properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"payment_link":{"nullable":true,"anyOf":[{"type":"object","required":["id","url","status","amount","currency"],"properties":{"id":{"type":"string"},"url":{"description":"The hosted payment page; encode it as the QR code","type":"string"},"status":{"description":"`paid` once a payment went through, `inactive` when the sale was called off or the link expired","anyOf":[{"const":"open","type":"string"},{"const":"paid","type":"string"},{"const":"inactive","type":"string"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"}}},{"type":"null"}]},"claim_id":{"nullable":true,"anyOf":[{"description":"`claim`: the krafa the phone created","type":"string"},{"type":"null"}]},"customer_kennitala":{"nullable":true,"anyOf":[{"description":"`claim`: the payor's kennitala","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt, set once the request is settled and has an intent","type":"string"},{"type":"null"}]},"outcome_uncertain":{"description":"`failed` only: nobody knows whether the card was charged (the phone stopped answering mid-sale). An approval may still arrive and be captured. Check the phone before charging again.","type":"boolean"}},"required":["id","kind","status","expires_at","claimed_at","completed_at","amount","currency","payment_intent","payment_link","claim_id","customer_kennitala","receipt_url","outcome_uncertain"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"getV1TerminalRequestsById","tags":["Terminal"],"summary":"Poll a sale sent to a paired phone","description":"Read by the requester (iPad, dashboard) and by the phone the request is addressed to, which polls it to notice an iPad-side cancel; a locked device key sees only its own requests. A `qr` request whose payment link has been paid is completed by this poll, without waiting for the phone.","security":[{"bearerAuth":[]}]}},"/v1/terminal/requests/{id}/complete":{"post":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"description":"`tap_to_pay` = the phone opens the tap sheet, `qr` = the phone shows the payment link's QR code, `claim` = the customer types a kennitala on the phone and gets a krafa","anyOf":[{"const":"tap_to_pay","type":"string"},{"const":"qr","type":"string"},{"const":"claim","type":"string"}]},"status":{"anyOf":[{"const":"pending","type":"string"},{"const":"claimed","type":"string"},{"const":"completed","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"expired","type":"string"}]},"expires_at":{"type":"number"},"claimed_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"completed_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"amount":{"nullable":true,"anyOf":[{"description":"The sale, minor units. Null only for requests created before kinds existed","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The sale, minor units. Null only for requests created before kinds existed","type":"integer"}]},{"type":"null"}]},"currency":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_intent":{"description":"`tap_to_pay`: from the start. `qr`: the intent that paid the link, once completed. `claim`: the claim's intent, once completed.","nullable":true,"anyOf":[{"type":"object","required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"],"properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"payment_link":{"nullable":true,"anyOf":[{"type":"object","required":["id","url","status","amount","currency"],"properties":{"id":{"type":"string"},"url":{"description":"The hosted payment page; encode it as the QR code","type":"string"},"status":{"description":"`paid` once a payment went through, `inactive` when the sale was called off or the link expired","anyOf":[{"const":"open","type":"string"},{"const":"paid","type":"string"},{"const":"inactive","type":"string"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"}}},{"type":"null"}]},"claim_id":{"nullable":true,"anyOf":[{"description":"`claim`: the krafa the phone created","type":"string"},{"type":"null"}]},"customer_kennitala":{"nullable":true,"anyOf":[{"description":"`claim`: the payor's kennitala","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt, set once the request is settled and has an intent","type":"string"},{"type":"null"}]},"outcome_uncertain":{"description":"`failed` only: nobody knows whether the card was charged (the phone stopped answering mid-sale). An approval may still arrive and be captured. Check the phone before charging again.","type":"boolean"}},"required":["id","kind","status","expires_at","claimed_at","completed_at","amount","currency","payment_intent","payment_link","claim_id","customer_kennitala","receipt_url","outcome_uncertain"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"description":"`tap_to_pay` = the phone opens the tap sheet, `qr` = the phone shows the payment link's QR code, `claim` = the customer types a kennitala on the phone and gets a krafa","anyOf":[{"const":"tap_to_pay","type":"string"},{"const":"qr","type":"string"},{"const":"claim","type":"string"}]},"status":{"anyOf":[{"const":"pending","type":"string"},{"const":"claimed","type":"string"},{"const":"completed","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"expired","type":"string"}]},"expires_at":{"type":"number"},"claimed_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"completed_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"amount":{"nullable":true,"anyOf":[{"description":"The sale, minor units. Null only for requests created before kinds existed","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The sale, minor units. Null only for requests created before kinds existed","type":"integer"}]},{"type":"null"}]},"currency":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_intent":{"description":"`tap_to_pay`: from the start. `qr`: the intent that paid the link, once completed. `claim`: the claim's intent, once completed.","nullable":true,"anyOf":[{"type":"object","required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"],"properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"payment_link":{"nullable":true,"anyOf":[{"type":"object","required":["id","url","status","amount","currency"],"properties":{"id":{"type":"string"},"url":{"description":"The hosted payment page; encode it as the QR code","type":"string"},"status":{"description":"`paid` once a payment went through, `inactive` when the sale was called off or the link expired","anyOf":[{"const":"open","type":"string"},{"const":"paid","type":"string"},{"const":"inactive","type":"string"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"}}},{"type":"null"}]},"claim_id":{"nullable":true,"anyOf":[{"description":"`claim`: the krafa the phone created","type":"string"},{"type":"null"}]},"customer_kennitala":{"nullable":true,"anyOf":[{"description":"`claim`: the payor's kennitala","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt, set once the request is settled and has an intent","type":"string"},{"type":"null"}]},"outcome_uncertain":{"description":"`failed` only: nobody knows whether the card was charged (the phone stopped answering mid-sale). An approval may still arrive and be captured. Check the phone before charging again.","type":"boolean"}},"required":["id","kind","status","expires_at","claimed_at","completed_at","amount","currency","payment_intent","payment_link","claim_id","customer_kennitala","receipt_url","outcome_uncertain"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"description":"`tap_to_pay` = the phone opens the tap sheet, `qr` = the phone shows the payment link's QR code, `claim` = the customer types a kennitala on the phone and gets a krafa","anyOf":[{"const":"tap_to_pay","type":"string"},{"const":"qr","type":"string"},{"const":"claim","type":"string"}]},"status":{"anyOf":[{"const":"pending","type":"string"},{"const":"claimed","type":"string"},{"const":"completed","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"expired","type":"string"}]},"expires_at":{"type":"number"},"claimed_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"completed_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"amount":{"nullable":true,"anyOf":[{"description":"The sale, minor units. Null only for requests created before kinds existed","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The sale, minor units. Null only for requests created before kinds existed","type":"integer"}]},{"type":"null"}]},"currency":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_intent":{"description":"`tap_to_pay`: from the start. `qr`: the intent that paid the link, once completed. `claim`: the claim's intent, once completed.","nullable":true,"anyOf":[{"type":"object","required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"],"properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"payment_link":{"nullable":true,"anyOf":[{"type":"object","required":["id","url","status","amount","currency"],"properties":{"id":{"type":"string"},"url":{"description":"The hosted payment page; encode it as the QR code","type":"string"},"status":{"description":"`paid` once a payment went through, `inactive` when the sale was called off or the link expired","anyOf":[{"const":"open","type":"string"},{"const":"paid","type":"string"},{"const":"inactive","type":"string"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"}}},{"type":"null"}]},"claim_id":{"nullable":true,"anyOf":[{"description":"`claim`: the krafa the phone created","type":"string"},{"type":"null"}]},"customer_kennitala":{"nullable":true,"anyOf":[{"description":"`claim`: the payor's kennitala","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt, set once the request is settled and has an intent","type":"string"},{"type":"null"}]},"outcome_uncertain":{"description":"`failed` only: nobody knows whether the card was charged (the phone stopped answering mid-sale). An approval may still arrive and be captured. Check the phone before charging again.","type":"boolean"}},"required":["id","kind","status","expires_at","claimed_at","completed_at","amount","currency","payment_intent","payment_link","claim_id","customer_kennitala","receipt_url","outcome_uncertain"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"409":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1TerminalRequestsByIdComplete","tags":["Terminal"],"summary":"Report how a claimed sale ended","description":"Called by the phone that claimed the request (403 not_request_device for any other key). `qr`: completed only once the link is paid (409 payment_link_not_paid); failed or canceled takes the link down, and a paid link completes the request whatever was reported. `claim`: completed needs claim_id. `tap_to_pay`: settle through POST /v1/terminal/payments/:id/result; only failed or canceled here. Repeating the outcome the request already has returns it unchanged.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["outcome"],"properties":{"outcome":{"anyOf":[{"const":"completed","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"}]},"claim_id":{"format":"uuid","description":"`claim`: the krafa created with POST /v1/claims. Required when completed.","type":"string"},"customer_kennitala":{"pattern":"^[0-9]{10}$","description":"`claim`: the kennitala the customer typed","type":"string"},"error_code":{"maxLength":100,"type":"string"},"error_message":{"maxLength":500,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["outcome"],"properties":{"outcome":{"anyOf":[{"const":"completed","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"}]},"claim_id":{"format":"uuid","description":"`claim`: the krafa created with POST /v1/claims. Required when completed.","type":"string"},"customer_kennitala":{"pattern":"^[0-9]{10}$","description":"`claim`: the kennitala the customer typed","type":"string"},"error_code":{"maxLength":100,"type":"string"},"error_message":{"maxLength":500,"type":"string"}}}},"text/plain":{"schema":{"type":"object","required":["outcome"],"properties":{"outcome":{"anyOf":[{"const":"completed","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"}]},"claim_id":{"format":"uuid","description":"`claim`: the krafa created with POST /v1/claims. Required when completed.","type":"string"},"customer_kennitala":{"pattern":"^[0-9]{10}$","description":"`claim`: the kennitala the customer typed","type":"string"},"error_code":{"maxLength":100,"type":"string"},"error_message":{"maxLength":500,"type":"string"}}}}}}}},"/v1/terminal/requests/{id}/cancel":{"post":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"description":"`tap_to_pay` = the phone opens the tap sheet, `qr` = the phone shows the payment link's QR code, `claim` = the customer types a kennitala on the phone and gets a krafa","anyOf":[{"const":"tap_to_pay","type":"string"},{"const":"qr","type":"string"},{"const":"claim","type":"string"}]},"status":{"anyOf":[{"const":"pending","type":"string"},{"const":"claimed","type":"string"},{"const":"completed","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"expired","type":"string"}]},"expires_at":{"type":"number"},"claimed_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"completed_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"amount":{"nullable":true,"anyOf":[{"description":"The sale, minor units. Null only for requests created before kinds existed","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The sale, minor units. Null only for requests created before kinds existed","type":"integer"}]},{"type":"null"}]},"currency":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_intent":{"description":"`tap_to_pay`: from the start. `qr`: the intent that paid the link, once completed. `claim`: the claim's intent, once completed.","nullable":true,"anyOf":[{"type":"object","required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"],"properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"payment_link":{"nullable":true,"anyOf":[{"type":"object","required":["id","url","status","amount","currency"],"properties":{"id":{"type":"string"},"url":{"description":"The hosted payment page; encode it as the QR code","type":"string"},"status":{"description":"`paid` once a payment went through, `inactive` when the sale was called off or the link expired","anyOf":[{"const":"open","type":"string"},{"const":"paid","type":"string"},{"const":"inactive","type":"string"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"}}},{"type":"null"}]},"claim_id":{"nullable":true,"anyOf":[{"description":"`claim`: the krafa the phone created","type":"string"},{"type":"null"}]},"customer_kennitala":{"nullable":true,"anyOf":[{"description":"`claim`: the payor's kennitala","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt, set once the request is settled and has an intent","type":"string"},{"type":"null"}]},"outcome_uncertain":{"description":"`failed` only: nobody knows whether the card was charged (the phone stopped answering mid-sale). An approval may still arrive and be captured. Check the phone before charging again.","type":"boolean"}},"required":["id","kind","status","expires_at","claimed_at","completed_at","amount","currency","payment_intent","payment_link","claim_id","customer_kennitala","receipt_url","outcome_uncertain"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"description":"`tap_to_pay` = the phone opens the tap sheet, `qr` = the phone shows the payment link's QR code, `claim` = the customer types a kennitala on the phone and gets a krafa","anyOf":[{"const":"tap_to_pay","type":"string"},{"const":"qr","type":"string"},{"const":"claim","type":"string"}]},"status":{"anyOf":[{"const":"pending","type":"string"},{"const":"claimed","type":"string"},{"const":"completed","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"expired","type":"string"}]},"expires_at":{"type":"number"},"claimed_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"completed_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"amount":{"nullable":true,"anyOf":[{"description":"The sale, minor units. Null only for requests created before kinds existed","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The sale, minor units. Null only for requests created before kinds existed","type":"integer"}]},{"type":"null"}]},"currency":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_intent":{"description":"`tap_to_pay`: from the start. `qr`: the intent that paid the link, once completed. `claim`: the claim's intent, once completed.","nullable":true,"anyOf":[{"type":"object","required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"],"properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"payment_link":{"nullable":true,"anyOf":[{"type":"object","required":["id","url","status","amount","currency"],"properties":{"id":{"type":"string"},"url":{"description":"The hosted payment page; encode it as the QR code","type":"string"},"status":{"description":"`paid` once a payment went through, `inactive` when the sale was called off or the link expired","anyOf":[{"const":"open","type":"string"},{"const":"paid","type":"string"},{"const":"inactive","type":"string"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"}}},{"type":"null"}]},"claim_id":{"nullable":true,"anyOf":[{"description":"`claim`: the krafa the phone created","type":"string"},{"type":"null"}]},"customer_kennitala":{"nullable":true,"anyOf":[{"description":"`claim`: the payor's kennitala","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt, set once the request is settled and has an intent","type":"string"},{"type":"null"}]},"outcome_uncertain":{"description":"`failed` only: nobody knows whether the card was charged (the phone stopped answering mid-sale). An approval may still arrive and be captured. Check the phone before charging again.","type":"boolean"}},"required":["id","kind","status","expires_at","claimed_at","completed_at","amount","currency","payment_intent","payment_link","claim_id","customer_kennitala","receipt_url","outcome_uncertain"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"description":"`tap_to_pay` = the phone opens the tap sheet, `qr` = the phone shows the payment link's QR code, `claim` = the customer types a kennitala on the phone and gets a krafa","anyOf":[{"const":"tap_to_pay","type":"string"},{"const":"qr","type":"string"},{"const":"claim","type":"string"}]},"status":{"anyOf":[{"const":"pending","type":"string"},{"const":"claimed","type":"string"},{"const":"completed","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"expired","type":"string"}]},"expires_at":{"type":"number"},"claimed_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"completed_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"amount":{"nullable":true,"anyOf":[{"description":"The sale, minor units. Null only for requests created before kinds existed","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"The sale, minor units. Null only for requests created before kinds existed","type":"integer"}]},{"type":"null"}]},"currency":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_intent":{"description":"`tap_to_pay`: from the start. `qr`: the intent that paid the link, once completed. `claim`: the claim's intent, once completed.","nullable":true,"anyOf":[{"type":"object","required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"],"properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"payment_link":{"nullable":true,"anyOf":[{"type":"object","required":["id","url","status","amount","currency"],"properties":{"id":{"type":"string"},"url":{"description":"The hosted payment page; encode it as the QR code","type":"string"},"status":{"description":"`paid` once a payment went through, `inactive` when the sale was called off or the link expired","anyOf":[{"const":"open","type":"string"},{"const":"paid","type":"string"},{"const":"inactive","type":"string"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"}}},{"type":"null"}]},"claim_id":{"nullable":true,"anyOf":[{"description":"`claim`: the krafa the phone created","type":"string"},{"type":"null"}]},"customer_kennitala":{"nullable":true,"anyOf":[{"description":"`claim`: the payor's kennitala","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt, set once the request is settled and has an intent","type":"string"},{"type":"null"}]},"outcome_uncertain":{"description":"`failed` only: nobody knows whether the card was charged (the phone stopped answering mid-sale). An approval may still arrive and be captured. Check the phone before charging again.","type":"boolean"}},"required":["id","kind","status","expires_at","claimed_at","completed_at","amount","currency","payment_intent","payment_link","claim_id","customer_kennitala","receipt_url","outcome_uncertain"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1TerminalRequestsByIdCancel","tags":["Terminal"],"summary":"Cancel a sale the phone has not picked up","description":"Only while pending (request_not_pending otherwise). The intent is canceled with it, and a `qr` request's link is deactivated.","security":[{"bearerAuth":[]}]}},"/v1/pos-devices/":{"post":{"parameters":[],"responses":{"201":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"pos_device","type":"string"},"kind":{"description":"`device` = locked payment-device key, `phone` = a normal account phone that opted in","anyOf":[{"const":"device","type":"string"},{"const":"phone","type":"string"}]},"label":{"type":"string"},"environment":{"anyOf":[{"const":"test","type":"string"},{"const":"live","type":"string"}]},"online":{"description":"Polled GET /v1/terminal/requests/next within the last 20 seconds","type":"boolean"},"tap_to_pay":{"description":"The phone reported Tap to Pay enabled on it (PATCH /v1/pos/terminal). Without it the handset still takes `qr` and `claim` requests.","type":"boolean"},"created_at":{"type":"number"},"revoked_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"key":{"type":"string"}},"required":["id","object","kind","label","environment","online","tap_to_pay","created_at","revoked_at","key"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"pos_device","type":"string"},"kind":{"description":"`device` = locked payment-device key, `phone` = a normal account phone that opted in","anyOf":[{"const":"device","type":"string"},{"const":"phone","type":"string"}]},"label":{"type":"string"},"environment":{"anyOf":[{"const":"test","type":"string"},{"const":"live","type":"string"}]},"online":{"description":"Polled GET /v1/terminal/requests/next within the last 20 seconds","type":"boolean"},"tap_to_pay":{"description":"The phone reported Tap to Pay enabled on it (PATCH /v1/pos/terminal). Without it the handset still takes `qr` and `claim` requests.","type":"boolean"},"created_at":{"type":"number"},"revoked_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"key":{"type":"string"}},"required":["id","object","kind","label","environment","online","tap_to_pay","created_at","revoked_at","key"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"pos_device","type":"string"},"kind":{"description":"`device` = locked payment-device key, `phone` = a normal account phone that opted in","anyOf":[{"const":"device","type":"string"},{"const":"phone","type":"string"}]},"label":{"type":"string"},"environment":{"anyOf":[{"const":"test","type":"string"},{"const":"live","type":"string"}]},"online":{"description":"Polled GET /v1/terminal/requests/next within the last 20 seconds","type":"boolean"},"tap_to_pay":{"description":"The phone reported Tap to Pay enabled on it (PATCH /v1/pos/terminal). Without it the handset still takes `qr` and `claim` requests.","type":"boolean"},"created_at":{"type":"number"},"revoked_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"key":{"type":"string"}},"required":["id","object","kind","label","environment","online","tap_to_pay","created_at","revoked_at","key"]}}}},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1Pos-devices","description":"Create a locked charge-only payment-device key for a shared phone. Returns the plain key once.","tags":["POS Devices"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["label"],"properties":{"label":{"minLength":1,"maxLength":100,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["label"],"properties":{"label":{"minLength":1,"maxLength":100,"type":"string"}}}},"text/plain":{"schema":{"type":"object","required":["label"],"properties":{"label":{"minLength":1,"maxLength":100,"type":"string"}}}}}}},"get":{"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","kind","label","environment","online","tap_to_pay","created_at","revoked_at"],"properties":{"id":{"type":"string"},"object":{"const":"pos_device","type":"string"},"kind":{"description":"`device` = locked payment-device key, `phone` = a normal account phone that opted in","anyOf":[{"const":"device","type":"string"},{"const":"phone","type":"string"}]},"label":{"type":"string"},"environment":{"anyOf":[{"const":"test","type":"string"},{"const":"live","type":"string"}]},"online":{"description":"Polled GET /v1/terminal/requests/next within the last 20 seconds","type":"boolean"},"tap_to_pay":{"description":"The phone reported Tap to Pay enabled on it (PATCH /v1/pos/terminal). Without it the handset still takes `qr` and `claim` requests.","type":"boolean"},"created_at":{"type":"number"},"revoked_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]}}}}},"required":["object","data"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","kind","label","environment","online","tap_to_pay","created_at","revoked_at"],"properties":{"id":{"type":"string"},"object":{"const":"pos_device","type":"string"},"kind":{"description":"`device` = locked payment-device key, `phone` = a normal account phone that opted in","anyOf":[{"const":"device","type":"string"},{"const":"phone","type":"string"}]},"label":{"type":"string"},"environment":{"anyOf":[{"const":"test","type":"string"},{"const":"live","type":"string"}]},"online":{"description":"Polled GET /v1/terminal/requests/next within the last 20 seconds","type":"boolean"},"tap_to_pay":{"description":"The phone reported Tap to Pay enabled on it (PATCH /v1/pos/terminal). Without it the handset still takes `qr` and `claim` requests.","type":"boolean"},"created_at":{"type":"number"},"revoked_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]}}}}},"required":["object","data"]}},"text/plain":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","kind","label","environment","online","tap_to_pay","created_at","revoked_at"],"properties":{"id":{"type":"string"},"object":{"const":"pos_device","type":"string"},"kind":{"description":"`device` = locked payment-device key, `phone` = a normal account phone that opted in","anyOf":[{"const":"device","type":"string"},{"const":"phone","type":"string"}]},"label":{"type":"string"},"environment":{"anyOf":[{"const":"test","type":"string"},{"const":"live","type":"string"}]},"online":{"description":"Polled GET /v1/terminal/requests/next within the last 20 seconds","type":"boolean"},"tap_to_pay":{"description":"The phone reported Tap to Pay enabled on it (PATCH /v1/pos/terminal). Without it the handset still takes `qr` and `claim` requests.","type":"boolean"},"created_at":{"type":"number"},"revoked_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]}}}}},"required":["object","data"]}}}},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"getV1Pos-devices","description":"List the terminals for the current environment: locked payment devices (kind `device`) and the account phones that turned on \"take sales from an iPad\" (kind `phone`), each with `online` = polled within the last 20 seconds.","tags":["POS Devices"],"security":[{"bearerAuth":[]}]}},"/v1/pos-devices/{id}":{"delete":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"pos_device","type":"string"},"revoked":{"const":true,"type":"boolean"}},"required":["id","object","revoked"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"pos_device","type":"string"},"revoked":{"const":true,"type":"boolean"}},"required":["id","object","revoked"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"pos_device","type":"string"},"revoked":{"const":true,"type":"boolean"}},"required":["id","object","revoked"]}}}},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"deleteV1Pos-devicesById","description":"Revoke a payment device.","tags":["POS Devices"],"security":[{"bearerAuth":[]}]}},"/v1/pos/pages/":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","livemode","name","sort_order","tiles","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"pos_page","type":"string"},"livemode":{"type":"boolean"},"name":{"type":"string"},"sort_order":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"tiles":{"type":"array","items":{"type":"object","required":["product_id","sort_order"],"properties":{"product_id":{"type":"string"},"sort_order":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}}},"required":["object","data"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","livemode","name","sort_order","tiles","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"pos_page","type":"string"},"livemode":{"type":"boolean"},"name":{"type":"string"},"sort_order":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"tiles":{"type":"array","items":{"type":"object","required":["product_id","sort_order"],"properties":{"product_id":{"type":"string"},"sort_order":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}}},"required":["object","data"]}},"text/plain":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","livemode","name","sort_order","tiles","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"pos_page","type":"string"},"livemode":{"type":"boolean"},"name":{"type":"string"},"sort_order":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"tiles":{"type":"array","items":{"type":"object","required":["product_id","sort_order"],"properties":{"product_id":{"type":"string"},"sort_order":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}}},"required":["object","data"]}}}}},"operationId":"getV1PosPages","tags":["POS"],"summary":"List POS pages","description":"The merchant's tile pages for the app's checkout, in display order, with the product ids on each.","security":[{"bearerAuth":[]}]},"post":{"parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"pos_page","type":"string"},"livemode":{"type":"boolean"},"name":{"type":"string"},"sort_order":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"tiles":{"type":"array","items":{"type":"object","required":["product_id","sort_order"],"properties":{"product_id":{"type":"string"},"sort_order":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","name","sort_order","tiles","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"pos_page","type":"string"},"livemode":{"type":"boolean"},"name":{"type":"string"},"sort_order":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"tiles":{"type":"array","items":{"type":"object","required":["product_id","sort_order"],"properties":{"product_id":{"type":"string"},"sort_order":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","name","sort_order","tiles","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"pos_page","type":"string"},"livemode":{"type":"boolean"},"name":{"type":"string"},"sort_order":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"tiles":{"type":"array","items":{"type":"object","required":["product_id","sort_order"],"properties":{"product_id":{"type":"string"},"sort_order":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","name","sort_order","tiles","created_at","updated_at"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1PosPages","tags":["POS"],"summary":"Create a POS page","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"minLength":1,"maxLength":80,"type":"string"},"sort_order":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]}}}},"multipart/form-data":{"schema":{"type":"object","required":["name"],"properties":{"name":{"minLength":1,"maxLength":80,"type":"string"},"sort_order":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]}}}},"text/plain":{"schema":{"type":"object","required":["name"],"properties":{"name":{"minLength":1,"maxLength":80,"type":"string"},"sort_order":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]}}}}}}}},"/v1/pos/pages/{id}":{"patch":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"pos_page","type":"string"},"livemode":{"type":"boolean"},"name":{"type":"string"},"sort_order":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"tiles":{"type":"array","items":{"type":"object","required":["product_id","sort_order"],"properties":{"product_id":{"type":"string"},"sort_order":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","name","sort_order","tiles","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"pos_page","type":"string"},"livemode":{"type":"boolean"},"name":{"type":"string"},"sort_order":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"tiles":{"type":"array","items":{"type":"object","required":["product_id","sort_order"],"properties":{"product_id":{"type":"string"},"sort_order":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","name","sort_order","tiles","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"pos_page","type":"string"},"livemode":{"type":"boolean"},"name":{"type":"string"},"sort_order":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"tiles":{"type":"array","items":{"type":"object","required":["product_id","sort_order"],"properties":{"product_id":{"type":"string"},"sort_order":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","name","sort_order","tiles","created_at","updated_at"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"patchV1PosPagesById","tags":["POS"],"summary":"Rename or reorder a POS page","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":80,"type":"string"},"sort_order":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":80,"type":"string"},"sort_order":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]}}}},"text/plain":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":80,"type":"string"},"sort_order":{"minimum":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"type":"integer"}]}}}}}}},"delete":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"pos_page","type":"string"},"deleted":{"const":true,"type":"boolean"}},"required":["id","object","deleted"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"pos_page","type":"string"},"deleted":{"const":true,"type":"boolean"}},"required":["id","object","deleted"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"pos_page","type":"string"},"deleted":{"const":true,"type":"boolean"}},"required":["id","object","deleted"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"deleteV1PosPagesById","tags":["POS"],"summary":"Delete a POS page","security":[{"bearerAuth":[]}]}},"/v1/pos/pages/{id}/tiles":{"put":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"pos_page","type":"string"},"livemode":{"type":"boolean"},"name":{"type":"string"},"sort_order":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"tiles":{"type":"array","items":{"type":"object","required":["product_id","sort_order"],"properties":{"product_id":{"type":"string"},"sort_order":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","name","sort_order","tiles","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"pos_page","type":"string"},"livemode":{"type":"boolean"},"name":{"type":"string"},"sort_order":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"tiles":{"type":"array","items":{"type":"object","required":["product_id","sort_order"],"properties":{"product_id":{"type":"string"},"sort_order":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","name","sort_order","tiles","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"pos_page","type":"string"},"livemode":{"type":"boolean"},"name":{"type":"string"},"sort_order":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"tiles":{"type":"array","items":{"type":"object","required":["product_id","sort_order"],"properties":{"product_id":{"type":"string"},"sort_order":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","name","sort_order","tiles","created_at","updated_at"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"putV1PosPagesByIdTiles","tags":["POS"],"summary":"Replace the tiles on a POS page","description":"Whole-set replace: send the grid as shown. Products must be the merchant's own active one-time products.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["tiles"],"properties":{"tiles":{"maxItems":200,"type":"array","items":{"type":"object","required":["product_id","sort_order"],"properties":{"product_id":{"format":"uuid","type":"string"},"sort_order":{"minimum":0,"default":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"default":0,"type":"integer"}]}}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["tiles"],"properties":{"tiles":{"maxItems":200,"type":"array","items":{"type":"object","required":["product_id","sort_order"],"properties":{"product_id":{"format":"uuid","type":"string"},"sort_order":{"minimum":0,"default":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"default":0,"type":"integer"}]}}}}}}},"text/plain":{"schema":{"type":"object","required":["tiles"],"properties":{"tiles":{"maxItems":200,"type":"array","items":{"type":"object","required":["product_id","sort_order"],"properties":{"product_id":{"format":"uuid","type":"string"},"sort_order":{"minimum":0,"default":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"default":0,"type":"integer"}]}}}}}}}}}}},"/v1/pos/stock/":{"get":{"parameters":[{"description":"Only products at or below their threshold: the warning list","schema":{"type":"boolean"},"in":"query","name":"low","required":false},{"description":"Matches name, code or barcode","schema":{"type":"string","maxLength":100},"in":"query","name":"search","required":false},{"schema":{"minimum":1,"maximum":500,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":500,"type":"integer"}]},"in":"query","name":"limit","required":false}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["object","livemode","product_id","variant_id","product_code","product_name","barcode","quantity","low_stock_threshold","low","track","updated_at"],"properties":{"object":{"const":"stock_level","type":"string"},"livemode":{"type":"boolean"},"product_id":{"type":"string"},"variant_id":{"nullable":true,"anyOf":[{"description":"Set when this count is for one variant of the product (e.g. size M); null for the whole product","type":"string"},{"type":"null"}]},"product_code":{"type":"string"},"product_name":{"type":"string"},"barcode":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"description":"On the shelf now. May be negative","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"On the shelf now. May be negative","type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"low":{"type":"boolean"},"track":{"description":"False parks the product: sales stop moving it","type":"boolean"},"updated_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]}}}}},"required":["object","data"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["object","livemode","product_id","variant_id","product_code","product_name","barcode","quantity","low_stock_threshold","low","track","updated_at"],"properties":{"object":{"const":"stock_level","type":"string"},"livemode":{"type":"boolean"},"product_id":{"type":"string"},"variant_id":{"nullable":true,"anyOf":[{"description":"Set when this count is for one variant of the product (e.g. size M); null for the whole product","type":"string"},{"type":"null"}]},"product_code":{"type":"string"},"product_name":{"type":"string"},"barcode":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"description":"On the shelf now. May be negative","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"On the shelf now. May be negative","type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"low":{"type":"boolean"},"track":{"description":"False parks the product: sales stop moving it","type":"boolean"},"updated_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]}}}}},"required":["object","data"]}},"text/plain":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["object","livemode","product_id","variant_id","product_code","product_name","barcode","quantity","low_stock_threshold","low","track","updated_at"],"properties":{"object":{"const":"stock_level","type":"string"},"livemode":{"type":"boolean"},"product_id":{"type":"string"},"variant_id":{"nullable":true,"anyOf":[{"description":"Set when this count is for one variant of the product (e.g. size M); null for the whole product","type":"string"},{"type":"null"}]},"product_code":{"type":"string"},"product_name":{"type":"string"},"barcode":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"description":"On the shelf now. May be negative","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"On the shelf now. May be negative","type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"low":{"type":"boolean"},"track":{"description":"False parks the product: sales stop moving it","type":"boolean"},"updated_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]}}}}},"required":["object","data"]}}}},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"getV1PosStock","tags":["POS"],"summary":"List stock counts","description":"The sellable catalogue with its counts. Products the merchant has never counted are listed at quantity 0 with no threshold, so the list is usable the day the app is switched on. ?low=true narrows it to the warning list.","security":[{"bearerAuth":[]}]}},"/v1/pos/stock/adjust":{"post":{"parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"stock_level","type":"string"},"livemode":{"type":"boolean"},"product_id":{"type":"string"},"variant_id":{"nullable":true,"anyOf":[{"description":"Set when this count is for one variant of the product (e.g. size M); null for the whole product","type":"string"},{"type":"null"}]},"product_code":{"type":"string"},"product_name":{"type":"string"},"barcode":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"description":"On the shelf now. May be negative","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"On the shelf now. May be negative","type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"low":{"type":"boolean"},"track":{"description":"False parks the product: sales stop moving it","type":"boolean"},"updated_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["object","livemode","product_id","variant_id","product_code","product_name","barcode","quantity","low_stock_threshold","low","track","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"object":{"const":"stock_level","type":"string"},"livemode":{"type":"boolean"},"product_id":{"type":"string"},"variant_id":{"nullable":true,"anyOf":[{"description":"Set when this count is for one variant of the product (e.g. size M); null for the whole product","type":"string"},{"type":"null"}]},"product_code":{"type":"string"},"product_name":{"type":"string"},"barcode":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"description":"On the shelf now. May be negative","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"On the shelf now. May be negative","type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"low":{"type":"boolean"},"track":{"description":"False parks the product: sales stop moving it","type":"boolean"},"updated_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["object","livemode","product_id","variant_id","product_code","product_name","barcode","quantity","low_stock_threshold","low","track","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"object":{"const":"stock_level","type":"string"},"livemode":{"type":"boolean"},"product_id":{"type":"string"},"variant_id":{"nullable":true,"anyOf":[{"description":"Set when this count is for one variant of the product (e.g. size M); null for the whole product","type":"string"},{"type":"null"}]},"product_code":{"type":"string"},"product_name":{"type":"string"},"barcode":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"description":"On the shelf now. May be negative","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"On the shelf now. May be negative","type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"low":{"type":"boolean"},"track":{"description":"False parks the product: sales stop moving it","type":"boolean"},"updated_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["object","livemode","product_id","variant_id","product_code","product_name","barcode","quantity","low_stock_threshold","low","track","updated_at"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1PosStockAdjust","tags":["POS"],"summary":"Adjust a stock count","description":"Moves one product's count (or one variant's, with variant_id) by delta and records why. The count may go negative: a shop that sold something the count said it did not have is shown -2, not stopped at the counter. Publishes stock.adjusted.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["product_id","delta","reason"],"properties":{"product_id":{"format":"uuid","type":"string"},"variant_id":{"format":"uuid","description":"Count one variant of the product (e.g. size M) instead of the whole product. A counted variant at 0 or below is sold out, and checkout refuses it.","type":"string"},"delta":{"minimum":-1000000,"maximum":1000000,"description":"Signed change. Goods received is positive, a correction down is negative. Must not be zero","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":-1000000,"maximum":1000000,"description":"Signed change. Goods received is positive, a correction down is negative. Must not be zero","type":"integer"}]},"reason":{"description":"Why the count moved","anyOf":[{"const":"refund","type":"string"},{"const":"received","type":"string"},{"const":"adjustment","type":"string"},{"const":"count","type":"string"}]},"note":{"maxLength":500,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["product_id","delta","reason"],"properties":{"product_id":{"format":"uuid","type":"string"},"variant_id":{"format":"uuid","description":"Count one variant of the product (e.g. size M) instead of the whole product. A counted variant at 0 or below is sold out, and checkout refuses it.","type":"string"},"delta":{"minimum":-1000000,"maximum":1000000,"description":"Signed change. Goods received is positive, a correction down is negative. Must not be zero","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":-1000000,"maximum":1000000,"description":"Signed change. Goods received is positive, a correction down is negative. Must not be zero","type":"integer"}]},"reason":{"description":"Why the count moved","anyOf":[{"const":"refund","type":"string"},{"const":"received","type":"string"},{"const":"adjustment","type":"string"},{"const":"count","type":"string"}]},"note":{"maxLength":500,"type":"string"}}}},"text/plain":{"schema":{"type":"object","required":["product_id","delta","reason"],"properties":{"product_id":{"format":"uuid","type":"string"},"variant_id":{"format":"uuid","description":"Count one variant of the product (e.g. size M) instead of the whole product. A counted variant at 0 or below is sold out, and checkout refuses it.","type":"string"},"delta":{"minimum":-1000000,"maximum":1000000,"description":"Signed change. Goods received is positive, a correction down is negative. Must not be zero","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":-1000000,"maximum":1000000,"description":"Signed change. Goods received is positive, a correction down is negative. Must not be zero","type":"integer"}]},"reason":{"description":"Why the count moved","anyOf":[{"const":"refund","type":"string"},{"const":"received","type":"string"},{"const":"adjustment","type":"string"},{"const":"count","type":"string"}]},"note":{"maxLength":500,"type":"string"}}}}}}}},"/v1/pos/stock/{product_id}/movements":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"product_id","required":true},{"schema":{"minimum":1,"maximum":500,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":500,"type":"integer"}]},"in":"query","name":"limit","required":false}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","product_id","variant_id","delta","reason","payment_intent_id","note","created_at"],"properties":{"id":{"type":"string"},"object":{"const":"stock_movement","type":"string"},"product_id":{"type":"string"},"variant_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"delta":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"reason":{"type":"string"},"payment_intent_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"number"}}}}},"required":["object","data"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","product_id","variant_id","delta","reason","payment_intent_id","note","created_at"],"properties":{"id":{"type":"string"},"object":{"const":"stock_movement","type":"string"},"product_id":{"type":"string"},"variant_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"delta":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"reason":{"type":"string"},"payment_intent_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"number"}}}}},"required":["object","data"]}},"text/plain":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","product_id","variant_id","delta","reason","payment_intent_id","note","created_at"],"properties":{"id":{"type":"string"},"object":{"const":"stock_movement","type":"string"},"product_id":{"type":"string"},"variant_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"delta":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"reason":{"type":"string"},"payment_intent_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"number"}}}}},"required":["object","data"]}}}},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"getV1PosStockByProduct_idMovements","tags":["POS"],"summary":"List stock movements for a product","description":"Why the count is what it is, newest first. Append-only: sales, refunds, goods received, counts and hand corrections, each with its note.","security":[{"bearerAuth":[]}]}},"/v1/pos/stock/{product_id}":{"patch":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"product_id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"stock_level","type":"string"},"livemode":{"type":"boolean"},"product_id":{"type":"string"},"variant_id":{"nullable":true,"anyOf":[{"description":"Set when this count is for one variant of the product (e.g. size M); null for the whole product","type":"string"},{"type":"null"}]},"product_code":{"type":"string"},"product_name":{"type":"string"},"barcode":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"description":"On the shelf now. May be negative","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"On the shelf now. May be negative","type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"low":{"type":"boolean"},"track":{"description":"False parks the product: sales stop moving it","type":"boolean"},"updated_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["object","livemode","product_id","variant_id","product_code","product_name","barcode","quantity","low_stock_threshold","low","track","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"object":{"const":"stock_level","type":"string"},"livemode":{"type":"boolean"},"product_id":{"type":"string"},"variant_id":{"nullable":true,"anyOf":[{"description":"Set when this count is for one variant of the product (e.g. size M); null for the whole product","type":"string"},{"type":"null"}]},"product_code":{"type":"string"},"product_name":{"type":"string"},"barcode":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"description":"On the shelf now. May be negative","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"On the shelf now. May be negative","type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"low":{"type":"boolean"},"track":{"description":"False parks the product: sales stop moving it","type":"boolean"},"updated_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["object","livemode","product_id","variant_id","product_code","product_name","barcode","quantity","low_stock_threshold","low","track","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"object":{"const":"stock_level","type":"string"},"livemode":{"type":"boolean"},"product_id":{"type":"string"},"variant_id":{"nullable":true,"anyOf":[{"description":"Set when this count is for one variant of the product (e.g. size M); null for the whole product","type":"string"},{"type":"null"}]},"product_code":{"type":"string"},"product_name":{"type":"string"},"barcode":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"description":"On the shelf now. May be negative","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"On the shelf now. May be negative","type":"integer"}]},"low_stock_threshold":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"low":{"type":"boolean"},"track":{"description":"False parks the product: sales stop moving it","type":"boolean"},"updated_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["object","livemode","product_id","variant_id","product_code","product_name","barcode","quantity","low_stock_threshold","low","track","updated_at"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"patchV1PosStockByProduct_id","tags":["POS"],"summary":"Set a product's low-stock threshold or stop tracking it","description":"Creates the level row at quantity 0 when there is none, so a merchant who wants to be warned at 5 does not have to count the shelf first.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"variant_id":{"format":"uuid","description":"Configure one variant's count instead of the whole product's","type":"string"},"low_stock_threshold":{"nullable":true,"anyOf":[{"minimum":0,"maximum":1000000,"description":"Warn at or below this. Null clears it, and a product with no threshold is never low","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"maximum":1000000,"description":"Warn at or below this. Null clears it, and a product with no threshold is never low","type":"integer"}]},{"type":"null"}]},"track":{"description":"False parks the product: the count and its history stay, sales stop moving it","type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"variant_id":{"format":"uuid","description":"Configure one variant's count instead of the whole product's","type":"string"},"low_stock_threshold":{"nullable":true,"anyOf":[{"minimum":0,"maximum":1000000,"description":"Warn at or below this. Null clears it, and a product with no threshold is never low","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"maximum":1000000,"description":"Warn at or below this. Null clears it, and a product with no threshold is never low","type":"integer"}]},{"type":"null"}]},"track":{"description":"False parks the product: the count and its history stay, sales stop moving it","type":"boolean"}}}},"text/plain":{"schema":{"type":"object","properties":{"variant_id":{"format":"uuid","description":"Configure one variant's count instead of the whole product's","type":"string"},"low_stock_threshold":{"nullable":true,"anyOf":[{"minimum":0,"maximum":1000000,"description":"Warn at or below this. Null clears it, and a product with no threshold is never low","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"maximum":1000000,"description":"Warn at or below this. Null clears it, and a product with no threshold is never low","type":"integer"}]},{"type":"null"}]},"track":{"description":"False parks the product: the count and its history stay, sales stop moving it","type":"boolean"}}}}}}}},"/v1/pos/terminal/":{"patch":{"parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"The calling API key's id — the same id the iPad sends sales to","type":"string"},"object":{"const":"pos_terminal","type":"string"},"kind":{"anyOf":[{"const":"device","type":"string"},{"const":"phone","type":"string"}]},"enabled":{"type":"boolean"},"label":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"tap_to_pay":{"description":"Whether this phone reported Tap to Pay enabled","type":"boolean"},"seen_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","object","kind","enabled","label","tap_to_pay","seen_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"description":"The calling API key's id — the same id the iPad sends sales to","type":"string"},"object":{"const":"pos_terminal","type":"string"},"kind":{"anyOf":[{"const":"device","type":"string"},{"const":"phone","type":"string"}]},"enabled":{"type":"boolean"},"label":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"tap_to_pay":{"description":"Whether this phone reported Tap to Pay enabled","type":"boolean"},"seen_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","object","kind","enabled","label","tap_to_pay","seen_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"description":"The calling API key's id — the same id the iPad sends sales to","type":"string"},"object":{"const":"pos_terminal","type":"string"},"kind":{"anyOf":[{"const":"device","type":"string"},{"const":"phone","type":"string"}]},"enabled":{"type":"boolean"},"label":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"tap_to_pay":{"description":"Whether this phone reported Tap to Pay enabled","type":"boolean"},"seen_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","object","kind","enabled","label","tap_to_pay","seen_at"]}}}},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"patchV1PosTerminal","tags":["POS Devices"],"summary":"Turn this device into an iPad terminal","description":"Switches the calling device on or off as a target for GET /v1/pos-devices and POST /v1/terminal/requests, and names it. Touches the last-seen stamp, so a phone that just switched on shows as online.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["enabled"],"properties":{"enabled":{"description":"Take sales this merchant's iPad sends to this device","type":"boolean"},"label":{"minLength":1,"maxLength":100,"description":"What the iPad calls this phone, e.g. \"Sími við kassann\". Kept when switched off.","type":"string"},"tap_to_pay":{"description":"Whether Tap to Pay is enabled on this phone. The iPad only offers Tap to Pay on a handset that has it; QR and krafa work on any. Omitted keeps the stored value.","type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","required":["enabled"],"properties":{"enabled":{"description":"Take sales this merchant's iPad sends to this device","type":"boolean"},"label":{"minLength":1,"maxLength":100,"description":"What the iPad calls this phone, e.g. \"Sími við kassann\". Kept when switched off.","type":"string"},"tap_to_pay":{"description":"Whether Tap to Pay is enabled on this phone. The iPad only offers Tap to Pay on a handset that has it; QR and krafa work on any. Omitted keeps the stored value.","type":"boolean"}}}},"text/plain":{"schema":{"type":"object","required":["enabled"],"properties":{"enabled":{"description":"Take sales this merchant's iPad sends to this device","type":"boolean"},"label":{"minLength":1,"maxLength":100,"description":"What the iPad calls this phone, e.g. \"Sími við kassann\". Kept when switched off.","type":"string"},"tap_to_pay":{"description":"Whether Tap to Pay is enabled on this phone. The iPad only offers Tap to Pay on a handset that has it; QR and krafa work on any. Omitted keeps the stored value.","type":"boolean"}}}}}}}},"/v1/pos/device/":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"The calling API key's id. This is the `pos_device_id` stamped on every sale it creates.","type":"string"},"object":{"const":"pos_device","type":"string"},"livemode":{"type":"boolean"},"label":{"nullable":true,"anyOf":[{"description":"Human label for the till, e.g. 'Kassi 1'. Null on a normal merchant key.","type":"string"},{"type":"null"}]},"role":{"description":"The key's capability. `pos` is a locked charge-only device key.","anyOf":[{"const":"full","type":"string"},{"const":"pos","type":"string"},{"const":"read_only","type":"string"}]}},"required":["id","object","livemode","label","role"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"description":"The calling API key's id. This is the `pos_device_id` stamped on every sale it creates.","type":"string"},"object":{"const":"pos_device","type":"string"},"livemode":{"type":"boolean"},"label":{"nullable":true,"anyOf":[{"description":"Human label for the till, e.g. 'Kassi 1'. Null on a normal merchant key.","type":"string"},{"type":"null"}]},"role":{"description":"The key's capability. `pos` is a locked charge-only device key.","anyOf":[{"const":"full","type":"string"},{"const":"pos","type":"string"},{"const":"read_only","type":"string"}]}},"required":["id","object","livemode","label","role"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"description":"The calling API key's id. This is the `pos_device_id` stamped on every sale it creates.","type":"string"},"object":{"const":"pos_device","type":"string"},"livemode":{"type":"boolean"},"label":{"nullable":true,"anyOf":[{"description":"Human label for the till, e.g. 'Kassi 1'. Null on a normal merchant key.","type":"string"},{"type":"null"}]},"role":{"description":"The key's capability. `pos` is a locked charge-only device key.","anyOf":[{"const":"full","type":"string"},{"const":"pos","type":"string"},{"const":"read_only","type":"string"}]}},"required":["id","object","livemode","label","role"]}}}}},"operationId":"getV1PosDevice","tags":["POS"],"summary":"The calling device","description":"The API key making the request, as the POS app sees itself: its id (the pos_device_id stamped on its sales), its label and its role. Allowed for the locked pos role.","security":[{"bearerAuth":[]}]}},"/v1/pos/staff/":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"description":"A person who can ring up a sale. The PIN is never returned.","type":"object","required":["id","object","livemode","name","active","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"pos_staff","type":"string"},"livemode":{"type":"boolean"},"name":{"description":"Display name shown on the till's lock screen","type":"string"},"active":{"description":"Inactive staff cannot verify a PIN and are not offered on the lock screen","type":"boolean"},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}}},"required":["object","data"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"description":"A person who can ring up a sale. The PIN is never returned.","type":"object","required":["id","object","livemode","name","active","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"pos_staff","type":"string"},"livemode":{"type":"boolean"},"name":{"description":"Display name shown on the till's lock screen","type":"string"},"active":{"description":"Inactive staff cannot verify a PIN and are not offered on the lock screen","type":"boolean"},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}}},"required":["object","data"]}},"text/plain":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"description":"A person who can ring up a sale. The PIN is never returned.","type":"object","required":["id","object","livemode","name","active","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"pos_staff","type":"string"},"livemode":{"type":"boolean"},"name":{"description":"Display name shown on the till's lock screen","type":"string"},"active":{"description":"Inactive staff cannot verify a PIN and are not offered on the lock screen","type":"boolean"},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}}},"required":["object","data"]}}}}},"operationId":"getV1PosStaff","tags":["POS"],"summary":"List POS staff","description":"Everyone who can ring up a sale, active or not, in name order. Names and active flags only — PINs and their hashes are never returned. Allowed for the locked pos role, which needs the roster to draw its lock screen.","security":[{"bearerAuth":[]}]},"post":{"parameters":[],"responses":{"200":{"description":"A person who can ring up a sale. The PIN is never returned.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"pos_staff","type":"string"},"livemode":{"type":"boolean"},"name":{"description":"Display name shown on the till's lock screen","type":"string"},"active":{"description":"Inactive staff cannot verify a PIN and are not offered on the lock screen","type":"boolean"},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","name","active","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"pos_staff","type":"string"},"livemode":{"type":"boolean"},"name":{"description":"Display name shown on the till's lock screen","type":"string"},"active":{"description":"Inactive staff cannot verify a PIN and are not offered on the lock screen","type":"boolean"},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","name","active","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"pos_staff","type":"string"},"livemode":{"type":"boolean"},"name":{"description":"Display name shown on the till's lock screen","type":"string"},"active":{"description":"Inactive staff cannot verify a PIN and are not offered on the lock screen","type":"boolean"},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","name","active","created_at","updated_at"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"409":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1PosStaff","tags":["POS"],"summary":"Add a POS staff member","description":"409 staff_name_taken when that name is already on the merchant's list in this environment.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","pin"],"properties":{"name":{"minLength":1,"maxLength":100,"type":"string"},"pin":{"pattern":"^[0-9]{4,6}$","description":"4 to 6 digits. Stored as a scrypt hash; never returned.","type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["name","pin"],"properties":{"name":{"minLength":1,"maxLength":100,"type":"string"},"pin":{"pattern":"^[0-9]{4,6}$","description":"4 to 6 digits. Stored as a scrypt hash; never returned.","type":"string"}}}},"text/plain":{"schema":{"type":"object","required":["name","pin"],"properties":{"name":{"minLength":1,"maxLength":100,"type":"string"},"pin":{"pattern":"^[0-9]{4,6}$","description":"4 to 6 digits. Stored as a scrypt hash; never returned.","type":"string"}}}}}}}},"/v1/pos/staff/{id}":{"patch":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"A person who can ring up a sale. The PIN is never returned.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"pos_staff","type":"string"},"livemode":{"type":"boolean"},"name":{"description":"Display name shown on the till's lock screen","type":"string"},"active":{"description":"Inactive staff cannot verify a PIN and are not offered on the lock screen","type":"boolean"},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","name","active","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"pos_staff","type":"string"},"livemode":{"type":"boolean"},"name":{"description":"Display name shown on the till's lock screen","type":"string"},"active":{"description":"Inactive staff cannot verify a PIN and are not offered on the lock screen","type":"boolean"},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","name","active","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"pos_staff","type":"string"},"livemode":{"type":"boolean"},"name":{"description":"Display name shown on the till's lock screen","type":"string"},"active":{"description":"Inactive staff cannot verify a PIN and are not offered on the lock screen","type":"boolean"},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","name","active","created_at","updated_at"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"409":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"patchV1PosStaffById","tags":["POS"],"summary":"Rename, rotate the PIN, or deactivate a staff member","description":"Staff are deactivated rather than deleted, so the pos_staff_id stamped on a past sale keeps resolving to a name.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":100,"type":"string"},"pin":{"pattern":"^[0-9]{4,6}$","type":"string"},"active":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":100,"type":"string"},"pin":{"pattern":"^[0-9]{4,6}$","type":"string"},"active":{"type":"boolean"}}}},"text/plain":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":100,"type":"string"},"pin":{"pattern":"^[0-9]{4,6}$","type":"string"},"active":{"type":"boolean"}}}}}}}},"/v1/pos/staff/verify":{"post":{"parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"pos_staff","type":"string"},"name":{"type":"string"}},"required":["id","object","name"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"pos_staff","type":"string"},"name":{"type":"string"}},"required":["id","object","name"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"pos_staff","type":"string"},"name":{"type":"string"}},"required":["id","object","name"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1PosStaffVerify","tags":["POS"],"summary":"Check a staff PIN","description":"Returns the staff member the PIN belongs to, or 401 invalid_pin. Rate limited to 10 attempts per API key per minute (429 too_many_attempts). Allowed for the locked pos role.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["pin"],"properties":{"pin":{"minLength":4,"maxLength":6,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["pin"],"properties":{"pin":{"minLength":4,"maxLength":6,"type":"string"}}}},"text/plain":{"schema":{"type":"object","required":["pin"],"properties":{"pin":{"minLength":4,"maxLength":6,"type":"string"}}}}}}}},"/v1/pos/z-report/":{"get":{"parameters":[{"description":"The day to close, YYYY-MM-DD, read in Atlantic/Reykjavik (UTC+0 all year)","schema":{"type":"string","pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}$"},"in":"query","name":"date","required":true},{"description":"Total one till only: an API key id. Ignored for a locked pos key, which always gets its own.","schema":{"type":"string","format":"uuid"},"in":"query","name":"device_id","required":false}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"pos_z_report","type":"string"},"livemode":{"type":"boolean"},"date":{"description":"The day this report covers, YYYY-MM-DD","type":"string"},"timezone":{"description":"Always Atlantic/Reykjavik, which is UTC+0 all year","type":"string"},"device_id":{"nullable":true,"anyOf":[{"description":"The till this report is scoped to, or null for the whole merchant","type":"string"},{"type":"null"}]},"sales_count":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"gross":{"description":"Sum of the charged amounts, in minor units","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Sum of the charged amounts, in minor units","type":"integer"}]},"discounts":{"description":"Line discounts plus whole-sale discounts given on the day","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Line discounts plus whole-sale discounts given on the day","type":"integer"}]},"refunds":{"description":"Refunds processed on the day, counted by the refund's own date","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Refunds processed on the day, counted by the refund's own date","type":"integer"}]},"net":{"description":"gross - refunds","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"gross - refunds","type":"integer"}]},"by_method":{"description":"All four methods, always, in a fixed order","type":"array","items":{"type":"object","required":["method","count","amount"],"properties":{"method":{"anyOf":[{"const":"tap_to_pay","type":"string"},{"const":"cash","type":"string"},{"const":"claim","type":"string"},{"const":"card_link","type":"string"}]},"count":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}}}},"by_vat":{"description":"Only the rates that occurred, highest rate first","type":"array","items":{"type":"object","required":["rate","net","vat","gross"],"properties":{"rate":{"description":"VAT percentage: 0, 11 or 24","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT percentage: 0, 11 or 24","type":"integer"}]},"net":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"vat":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"gross":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}}}},"by_staff":{"description":"Only sales that carried a staff_id; biggest taker first","type":"array","items":{"type":"object","required":["staff_id","name","count","amount"],"properties":{"staff_id":{"type":"string"},"name":{"type":"string"},"count":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}}}},"first_sale_at":{"nullable":true,"anyOf":[{"description":"Unix seconds","type":"number"},{"type":"null"}]},"last_sale_at":{"nullable":true,"anyOf":[{"description":"Unix seconds","type":"number"},{"type":"null"}]}},"required":["object","livemode","date","timezone","device_id","sales_count","gross","discounts","refunds","net","by_method","by_vat","by_staff","first_sale_at","last_sale_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"object":{"const":"pos_z_report","type":"string"},"livemode":{"type":"boolean"},"date":{"description":"The day this report covers, YYYY-MM-DD","type":"string"},"timezone":{"description":"Always Atlantic/Reykjavik, which is UTC+0 all year","type":"string"},"device_id":{"nullable":true,"anyOf":[{"description":"The till this report is scoped to, or null for the whole merchant","type":"string"},{"type":"null"}]},"sales_count":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"gross":{"description":"Sum of the charged amounts, in minor units","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Sum of the charged amounts, in minor units","type":"integer"}]},"discounts":{"description":"Line discounts plus whole-sale discounts given on the day","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Line discounts plus whole-sale discounts given on the day","type":"integer"}]},"refunds":{"description":"Refunds processed on the day, counted by the refund's own date","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Refunds processed on the day, counted by the refund's own date","type":"integer"}]},"net":{"description":"gross - refunds","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"gross - refunds","type":"integer"}]},"by_method":{"description":"All four methods, always, in a fixed order","type":"array","items":{"type":"object","required":["method","count","amount"],"properties":{"method":{"anyOf":[{"const":"tap_to_pay","type":"string"},{"const":"cash","type":"string"},{"const":"claim","type":"string"},{"const":"card_link","type":"string"}]},"count":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}}}},"by_vat":{"description":"Only the rates that occurred, highest rate first","type":"array","items":{"type":"object","required":["rate","net","vat","gross"],"properties":{"rate":{"description":"VAT percentage: 0, 11 or 24","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT percentage: 0, 11 or 24","type":"integer"}]},"net":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"vat":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"gross":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}}}},"by_staff":{"description":"Only sales that carried a staff_id; biggest taker first","type":"array","items":{"type":"object","required":["staff_id","name","count","amount"],"properties":{"staff_id":{"type":"string"},"name":{"type":"string"},"count":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}}}},"first_sale_at":{"nullable":true,"anyOf":[{"description":"Unix seconds","type":"number"},{"type":"null"}]},"last_sale_at":{"nullable":true,"anyOf":[{"description":"Unix seconds","type":"number"},{"type":"null"}]}},"required":["object","livemode","date","timezone","device_id","sales_count","gross","discounts","refunds","net","by_method","by_vat","by_staff","first_sale_at","last_sale_at"]}},"text/plain":{"schema":{"type":"object","properties":{"object":{"const":"pos_z_report","type":"string"},"livemode":{"type":"boolean"},"date":{"description":"The day this report covers, YYYY-MM-DD","type":"string"},"timezone":{"description":"Always Atlantic/Reykjavik, which is UTC+0 all year","type":"string"},"device_id":{"nullable":true,"anyOf":[{"description":"The till this report is scoped to, or null for the whole merchant","type":"string"},{"type":"null"}]},"sales_count":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"gross":{"description":"Sum of the charged amounts, in minor units","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Sum of the charged amounts, in minor units","type":"integer"}]},"discounts":{"description":"Line discounts plus whole-sale discounts given on the day","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Line discounts plus whole-sale discounts given on the day","type":"integer"}]},"refunds":{"description":"Refunds processed on the day, counted by the refund's own date","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Refunds processed on the day, counted by the refund's own date","type":"integer"}]},"net":{"description":"gross - refunds","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"gross - refunds","type":"integer"}]},"by_method":{"description":"All four methods, always, in a fixed order","type":"array","items":{"type":"object","required":["method","count","amount"],"properties":{"method":{"anyOf":[{"const":"tap_to_pay","type":"string"},{"const":"cash","type":"string"},{"const":"claim","type":"string"},{"const":"card_link","type":"string"}]},"count":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}}}},"by_vat":{"description":"Only the rates that occurred, highest rate first","type":"array","items":{"type":"object","required":["rate","net","vat","gross"],"properties":{"rate":{"description":"VAT percentage: 0, 11 or 24","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT percentage: 0, 11 or 24","type":"integer"}]},"net":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"vat":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"gross":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}}}},"by_staff":{"description":"Only sales that carried a staff_id; biggest taker first","type":"array","items":{"type":"object","required":["staff_id","name","count","amount"],"properties":{"staff_id":{"type":"string"},"name":{"type":"string"},"count":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}}}},"first_sale_at":{"nullable":true,"anyOf":[{"description":"Unix seconds","type":"number"},{"type":"null"}]},"last_sale_at":{"nullable":true,"anyOf":[{"description":"Unix seconds","type":"number"},{"type":"null"}]}},"required":["object","livemode","date","timezone","device_id","sales_count","gross","discounts","refunds","net","by_method","by_vat","by_staff","first_sale_at","last_sale_at"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"getV1PosZ-report","tags":["POS"],"summary":"Daily close (Z-report)","description":"One day's takings: counts and sums by payment method, VAT rate and staff member, plus the discounts given and the refunds processed that day. Aggregate only. Allowed for the locked pos role, with device_id forced to the calling key.","security":[{"bearerAuth":[]}]}},"/v1/payment-intents/cash":{"post":{"parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"payment_intent":{"type":"object","required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"],"properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"additionalProperties":false},"receipt_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["payment_intent","receipt_url"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"payment_intent":{"type":"object","required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"],"properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"additionalProperties":false},"receipt_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["payment_intent","receipt_url"]}},"text/plain":{"schema":{"type":"object","properties":{"payment_intent":{"type":"object","required":["id","object","livemode","amount","currency","vat_amount","discount_amount","status","customer","payment_method","description","provider_ref","receipt_number","receipt_url","receipt_pdf_url","created_at","captured_at","canceled_at","metadata"],"properties":{"id":{"type":"string"},"object":{"const":"payment_intent","type":"string"},"livemode":{"type":"boolean"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"currency":{"type":"string"},"vat_amount":{"nullable":true,"anyOf":[{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total VAT for the payment in minor units, computed from line items. Null when no line items were attached.","type":"integer"}]},{"type":"null"}]},"discount_amount":{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale discount already subtracted from amount: a coupon or promotion code, or a POS discount (docs/plans/pos-features.md). 0 when there was none.","type":"integer"}]},"status":{"anyOf":[{"const":"requires_payment_method","type":"string"},{"const":"requires_action","type":"string"},{"const":"authorized","type":"string"},{"const":"pending_settlement","type":"string"},{"const":"captured","type":"string"},{"const":"failed","type":"string"},{"const":"canceled","type":"string"},{"const":"refunded","type":"string"},{"const":"partially_refunded","type":"string"},{"const":"awaiting_claim","type":"string"}]},"customer":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"provider_ref":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_number":{"nullable":true,"anyOf":[{"description":"Sequential per-merchant receipt number assigned at capture (kvittun) or claim issue (reikningur). Year-prefixed and zero-padded, e.g. '2026-00042'.","type":"string"},{"type":"null"}]},"receipt_url":{"nullable":true,"anyOf":[{"description":"Hosted receipt URL. Customer-facing; safe to forward in your own emails.","type":"string"},{"type":"null"}]},"receipt_pdf_url":{"nullable":true,"anyOf":[{"description":"Direct URL to the receipt PDF. Same capability as receipt_url.","type":"string"},{"type":"null"}]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"number"},"captured_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}},"additionalProperties":false},"receipt_url":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["payment_intent","receipt_url"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1Payment-intentsCash","tags":["Payment Intents"],"summary":"Record a cash sale","description":"Creates a captured payment intent for cash taken at the counter, with a receipt number and hosted receipt. Optional line items are written to the receipt and the sales-by-product report; their total must equal amount.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["amount"],"properties":{"amount":{"minimum":1,"description":"Amount in minor units (ISK is zero-decimal)","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"description":"Amount in minor units (ISK is zero-decimal)","type":"integer"}]},"currency":{"minLength":3,"maxLength":3,"type":"string"},"description":{"maxLength":500,"type":"string"},"customer":{"format":"uuid","type":"string"},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}},"items":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","required":["description","quantity","unit_amount","vat_rate"],"properties":{"description":{"minLength":1,"maxLength":500,"type":"string"},"quantity":{"minimum":1,"maximum":100000,"default":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100000,"default":1,"type":"integer"}]},"unit_amount":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"vat_rate":{"anyOf":[{"const":0,"type":"number"},{"const":11,"type":"number"},{"const":24,"type":"number"}]},"product_id":{"format":"uuid","type":"string"},"discount_amount":{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the line is charged at unit_amount * quantity - discount_amount.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the line is charged at unit_amount * quantity - discount_amount.","type":"integer"}]}}}},"discount_amount":{"minimum":0,"description":"Whole-sale discount in minor units. With items, amount must equal the sum of (unit_amount * quantity - line discount) less this.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"Whole-sale discount in minor units. With items, amount must equal the sum of (unit_amount * quantity - line discount) less this.","type":"integer"}]},"staff_id":{"format":"uuid","description":"Who rang the sale up, from GET /v1/pos/staff. 400 invalid_staff when unknown or inactive.","type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["amount"],"properties":{"amount":{"minimum":1,"description":"Amount in minor units (ISK is zero-decimal)","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"description":"Amount in minor units (ISK is zero-decimal)","type":"integer"}]},"currency":{"minLength":3,"maxLength":3,"type":"string"},"description":{"maxLength":500,"type":"string"},"customer":{"format":"uuid","type":"string"},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}},"items":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","required":["description","quantity","unit_amount","vat_rate"],"properties":{"description":{"minLength":1,"maxLength":500,"type":"string"},"quantity":{"minimum":1,"maximum":100000,"default":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100000,"default":1,"type":"integer"}]},"unit_amount":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"vat_rate":{"anyOf":[{"const":0,"type":"number"},{"const":11,"type":"number"},{"const":24,"type":"number"}]},"product_id":{"format":"uuid","type":"string"},"discount_amount":{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the line is charged at unit_amount * quantity - discount_amount.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the line is charged at unit_amount * quantity - discount_amount.","type":"integer"}]}}}},"discount_amount":{"minimum":0,"description":"Whole-sale discount in minor units. With items, amount must equal the sum of (unit_amount * quantity - line discount) less this.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"Whole-sale discount in minor units. With items, amount must equal the sum of (unit_amount * quantity - line discount) less this.","type":"integer"}]},"staff_id":{"format":"uuid","description":"Who rang the sale up, from GET /v1/pos/staff. 400 invalid_staff when unknown or inactive.","type":"string"}}}},"text/plain":{"schema":{"type":"object","required":["amount"],"properties":{"amount":{"minimum":1,"description":"Amount in minor units (ISK is zero-decimal)","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"description":"Amount in minor units (ISK is zero-decimal)","type":"integer"}]},"currency":{"minLength":3,"maxLength":3,"type":"string"},"description":{"maxLength":500,"type":"string"},"customer":{"format":"uuid","type":"string"},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}},"items":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","required":["description","quantity","unit_amount","vat_rate"],"properties":{"description":{"minLength":1,"maxLength":500,"type":"string"},"quantity":{"minimum":1,"maximum":100000,"default":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100000,"default":1,"type":"integer"}]},"unit_amount":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"vat_rate":{"anyOf":[{"const":0,"type":"number"},{"const":11,"type":"number"},{"const":24,"type":"number"}]},"product_id":{"format":"uuid","type":"string"},"discount_amount":{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the line is charged at unit_amount * quantity - discount_amount.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the line is charged at unit_amount * quantity - discount_amount.","type":"integer"}]}}}},"discount_amount":{"minimum":0,"description":"Whole-sale discount in minor units. With items, amount must equal the sum of (unit_amount * quantity - line discount) less this.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"Whole-sale discount in minor units. With items, amount must equal the sum of (unit_amount * quantity - line discount) less this.","type":"integer"}]},"staff_id":{"format":"uuid","description":"Who rang the sale up, from GET /v1/pos/staff. 400 invalid_staff when unknown or inactive.","type":"string"}}}}}}}},"/v1/delivery/":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"carrier":{"type":"string"},"sandbox":{"type":"boolean"},"booking_enabled":{"description":"Whether POST /v1/delivery/consignments may book: always true for a sandbox carrier, and for a production carrier only once Kling has approved production booking for this merchant.","type":"boolean"}},"required":["carrier","sandbox","booking_enabled"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"carrier":{"type":"string"},"sandbox":{"type":"boolean"},"booking_enabled":{"description":"Whether POST /v1/delivery/consignments may book: always true for a sandbox carrier, and for a production carrier only once Kling has approved production booking for this merchant.","type":"boolean"}},"required":["carrier","sandbox","booking_enabled"]}},"text/plain":{"schema":{"type":"object","properties":{"carrier":{"type":"string"},"sandbox":{"type":"boolean"},"booking_enabled":{"description":"Whether POST /v1/delivery/consignments may book: always true for a sandbox carrier, and for a production carrier only once Kling has approved production booking for this merchant.","type":"boolean"}},"required":["carrier","sandbox","booking_enabled"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"getV1Delivery","tags":["Delivery"],"summary":"Get the merchant's delivery carrier","description":"Which carrier the merchant has connected in this environment, whether it points at the carrier's sandbox host, and whether consignments may be booked. A merchant with no carrier gets `no_carrier_configured`; `GET /v1/merchant` lists `delivery.<carrier>` in `enabled_capabilities` when one exists.","security":[{"bearerAuth":[]}]}},"/v1/delivery/setup":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"carrier":{"const":"dropp","type":"string"},"connected":{"description":"Whether an active Dropp key is stored for this merchant in this environment.","type":"boolean"},"sandbox":{"nullable":true,"anyOf":[{"description":"Whether the stored key points at Dropp's test host (stage.dropp.is). Null when not connected.","type":"boolean"},{"type":"null"}]},"booking_enabled":{"description":"Whether POST /v1/delivery/consignments may book. False when not connected.","type":"boolean"},"application":{"nullable":true,"anyOf":[{"description":"The merchant's application for a Dropp account, if one was made from Kling. One per merchant, not per environment.","type":"object","required":["status","sent_at","contact_email"],"properties":{"status":{"description":"`pending` while the mail is going out, `sent` once Dropp has it, `mail_failed` if the mail did not go out (submit again), `key_received` once a key has been saved.","anyOf":[{"const":"pending","type":"string"},{"const":"sent","type":"string"},{"const":"mail_failed","type":"string"},{"const":"key_received","type":"string"}]},"sent_at":{"format":"date-time","type":"string"},"contact_email":{"description":"Where Dropp will contact the merchant.","type":"string"}}},{"type":"null"}]},"prefill":{"description":"What Kling already knows about the merchant, to pre-fill the application form. The contact is the account owner. Null where Kling knows nothing.","type":"object","required":["store_name","kennitala","contact_name","contact_email","contact_phone","website","street","postal_code","city"],"properties":{"store_name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"kennitala":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"contact_name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"contact_email":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"contact_phone":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"street":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"postal_code":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}}}},"required":["carrier","connected","sandbox","booking_enabled","application","prefill"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"carrier":{"const":"dropp","type":"string"},"connected":{"description":"Whether an active Dropp key is stored for this merchant in this environment.","type":"boolean"},"sandbox":{"nullable":true,"anyOf":[{"description":"Whether the stored key points at Dropp's test host (stage.dropp.is). Null when not connected.","type":"boolean"},{"type":"null"}]},"booking_enabled":{"description":"Whether POST /v1/delivery/consignments may book. False when not connected.","type":"boolean"},"application":{"nullable":true,"anyOf":[{"description":"The merchant's application for a Dropp account, if one was made from Kling. One per merchant, not per environment.","type":"object","required":["status","sent_at","contact_email"],"properties":{"status":{"description":"`pending` while the mail is going out, `sent` once Dropp has it, `mail_failed` if the mail did not go out (submit again), `key_received` once a key has been saved.","anyOf":[{"const":"pending","type":"string"},{"const":"sent","type":"string"},{"const":"mail_failed","type":"string"},{"const":"key_received","type":"string"}]},"sent_at":{"format":"date-time","type":"string"},"contact_email":{"description":"Where Dropp will contact the merchant.","type":"string"}}},{"type":"null"}]},"prefill":{"description":"What Kling already knows about the merchant, to pre-fill the application form. The contact is the account owner. Null where Kling knows nothing.","type":"object","required":["store_name","kennitala","contact_name","contact_email","contact_phone","website","street","postal_code","city"],"properties":{"store_name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"kennitala":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"contact_name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"contact_email":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"contact_phone":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"street":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"postal_code":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}}}},"required":["carrier","connected","sandbox","booking_enabled","application","prefill"]}},"text/plain":{"schema":{"type":"object","properties":{"carrier":{"const":"dropp","type":"string"},"connected":{"description":"Whether an active Dropp key is stored for this merchant in this environment.","type":"boolean"},"sandbox":{"nullable":true,"anyOf":[{"description":"Whether the stored key points at Dropp's test host (stage.dropp.is). Null when not connected.","type":"boolean"},{"type":"null"}]},"booking_enabled":{"description":"Whether POST /v1/delivery/consignments may book. False when not connected.","type":"boolean"},"application":{"nullable":true,"anyOf":[{"description":"The merchant's application for a Dropp account, if one was made from Kling. One per merchant, not per environment.","type":"object","required":["status","sent_at","contact_email"],"properties":{"status":{"description":"`pending` while the mail is going out, `sent` once Dropp has it, `mail_failed` if the mail did not go out (submit again), `key_received` once a key has been saved.","anyOf":[{"const":"pending","type":"string"},{"const":"sent","type":"string"},{"const":"mail_failed","type":"string"},{"const":"key_received","type":"string"}]},"sent_at":{"format":"date-time","type":"string"},"contact_email":{"description":"Where Dropp will contact the merchant.","type":"string"}}},{"type":"null"}]},"prefill":{"description":"What Kling already knows about the merchant, to pre-fill the application form. The contact is the account owner. Null where Kling knows nothing.","type":"object","required":["store_name","kennitala","contact_name","contact_email","contact_phone","website","street","postal_code","city"],"properties":{"store_name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"kennitala":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"contact_name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"contact_email":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"contact_phone":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"street":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"postal_code":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}}}},"required":["carrier","connected","sandbox","booking_enabled","application","prefill"]}}}}},"operationId":"getV1DeliverySetup","tags":["Delivery"],"summary":"Get Dropp setup state","description":"Everything a setup screen needs to connect Dropp for the merchant in this environment: whether a key is stored, whether it points at Dropp's test host, whether booking is enabled, the state of an application for a Dropp account, and what Kling already knows about the merchant to pre-fill that application. Always 200, also for a merchant who has done nothing yet. The stored key is never returned.","security":[{"bearerAuth":[]}]}},"/v1/delivery/setup/key":{"post":{"parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"carrier":{"const":"dropp","type":"string"},"connected":{"description":"Whether an active Dropp key is stored for this merchant in this environment.","type":"boolean"},"sandbox":{"nullable":true,"anyOf":[{"description":"Whether the stored key points at Dropp's test host (stage.dropp.is). Null when not connected.","type":"boolean"},{"type":"null"}]},"booking_enabled":{"description":"Whether POST /v1/delivery/consignments may book. False when not connected.","type":"boolean"},"application":{"nullable":true,"anyOf":[{"description":"The merchant's application for a Dropp account, if one was made from Kling. One per merchant, not per environment.","type":"object","required":["status","sent_at","contact_email"],"properties":{"status":{"description":"`pending` while the mail is going out, `sent` once Dropp has it, `mail_failed` if the mail did not go out (submit again), `key_received` once a key has been saved.","anyOf":[{"const":"pending","type":"string"},{"const":"sent","type":"string"},{"const":"mail_failed","type":"string"},{"const":"key_received","type":"string"}]},"sent_at":{"format":"date-time","type":"string"},"contact_email":{"description":"Where Dropp will contact the merchant.","type":"string"}}},{"type":"null"}]},"prefill":{"description":"What Kling already knows about the merchant, to pre-fill the application form. The contact is the account owner. Null where Kling knows nothing.","type":"object","required":["store_name","kennitala","contact_name","contact_email","contact_phone","website","street","postal_code","city"],"properties":{"store_name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"kennitala":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"contact_name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"contact_email":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"contact_phone":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"street":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"postal_code":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}}}},"required":["carrier","connected","sandbox","booking_enabled","application","prefill"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"carrier":{"const":"dropp","type":"string"},"connected":{"description":"Whether an active Dropp key is stored for this merchant in this environment.","type":"boolean"},"sandbox":{"nullable":true,"anyOf":[{"description":"Whether the stored key points at Dropp's test host (stage.dropp.is). Null when not connected.","type":"boolean"},{"type":"null"}]},"booking_enabled":{"description":"Whether POST /v1/delivery/consignments may book. False when not connected.","type":"boolean"},"application":{"nullable":true,"anyOf":[{"description":"The merchant's application for a Dropp account, if one was made from Kling. One per merchant, not per environment.","type":"object","required":["status","sent_at","contact_email"],"properties":{"status":{"description":"`pending` while the mail is going out, `sent` once Dropp has it, `mail_failed` if the mail did not go out (submit again), `key_received` once a key has been saved.","anyOf":[{"const":"pending","type":"string"},{"const":"sent","type":"string"},{"const":"mail_failed","type":"string"},{"const":"key_received","type":"string"}]},"sent_at":{"format":"date-time","type":"string"},"contact_email":{"description":"Where Dropp will contact the merchant.","type":"string"}}},{"type":"null"}]},"prefill":{"description":"What Kling already knows about the merchant, to pre-fill the application form. The contact is the account owner. Null where Kling knows nothing.","type":"object","required":["store_name","kennitala","contact_name","contact_email","contact_phone","website","street","postal_code","city"],"properties":{"store_name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"kennitala":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"contact_name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"contact_email":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"contact_phone":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"street":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"postal_code":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}}}},"required":["carrier","connected","sandbox","booking_enabled","application","prefill"]}},"text/plain":{"schema":{"type":"object","properties":{"carrier":{"const":"dropp","type":"string"},"connected":{"description":"Whether an active Dropp key is stored for this merchant in this environment.","type":"boolean"},"sandbox":{"nullable":true,"anyOf":[{"description":"Whether the stored key points at Dropp's test host (stage.dropp.is). Null when not connected.","type":"boolean"},{"type":"null"}]},"booking_enabled":{"description":"Whether POST /v1/delivery/consignments may book. False when not connected.","type":"boolean"},"application":{"nullable":true,"anyOf":[{"description":"The merchant's application for a Dropp account, if one was made from Kling. One per merchant, not per environment.","type":"object","required":["status","sent_at","contact_email"],"properties":{"status":{"description":"`pending` while the mail is going out, `sent` once Dropp has it, `mail_failed` if the mail did not go out (submit again), `key_received` once a key has been saved.","anyOf":[{"const":"pending","type":"string"},{"const":"sent","type":"string"},{"const":"mail_failed","type":"string"},{"const":"key_received","type":"string"}]},"sent_at":{"format":"date-time","type":"string"},"contact_email":{"description":"Where Dropp will contact the merchant.","type":"string"}}},{"type":"null"}]},"prefill":{"description":"What Kling already knows about the merchant, to pre-fill the application form. The contact is the account owner. Null where Kling knows nothing.","type":"object","required":["store_name","kennitala","contact_name","contact_email","contact_phone","website","street","postal_code","city"],"properties":{"store_name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"kennitala":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"contact_name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"contact_email":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"contact_phone":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"street":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"postal_code":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}}}},"required":["carrier","connected","sandbox","booking_enabled","application","prefill"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"502":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1DeliverySetupKey","tags":["Delivery"],"summary":"Connect Dropp with an API key","description":"Store the merchant's Dropp API key for this environment. The key is checked against Dropp first; a key Dropp refuses answers `400 carrier_key_invalid` and nothing is stored, and Dropp being unreachable answers `502 carrier_unavailable`. On success an open application for a Dropp account is marked `key_received`, `GET /v1/merchant` lists `delivery.dropp` in `enabled_capabilities`, and the response is the new setup state. Replaces a key stored earlier.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["api_key"],"properties":{"api_key":{"maxLength":1024,"description":"The merchant's Dropp API key, from umsjon.dropp.is. Checked against Dropp before it is stored, then stored encrypted.","type":"string"},"sandbox":{"description":"Whether the key is for Dropp's test host (stage.dropp.is). Defaults to the stored key's setting, or `true` when no key has been stored yet.","type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","required":["api_key"],"properties":{"api_key":{"maxLength":1024,"description":"The merchant's Dropp API key, from umsjon.dropp.is. Checked against Dropp before it is stored, then stored encrypted.","type":"string"},"sandbox":{"description":"Whether the key is for Dropp's test host (stage.dropp.is). Defaults to the stored key's setting, or `true` when no key has been stored yet.","type":"boolean"}}}},"text/plain":{"schema":{"type":"object","required":["api_key"],"properties":{"api_key":{"maxLength":1024,"description":"The merchant's Dropp API key, from umsjon.dropp.is. Checked against Dropp before it is stored, then stored encrypted.","type":"string"},"sandbox":{"description":"Whether the key is for Dropp's test host (stage.dropp.is). Defaults to the stored key's setting, or `true` when no key has been stored yet.","type":"boolean"}}}}}}}},"/v1/delivery/setup/application":{"post":{"parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"carrier":{"const":"dropp","type":"string"},"connected":{"description":"Whether an active Dropp key is stored for this merchant in this environment.","type":"boolean"},"sandbox":{"nullable":true,"anyOf":[{"description":"Whether the stored key points at Dropp's test host (stage.dropp.is). Null when not connected.","type":"boolean"},{"type":"null"}]},"booking_enabled":{"description":"Whether POST /v1/delivery/consignments may book. False when not connected.","type":"boolean"},"application":{"nullable":true,"anyOf":[{"description":"The merchant's application for a Dropp account, if one was made from Kling. One per merchant, not per environment.","type":"object","required":["status","sent_at","contact_email"],"properties":{"status":{"description":"`pending` while the mail is going out, `sent` once Dropp has it, `mail_failed` if the mail did not go out (submit again), `key_received` once a key has been saved.","anyOf":[{"const":"pending","type":"string"},{"const":"sent","type":"string"},{"const":"mail_failed","type":"string"},{"const":"key_received","type":"string"}]},"sent_at":{"format":"date-time","type":"string"},"contact_email":{"description":"Where Dropp will contact the merchant.","type":"string"}}},{"type":"null"}]},"prefill":{"description":"What Kling already knows about the merchant, to pre-fill the application form. The contact is the account owner. Null where Kling knows nothing.","type":"object","required":["store_name","kennitala","contact_name","contact_email","contact_phone","website","street","postal_code","city"],"properties":{"store_name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"kennitala":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"contact_name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"contact_email":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"contact_phone":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"street":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"postal_code":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}}}},"required":["carrier","connected","sandbox","booking_enabled","application","prefill"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"carrier":{"const":"dropp","type":"string"},"connected":{"description":"Whether an active Dropp key is stored for this merchant in this environment.","type":"boolean"},"sandbox":{"nullable":true,"anyOf":[{"description":"Whether the stored key points at Dropp's test host (stage.dropp.is). Null when not connected.","type":"boolean"},{"type":"null"}]},"booking_enabled":{"description":"Whether POST /v1/delivery/consignments may book. False when not connected.","type":"boolean"},"application":{"nullable":true,"anyOf":[{"description":"The merchant's application for a Dropp account, if one was made from Kling. One per merchant, not per environment.","type":"object","required":["status","sent_at","contact_email"],"properties":{"status":{"description":"`pending` while the mail is going out, `sent` once Dropp has it, `mail_failed` if the mail did not go out (submit again), `key_received` once a key has been saved.","anyOf":[{"const":"pending","type":"string"},{"const":"sent","type":"string"},{"const":"mail_failed","type":"string"},{"const":"key_received","type":"string"}]},"sent_at":{"format":"date-time","type":"string"},"contact_email":{"description":"Where Dropp will contact the merchant.","type":"string"}}},{"type":"null"}]},"prefill":{"description":"What Kling already knows about the merchant, to pre-fill the application form. The contact is the account owner. Null where Kling knows nothing.","type":"object","required":["store_name","kennitala","contact_name","contact_email","contact_phone","website","street","postal_code","city"],"properties":{"store_name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"kennitala":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"contact_name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"contact_email":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"contact_phone":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"street":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"postal_code":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}}}},"required":["carrier","connected","sandbox","booking_enabled","application","prefill"]}},"text/plain":{"schema":{"type":"object","properties":{"carrier":{"const":"dropp","type":"string"},"connected":{"description":"Whether an active Dropp key is stored for this merchant in this environment.","type":"boolean"},"sandbox":{"nullable":true,"anyOf":[{"description":"Whether the stored key points at Dropp's test host (stage.dropp.is). Null when not connected.","type":"boolean"},{"type":"null"}]},"booking_enabled":{"description":"Whether POST /v1/delivery/consignments may book. False when not connected.","type":"boolean"},"application":{"nullable":true,"anyOf":[{"description":"The merchant's application for a Dropp account, if one was made from Kling. One per merchant, not per environment.","type":"object","required":["status","sent_at","contact_email"],"properties":{"status":{"description":"`pending` while the mail is going out, `sent` once Dropp has it, `mail_failed` if the mail did not go out (submit again), `key_received` once a key has been saved.","anyOf":[{"const":"pending","type":"string"},{"const":"sent","type":"string"},{"const":"mail_failed","type":"string"},{"const":"key_received","type":"string"}]},"sent_at":{"format":"date-time","type":"string"},"contact_email":{"description":"Where Dropp will contact the merchant.","type":"string"}}},{"type":"null"}]},"prefill":{"description":"What Kling already knows about the merchant, to pre-fill the application form. The contact is the account owner. Null where Kling knows nothing.","type":"object","required":["store_name","kennitala","contact_name","contact_email","contact_phone","website","street","postal_code","city"],"properties":{"store_name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"kennitala":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"contact_name":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"contact_email":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"contact_phone":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"street":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"postal_code":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]}}}},"required":["carrier","connected","sandbox","booking_enabled","application","prefill"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"409":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"502":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1DeliverySetupApplication","tags":["Delivery"],"summary":"Apply for a Dropp account","description":"Dropp opens merchant accounts by hand, so Kling mails Dropp a structured application on the merchant's behalf (reply-to the contact) and a receipt to the contact. When Dropp answers with a key, store it with `POST /v1/delivery/setup/key`. Errors carry an Icelandic `message` meant for the merchant: `400 application_invalid` (a field is missing or malformed), `409 carrier_already_connected` (the merchant already has a Dropp key), `409 application_recently_sent` (the same application went out in the last 24 hours; changing the store or contact details sends a new one), `502 application_mail_failed` (the application is saved but the mail did not go out; submit again). The response is the new setup state.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["store_name","kennitala","contact_name","contact_email","contact_phone","street","postal_code","city"],"properties":{"store_name":{"maxLength":255,"type":"string"},"kennitala":{"maxLength":16,"description":"The store's kennitala, with or without the dash.","type":"string"},"contact_name":{"maxLength":255,"type":"string"},"contact_email":{"maxLength":255,"description":"Dropp replies here, and the merchant gets a copy of the application here.","type":"string"},"contact_phone":{"maxLength":32,"type":"string"},"street":{"maxLength":255,"type":"string"},"postal_code":{"maxLength":16,"type":"string"},"city":{"maxLength":128,"type":"string"},"website":{"maxLength":255,"type":"string"},"note":{"maxLength":2000,"description":"What the store sells, roughly how many parcels a month, anything Dropp should know.","type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["store_name","kennitala","contact_name","contact_email","contact_phone","street","postal_code","city"],"properties":{"store_name":{"maxLength":255,"type":"string"},"kennitala":{"maxLength":16,"description":"The store's kennitala, with or without the dash.","type":"string"},"contact_name":{"maxLength":255,"type":"string"},"contact_email":{"maxLength":255,"description":"Dropp replies here, and the merchant gets a copy of the application here.","type":"string"},"contact_phone":{"maxLength":32,"type":"string"},"street":{"maxLength":255,"type":"string"},"postal_code":{"maxLength":16,"type":"string"},"city":{"maxLength":128,"type":"string"},"website":{"maxLength":255,"type":"string"},"note":{"maxLength":2000,"description":"What the store sells, roughly how many parcels a month, anything Dropp should know.","type":"string"}}}},"text/plain":{"schema":{"type":"object","required":["store_name","kennitala","contact_name","contact_email","contact_phone","street","postal_code","city"],"properties":{"store_name":{"maxLength":255,"type":"string"},"kennitala":{"maxLength":16,"description":"The store's kennitala, with or without the dash.","type":"string"},"contact_name":{"maxLength":255,"type":"string"},"contact_email":{"maxLength":255,"description":"Dropp replies here, and the merchant gets a copy of the application here.","type":"string"},"contact_phone":{"maxLength":32,"type":"string"},"street":{"maxLength":255,"type":"string"},"postal_code":{"maxLength":16,"type":"string"},"city":{"maxLength":128,"type":"string"},"website":{"maxLength":255,"type":"string"},"note":{"maxLength":2000,"description":"What the store sells, roughly how many parcels a month, anything Dropp should know.","type":"string"}}}}}}}},"/v1/delivery/locations":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"description":"A pickup location offered by the merchant's carrier","type":"object","required":["id","object","carrier","name","address","zip","city","latitude","longitude","locker"],"properties":{"id":{"description":"Carrier's id for the location. Pass it as location_id when booking.","type":"string"},"object":{"const":"delivery.location","type":"string"},"carrier":{"description":"Carrier that serves this location, e.g. dropp","type":"string"},"name":{"description":"Display name, e.g. \"Kringlan\"","type":"string"},"address":{"nullable":true,"anyOf":[{"description":"Street address, if the carrier provides it","type":"string"},{"type":"null"}]},"zip":{"nullable":true,"anyOf":[{"description":"Postcode","type":"string"},{"type":"null"}]},"city":{"nullable":true,"anyOf":[{"description":"Town or city","type":"string"},{"type":"null"}]},"latitude":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"longitude":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"locker":{"nullable":true,"anyOf":[{"description":"true for an unstaffed parcel locker, false for a staffed counter, null when unknown","type":"boolean"},{"type":"null"}]}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"description":"A pickup location offered by the merchant's carrier","type":"object","required":["id","object","carrier","name","address","zip","city","latitude","longitude","locker"],"properties":{"id":{"description":"Carrier's id for the location. Pass it as location_id when booking.","type":"string"},"object":{"const":"delivery.location","type":"string"},"carrier":{"description":"Carrier that serves this location, e.g. dropp","type":"string"},"name":{"description":"Display name, e.g. \"Kringlan\"","type":"string"},"address":{"nullable":true,"anyOf":[{"description":"Street address, if the carrier provides it","type":"string"},{"type":"null"}]},"zip":{"nullable":true,"anyOf":[{"description":"Postcode","type":"string"},{"type":"null"}]},"city":{"nullable":true,"anyOf":[{"description":"Town or city","type":"string"},{"type":"null"}]},"latitude":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"longitude":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"locker":{"nullable":true,"anyOf":[{"description":"true for an unstaffed parcel locker, false for a staffed counter, null when unknown","type":"boolean"},{"type":"null"}]}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}},"text/plain":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"description":"A pickup location offered by the merchant's carrier","type":"object","required":["id","object","carrier","name","address","zip","city","latitude","longitude","locker"],"properties":{"id":{"description":"Carrier's id for the location. Pass it as location_id when booking.","type":"string"},"object":{"const":"delivery.location","type":"string"},"carrier":{"description":"Carrier that serves this location, e.g. dropp","type":"string"},"name":{"description":"Display name, e.g. \"Kringlan\"","type":"string"},"address":{"nullable":true,"anyOf":[{"description":"Street address, if the carrier provides it","type":"string"},{"type":"null"}]},"zip":{"nullable":true,"anyOf":[{"description":"Postcode","type":"string"},{"type":"null"}]},"city":{"nullable":true,"anyOf":[{"description":"Town or city","type":"string"},{"type":"null"}]},"latitude":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"longitude":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"locker":{"nullable":true,"anyOf":[{"description":"true for an unstaffed parcel locker, false for a staffed counter, null when unknown","type":"boolean"},{"type":"null"}]}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"502":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"getV1DeliveryLocations","tags":["Delivery"],"summary":"List pickup locations","description":"Every pickup location the merchant's carrier currently serves, with coordinates and a `locker` flag. Cached for one hour per merchant. Show these to the customer and pass the chosen `id` as `location_id` when booking.","security":[{"bearerAuth":[]}]}},"/v1/delivery/home-delivery-zips":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"description":"Postcode","type":"string"}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"description":"Postcode","type":"string"}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}},"text/plain":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"description":"Postcode","type":"string"}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"502":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"getV1DeliveryHome-delivery-zips","tags":["Delivery"],"summary":"List home-delivery postcodes","description":"Postcodes the carrier delivers to the door. Offer home delivery only when the customer's postcode is in this list. Cached for one hour per merchant.","security":[{"bearerAuth":[]}]}},"/v1/delivery/consignments":{"post":{"parameters":[],"responses":{"200":{"description":"A booked parcel at the merchant's carrier","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"Carrier's id for the consignment. Use it as :ref on the consignment endpoints.","type":"string"},"object":{"const":"delivery.consignment","type":"string"},"carrier":{"type":"string"},"status":{"description":"Carrier-native status. For Dropp one of: initial, ready, transit, consignment, delivered, error, overweight, cancelled.","type":"string"},"barcode":{"nullable":true,"anyOf":[{"description":"Parcel barcode, present once the carrier has accepted the consignment","type":"string"},{"type":"null"}]},"sandbox":{"description":"true when the merchant's carrier row points at the carrier's test host (stage.dropp.is). Nothing physically ships from a sandbox consignment.","type":"boolean"},"label_url":{"nullable":true,"anyOf":[{"description":"Path on this API that proxies the printable label PDF, or null when the carrier has not issued a barcode yet","type":"string"},{"type":"null"}]}},"required":["id","object","carrier","status","barcode","sandbox","label_url"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"description":"Carrier's id for the consignment. Use it as :ref on the consignment endpoints.","type":"string"},"object":{"const":"delivery.consignment","type":"string"},"carrier":{"type":"string"},"status":{"description":"Carrier-native status. For Dropp one of: initial, ready, transit, consignment, delivered, error, overweight, cancelled.","type":"string"},"barcode":{"nullable":true,"anyOf":[{"description":"Parcel barcode, present once the carrier has accepted the consignment","type":"string"},{"type":"null"}]},"sandbox":{"description":"true when the merchant's carrier row points at the carrier's test host (stage.dropp.is). Nothing physically ships from a sandbox consignment.","type":"boolean"},"label_url":{"nullable":true,"anyOf":[{"description":"Path on this API that proxies the printable label PDF, or null when the carrier has not issued a barcode yet","type":"string"},{"type":"null"}]}},"required":["id","object","carrier","status","barcode","sandbox","label_url"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"description":"Carrier's id for the consignment. Use it as :ref on the consignment endpoints.","type":"string"},"object":{"const":"delivery.consignment","type":"string"},"carrier":{"type":"string"},"status":{"description":"Carrier-native status. For Dropp one of: initial, ready, transit, consignment, delivered, error, overweight, cancelled.","type":"string"},"barcode":{"nullable":true,"anyOf":[{"description":"Parcel barcode, present once the carrier has accepted the consignment","type":"string"},{"type":"null"}]},"sandbox":{"description":"true when the merchant's carrier row points at the carrier's test host (stage.dropp.is). Nothing physically ships from a sandbox consignment.","type":"boolean"},"label_url":{"nullable":true,"anyOf":[{"description":"Path on this API that proxies the printable label PDF, or null when the carrier has not issued a barcode yet","type":"string"},{"type":"null"}]}},"required":["id","object","carrier","status","barcode","sandbox","label_url"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1DeliveryConsignments","tags":["Delivery"],"summary":"Book a consignment","description":"Book a parcel with the merchant's carrier. Pass `location_id` for pickup or `home_delivery: true` with a full address. The recipient's phone is required. Send an `Idempotency-Key` header so a retried request never books twice. A production carrier answers `403 production_booking_not_approved` until Kling has approved production booking for the merchant; a sandbox carrier books on the carrier's test host and nothing physically ships.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["recipient","lines"],"properties":{"location_id":{"minLength":1,"maxLength":128,"description":"Pickup location id from GET /v1/delivery/locations. Required unless home_delivery is true.","type":"string"},"home_delivery":{"default":false,"description":"Deliver to the recipient's address instead of a pickup location. The postcode must be in GET /v1/delivery/home-delivery-zips.","type":"boolean"},"recipient":{"type":"object","required":["name","phone"],"properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"email":{"maxLength":255,"type":"string"},"phone":{"minLength":1,"maxLength":32,"description":"Required: the carrier texts the recipient and verifies identity by phone at pickup.","type":"string"},"address":{"maxLength":255,"description":"Street address. Required for home delivery.","type":"string"},"city":{"maxLength":128,"type":"string"},"zip":{"maxLength":16,"type":"string"},"national_id":{"minLength":10,"maxLength":10,"pattern":"^\\d{10}$","description":"Kennitala, used by the carrier for identity verification at pickup.","type":"string"}}},"lines":{"minItems":1,"description":"What is in the parcel.","type":"array","items":{"type":"object","required":["name","quantity"],"properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"quantity":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"price":{"minimum":0,"description":"Unit price, integer ISK. Informational for the carrier.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"Unit price, integer ISK. Informational for the carrier.","type":"integer"}]}}}},"value":{"minimum":0,"description":"Declared value of the parcel, integer ISK, for the carrier's insurance.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"Declared value of the parcel, integer ISK, for the carrier's insurance.","type":"integer"}]},"reference":{"maxLength":128,"description":"Your own order reference. Printed on the label and shown in the carrier portal.","type":"string"},"comment":{"maxLength":500,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["recipient","lines"],"properties":{"location_id":{"minLength":1,"maxLength":128,"description":"Pickup location id from GET /v1/delivery/locations. Required unless home_delivery is true.","type":"string"},"home_delivery":{"default":false,"description":"Deliver to the recipient's address instead of a pickup location. The postcode must be in GET /v1/delivery/home-delivery-zips.","type":"boolean"},"recipient":{"type":"object","required":["name","phone"],"properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"email":{"maxLength":255,"type":"string"},"phone":{"minLength":1,"maxLength":32,"description":"Required: the carrier texts the recipient and verifies identity by phone at pickup.","type":"string"},"address":{"maxLength":255,"description":"Street address. Required for home delivery.","type":"string"},"city":{"maxLength":128,"type":"string"},"zip":{"maxLength":16,"type":"string"},"national_id":{"minLength":10,"maxLength":10,"pattern":"^\\d{10}$","description":"Kennitala, used by the carrier for identity verification at pickup.","type":"string"}}},"lines":{"minItems":1,"description":"What is in the parcel.","type":"array","items":{"type":"object","required":["name","quantity"],"properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"quantity":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"price":{"minimum":0,"description":"Unit price, integer ISK. Informational for the carrier.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"Unit price, integer ISK. Informational for the carrier.","type":"integer"}]}}}},"value":{"minimum":0,"description":"Declared value of the parcel, integer ISK, for the carrier's insurance.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"Declared value of the parcel, integer ISK, for the carrier's insurance.","type":"integer"}]},"reference":{"maxLength":128,"description":"Your own order reference. Printed on the label and shown in the carrier portal.","type":"string"},"comment":{"maxLength":500,"type":"string"}}}},"text/plain":{"schema":{"type":"object","required":["recipient","lines"],"properties":{"location_id":{"minLength":1,"maxLength":128,"description":"Pickup location id from GET /v1/delivery/locations. Required unless home_delivery is true.","type":"string"},"home_delivery":{"default":false,"description":"Deliver to the recipient's address instead of a pickup location. The postcode must be in GET /v1/delivery/home-delivery-zips.","type":"boolean"},"recipient":{"type":"object","required":["name","phone"],"properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"email":{"maxLength":255,"type":"string"},"phone":{"minLength":1,"maxLength":32,"description":"Required: the carrier texts the recipient and verifies identity by phone at pickup.","type":"string"},"address":{"maxLength":255,"description":"Street address. Required for home delivery.","type":"string"},"city":{"maxLength":128,"type":"string"},"zip":{"maxLength":16,"type":"string"},"national_id":{"minLength":10,"maxLength":10,"pattern":"^\\d{10}$","description":"Kennitala, used by the carrier for identity verification at pickup.","type":"string"}}},"lines":{"minItems":1,"description":"What is in the parcel.","type":"array","items":{"type":"object","required":["name","quantity"],"properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"quantity":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"price":{"minimum":0,"description":"Unit price, integer ISK. Informational for the carrier.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"Unit price, integer ISK. Informational for the carrier.","type":"integer"}]}}}},"value":{"minimum":0,"description":"Declared value of the parcel, integer ISK, for the carrier's insurance.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"Declared value of the parcel, integer ISK, for the carrier's insurance.","type":"integer"}]},"reference":{"maxLength":128,"description":"Your own order reference. Printed on the label and shown in the carrier portal.","type":"string"},"comment":{"maxLength":500,"type":"string"}}}}}}}},"/v1/delivery/consignments/{ref}":{"get":{"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"in":"path","name":"ref","required":true}],"responses":{"200":{"description":"A booked parcel at the merchant's carrier","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"Carrier's id for the consignment. Use it as :ref on the consignment endpoints.","type":"string"},"object":{"const":"delivery.consignment","type":"string"},"carrier":{"type":"string"},"status":{"description":"Carrier-native status. For Dropp one of: initial, ready, transit, consignment, delivered, error, overweight, cancelled.","type":"string"},"barcode":{"nullable":true,"anyOf":[{"description":"Parcel barcode, present once the carrier has accepted the consignment","type":"string"},{"type":"null"}]},"sandbox":{"description":"true when the merchant's carrier row points at the carrier's test host (stage.dropp.is). Nothing physically ships from a sandbox consignment.","type":"boolean"},"label_url":{"nullable":true,"anyOf":[{"description":"Path on this API that proxies the printable label PDF, or null when the carrier has not issued a barcode yet","type":"string"},{"type":"null"}]}},"required":["id","object","carrier","status","barcode","sandbox","label_url"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"description":"Carrier's id for the consignment. Use it as :ref on the consignment endpoints.","type":"string"},"object":{"const":"delivery.consignment","type":"string"},"carrier":{"type":"string"},"status":{"description":"Carrier-native status. For Dropp one of: initial, ready, transit, consignment, delivered, error, overweight, cancelled.","type":"string"},"barcode":{"nullable":true,"anyOf":[{"description":"Parcel barcode, present once the carrier has accepted the consignment","type":"string"},{"type":"null"}]},"sandbox":{"description":"true when the merchant's carrier row points at the carrier's test host (stage.dropp.is). Nothing physically ships from a sandbox consignment.","type":"boolean"},"label_url":{"nullable":true,"anyOf":[{"description":"Path on this API that proxies the printable label PDF, or null when the carrier has not issued a barcode yet","type":"string"},{"type":"null"}]}},"required":["id","object","carrier","status","barcode","sandbox","label_url"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"description":"Carrier's id for the consignment. Use it as :ref on the consignment endpoints.","type":"string"},"object":{"const":"delivery.consignment","type":"string"},"carrier":{"type":"string"},"status":{"description":"Carrier-native status. For Dropp one of: initial, ready, transit, consignment, delivered, error, overweight, cancelled.","type":"string"},"barcode":{"nullable":true,"anyOf":[{"description":"Parcel barcode, present once the carrier has accepted the consignment","type":"string"},{"type":"null"}]},"sandbox":{"description":"true when the merchant's carrier row points at the carrier's test host (stage.dropp.is). Nothing physically ships from a sandbox consignment.","type":"boolean"},"label_url":{"nullable":true,"anyOf":[{"description":"Path on this API that proxies the printable label PDF, or null when the carrier has not issued a barcode yet","type":"string"},{"type":"null"}]}},"required":["id","object","carrier","status","barcode","sandbox","label_url"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"502":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"getV1DeliveryConsignmentsByRef","tags":["Delivery"],"summary":"Get a consignment","description":"Current carrier status of a booked consignment. Poll this to move an order from booked to delivered.","security":[{"bearerAuth":[]}]},"delete":{"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"in":"path","name":"ref","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"delivery.consignment","type":"string"},"deleted":{"const":true,"type":"boolean"}},"required":["id","object","deleted"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"delivery.consignment","type":"string"},"deleted":{"const":true,"type":"boolean"}},"required":["id","object","deleted"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"delivery.consignment","type":"string"},"deleted":{"const":true,"type":"boolean"}},"required":["id","object","deleted"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"502":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"deleteV1DeliveryConsignmentsByRef","tags":["Delivery"],"summary":"Cancel a consignment","description":"Cancel a consignment at the carrier. Subject to the same production-booking approval as booking.","security":[{"bearerAuth":[]}]}},"/v1/delivery/consignments/{ref}/label":{"get":{"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"in":"path","name":"ref","required":true}],"operationId":"getV1DeliveryConsignmentsByRefLabel","tags":["Delivery"],"summary":"Download the label PDF","description":"The carrier's printable label for a booked consignment, proxied with the merchant's carrier credentials so the caller never needs them. Responds with `application/pdf`; `409 label_not_ready` until the carrier has issued a barcode.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"The label PDF","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"No carrier configured"},"404":{"description":"Unknown consignment"},"409":{"description":"Label not ready"}}}},"/v1/test/subscriptions/{id}/advance-billing":{"post":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"subscription","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"product":{"type":"string"},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"const":"trialing","type":"string"},{"const":"active","type":"string"},{"const":"past_due","type":"string"},{"const":"canceled","type":"string"}]},"collection_method":{"anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"current_period_start":{"type":"number"},"current_period_end":{"type":"number"},"trial_start":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"trial_end":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"ended_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"},"billing_run":{"type":"object","required":["steps"],"properties":{"steps":{"type":"array","items":{"type":"object","required":["type","payment_intent_id","charge_status","subscription_status_after"],"properties":{"type":{"anyOf":[{"const":"renewal","type":"string"},{"const":"retry","type":"string"}]},"payment_intent_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"charge_status":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"subscription_status_after":{"type":"string"}}}}}}},"required":["id","object","livemode","customer","product","payment_method","status","collection_method","current_period_start","current_period_end","trial_start","trial_end","cancel_at_period_end","canceled_at","ended_at","metadata","created_at","updated_at","billing_run"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"subscription","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"product":{"type":"string"},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"const":"trialing","type":"string"},{"const":"active","type":"string"},{"const":"past_due","type":"string"},{"const":"canceled","type":"string"}]},"collection_method":{"anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"current_period_start":{"type":"number"},"current_period_end":{"type":"number"},"trial_start":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"trial_end":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"ended_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"},"billing_run":{"type":"object","required":["steps"],"properties":{"steps":{"type":"array","items":{"type":"object","required":["type","payment_intent_id","charge_status","subscription_status_after"],"properties":{"type":{"anyOf":[{"const":"renewal","type":"string"},{"const":"retry","type":"string"}]},"payment_intent_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"charge_status":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"subscription_status_after":{"type":"string"}}}}}}},"required":["id","object","livemode","customer","product","payment_method","status","collection_method","current_period_start","current_period_end","trial_start","trial_end","cancel_at_period_end","canceled_at","ended_at","metadata","created_at","updated_at","billing_run"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"subscription","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"product":{"type":"string"},"payment_method":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"const":"trialing","type":"string"},{"const":"active","type":"string"},{"const":"past_due","type":"string"},{"const":"canceled","type":"string"}]},"collection_method":{"anyOf":[{"const":"card","type":"string"},{"const":"bank_claim","type":"string"}]},"current_period_start":{"type":"number"},"current_period_end":{"type":"number"},"trial_start":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"trial_end":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"cancel_at_period_end":{"type":"boolean"},"canceled_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"ended_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"},"billing_run":{"type":"object","required":["steps"],"properties":{"steps":{"type":"array","items":{"type":"object","required":["type","payment_intent_id","charge_status","subscription_status_after"],"properties":{"type":{"anyOf":[{"const":"renewal","type":"string"},{"const":"retry","type":"string"}]},"payment_intent_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"charge_status":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"subscription_status_after":{"type":"string"}}}}}}},"required":["id","object","livemode","customer","product","payment_method","status","collection_method","current_period_start","current_period_end","trial_start","trial_end","cancel_at_period_end","canceled_at","ended_at","metadata","created_at","updated_at","billing_run"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"409":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1TestSubscriptionsByIdAdvance-billing","description":"Advance a subscription's billing cycle immediately (test mode only, sk_test_ keys). Runs the real billing job off-schedule: creates a real payment intent, charges the saved payment method via the test-mode connector, and emits the same ledger/webhook events as a scheduled renewal. `to=next_period_end` runs one billing step (a renewal when active, the next dunning retry when past_due); `to=past_due` expects the renewal charge to fail; `to=canceled_nonpayment` keeps running dunning retries until the subscription cancels. Failure targets return 409 `advance_target_not_reached` if a charge unexpectedly succeeds — the executed billing steps are real and are NOT rolled back.","tags":["Testing"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Target state to drive the subscription to. Failure targets require a declining test card (e.g. 4000 0000 0000 0341) saved on the subscription.","anyOf":[{"const":"next_period_end","type":"string"},{"const":"past_due","type":"string"},{"const":"canceled_nonpayment","type":"string"}]}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"to":{"description":"Target state to drive the subscription to. Failure targets require a declining test card (e.g. 4000 0000 0000 0341) saved on the subscription.","anyOf":[{"const":"next_period_end","type":"string"},{"const":"past_due","type":"string"},{"const":"canceled_nonpayment","type":"string"}]}}}},"text/plain":{"schema":{"type":"object","properties":{"to":{"description":"Target state to drive the subscription to. Failure targets require a declining test card (e.g. 4000 0000 0000 0341) saved on the subscription.","anyOf":[{"const":"next_period_end","type":"string"},{"const":"past_due","type":"string"},{"const":"canceled_nonpayment","type":"string"}]}}}}}}}},"/v1/coupons/":{"post":{"parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"coupon","type":"string"},"livemode":{"type":"boolean"},"name":{"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"duration_in_months":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"max_redemptions":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"active":{"type":"boolean"},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","name","type","value","duration","duration_in_months","max_redemptions","active","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"coupon","type":"string"},"livemode":{"type":"boolean"},"name":{"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"duration_in_months":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"max_redemptions":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"active":{"type":"boolean"},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","name","type","value","duration","duration_in_months","max_redemptions","active","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"coupon","type":"string"},"livemode":{"type":"boolean"},"name":{"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"duration_in_months":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"max_redemptions":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"active":{"type":"boolean"},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","name","type","value","duration","duration_in_months","max_redemptions","active","created_at","updated_at"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1Coupons","description":"Create a new coupon","tags":["Coupons"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","type","value","duration"],"properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"minimum":1,"maximum":2147483647,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"type":"integer"}]},"currency":{"minLength":3,"maxLength":3,"type":"string"},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"duration_in_months":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"max_redemptions":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]}}}},"multipart/form-data":{"schema":{"type":"object","required":["name","type","value","duration"],"properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"minimum":1,"maximum":2147483647,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"type":"integer"}]},"currency":{"minLength":3,"maxLength":3,"type":"string"},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"duration_in_months":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"max_redemptions":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]}}}},"text/plain":{"schema":{"type":"object","required":["name","type","value","duration"],"properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"minimum":1,"maximum":2147483647,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"type":"integer"}]},"currency":{"minLength":3,"maxLength":3,"type":"string"},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"duration_in_months":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"max_redemptions":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]}}}}}}},"get":{"parameters":[{"schema":{"minimum":1,"maximum":100,"default":10,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100,"default":10,"type":"integer"}]},"in":"query","name":"limit","required":true},{"schema":{"type":"boolean"},"in":"query","name":"active","required":false}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","livemode","name","type","value","duration","duration_in_months","max_redemptions","active","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"coupon","type":"string"},"livemode":{"type":"boolean"},"name":{"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"duration_in_months":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"max_redemptions":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"active":{"type":"boolean"},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","livemode","name","type","value","duration","duration_in_months","max_redemptions","active","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"coupon","type":"string"},"livemode":{"type":"boolean"},"name":{"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"duration_in_months":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"max_redemptions":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"active":{"type":"boolean"},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}},"text/plain":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","livemode","name","type","value","duration","duration_in_months","max_redemptions","active","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"coupon","type":"string"},"livemode":{"type":"boolean"},"name":{"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"duration_in_months":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"max_redemptions":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"active":{"type":"boolean"},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}}}}},"operationId":"getV1Coupons","description":"List coupons","tags":["Coupons"],"security":[{"bearerAuth":[]}]}},"/v1/coupons/{id}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"coupon","type":"string"},"livemode":{"type":"boolean"},"name":{"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"duration_in_months":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"max_redemptions":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"active":{"type":"boolean"},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","name","type","value","duration","duration_in_months","max_redemptions","active","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"coupon","type":"string"},"livemode":{"type":"boolean"},"name":{"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"duration_in_months":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"max_redemptions":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"active":{"type":"boolean"},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","name","type","value","duration","duration_in_months","max_redemptions","active","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"coupon","type":"string"},"livemode":{"type":"boolean"},"name":{"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"duration_in_months":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"max_redemptions":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"active":{"type":"boolean"},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","name","type","value","duration","duration_in_months","max_redemptions","active","created_at","updated_at"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"getV1CouponsById","description":"Retrieve a coupon","tags":["Coupons"],"security":[{"bearerAuth":[]}]},"patch":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"coupon","type":"string"},"livemode":{"type":"boolean"},"name":{"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"duration_in_months":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"max_redemptions":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"active":{"type":"boolean"},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","name","type","value","duration","duration_in_months","max_redemptions","active","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"coupon","type":"string"},"livemode":{"type":"boolean"},"name":{"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"duration_in_months":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"max_redemptions":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"active":{"type":"boolean"},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","name","type","value","duration","duration_in_months","max_redemptions","active","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"coupon","type":"string"},"livemode":{"type":"boolean"},"name":{"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"duration_in_months":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"max_redemptions":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"active":{"type":"boolean"},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","name","type","value","duration","duration_in_months","max_redemptions","active","created_at","updated_at"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"patchV1CouponsById","description":"Update a coupon","tags":["Coupons"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"active":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"active":{"type":"boolean"}}}},"text/plain":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"active":{"type":"boolean"}}}}}}},"delete":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"coupon","type":"string"},"deleted":{"const":true,"type":"boolean"}},"required":["id","object","deleted"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"coupon","type":"string"},"deleted":{"const":true,"type":"boolean"}},"required":["id","object","deleted"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"coupon","type":"string"},"deleted":{"const":true,"type":"boolean"}},"required":["id","object","deleted"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"409":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"deleteV1CouponsById","description":"Delete a coupon","tags":["Coupons"],"security":[{"bearerAuth":[]}]}},"/v1/promotion-codes/":{"post":{"parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"promotion_code","type":"string"},"livemode":{"type":"boolean"},"coupon_id":{"type":"string"},"code":{"type":"string"},"active":{"type":"boolean"},"max_redemptions":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"max_redemptions_per_customer":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"times_redeemed":{"type":"number"},"expires_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"min_amount":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"coupon":{"type":"object","required":["id","name","type","value","duration","duration_in_months","active"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"duration_in_months":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"active":{"type":"boolean"}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","coupon_id","code","active","max_redemptions","max_redemptions_per_customer","times_redeemed","expires_at","min_amount","coupon","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"promotion_code","type":"string"},"livemode":{"type":"boolean"},"coupon_id":{"type":"string"},"code":{"type":"string"},"active":{"type":"boolean"},"max_redemptions":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"max_redemptions_per_customer":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"times_redeemed":{"type":"number"},"expires_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"min_amount":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"coupon":{"type":"object","required":["id","name","type","value","duration","duration_in_months","active"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"duration_in_months":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"active":{"type":"boolean"}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","coupon_id","code","active","max_redemptions","max_redemptions_per_customer","times_redeemed","expires_at","min_amount","coupon","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"promotion_code","type":"string"},"livemode":{"type":"boolean"},"coupon_id":{"type":"string"},"code":{"type":"string"},"active":{"type":"boolean"},"max_redemptions":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"max_redemptions_per_customer":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"times_redeemed":{"type":"number"},"expires_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"min_amount":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"coupon":{"type":"object","required":["id","name","type","value","duration","duration_in_months","active"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"duration_in_months":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"active":{"type":"boolean"}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","coupon_id","code","active","max_redemptions","max_redemptions_per_customer","times_redeemed","expires_at","min_amount","coupon","created_at","updated_at"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"409":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1Promotion-codes","description":"Create a new promotion code","tags":["Promotion Codes"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["coupon_id","code"],"properties":{"coupon_id":{"format":"uuid","type":"string"},"code":{"minLength":1,"maxLength":50,"type":"string"},"max_redemptions":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"max_redemptions_per_customer":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"expires_at":{"format":"date-time","type":"string"},"min_amount":{"minimum":1,"maximum":2147483647,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"type":"integer"}]}}}},"multipart/form-data":{"schema":{"type":"object","required":["coupon_id","code"],"properties":{"coupon_id":{"format":"uuid","type":"string"},"code":{"minLength":1,"maxLength":50,"type":"string"},"max_redemptions":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"max_redemptions_per_customer":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"expires_at":{"format":"date-time","type":"string"},"min_amount":{"minimum":1,"maximum":2147483647,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"type":"integer"}]}}}},"text/plain":{"schema":{"type":"object","required":["coupon_id","code"],"properties":{"coupon_id":{"format":"uuid","type":"string"},"code":{"minLength":1,"maxLength":50,"type":"string"},"max_redemptions":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"max_redemptions_per_customer":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"expires_at":{"format":"date-time","type":"string"},"min_amount":{"minimum":1,"maximum":2147483647,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"type":"integer"}]}}}}}}},"get":{"parameters":[{"schema":{"minimum":1,"maximum":100,"default":10,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100,"default":10,"type":"integer"}]},"in":"query","name":"limit","required":true},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"coupon","required":false},{"schema":{"type":"boolean"},"in":"query","name":"active","required":false}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","livemode","coupon_id","code","active","max_redemptions","max_redemptions_per_customer","times_redeemed","expires_at","min_amount","coupon","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"promotion_code","type":"string"},"livemode":{"type":"boolean"},"coupon_id":{"type":"string"},"code":{"type":"string"},"active":{"type":"boolean"},"max_redemptions":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"max_redemptions_per_customer":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"times_redeemed":{"type":"number"},"expires_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"min_amount":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"coupon":{"type":"object","required":["id","name","type","value","duration","duration_in_months","active"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"duration_in_months":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"active":{"type":"boolean"}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","livemode","coupon_id","code","active","max_redemptions","max_redemptions_per_customer","times_redeemed","expires_at","min_amount","coupon","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"promotion_code","type":"string"},"livemode":{"type":"boolean"},"coupon_id":{"type":"string"},"code":{"type":"string"},"active":{"type":"boolean"},"max_redemptions":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"max_redemptions_per_customer":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"times_redeemed":{"type":"number"},"expires_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"min_amount":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"coupon":{"type":"object","required":["id","name","type","value","duration","duration_in_months","active"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"duration_in_months":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"active":{"type":"boolean"}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}},"text/plain":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","livemode","coupon_id","code","active","max_redemptions","max_redemptions_per_customer","times_redeemed","expires_at","min_amount","coupon","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"promotion_code","type":"string"},"livemode":{"type":"boolean"},"coupon_id":{"type":"string"},"code":{"type":"string"},"active":{"type":"boolean"},"max_redemptions":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"max_redemptions_per_customer":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"times_redeemed":{"type":"number"},"expires_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"min_amount":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"coupon":{"type":"object","required":["id","name","type","value","duration","duration_in_months","active"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"duration_in_months":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"active":{"type":"boolean"}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}}}}},"operationId":"getV1Promotion-codes","description":"List promotion codes","tags":["Promotion Codes"],"security":[{"bearerAuth":[]}]}},"/v1/promotion-codes/{id}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"promotion_code","type":"string"},"livemode":{"type":"boolean"},"coupon_id":{"type":"string"},"code":{"type":"string"},"active":{"type":"boolean"},"max_redemptions":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"max_redemptions_per_customer":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"times_redeemed":{"type":"number"},"expires_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"min_amount":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"coupon":{"type":"object","required":["id","name","type","value","duration","duration_in_months","active"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"duration_in_months":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"active":{"type":"boolean"}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","coupon_id","code","active","max_redemptions","max_redemptions_per_customer","times_redeemed","expires_at","min_amount","coupon","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"promotion_code","type":"string"},"livemode":{"type":"boolean"},"coupon_id":{"type":"string"},"code":{"type":"string"},"active":{"type":"boolean"},"max_redemptions":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"max_redemptions_per_customer":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"times_redeemed":{"type":"number"},"expires_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"min_amount":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"coupon":{"type":"object","required":["id","name","type","value","duration","duration_in_months","active"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"duration_in_months":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"active":{"type":"boolean"}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","coupon_id","code","active","max_redemptions","max_redemptions_per_customer","times_redeemed","expires_at","min_amount","coupon","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"promotion_code","type":"string"},"livemode":{"type":"boolean"},"coupon_id":{"type":"string"},"code":{"type":"string"},"active":{"type":"boolean"},"max_redemptions":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"max_redemptions_per_customer":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"times_redeemed":{"type":"number"},"expires_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"min_amount":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"coupon":{"type":"object","required":["id","name","type","value","duration","duration_in_months","active"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"duration_in_months":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"active":{"type":"boolean"}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","coupon_id","code","active","max_redemptions","max_redemptions_per_customer","times_redeemed","expires_at","min_amount","coupon","created_at","updated_at"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"getV1Promotion-codesById","description":"Retrieve a promotion code","tags":["Promotion Codes"],"security":[{"bearerAuth":[]}]},"patch":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"promotion_code","type":"string"},"livemode":{"type":"boolean"},"coupon_id":{"type":"string"},"code":{"type":"string"},"active":{"type":"boolean"},"max_redemptions":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"max_redemptions_per_customer":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"times_redeemed":{"type":"number"},"expires_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"min_amount":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"coupon":{"type":"object","required":["id","name","type","value","duration","duration_in_months","active"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"duration_in_months":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"active":{"type":"boolean"}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","coupon_id","code","active","max_redemptions","max_redemptions_per_customer","times_redeemed","expires_at","min_amount","coupon","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"promotion_code","type":"string"},"livemode":{"type":"boolean"},"coupon_id":{"type":"string"},"code":{"type":"string"},"active":{"type":"boolean"},"max_redemptions":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"max_redemptions_per_customer":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"times_redeemed":{"type":"number"},"expires_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"min_amount":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"coupon":{"type":"object","required":["id","name","type","value","duration","duration_in_months","active"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"duration_in_months":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"active":{"type":"boolean"}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","coupon_id","code","active","max_redemptions","max_redemptions_per_customer","times_redeemed","expires_at","min_amount","coupon","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"promotion_code","type":"string"},"livemode":{"type":"boolean"},"coupon_id":{"type":"string"},"code":{"type":"string"},"active":{"type":"boolean"},"max_redemptions":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"max_redemptions_per_customer":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"times_redeemed":{"type":"number"},"expires_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"min_amount":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"coupon":{"type":"object","required":["id","name","type","value","duration","duration_in_months","active"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"duration_in_months":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]},"active":{"type":"boolean"}}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","coupon_id","code","active","max_redemptions","max_redemptions_per_customer","times_redeemed","expires_at","min_amount","coupon","created_at","updated_at"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"patchV1Promotion-codesById","description":"Update a promotion code","tags":["Promotion Codes"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"active":{"type":"boolean"}}}},"text/plain":{"schema":{"type":"object","properties":{"active":{"type":"boolean"}}}}}}}},"/v1/promotion-codes/validate":{"post":{"parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"valid":{"const":true,"type":"boolean"},"promotion_code_id":{"type":"string"},"coupon":{"type":"object","required":["id","type","value","duration","duration_in_months"],"properties":{"id":{"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"duration_in_months":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]}}}},"required":["valid","promotion_code_id","coupon"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"valid":{"const":true,"type":"boolean"},"promotion_code_id":{"type":"string"},"coupon":{"type":"object","required":["id","type","value","duration","duration_in_months"],"properties":{"id":{"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"duration_in_months":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]}}}},"required":["valid","promotion_code_id","coupon"]}},"text/plain":{"schema":{"type":"object","properties":{"valid":{"const":true,"type":"boolean"},"promotion_code_id":{"type":"string"},"coupon":{"type":"object","required":["id","type","value","duration","duration_in_months"],"properties":{"id":{"type":"string"},"type":{"anyOf":[{"const":"percentage","type":"string"},{"const":"fixed_amount","type":"string"}]},"value":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"duration":{"anyOf":[{"const":"once","type":"string"},{"const":"repeating","type":"string"},{"const":"forever","type":"string"}]},"duration_in_months":{"nullable":true,"anyOf":[{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},{"type":"null"}]}}}},"required":["valid","promotion_code_id","coupon"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1Promotion-codesValidate","description":"Validate a promotion code","tags":["Promotion Codes"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["code"],"properties":{"code":{"minLength":1,"type":"string"},"subtotal":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"currency":{"minLength":3,"maxLength":3,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["code"],"properties":{"code":{"minLength":1,"type":"string"},"subtotal":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"currency":{"minLength":3,"maxLength":3,"type":"string"}}}},"text/plain":{"schema":{"type":"object","required":["code"],"properties":{"code":{"minLength":1,"type":"string"},"subtotal":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"currency":{"minLength":3,"maxLength":3,"type":"string"}}}}}}}},"/v1/notification-channels/":{"get":{"parameters":[{"description":"Maximum number of channels to return","schema":{"minimum":1,"maximum":100,"default":25,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100,"default":25,"description":"Maximum number of channels to return","type":"integer"}]},"in":"query","name":"limit","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","livemode","type","name","enabled","config","event_subscriptions","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"notification_channel","type":"string"},"livemode":{"type":"boolean"},"type":{"anyOf":[{"const":"email","type":"string"},{"const":"webhook","type":"string"},{"const":"slack","type":"string"},{"const":"sms","type":"string"}]},"name":{"type":"string"},"enabled":{"type":"boolean"},"config":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"event_subscriptions":{"type":"array","items":{"type":"string"}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"additionalProperties":false}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","livemode","type","name","enabled","config","event_subscriptions","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"notification_channel","type":"string"},"livemode":{"type":"boolean"},"type":{"anyOf":[{"const":"email","type":"string"},{"const":"webhook","type":"string"},{"const":"slack","type":"string"},{"const":"sms","type":"string"}]},"name":{"type":"string"},"enabled":{"type":"boolean"},"config":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"event_subscriptions":{"type":"array","items":{"type":"string"}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"additionalProperties":false}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}},"text/plain":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","livemode","type","name","enabled","config","event_subscriptions","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"notification_channel","type":"string"},"livemode":{"type":"boolean"},"type":{"anyOf":[{"const":"email","type":"string"},{"const":"webhook","type":"string"},{"const":"slack","type":"string"},{"const":"sms","type":"string"}]},"name":{"type":"string"},"enabled":{"type":"boolean"},"config":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"event_subscriptions":{"type":"array","items":{"type":"string"}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"additionalProperties":false}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}}}}},"operationId":"getV1Notification-channels","description":"List all notification channels","tags":["Notification Channels"],"security":[{"bearerAuth":[]}]},"post":{"parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"notification_channel","type":"string"},"livemode":{"type":"boolean"},"type":{"anyOf":[{"const":"email","type":"string"},{"const":"webhook","type":"string"},{"const":"slack","type":"string"},{"const":"sms","type":"string"}]},"name":{"type":"string"},"enabled":{"type":"boolean"},"config":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"event_subscriptions":{"type":"array","items":{"type":"string"}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","type","name","enabled","config","event_subscriptions","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"notification_channel","type":"string"},"livemode":{"type":"boolean"},"type":{"anyOf":[{"const":"email","type":"string"},{"const":"webhook","type":"string"},{"const":"slack","type":"string"},{"const":"sms","type":"string"}]},"name":{"type":"string"},"enabled":{"type":"boolean"},"config":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"event_subscriptions":{"type":"array","items":{"type":"string"}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","type","name","enabled","config","event_subscriptions","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"notification_channel","type":"string"},"livemode":{"type":"boolean"},"type":{"anyOf":[{"const":"email","type":"string"},{"const":"webhook","type":"string"},{"const":"slack","type":"string"},{"const":"sms","type":"string"}]},"name":{"type":"string"},"enabled":{"type":"boolean"},"config":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"event_subscriptions":{"type":"array","items":{"type":"string"}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","type","name","enabled","config","event_subscriptions","created_at","updated_at"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1Notification-channels","description":"Create a notification channel (webhook, email, slack, or sms) with event subscriptions. Webhook channels are signed with HMAC-SHA256 via the X-Kling-Signature header.","tags":["Notification Channels"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","name","event_subscriptions"],"properties":{"type":{"description":"Channel type: email, webhook, slack, or sms","anyOf":[{"const":"email","type":"string"},{"const":"webhook","type":"string"},{"const":"slack","type":"string"},{"const":"sms","type":"string"}]},"name":{"minLength":1,"maxLength":255,"description":"Display name for this channel","type":"string"},"enabled":{"default":true,"description":"Whether the channel is active","type":"boolean"},"config":{"description":"Channel-specific configuration. Webhook: { url: string, secret?: string } (secret auto-generated if omitted). Email: { bcc?: string, subject?: string, htmlTemplate?: string }. Slack: { webhookUrl: string }.","type":"object","patternProperties":{"^(.*)$":{}}},"event_subscriptions":{"minItems":1,"description":"Event types to subscribe to (e.g. payment_intent.captured, subscription.canceled)","type":"array","items":{"description":"Event types a notification channel can subscribe to","anyOf":[{"const":"payment_intent.captured","type":"string"},{"const":"payment_intent.failed","type":"string"},{"const":"payment_intent.refunded","type":"string"},{"const":"claim.created","type":"string"},{"const":"claim.paid","type":"string"},{"const":"subscription.created","type":"string"},{"const":"subscription.canceled","type":"string"},{"const":"subscription.renewed","type":"string"},{"const":"subscription.updated","type":"string"},{"const":"subscription.activated","type":"string"},{"const":"subscription.trial_ended","type":"string"},{"const":"subscription.payment_failed","type":"string"},{"const":"subscription.payment_retry_failed","type":"string"},{"const":"subscription.payment_recovered","type":"string"},{"const":"checkout.session.completed","type":"string"}]}}}}},"multipart/form-data":{"schema":{"type":"object","required":["type","name","event_subscriptions"],"properties":{"type":{"description":"Channel type: email, webhook, slack, or sms","anyOf":[{"const":"email","type":"string"},{"const":"webhook","type":"string"},{"const":"slack","type":"string"},{"const":"sms","type":"string"}]},"name":{"minLength":1,"maxLength":255,"description":"Display name for this channel","type":"string"},"enabled":{"default":true,"description":"Whether the channel is active","type":"boolean"},"config":{"description":"Channel-specific configuration. Webhook: { url: string, secret?: string } (secret auto-generated if omitted). Email: { bcc?: string, subject?: string, htmlTemplate?: string }. Slack: { webhookUrl: string }.","type":"object","patternProperties":{"^(.*)$":{}}},"event_subscriptions":{"minItems":1,"description":"Event types to subscribe to (e.g. payment_intent.captured, subscription.canceled)","type":"array","items":{"description":"Event types a notification channel can subscribe to","anyOf":[{"const":"payment_intent.captured","type":"string"},{"const":"payment_intent.failed","type":"string"},{"const":"payment_intent.refunded","type":"string"},{"const":"claim.created","type":"string"},{"const":"claim.paid","type":"string"},{"const":"subscription.created","type":"string"},{"const":"subscription.canceled","type":"string"},{"const":"subscription.renewed","type":"string"},{"const":"subscription.updated","type":"string"},{"const":"subscription.activated","type":"string"},{"const":"subscription.trial_ended","type":"string"},{"const":"subscription.payment_failed","type":"string"},{"const":"subscription.payment_retry_failed","type":"string"},{"const":"subscription.payment_recovered","type":"string"},{"const":"checkout.session.completed","type":"string"}]}}}}},"text/plain":{"schema":{"type":"object","required":["type","name","event_subscriptions"],"properties":{"type":{"description":"Channel type: email, webhook, slack, or sms","anyOf":[{"const":"email","type":"string"},{"const":"webhook","type":"string"},{"const":"slack","type":"string"},{"const":"sms","type":"string"}]},"name":{"minLength":1,"maxLength":255,"description":"Display name for this channel","type":"string"},"enabled":{"default":true,"description":"Whether the channel is active","type":"boolean"},"config":{"description":"Channel-specific configuration. Webhook: { url: string, secret?: string } (secret auto-generated if omitted). Email: { bcc?: string, subject?: string, htmlTemplate?: string }. Slack: { webhookUrl: string }.","type":"object","patternProperties":{"^(.*)$":{}}},"event_subscriptions":{"minItems":1,"description":"Event types to subscribe to (e.g. payment_intent.captured, subscription.canceled)","type":"array","items":{"description":"Event types a notification channel can subscribe to","anyOf":[{"const":"payment_intent.captured","type":"string"},{"const":"payment_intent.failed","type":"string"},{"const":"payment_intent.refunded","type":"string"},{"const":"claim.created","type":"string"},{"const":"claim.paid","type":"string"},{"const":"subscription.created","type":"string"},{"const":"subscription.canceled","type":"string"},{"const":"subscription.renewed","type":"string"},{"const":"subscription.updated","type":"string"},{"const":"subscription.activated","type":"string"},{"const":"subscription.trial_ended","type":"string"},{"const":"subscription.payment_failed","type":"string"},{"const":"subscription.payment_retry_failed","type":"string"},{"const":"subscription.payment_recovered","type":"string"},{"const":"checkout.session.completed","type":"string"}]}}}}}}}}},"/v1/notification-channels/test-webhooks":{"post":{"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"webhook_test_result","type":"string"},"results":{"type":"array","items":{"type":"object","required":["channel_id","channel_name","url","success","http_status","response_body","error"],"properties":{"channel_id":{"type":"string"},"channel_name":{"type":"string"},"url":{"type":"string"},"success":{"type":"boolean"},"http_status":{"anyOf":[{"type":"number"},{"type":"null"}]},"response_body":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]}}}},"message":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["object","results","message"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"object":{"const":"webhook_test_result","type":"string"},"results":{"type":"array","items":{"type":"object","required":["channel_id","channel_name","url","success","http_status","response_body","error"],"properties":{"channel_id":{"type":"string"},"channel_name":{"type":"string"},"url":{"type":"string"},"success":{"type":"boolean"},"http_status":{"anyOf":[{"type":"number"},{"type":"null"}]},"response_body":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]}}}},"message":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["object","results","message"]}},"text/plain":{"schema":{"type":"object","properties":{"object":{"const":"webhook_test_result","type":"string"},"results":{"type":"array","items":{"type":"object","required":["channel_id","channel_name","url","success","http_status","response_body","error"],"properties":{"channel_id":{"type":"string"},"channel_name":{"type":"string"},"url":{"type":"string"},"success":{"type":"boolean"},"http_status":{"anyOf":[{"type":"number"},{"type":"null"}]},"response_body":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]}}}},"message":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["object","results","message"]}}}}},"operationId":"postV1Notification-channelsTest-webhooks","description":"Send a test debug.check event to all enabled webhook channels and return results","tags":["Notification Channels"],"security":[{"bearerAuth":[]}]}},"/v1/notification-channels/{id}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"notification_channel","type":"string"},"livemode":{"type":"boolean"},"type":{"anyOf":[{"const":"email","type":"string"},{"const":"webhook","type":"string"},{"const":"slack","type":"string"},{"const":"sms","type":"string"}]},"name":{"type":"string"},"enabled":{"type":"boolean"},"config":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"event_subscriptions":{"type":"array","items":{"type":"string"}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","type","name","enabled","config","event_subscriptions","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"notification_channel","type":"string"},"livemode":{"type":"boolean"},"type":{"anyOf":[{"const":"email","type":"string"},{"const":"webhook","type":"string"},{"const":"slack","type":"string"},{"const":"sms","type":"string"}]},"name":{"type":"string"},"enabled":{"type":"boolean"},"config":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"event_subscriptions":{"type":"array","items":{"type":"string"}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","type","name","enabled","config","event_subscriptions","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"notification_channel","type":"string"},"livemode":{"type":"boolean"},"type":{"anyOf":[{"const":"email","type":"string"},{"const":"webhook","type":"string"},{"const":"slack","type":"string"},{"const":"sms","type":"string"}]},"name":{"type":"string"},"enabled":{"type":"boolean"},"config":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"event_subscriptions":{"type":"array","items":{"type":"string"}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","type","name","enabled","config","event_subscriptions","created_at","updated_at"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"getV1Notification-channelsById","description":"Retrieve a notification channel","tags":["Notification Channels"],"security":[{"bearerAuth":[]}]},"patch":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"notification_channel","type":"string"},"livemode":{"type":"boolean"},"type":{"anyOf":[{"const":"email","type":"string"},{"const":"webhook","type":"string"},{"const":"slack","type":"string"},{"const":"sms","type":"string"}]},"name":{"type":"string"},"enabled":{"type":"boolean"},"config":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"event_subscriptions":{"type":"array","items":{"type":"string"}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","type","name","enabled","config","event_subscriptions","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"notification_channel","type":"string"},"livemode":{"type":"boolean"},"type":{"anyOf":[{"const":"email","type":"string"},{"const":"webhook","type":"string"},{"const":"slack","type":"string"},{"const":"sms","type":"string"}]},"name":{"type":"string"},"enabled":{"type":"boolean"},"config":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"event_subscriptions":{"type":"array","items":{"type":"string"}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","type","name","enabled","config","event_subscriptions","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"notification_channel","type":"string"},"livemode":{"type":"boolean"},"type":{"anyOf":[{"const":"email","type":"string"},{"const":"webhook","type":"string"},{"const":"slack","type":"string"},{"const":"sms","type":"string"}]},"name":{"type":"string"},"enabled":{"type":"boolean"},"config":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"event_subscriptions":{"type":"array","items":{"type":"string"}},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","type","name","enabled","config","event_subscriptions","created_at","updated_at"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"patchV1Notification-channelsById","description":"Update a notification channel","tags":["Notification Channels"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"enabled":{"type":"boolean"},"config":{"type":"object","patternProperties":{"^(.*)$":{}}},"event_subscriptions":{"type":"array","items":{"description":"Event types a notification channel can subscribe to","anyOf":[{"const":"payment_intent.captured","type":"string"},{"const":"payment_intent.failed","type":"string"},{"const":"payment_intent.refunded","type":"string"},{"const":"claim.created","type":"string"},{"const":"claim.paid","type":"string"},{"const":"subscription.created","type":"string"},{"const":"subscription.canceled","type":"string"},{"const":"subscription.renewed","type":"string"},{"const":"subscription.updated","type":"string"},{"const":"subscription.activated","type":"string"},{"const":"subscription.trial_ended","type":"string"},{"const":"subscription.payment_failed","type":"string"},{"const":"subscription.payment_retry_failed","type":"string"},{"const":"subscription.payment_recovered","type":"string"},{"const":"checkout.session.completed","type":"string"}]}}},"additionalProperties":false}},"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"enabled":{"type":"boolean"},"config":{"type":"object","patternProperties":{"^(.*)$":{}}},"event_subscriptions":{"type":"array","items":{"description":"Event types a notification channel can subscribe to","anyOf":[{"const":"payment_intent.captured","type":"string"},{"const":"payment_intent.failed","type":"string"},{"const":"payment_intent.refunded","type":"string"},{"const":"claim.created","type":"string"},{"const":"claim.paid","type":"string"},{"const":"subscription.created","type":"string"},{"const":"subscription.canceled","type":"string"},{"const":"subscription.renewed","type":"string"},{"const":"subscription.updated","type":"string"},{"const":"subscription.activated","type":"string"},{"const":"subscription.trial_ended","type":"string"},{"const":"subscription.payment_failed","type":"string"},{"const":"subscription.payment_retry_failed","type":"string"},{"const":"subscription.payment_recovered","type":"string"},{"const":"checkout.session.completed","type":"string"}]}}},"additionalProperties":false}},"text/plain":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"enabled":{"type":"boolean"},"config":{"type":"object","patternProperties":{"^(.*)$":{}}},"event_subscriptions":{"type":"array","items":{"description":"Event types a notification channel can subscribe to","anyOf":[{"const":"payment_intent.captured","type":"string"},{"const":"payment_intent.failed","type":"string"},{"const":"payment_intent.refunded","type":"string"},{"const":"claim.created","type":"string"},{"const":"claim.paid","type":"string"},{"const":"subscription.created","type":"string"},{"const":"subscription.canceled","type":"string"},{"const":"subscription.renewed","type":"string"},{"const":"subscription.updated","type":"string"},{"const":"subscription.activated","type":"string"},{"const":"subscription.trial_ended","type":"string"},{"const":"subscription.payment_failed","type":"string"},{"const":"subscription.payment_retry_failed","type":"string"},{"const":"subscription.payment_recovered","type":"string"},{"const":"checkout.session.completed","type":"string"}]}}},"additionalProperties":false}}}}},"delete":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"notification_channel","type":"string"},"deleted":{"const":true,"type":"boolean"}},"required":["id","object","deleted"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"notification_channel","type":"string"},"deleted":{"const":true,"type":"boolean"}},"required":["id","object","deleted"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"notification_channel","type":"string"},"deleted":{"const":true,"type":"boolean"}},"required":["id","object","deleted"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"deleteV1Notification-channelsById","description":"Delete a notification channel","tags":["Notification Channels"],"security":[{"bearerAuth":[]}]}},"/v1/notification-channels/{id}/deliveries":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"number","minimum":1,"maximum":100,"default":50},"in":"query","name":"limit","required":false}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","channel_type","event_type","status","http_status","response_body","recipient","attempts","next_retry_at","last_attempt_at","created_at"],"properties":{"id":{"type":"string"},"object":{"const":"notification_delivery","type":"string"},"channel_type":{"type":"string"},"event_type":{"type":"string"},"status":{"type":"string"},"http_status":{"anyOf":[{"type":"number"},{"type":"null"}]},"response_body":{"anyOf":[{"type":"string"},{"type":"null"}]},"recipient":{"anyOf":[{"type":"string"},{"type":"null"}]},"attempts":{"type":"number"},"next_retry_at":{"anyOf":[{"type":"number"},{"type":"null"}]},"last_attempt_at":{"anyOf":[{"type":"number"},{"type":"null"}]},"created_at":{"type":"number"}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","channel_type","event_type","status","http_status","response_body","recipient","attempts","next_retry_at","last_attempt_at","created_at"],"properties":{"id":{"type":"string"},"object":{"const":"notification_delivery","type":"string"},"channel_type":{"type":"string"},"event_type":{"type":"string"},"status":{"type":"string"},"http_status":{"anyOf":[{"type":"number"},{"type":"null"}]},"response_body":{"anyOf":[{"type":"string"},{"type":"null"}]},"recipient":{"anyOf":[{"type":"string"},{"type":"null"}]},"attempts":{"type":"number"},"next_retry_at":{"anyOf":[{"type":"number"},{"type":"null"}]},"last_attempt_at":{"anyOf":[{"type":"number"},{"type":"null"}]},"created_at":{"type":"number"}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}},"text/plain":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","channel_type","event_type","status","http_status","response_body","recipient","attempts","next_retry_at","last_attempt_at","created_at"],"properties":{"id":{"type":"string"},"object":{"const":"notification_delivery","type":"string"},"channel_type":{"type":"string"},"event_type":{"type":"string"},"status":{"type":"string"},"http_status":{"anyOf":[{"type":"number"},{"type":"null"}]},"response_body":{"anyOf":[{"type":"string"},{"type":"null"}]},"recipient":{"anyOf":[{"type":"string"},{"type":"null"}]},"attempts":{"type":"number"},"next_retry_at":{"anyOf":[{"type":"number"},{"type":"null"}]},"last_attempt_at":{"anyOf":[{"type":"number"},{"type":"null"}]},"created_at":{"type":"number"}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"getV1Notification-channelsByIdDeliveries","description":"List delivery history for a notification channel","tags":["Notification Channels"],"security":[{"bearerAuth":[]}]}},"/v1/payment-links/":{"post":{"parameters":[],"responses":{"200":{"description":"A payment link is a reusable URL that creates checkout sessions when accessed","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the payment link","type":"string"},"object":{"const":"payment_link","type":"string"},"livemode":{"description":"Whether this is a live mode link (true) or test mode (false)","type":"boolean"},"name":{"description":"Display name for the payment link","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description","type":"string"},{"type":"null"}]},"amount":{"description":"Total amount in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total amount in the smallest currency unit","type":"integer"}]},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"discount_amount":{"description":"Whole-sale POS discount already subtracted from amount","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale POS discount already subtracted from amount","type":"integer"}]},"active":{"description":"Whether the link is currently active","type":"boolean"},"max_uses":{"nullable":true,"anyOf":[{"description":"Maximum number of successful payments this link accepts. null = unlimited","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Maximum number of successful payments this link accepts. null = unlimited","type":"integer"}]},{"type":"null"}]},"success_count":{"description":"Number of successful payments captured through this link","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of successful payments captured through this link","type":"integer"}]},"url":{"description":"Public URL for customers to access the payment link","type":"string"},"expires_at":{"nullable":true,"anyOf":[{"description":"Unix timestamp when this link expires. null = never","type":"number"},{"type":"null"}]},"form_fields":{"description":"Form fields to collect from the customer","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"save_payment_method":{"description":"Whether to save the payment method for future use","type":"boolean"},"allow_promotion_codes":{"description":"Whether promotion codes can be applied","type":"boolean"},"success_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to after successful payment","type":"string"},{"type":"null"}]},"cancel_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to if the customer cancels","type":"string"},{"type":"null"}]},"items":{"description":"Line items in this payment link","type":"array","items":{"description":"A line item in the payment link","type":"object","required":["id","product_id","variant_id","description","quantity","unit_amount","vat_rate","discount_amount"],"properties":{"id":{"description":"Unique identifier for the line item","type":"string"},"product_id":{"nullable":true,"anyOf":[{"description":"ID of the product this item references, if any","type":"string"},{"type":"null"}]},"variant_id":{"nullable":true,"anyOf":[{"description":"ID of the product variant bought, when the product has variants","type":"string"},{"type":"null"}]},"description":{"description":"Human-readable description of the line item. For a variant it names the choice, e.g. \"Hettupeysa, Stærð: M\"","type":"string"},"quantity":{"description":"Number of units","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of units","type":"integer"}]},"unit_amount":{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","type":"integer"}]},"vat_rate":{"description":"VAT rate as an integer percentage: 0, 11, or 24","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate as an integer percentage: 0, 11, or 24","type":"integer"}]},"discount_amount":{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","type":"integer"}]}}}},"metadata":{"description":"Arbitrary key-value metadata","nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"description":"Unix timestamp when this link was created","type":"number"},"updated_at":{"description":"Unix timestamp when this link was last updated","type":"number"}},"required":["id","object","livemode","name","description","amount","currency","discount_amount","active","max_uses","success_count","url","expires_at","form_fields","save_payment_method","allow_promotion_codes","success_url","cancel_url","items","metadata","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the payment link","type":"string"},"object":{"const":"payment_link","type":"string"},"livemode":{"description":"Whether this is a live mode link (true) or test mode (false)","type":"boolean"},"name":{"description":"Display name for the payment link","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description","type":"string"},{"type":"null"}]},"amount":{"description":"Total amount in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total amount in the smallest currency unit","type":"integer"}]},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"discount_amount":{"description":"Whole-sale POS discount already subtracted from amount","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale POS discount already subtracted from amount","type":"integer"}]},"active":{"description":"Whether the link is currently active","type":"boolean"},"max_uses":{"nullable":true,"anyOf":[{"description":"Maximum number of successful payments this link accepts. null = unlimited","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Maximum number of successful payments this link accepts. null = unlimited","type":"integer"}]},{"type":"null"}]},"success_count":{"description":"Number of successful payments captured through this link","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of successful payments captured through this link","type":"integer"}]},"url":{"description":"Public URL for customers to access the payment link","type":"string"},"expires_at":{"nullable":true,"anyOf":[{"description":"Unix timestamp when this link expires. null = never","type":"number"},{"type":"null"}]},"form_fields":{"description":"Form fields to collect from the customer","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"save_payment_method":{"description":"Whether to save the payment method for future use","type":"boolean"},"allow_promotion_codes":{"description":"Whether promotion codes can be applied","type":"boolean"},"success_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to after successful payment","type":"string"},{"type":"null"}]},"cancel_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to if the customer cancels","type":"string"},{"type":"null"}]},"items":{"description":"Line items in this payment link","type":"array","items":{"description":"A line item in the payment link","type":"object","required":["id","product_id","variant_id","description","quantity","unit_amount","vat_rate","discount_amount"],"properties":{"id":{"description":"Unique identifier for the line item","type":"string"},"product_id":{"nullable":true,"anyOf":[{"description":"ID of the product this item references, if any","type":"string"},{"type":"null"}]},"variant_id":{"nullable":true,"anyOf":[{"description":"ID of the product variant bought, when the product has variants","type":"string"},{"type":"null"}]},"description":{"description":"Human-readable description of the line item. For a variant it names the choice, e.g. \"Hettupeysa, Stærð: M\"","type":"string"},"quantity":{"description":"Number of units","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of units","type":"integer"}]},"unit_amount":{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","type":"integer"}]},"vat_rate":{"description":"VAT rate as an integer percentage: 0, 11, or 24","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate as an integer percentage: 0, 11, or 24","type":"integer"}]},"discount_amount":{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","type":"integer"}]}}}},"metadata":{"description":"Arbitrary key-value metadata","nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"description":"Unix timestamp when this link was created","type":"number"},"updated_at":{"description":"Unix timestamp when this link was last updated","type":"number"}},"required":["id","object","livemode","name","description","amount","currency","discount_amount","active","max_uses","success_count","url","expires_at","form_fields","save_payment_method","allow_promotion_codes","success_url","cancel_url","items","metadata","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the payment link","type":"string"},"object":{"const":"payment_link","type":"string"},"livemode":{"description":"Whether this is a live mode link (true) or test mode (false)","type":"boolean"},"name":{"description":"Display name for the payment link","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description","type":"string"},{"type":"null"}]},"amount":{"description":"Total amount in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total amount in the smallest currency unit","type":"integer"}]},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"discount_amount":{"description":"Whole-sale POS discount already subtracted from amount","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale POS discount already subtracted from amount","type":"integer"}]},"active":{"description":"Whether the link is currently active","type":"boolean"},"max_uses":{"nullable":true,"anyOf":[{"description":"Maximum number of successful payments this link accepts. null = unlimited","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Maximum number of successful payments this link accepts. null = unlimited","type":"integer"}]},{"type":"null"}]},"success_count":{"description":"Number of successful payments captured through this link","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of successful payments captured through this link","type":"integer"}]},"url":{"description":"Public URL for customers to access the payment link","type":"string"},"expires_at":{"nullable":true,"anyOf":[{"description":"Unix timestamp when this link expires. null = never","type":"number"},{"type":"null"}]},"form_fields":{"description":"Form fields to collect from the customer","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"save_payment_method":{"description":"Whether to save the payment method for future use","type":"boolean"},"allow_promotion_codes":{"description":"Whether promotion codes can be applied","type":"boolean"},"success_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to after successful payment","type":"string"},{"type":"null"}]},"cancel_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to if the customer cancels","type":"string"},{"type":"null"}]},"items":{"description":"Line items in this payment link","type":"array","items":{"description":"A line item in the payment link","type":"object","required":["id","product_id","variant_id","description","quantity","unit_amount","vat_rate","discount_amount"],"properties":{"id":{"description":"Unique identifier for the line item","type":"string"},"product_id":{"nullable":true,"anyOf":[{"description":"ID of the product this item references, if any","type":"string"},{"type":"null"}]},"variant_id":{"nullable":true,"anyOf":[{"description":"ID of the product variant bought, when the product has variants","type":"string"},{"type":"null"}]},"description":{"description":"Human-readable description of the line item. For a variant it names the choice, e.g. \"Hettupeysa, Stærð: M\"","type":"string"},"quantity":{"description":"Number of units","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of units","type":"integer"}]},"unit_amount":{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","type":"integer"}]},"vat_rate":{"description":"VAT rate as an integer percentage: 0, 11, or 24","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate as an integer percentage: 0, 11, or 24","type":"integer"}]},"discount_amount":{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","type":"integer"}]}}}},"metadata":{"description":"Arbitrary key-value metadata","nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"description":"Unix timestamp when this link was created","type":"number"},"updated_at":{"description":"Unix timestamp when this link was last updated","type":"number"}},"required":["id","object","livemode","name","description","amount","currency","discount_amount","active","max_uses","success_count","url","expires_at","form_fields","save_payment_method","allow_promotion_codes","success_url","cancel_url","items","metadata","created_at","updated_at"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1Payment-links","description":"Create a new payment link","tags":["Payment Links"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","items"],"properties":{"name":{"minLength":1,"maxLength":255,"description":"Display name for the payment link","type":"string"},"description":{"description":"Optional description","type":"string"},"currency":{"minLength":3,"maxLength":3,"default":"ISK","type":"string"},"max_uses":{"nullable":true,"anyOf":[{"minimum":1,"description":"null = unlimited, 1 = one-time, N = custom limit","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"description":"null = unlimited, 1 = one-time, N = custom limit","type":"integer"}]},{"type":"null"}]},"expires_at":{"description":"Unix timestamp when the link expires","type":"number"},"collect_name":{"default":false,"type":"boolean"},"collect_email":{"default":true,"type":"boolean"},"collect_phone":{"default":false,"type":"boolean"},"collect_national_id":{"default":false,"type":"boolean"},"save_payment_method":{"default":false,"type":"boolean"},"allow_promotion_codes":{"default":false,"type":"boolean"},"success_url":{"format":"uri","type":"string"},"cancel_url":{"format":"uri","type":"string"},"items":{"minItems":1,"description":"At least one line item required","type":"array","items":{"type":"object","required":["description","quantity","unit_amount","vat_rate"],"properties":{"description":{"minLength":1,"maxLength":500,"type":"string"},"quantity":{"minimum":1,"maximum":2147483647,"default":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"default":1,"type":"integer"}]},"unit_amount":{"minimum":1,"maximum":2147483647,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"type":"integer"}]},"vat_rate":{"description":"VAT percentage: 0, 11, or 24","anyOf":[{"const":0,"type":"number"},{"const":11,"type":"number"},{"const":24,"type":"number"}]},"product_id":{"format":"uuid","type":"string"},"discount_amount":{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the link charges unit_amount * quantity - discount_amount for the line.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the link charges unit_amount * quantity - discount_amount for the line.","type":"integer"}]}}}},"discount_amount":{"minimum":0,"description":"Whole-sale POS discount in minor units. The link's amount becomes the sum of (unit_amount * quantity - line discount) less this.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"Whole-sale POS discount in minor units. The link's amount becomes the sum of (unit_amount * quantity - line discount) less this.","type":"integer"}]},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["name","items"],"properties":{"name":{"minLength":1,"maxLength":255,"description":"Display name for the payment link","type":"string"},"description":{"description":"Optional description","type":"string"},"currency":{"minLength":3,"maxLength":3,"default":"ISK","type":"string"},"max_uses":{"nullable":true,"anyOf":[{"minimum":1,"description":"null = unlimited, 1 = one-time, N = custom limit","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"description":"null = unlimited, 1 = one-time, N = custom limit","type":"integer"}]},{"type":"null"}]},"expires_at":{"description":"Unix timestamp when the link expires","type":"number"},"collect_name":{"default":false,"type":"boolean"},"collect_email":{"default":true,"type":"boolean"},"collect_phone":{"default":false,"type":"boolean"},"collect_national_id":{"default":false,"type":"boolean"},"save_payment_method":{"default":false,"type":"boolean"},"allow_promotion_codes":{"default":false,"type":"boolean"},"success_url":{"format":"uri","type":"string"},"cancel_url":{"format":"uri","type":"string"},"items":{"minItems":1,"description":"At least one line item required","type":"array","items":{"type":"object","required":["description","quantity","unit_amount","vat_rate"],"properties":{"description":{"minLength":1,"maxLength":500,"type":"string"},"quantity":{"minimum":1,"maximum":2147483647,"default":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"default":1,"type":"integer"}]},"unit_amount":{"minimum":1,"maximum":2147483647,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"type":"integer"}]},"vat_rate":{"description":"VAT percentage: 0, 11, or 24","anyOf":[{"const":0,"type":"number"},{"const":11,"type":"number"},{"const":24,"type":"number"}]},"product_id":{"format":"uuid","type":"string"},"discount_amount":{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the link charges unit_amount * quantity - discount_amount for the line.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the link charges unit_amount * quantity - discount_amount for the line.","type":"integer"}]}}}},"discount_amount":{"minimum":0,"description":"Whole-sale POS discount in minor units. The link's amount becomes the sum of (unit_amount * quantity - line discount) less this.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"Whole-sale POS discount in minor units. The link's amount becomes the sum of (unit_amount * quantity - line discount) less this.","type":"integer"}]},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}}}}},"text/plain":{"schema":{"type":"object","required":["name","items"],"properties":{"name":{"minLength":1,"maxLength":255,"description":"Display name for the payment link","type":"string"},"description":{"description":"Optional description","type":"string"},"currency":{"minLength":3,"maxLength":3,"default":"ISK","type":"string"},"max_uses":{"nullable":true,"anyOf":[{"minimum":1,"description":"null = unlimited, 1 = one-time, N = custom limit","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"description":"null = unlimited, 1 = one-time, N = custom limit","type":"integer"}]},{"type":"null"}]},"expires_at":{"description":"Unix timestamp when the link expires","type":"number"},"collect_name":{"default":false,"type":"boolean"},"collect_email":{"default":true,"type":"boolean"},"collect_phone":{"default":false,"type":"boolean"},"collect_national_id":{"default":false,"type":"boolean"},"save_payment_method":{"default":false,"type":"boolean"},"allow_promotion_codes":{"default":false,"type":"boolean"},"success_url":{"format":"uri","type":"string"},"cancel_url":{"format":"uri","type":"string"},"items":{"minItems":1,"description":"At least one line item required","type":"array","items":{"type":"object","required":["description","quantity","unit_amount","vat_rate"],"properties":{"description":{"minLength":1,"maxLength":500,"type":"string"},"quantity":{"minimum":1,"maximum":2147483647,"default":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"default":1,"type":"integer"}]},"unit_amount":{"minimum":1,"maximum":2147483647,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"type":"integer"}]},"vat_rate":{"description":"VAT percentage: 0, 11, or 24","anyOf":[{"const":0,"type":"number"},{"const":11,"type":"number"},{"const":24,"type":"number"}]},"product_id":{"format":"uuid","type":"string"},"discount_amount":{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the link charges unit_amount * quantity - discount_amount for the line.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the link charges unit_amount * quantity - discount_amount for the line.","type":"integer"}]}}}},"discount_amount":{"minimum":0,"description":"Whole-sale POS discount in minor units. The link's amount becomes the sum of (unit_amount * quantity - line discount) less this.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"Whole-sale POS discount in minor units. The link's amount becomes the sum of (unit_amount * quantity - line discount) less this.","type":"integer"}]},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}}}}}}}},"get":{"parameters":[{"schema":{"minimum":1,"maximum":100,"default":10,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100,"default":10,"type":"integer"}]},"in":"query","name":"limit","required":true},{"schema":{"type":"boolean"},"in":"query","name":"active","required":false}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"description":"A payment link is a reusable URL that creates checkout sessions when accessed","type":"object","required":["id","object","livemode","name","description","amount","currency","discount_amount","active","max_uses","success_count","url","expires_at","form_fields","save_payment_method","allow_promotion_codes","success_url","cancel_url","items","metadata","created_at","updated_at"],"properties":{"id":{"description":"Unique identifier for the payment link","type":"string"},"object":{"const":"payment_link","type":"string"},"livemode":{"description":"Whether this is a live mode link (true) or test mode (false)","type":"boolean"},"name":{"description":"Display name for the payment link","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description","type":"string"},{"type":"null"}]},"amount":{"description":"Total amount in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total amount in the smallest currency unit","type":"integer"}]},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"discount_amount":{"description":"Whole-sale POS discount already subtracted from amount","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale POS discount already subtracted from amount","type":"integer"}]},"active":{"description":"Whether the link is currently active","type":"boolean"},"max_uses":{"nullable":true,"anyOf":[{"description":"Maximum number of successful payments this link accepts. null = unlimited","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Maximum number of successful payments this link accepts. null = unlimited","type":"integer"}]},{"type":"null"}]},"success_count":{"description":"Number of successful payments captured through this link","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of successful payments captured through this link","type":"integer"}]},"url":{"description":"Public URL for customers to access the payment link","type":"string"},"expires_at":{"nullable":true,"anyOf":[{"description":"Unix timestamp when this link expires. null = never","type":"number"},{"type":"null"}]},"form_fields":{"description":"Form fields to collect from the customer","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"save_payment_method":{"description":"Whether to save the payment method for future use","type":"boolean"},"allow_promotion_codes":{"description":"Whether promotion codes can be applied","type":"boolean"},"success_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to after successful payment","type":"string"},{"type":"null"}]},"cancel_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to if the customer cancels","type":"string"},{"type":"null"}]},"items":{"description":"Line items in this payment link","type":"array","items":{"description":"A line item in the payment link","type":"object","required":["id","product_id","variant_id","description","quantity","unit_amount","vat_rate","discount_amount"],"properties":{"id":{"description":"Unique identifier for the line item","type":"string"},"product_id":{"nullable":true,"anyOf":[{"description":"ID of the product this item references, if any","type":"string"},{"type":"null"}]},"variant_id":{"nullable":true,"anyOf":[{"description":"ID of the product variant bought, when the product has variants","type":"string"},{"type":"null"}]},"description":{"description":"Human-readable description of the line item. For a variant it names the choice, e.g. \"Hettupeysa, Stærð: M\"","type":"string"},"quantity":{"description":"Number of units","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of units","type":"integer"}]},"unit_amount":{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","type":"integer"}]},"vat_rate":{"description":"VAT rate as an integer percentage: 0, 11, or 24","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate as an integer percentage: 0, 11, or 24","type":"integer"}]},"discount_amount":{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","type":"integer"}]}}}},"metadata":{"description":"Arbitrary key-value metadata","nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"description":"Unix timestamp when this link was created","type":"number"},"updated_at":{"description":"Unix timestamp when this link was last updated","type":"number"}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"description":"A payment link is a reusable URL that creates checkout sessions when accessed","type":"object","required":["id","object","livemode","name","description","amount","currency","discount_amount","active","max_uses","success_count","url","expires_at","form_fields","save_payment_method","allow_promotion_codes","success_url","cancel_url","items","metadata","created_at","updated_at"],"properties":{"id":{"description":"Unique identifier for the payment link","type":"string"},"object":{"const":"payment_link","type":"string"},"livemode":{"description":"Whether this is a live mode link (true) or test mode (false)","type":"boolean"},"name":{"description":"Display name for the payment link","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description","type":"string"},{"type":"null"}]},"amount":{"description":"Total amount in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total amount in the smallest currency unit","type":"integer"}]},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"discount_amount":{"description":"Whole-sale POS discount already subtracted from amount","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale POS discount already subtracted from amount","type":"integer"}]},"active":{"description":"Whether the link is currently active","type":"boolean"},"max_uses":{"nullable":true,"anyOf":[{"description":"Maximum number of successful payments this link accepts. null = unlimited","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Maximum number of successful payments this link accepts. null = unlimited","type":"integer"}]},{"type":"null"}]},"success_count":{"description":"Number of successful payments captured through this link","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of successful payments captured through this link","type":"integer"}]},"url":{"description":"Public URL for customers to access the payment link","type":"string"},"expires_at":{"nullable":true,"anyOf":[{"description":"Unix timestamp when this link expires. null = never","type":"number"},{"type":"null"}]},"form_fields":{"description":"Form fields to collect from the customer","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"save_payment_method":{"description":"Whether to save the payment method for future use","type":"boolean"},"allow_promotion_codes":{"description":"Whether promotion codes can be applied","type":"boolean"},"success_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to after successful payment","type":"string"},{"type":"null"}]},"cancel_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to if the customer cancels","type":"string"},{"type":"null"}]},"items":{"description":"Line items in this payment link","type":"array","items":{"description":"A line item in the payment link","type":"object","required":["id","product_id","variant_id","description","quantity","unit_amount","vat_rate","discount_amount"],"properties":{"id":{"description":"Unique identifier for the line item","type":"string"},"product_id":{"nullable":true,"anyOf":[{"description":"ID of the product this item references, if any","type":"string"},{"type":"null"}]},"variant_id":{"nullable":true,"anyOf":[{"description":"ID of the product variant bought, when the product has variants","type":"string"},{"type":"null"}]},"description":{"description":"Human-readable description of the line item. For a variant it names the choice, e.g. \"Hettupeysa, Stærð: M\"","type":"string"},"quantity":{"description":"Number of units","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of units","type":"integer"}]},"unit_amount":{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","type":"integer"}]},"vat_rate":{"description":"VAT rate as an integer percentage: 0, 11, or 24","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate as an integer percentage: 0, 11, or 24","type":"integer"}]},"discount_amount":{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","type":"integer"}]}}}},"metadata":{"description":"Arbitrary key-value metadata","nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"description":"Unix timestamp when this link was created","type":"number"},"updated_at":{"description":"Unix timestamp when this link was last updated","type":"number"}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}},"text/plain":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"description":"A payment link is a reusable URL that creates checkout sessions when accessed","type":"object","required":["id","object","livemode","name","description","amount","currency","discount_amount","active","max_uses","success_count","url","expires_at","form_fields","save_payment_method","allow_promotion_codes","success_url","cancel_url","items","metadata","created_at","updated_at"],"properties":{"id":{"description":"Unique identifier for the payment link","type":"string"},"object":{"const":"payment_link","type":"string"},"livemode":{"description":"Whether this is a live mode link (true) or test mode (false)","type":"boolean"},"name":{"description":"Display name for the payment link","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description","type":"string"},{"type":"null"}]},"amount":{"description":"Total amount in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total amount in the smallest currency unit","type":"integer"}]},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"discount_amount":{"description":"Whole-sale POS discount already subtracted from amount","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale POS discount already subtracted from amount","type":"integer"}]},"active":{"description":"Whether the link is currently active","type":"boolean"},"max_uses":{"nullable":true,"anyOf":[{"description":"Maximum number of successful payments this link accepts. null = unlimited","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Maximum number of successful payments this link accepts. null = unlimited","type":"integer"}]},{"type":"null"}]},"success_count":{"description":"Number of successful payments captured through this link","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of successful payments captured through this link","type":"integer"}]},"url":{"description":"Public URL for customers to access the payment link","type":"string"},"expires_at":{"nullable":true,"anyOf":[{"description":"Unix timestamp when this link expires. null = never","type":"number"},{"type":"null"}]},"form_fields":{"description":"Form fields to collect from the customer","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"save_payment_method":{"description":"Whether to save the payment method for future use","type":"boolean"},"allow_promotion_codes":{"description":"Whether promotion codes can be applied","type":"boolean"},"success_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to after successful payment","type":"string"},{"type":"null"}]},"cancel_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to if the customer cancels","type":"string"},{"type":"null"}]},"items":{"description":"Line items in this payment link","type":"array","items":{"description":"A line item in the payment link","type":"object","required":["id","product_id","variant_id","description","quantity","unit_amount","vat_rate","discount_amount"],"properties":{"id":{"description":"Unique identifier for the line item","type":"string"},"product_id":{"nullable":true,"anyOf":[{"description":"ID of the product this item references, if any","type":"string"},{"type":"null"}]},"variant_id":{"nullable":true,"anyOf":[{"description":"ID of the product variant bought, when the product has variants","type":"string"},{"type":"null"}]},"description":{"description":"Human-readable description of the line item. For a variant it names the choice, e.g. \"Hettupeysa, Stærð: M\"","type":"string"},"quantity":{"description":"Number of units","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of units","type":"integer"}]},"unit_amount":{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","type":"integer"}]},"vat_rate":{"description":"VAT rate as an integer percentage: 0, 11, or 24","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate as an integer percentage: 0, 11, or 24","type":"integer"}]},"discount_amount":{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","type":"integer"}]}}}},"metadata":{"description":"Arbitrary key-value metadata","nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"description":"Unix timestamp when this link was created","type":"number"},"updated_at":{"description":"Unix timestamp when this link was last updated","type":"number"}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}}}}},"operationId":"getV1Payment-links","description":"List all payment links","tags":["Payment Links"],"security":[{"bearerAuth":[]}]}},"/v1/payment-links/{id}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"A payment link is a reusable URL that creates checkout sessions when accessed","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the payment link","type":"string"},"object":{"const":"payment_link","type":"string"},"livemode":{"description":"Whether this is a live mode link (true) or test mode (false)","type":"boolean"},"name":{"description":"Display name for the payment link","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description","type":"string"},{"type":"null"}]},"amount":{"description":"Total amount in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total amount in the smallest currency unit","type":"integer"}]},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"discount_amount":{"description":"Whole-sale POS discount already subtracted from amount","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale POS discount already subtracted from amount","type":"integer"}]},"active":{"description":"Whether the link is currently active","type":"boolean"},"max_uses":{"nullable":true,"anyOf":[{"description":"Maximum number of successful payments this link accepts. null = unlimited","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Maximum number of successful payments this link accepts. null = unlimited","type":"integer"}]},{"type":"null"}]},"success_count":{"description":"Number of successful payments captured through this link","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of successful payments captured through this link","type":"integer"}]},"url":{"description":"Public URL for customers to access the payment link","type":"string"},"expires_at":{"nullable":true,"anyOf":[{"description":"Unix timestamp when this link expires. null = never","type":"number"},{"type":"null"}]},"form_fields":{"description":"Form fields to collect from the customer","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"save_payment_method":{"description":"Whether to save the payment method for future use","type":"boolean"},"allow_promotion_codes":{"description":"Whether promotion codes can be applied","type":"boolean"},"success_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to after successful payment","type":"string"},{"type":"null"}]},"cancel_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to if the customer cancels","type":"string"},{"type":"null"}]},"items":{"description":"Line items in this payment link","type":"array","items":{"description":"A line item in the payment link","type":"object","required":["id","product_id","variant_id","description","quantity","unit_amount","vat_rate","discount_amount"],"properties":{"id":{"description":"Unique identifier for the line item","type":"string"},"product_id":{"nullable":true,"anyOf":[{"description":"ID of the product this item references, if any","type":"string"},{"type":"null"}]},"variant_id":{"nullable":true,"anyOf":[{"description":"ID of the product variant bought, when the product has variants","type":"string"},{"type":"null"}]},"description":{"description":"Human-readable description of the line item. For a variant it names the choice, e.g. \"Hettupeysa, Stærð: M\"","type":"string"},"quantity":{"description":"Number of units","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of units","type":"integer"}]},"unit_amount":{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","type":"integer"}]},"vat_rate":{"description":"VAT rate as an integer percentage: 0, 11, or 24","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate as an integer percentage: 0, 11, or 24","type":"integer"}]},"discount_amount":{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","type":"integer"}]}}}},"metadata":{"description":"Arbitrary key-value metadata","nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"description":"Unix timestamp when this link was created","type":"number"},"updated_at":{"description":"Unix timestamp when this link was last updated","type":"number"}},"required":["id","object","livemode","name","description","amount","currency","discount_amount","active","max_uses","success_count","url","expires_at","form_fields","save_payment_method","allow_promotion_codes","success_url","cancel_url","items","metadata","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the payment link","type":"string"},"object":{"const":"payment_link","type":"string"},"livemode":{"description":"Whether this is a live mode link (true) or test mode (false)","type":"boolean"},"name":{"description":"Display name for the payment link","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description","type":"string"},{"type":"null"}]},"amount":{"description":"Total amount in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total amount in the smallest currency unit","type":"integer"}]},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"discount_amount":{"description":"Whole-sale POS discount already subtracted from amount","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale POS discount already subtracted from amount","type":"integer"}]},"active":{"description":"Whether the link is currently active","type":"boolean"},"max_uses":{"nullable":true,"anyOf":[{"description":"Maximum number of successful payments this link accepts. null = unlimited","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Maximum number of successful payments this link accepts. null = unlimited","type":"integer"}]},{"type":"null"}]},"success_count":{"description":"Number of successful payments captured through this link","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of successful payments captured through this link","type":"integer"}]},"url":{"description":"Public URL for customers to access the payment link","type":"string"},"expires_at":{"nullable":true,"anyOf":[{"description":"Unix timestamp when this link expires. null = never","type":"number"},{"type":"null"}]},"form_fields":{"description":"Form fields to collect from the customer","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"save_payment_method":{"description":"Whether to save the payment method for future use","type":"boolean"},"allow_promotion_codes":{"description":"Whether promotion codes can be applied","type":"boolean"},"success_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to after successful payment","type":"string"},{"type":"null"}]},"cancel_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to if the customer cancels","type":"string"},{"type":"null"}]},"items":{"description":"Line items in this payment link","type":"array","items":{"description":"A line item in the payment link","type":"object","required":["id","product_id","variant_id","description","quantity","unit_amount","vat_rate","discount_amount"],"properties":{"id":{"description":"Unique identifier for the line item","type":"string"},"product_id":{"nullable":true,"anyOf":[{"description":"ID of the product this item references, if any","type":"string"},{"type":"null"}]},"variant_id":{"nullable":true,"anyOf":[{"description":"ID of the product variant bought, when the product has variants","type":"string"},{"type":"null"}]},"description":{"description":"Human-readable description of the line item. For a variant it names the choice, e.g. \"Hettupeysa, Stærð: M\"","type":"string"},"quantity":{"description":"Number of units","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of units","type":"integer"}]},"unit_amount":{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","type":"integer"}]},"vat_rate":{"description":"VAT rate as an integer percentage: 0, 11, or 24","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate as an integer percentage: 0, 11, or 24","type":"integer"}]},"discount_amount":{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","type":"integer"}]}}}},"metadata":{"description":"Arbitrary key-value metadata","nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"description":"Unix timestamp when this link was created","type":"number"},"updated_at":{"description":"Unix timestamp when this link was last updated","type":"number"}},"required":["id","object","livemode","name","description","amount","currency","discount_amount","active","max_uses","success_count","url","expires_at","form_fields","save_payment_method","allow_promotion_codes","success_url","cancel_url","items","metadata","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the payment link","type":"string"},"object":{"const":"payment_link","type":"string"},"livemode":{"description":"Whether this is a live mode link (true) or test mode (false)","type":"boolean"},"name":{"description":"Display name for the payment link","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description","type":"string"},{"type":"null"}]},"amount":{"description":"Total amount in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total amount in the smallest currency unit","type":"integer"}]},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"discount_amount":{"description":"Whole-sale POS discount already subtracted from amount","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale POS discount already subtracted from amount","type":"integer"}]},"active":{"description":"Whether the link is currently active","type":"boolean"},"max_uses":{"nullable":true,"anyOf":[{"description":"Maximum number of successful payments this link accepts. null = unlimited","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Maximum number of successful payments this link accepts. null = unlimited","type":"integer"}]},{"type":"null"}]},"success_count":{"description":"Number of successful payments captured through this link","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of successful payments captured through this link","type":"integer"}]},"url":{"description":"Public URL for customers to access the payment link","type":"string"},"expires_at":{"nullable":true,"anyOf":[{"description":"Unix timestamp when this link expires. null = never","type":"number"},{"type":"null"}]},"form_fields":{"description":"Form fields to collect from the customer","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"save_payment_method":{"description":"Whether to save the payment method for future use","type":"boolean"},"allow_promotion_codes":{"description":"Whether promotion codes can be applied","type":"boolean"},"success_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to after successful payment","type":"string"},{"type":"null"}]},"cancel_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to if the customer cancels","type":"string"},{"type":"null"}]},"items":{"description":"Line items in this payment link","type":"array","items":{"description":"A line item in the payment link","type":"object","required":["id","product_id","variant_id","description","quantity","unit_amount","vat_rate","discount_amount"],"properties":{"id":{"description":"Unique identifier for the line item","type":"string"},"product_id":{"nullable":true,"anyOf":[{"description":"ID of the product this item references, if any","type":"string"},{"type":"null"}]},"variant_id":{"nullable":true,"anyOf":[{"description":"ID of the product variant bought, when the product has variants","type":"string"},{"type":"null"}]},"description":{"description":"Human-readable description of the line item. For a variant it names the choice, e.g. \"Hettupeysa, Stærð: M\"","type":"string"},"quantity":{"description":"Number of units","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of units","type":"integer"}]},"unit_amount":{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","type":"integer"}]},"vat_rate":{"description":"VAT rate as an integer percentage: 0, 11, or 24","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate as an integer percentage: 0, 11, or 24","type":"integer"}]},"discount_amount":{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","type":"integer"}]}}}},"metadata":{"description":"Arbitrary key-value metadata","nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"description":"Unix timestamp when this link was created","type":"number"},"updated_at":{"description":"Unix timestamp when this link was last updated","type":"number"}},"required":["id","object","livemode","name","description","amount","currency","discount_amount","active","max_uses","success_count","url","expires_at","form_fields","save_payment_method","allow_promotion_codes","success_url","cancel_url","items","metadata","created_at","updated_at"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"getV1Payment-linksById","description":"Retrieve a payment link by ID","tags":["Payment Links"],"security":[{"bearerAuth":[]}]},"patch":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"A payment link is a reusable URL that creates checkout sessions when accessed","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the payment link","type":"string"},"object":{"const":"payment_link","type":"string"},"livemode":{"description":"Whether this is a live mode link (true) or test mode (false)","type":"boolean"},"name":{"description":"Display name for the payment link","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description","type":"string"},{"type":"null"}]},"amount":{"description":"Total amount in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total amount in the smallest currency unit","type":"integer"}]},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"discount_amount":{"description":"Whole-sale POS discount already subtracted from amount","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale POS discount already subtracted from amount","type":"integer"}]},"active":{"description":"Whether the link is currently active","type":"boolean"},"max_uses":{"nullable":true,"anyOf":[{"description":"Maximum number of successful payments this link accepts. null = unlimited","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Maximum number of successful payments this link accepts. null = unlimited","type":"integer"}]},{"type":"null"}]},"success_count":{"description":"Number of successful payments captured through this link","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of successful payments captured through this link","type":"integer"}]},"url":{"description":"Public URL for customers to access the payment link","type":"string"},"expires_at":{"nullable":true,"anyOf":[{"description":"Unix timestamp when this link expires. null = never","type":"number"},{"type":"null"}]},"form_fields":{"description":"Form fields to collect from the customer","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"save_payment_method":{"description":"Whether to save the payment method for future use","type":"boolean"},"allow_promotion_codes":{"description":"Whether promotion codes can be applied","type":"boolean"},"success_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to after successful payment","type":"string"},{"type":"null"}]},"cancel_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to if the customer cancels","type":"string"},{"type":"null"}]},"items":{"description":"Line items in this payment link","type":"array","items":{"description":"A line item in the payment link","type":"object","required":["id","product_id","variant_id","description","quantity","unit_amount","vat_rate","discount_amount"],"properties":{"id":{"description":"Unique identifier for the line item","type":"string"},"product_id":{"nullable":true,"anyOf":[{"description":"ID of the product this item references, if any","type":"string"},{"type":"null"}]},"variant_id":{"nullable":true,"anyOf":[{"description":"ID of the product variant bought, when the product has variants","type":"string"},{"type":"null"}]},"description":{"description":"Human-readable description of the line item. For a variant it names the choice, e.g. \"Hettupeysa, Stærð: M\"","type":"string"},"quantity":{"description":"Number of units","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of units","type":"integer"}]},"unit_amount":{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","type":"integer"}]},"vat_rate":{"description":"VAT rate as an integer percentage: 0, 11, or 24","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate as an integer percentage: 0, 11, or 24","type":"integer"}]},"discount_amount":{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","type":"integer"}]}}}},"metadata":{"description":"Arbitrary key-value metadata","nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"description":"Unix timestamp when this link was created","type":"number"},"updated_at":{"description":"Unix timestamp when this link was last updated","type":"number"}},"required":["id","object","livemode","name","description","amount","currency","discount_amount","active","max_uses","success_count","url","expires_at","form_fields","save_payment_method","allow_promotion_codes","success_url","cancel_url","items","metadata","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the payment link","type":"string"},"object":{"const":"payment_link","type":"string"},"livemode":{"description":"Whether this is a live mode link (true) or test mode (false)","type":"boolean"},"name":{"description":"Display name for the payment link","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description","type":"string"},{"type":"null"}]},"amount":{"description":"Total amount in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total amount in the smallest currency unit","type":"integer"}]},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"discount_amount":{"description":"Whole-sale POS discount already subtracted from amount","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale POS discount already subtracted from amount","type":"integer"}]},"active":{"description":"Whether the link is currently active","type":"boolean"},"max_uses":{"nullable":true,"anyOf":[{"description":"Maximum number of successful payments this link accepts. null = unlimited","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Maximum number of successful payments this link accepts. null = unlimited","type":"integer"}]},{"type":"null"}]},"success_count":{"description":"Number of successful payments captured through this link","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of successful payments captured through this link","type":"integer"}]},"url":{"description":"Public URL for customers to access the payment link","type":"string"},"expires_at":{"nullable":true,"anyOf":[{"description":"Unix timestamp when this link expires. null = never","type":"number"},{"type":"null"}]},"form_fields":{"description":"Form fields to collect from the customer","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"save_payment_method":{"description":"Whether to save the payment method for future use","type":"boolean"},"allow_promotion_codes":{"description":"Whether promotion codes can be applied","type":"boolean"},"success_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to after successful payment","type":"string"},{"type":"null"}]},"cancel_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to if the customer cancels","type":"string"},{"type":"null"}]},"items":{"description":"Line items in this payment link","type":"array","items":{"description":"A line item in the payment link","type":"object","required":["id","product_id","variant_id","description","quantity","unit_amount","vat_rate","discount_amount"],"properties":{"id":{"description":"Unique identifier for the line item","type":"string"},"product_id":{"nullable":true,"anyOf":[{"description":"ID of the product this item references, if any","type":"string"},{"type":"null"}]},"variant_id":{"nullable":true,"anyOf":[{"description":"ID of the product variant bought, when the product has variants","type":"string"},{"type":"null"}]},"description":{"description":"Human-readable description of the line item. For a variant it names the choice, e.g. \"Hettupeysa, Stærð: M\"","type":"string"},"quantity":{"description":"Number of units","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of units","type":"integer"}]},"unit_amount":{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","type":"integer"}]},"vat_rate":{"description":"VAT rate as an integer percentage: 0, 11, or 24","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate as an integer percentage: 0, 11, or 24","type":"integer"}]},"discount_amount":{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","type":"integer"}]}}}},"metadata":{"description":"Arbitrary key-value metadata","nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"description":"Unix timestamp when this link was created","type":"number"},"updated_at":{"description":"Unix timestamp when this link was last updated","type":"number"}},"required":["id","object","livemode","name","description","amount","currency","discount_amount","active","max_uses","success_count","url","expires_at","form_fields","save_payment_method","allow_promotion_codes","success_url","cancel_url","items","metadata","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the payment link","type":"string"},"object":{"const":"payment_link","type":"string"},"livemode":{"description":"Whether this is a live mode link (true) or test mode (false)","type":"boolean"},"name":{"description":"Display name for the payment link","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description","type":"string"},{"type":"null"}]},"amount":{"description":"Total amount in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total amount in the smallest currency unit","type":"integer"}]},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"discount_amount":{"description":"Whole-sale POS discount already subtracted from amount","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale POS discount already subtracted from amount","type":"integer"}]},"active":{"description":"Whether the link is currently active","type":"boolean"},"max_uses":{"nullable":true,"anyOf":[{"description":"Maximum number of successful payments this link accepts. null = unlimited","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Maximum number of successful payments this link accepts. null = unlimited","type":"integer"}]},{"type":"null"}]},"success_count":{"description":"Number of successful payments captured through this link","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of successful payments captured through this link","type":"integer"}]},"url":{"description":"Public URL for customers to access the payment link","type":"string"},"expires_at":{"nullable":true,"anyOf":[{"description":"Unix timestamp when this link expires. null = never","type":"number"},{"type":"null"}]},"form_fields":{"description":"Form fields to collect from the customer","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"save_payment_method":{"description":"Whether to save the payment method for future use","type":"boolean"},"allow_promotion_codes":{"description":"Whether promotion codes can be applied","type":"boolean"},"success_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to after successful payment","type":"string"},{"type":"null"}]},"cancel_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to if the customer cancels","type":"string"},{"type":"null"}]},"items":{"description":"Line items in this payment link","type":"array","items":{"description":"A line item in the payment link","type":"object","required":["id","product_id","variant_id","description","quantity","unit_amount","vat_rate","discount_amount"],"properties":{"id":{"description":"Unique identifier for the line item","type":"string"},"product_id":{"nullable":true,"anyOf":[{"description":"ID of the product this item references, if any","type":"string"},{"type":"null"}]},"variant_id":{"nullable":true,"anyOf":[{"description":"ID of the product variant bought, when the product has variants","type":"string"},{"type":"null"}]},"description":{"description":"Human-readable description of the line item. For a variant it names the choice, e.g. \"Hettupeysa, Stærð: M\"","type":"string"},"quantity":{"description":"Number of units","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of units","type":"integer"}]},"unit_amount":{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","type":"integer"}]},"vat_rate":{"description":"VAT rate as an integer percentage: 0, 11, or 24","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate as an integer percentage: 0, 11, or 24","type":"integer"}]},"discount_amount":{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","type":"integer"}]}}}},"metadata":{"description":"Arbitrary key-value metadata","nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"description":"Unix timestamp when this link was created","type":"number"},"updated_at":{"description":"Unix timestamp when this link was last updated","type":"number"}},"required":["id","object","livemode","name","description","amount","currency","discount_amount","active","max_uses","success_count","url","expires_at","form_fields","save_payment_method","allow_promotion_codes","success_url","cancel_url","items","metadata","created_at","updated_at"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"patchV1Payment-linksById","description":"Update a payment link","tags":["Payment Links"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"max_uses":{"nullable":true,"anyOf":[{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},{"type":"null"}]},"expires_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"collect_name":{"type":"boolean"},"collect_email":{"type":"boolean"},"collect_phone":{"type":"boolean"},"collect_national_id":{"type":"boolean"},"save_payment_method":{"type":"boolean"},"allow_promotion_codes":{"type":"boolean"},"success_url":{"nullable":true,"anyOf":[{"format":"uri","type":"string"},{"type":"null"}]},"cancel_url":{"nullable":true,"anyOf":[{"format":"uri","type":"string"},{"type":"null"}]},"items":{"minItems":1,"type":"array","items":{"type":"object","required":["description","quantity","unit_amount","vat_rate"],"properties":{"description":{"minLength":1,"maxLength":500,"type":"string"},"quantity":{"minimum":1,"maximum":2147483647,"default":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"default":1,"type":"integer"}]},"unit_amount":{"minimum":1,"maximum":2147483647,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"type":"integer"}]},"vat_rate":{"description":"VAT percentage: 0, 11, or 24","anyOf":[{"const":0,"type":"number"},{"const":11,"type":"number"},{"const":24,"type":"number"}]},"product_id":{"format":"uuid","type":"string"},"discount_amount":{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the link charges unit_amount * quantity - discount_amount for the line.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the link charges unit_amount * quantity - discount_amount for the line.","type":"integer"}]}}}},"discount_amount":{"minimum":0,"description":"Whole-sale POS discount. Only applied together with items, which is also when it is reset if omitted.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"Whole-sale POS discount. Only applied together with items, which is also when it is reset if omitted.","type":"integer"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"max_uses":{"nullable":true,"anyOf":[{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},{"type":"null"}]},"expires_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"collect_name":{"type":"boolean"},"collect_email":{"type":"boolean"},"collect_phone":{"type":"boolean"},"collect_national_id":{"type":"boolean"},"save_payment_method":{"type":"boolean"},"allow_promotion_codes":{"type":"boolean"},"success_url":{"nullable":true,"anyOf":[{"format":"uri","type":"string"},{"type":"null"}]},"cancel_url":{"nullable":true,"anyOf":[{"format":"uri","type":"string"},{"type":"null"}]},"items":{"minItems":1,"type":"array","items":{"type":"object","required":["description","quantity","unit_amount","vat_rate"],"properties":{"description":{"minLength":1,"maxLength":500,"type":"string"},"quantity":{"minimum":1,"maximum":2147483647,"default":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"default":1,"type":"integer"}]},"unit_amount":{"minimum":1,"maximum":2147483647,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"type":"integer"}]},"vat_rate":{"description":"VAT percentage: 0, 11, or 24","anyOf":[{"const":0,"type":"number"},{"const":11,"type":"number"},{"const":24,"type":"number"}]},"product_id":{"format":"uuid","type":"string"},"discount_amount":{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the link charges unit_amount * quantity - discount_amount for the line.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the link charges unit_amount * quantity - discount_amount for the line.","type":"integer"}]}}}},"discount_amount":{"minimum":0,"description":"Whole-sale POS discount. Only applied together with items, which is also when it is reset if omitted.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"Whole-sale POS discount. Only applied together with items, which is also when it is reset if omitted.","type":"integer"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}}}},"text/plain":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"max_uses":{"nullable":true,"anyOf":[{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},{"type":"null"}]},"expires_at":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"collect_name":{"type":"boolean"},"collect_email":{"type":"boolean"},"collect_phone":{"type":"boolean"},"collect_national_id":{"type":"boolean"},"save_payment_method":{"type":"boolean"},"allow_promotion_codes":{"type":"boolean"},"success_url":{"nullable":true,"anyOf":[{"format":"uri","type":"string"},{"type":"null"}]},"cancel_url":{"nullable":true,"anyOf":[{"format":"uri","type":"string"},{"type":"null"}]},"items":{"minItems":1,"type":"array","items":{"type":"object","required":["description","quantity","unit_amount","vat_rate"],"properties":{"description":{"minLength":1,"maxLength":500,"type":"string"},"quantity":{"minimum":1,"maximum":2147483647,"default":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"default":1,"type":"integer"}]},"unit_amount":{"minimum":1,"maximum":2147483647,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"type":"integer"}]},"vat_rate":{"description":"VAT percentage: 0, 11, or 24","anyOf":[{"const":0,"type":"number"},{"const":11,"type":"number"},{"const":24,"type":"number"}]},"product_id":{"format":"uuid","type":"string"},"discount_amount":{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the link charges unit_amount * quantity - discount_amount for the line.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the link charges unit_amount * quantity - discount_amount for the line.","type":"integer"}]}}}},"discount_amount":{"minimum":0,"description":"Whole-sale POS discount. Only applied together with items, which is also when it is reset if omitted.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"Whole-sale POS discount. Only applied together with items, which is also when it is reset if omitted.","type":"integer"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]}}}}}}},"delete":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"payment_link","type":"string"},"deleted":{"const":true,"type":"boolean"}},"required":["id","object","deleted"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"payment_link","type":"string"},"deleted":{"const":true,"type":"boolean"}},"required":["id","object","deleted"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"payment_link","type":"string"},"deleted":{"const":true,"type":"boolean"}},"required":["id","object","deleted"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"deleteV1Payment-linksById","description":"Delete a payment link","tags":["Payment Links"],"security":[{"bearerAuth":[]}]}},"/v1/payment-links/{id}/activate":{"post":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"A payment link is a reusable URL that creates checkout sessions when accessed","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the payment link","type":"string"},"object":{"const":"payment_link","type":"string"},"livemode":{"description":"Whether this is a live mode link (true) or test mode (false)","type":"boolean"},"name":{"description":"Display name for the payment link","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description","type":"string"},{"type":"null"}]},"amount":{"description":"Total amount in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total amount in the smallest currency unit","type":"integer"}]},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"discount_amount":{"description":"Whole-sale POS discount already subtracted from amount","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale POS discount already subtracted from amount","type":"integer"}]},"active":{"description":"Whether the link is currently active","type":"boolean"},"max_uses":{"nullable":true,"anyOf":[{"description":"Maximum number of successful payments this link accepts. null = unlimited","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Maximum number of successful payments this link accepts. null = unlimited","type":"integer"}]},{"type":"null"}]},"success_count":{"description":"Number of successful payments captured through this link","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of successful payments captured through this link","type":"integer"}]},"url":{"description":"Public URL for customers to access the payment link","type":"string"},"expires_at":{"nullable":true,"anyOf":[{"description":"Unix timestamp when this link expires. null = never","type":"number"},{"type":"null"}]},"form_fields":{"description":"Form fields to collect from the customer","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"save_payment_method":{"description":"Whether to save the payment method for future use","type":"boolean"},"allow_promotion_codes":{"description":"Whether promotion codes can be applied","type":"boolean"},"success_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to after successful payment","type":"string"},{"type":"null"}]},"cancel_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to if the customer cancels","type":"string"},{"type":"null"}]},"items":{"description":"Line items in this payment link","type":"array","items":{"description":"A line item in the payment link","type":"object","required":["id","product_id","variant_id","description","quantity","unit_amount","vat_rate","discount_amount"],"properties":{"id":{"description":"Unique identifier for the line item","type":"string"},"product_id":{"nullable":true,"anyOf":[{"description":"ID of the product this item references, if any","type":"string"},{"type":"null"}]},"variant_id":{"nullable":true,"anyOf":[{"description":"ID of the product variant bought, when the product has variants","type":"string"},{"type":"null"}]},"description":{"description":"Human-readable description of the line item. For a variant it names the choice, e.g. \"Hettupeysa, Stærð: M\"","type":"string"},"quantity":{"description":"Number of units","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of units","type":"integer"}]},"unit_amount":{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","type":"integer"}]},"vat_rate":{"description":"VAT rate as an integer percentage: 0, 11, or 24","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate as an integer percentage: 0, 11, or 24","type":"integer"}]},"discount_amount":{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","type":"integer"}]}}}},"metadata":{"description":"Arbitrary key-value metadata","nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"description":"Unix timestamp when this link was created","type":"number"},"updated_at":{"description":"Unix timestamp when this link was last updated","type":"number"}},"required":["id","object","livemode","name","description","amount","currency","discount_amount","active","max_uses","success_count","url","expires_at","form_fields","save_payment_method","allow_promotion_codes","success_url","cancel_url","items","metadata","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the payment link","type":"string"},"object":{"const":"payment_link","type":"string"},"livemode":{"description":"Whether this is a live mode link (true) or test mode (false)","type":"boolean"},"name":{"description":"Display name for the payment link","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description","type":"string"},{"type":"null"}]},"amount":{"description":"Total amount in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total amount in the smallest currency unit","type":"integer"}]},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"discount_amount":{"description":"Whole-sale POS discount already subtracted from amount","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale POS discount already subtracted from amount","type":"integer"}]},"active":{"description":"Whether the link is currently active","type":"boolean"},"max_uses":{"nullable":true,"anyOf":[{"description":"Maximum number of successful payments this link accepts. null = unlimited","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Maximum number of successful payments this link accepts. null = unlimited","type":"integer"}]},{"type":"null"}]},"success_count":{"description":"Number of successful payments captured through this link","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of successful payments captured through this link","type":"integer"}]},"url":{"description":"Public URL for customers to access the payment link","type":"string"},"expires_at":{"nullable":true,"anyOf":[{"description":"Unix timestamp when this link expires. null = never","type":"number"},{"type":"null"}]},"form_fields":{"description":"Form fields to collect from the customer","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"save_payment_method":{"description":"Whether to save the payment method for future use","type":"boolean"},"allow_promotion_codes":{"description":"Whether promotion codes can be applied","type":"boolean"},"success_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to after successful payment","type":"string"},{"type":"null"}]},"cancel_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to if the customer cancels","type":"string"},{"type":"null"}]},"items":{"description":"Line items in this payment link","type":"array","items":{"description":"A line item in the payment link","type":"object","required":["id","product_id","variant_id","description","quantity","unit_amount","vat_rate","discount_amount"],"properties":{"id":{"description":"Unique identifier for the line item","type":"string"},"product_id":{"nullable":true,"anyOf":[{"description":"ID of the product this item references, if any","type":"string"},{"type":"null"}]},"variant_id":{"nullable":true,"anyOf":[{"description":"ID of the product variant bought, when the product has variants","type":"string"},{"type":"null"}]},"description":{"description":"Human-readable description of the line item. For a variant it names the choice, e.g. \"Hettupeysa, Stærð: M\"","type":"string"},"quantity":{"description":"Number of units","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of units","type":"integer"}]},"unit_amount":{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","type":"integer"}]},"vat_rate":{"description":"VAT rate as an integer percentage: 0, 11, or 24","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate as an integer percentage: 0, 11, or 24","type":"integer"}]},"discount_amount":{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","type":"integer"}]}}}},"metadata":{"description":"Arbitrary key-value metadata","nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"description":"Unix timestamp when this link was created","type":"number"},"updated_at":{"description":"Unix timestamp when this link was last updated","type":"number"}},"required":["id","object","livemode","name","description","amount","currency","discount_amount","active","max_uses","success_count","url","expires_at","form_fields","save_payment_method","allow_promotion_codes","success_url","cancel_url","items","metadata","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the payment link","type":"string"},"object":{"const":"payment_link","type":"string"},"livemode":{"description":"Whether this is a live mode link (true) or test mode (false)","type":"boolean"},"name":{"description":"Display name for the payment link","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description","type":"string"},{"type":"null"}]},"amount":{"description":"Total amount in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total amount in the smallest currency unit","type":"integer"}]},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"discount_amount":{"description":"Whole-sale POS discount already subtracted from amount","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale POS discount already subtracted from amount","type":"integer"}]},"active":{"description":"Whether the link is currently active","type":"boolean"},"max_uses":{"nullable":true,"anyOf":[{"description":"Maximum number of successful payments this link accepts. null = unlimited","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Maximum number of successful payments this link accepts. null = unlimited","type":"integer"}]},{"type":"null"}]},"success_count":{"description":"Number of successful payments captured through this link","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of successful payments captured through this link","type":"integer"}]},"url":{"description":"Public URL for customers to access the payment link","type":"string"},"expires_at":{"nullable":true,"anyOf":[{"description":"Unix timestamp when this link expires. null = never","type":"number"},{"type":"null"}]},"form_fields":{"description":"Form fields to collect from the customer","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"save_payment_method":{"description":"Whether to save the payment method for future use","type":"boolean"},"allow_promotion_codes":{"description":"Whether promotion codes can be applied","type":"boolean"},"success_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to after successful payment","type":"string"},{"type":"null"}]},"cancel_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to if the customer cancels","type":"string"},{"type":"null"}]},"items":{"description":"Line items in this payment link","type":"array","items":{"description":"A line item in the payment link","type":"object","required":["id","product_id","variant_id","description","quantity","unit_amount","vat_rate","discount_amount"],"properties":{"id":{"description":"Unique identifier for the line item","type":"string"},"product_id":{"nullable":true,"anyOf":[{"description":"ID of the product this item references, if any","type":"string"},{"type":"null"}]},"variant_id":{"nullable":true,"anyOf":[{"description":"ID of the product variant bought, when the product has variants","type":"string"},{"type":"null"}]},"description":{"description":"Human-readable description of the line item. For a variant it names the choice, e.g. \"Hettupeysa, Stærð: M\"","type":"string"},"quantity":{"description":"Number of units","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of units","type":"integer"}]},"unit_amount":{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","type":"integer"}]},"vat_rate":{"description":"VAT rate as an integer percentage: 0, 11, or 24","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate as an integer percentage: 0, 11, or 24","type":"integer"}]},"discount_amount":{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","type":"integer"}]}}}},"metadata":{"description":"Arbitrary key-value metadata","nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"description":"Unix timestamp when this link was created","type":"number"},"updated_at":{"description":"Unix timestamp when this link was last updated","type":"number"}},"required":["id","object","livemode","name","description","amount","currency","discount_amount","active","max_uses","success_count","url","expires_at","form_fields","save_payment_method","allow_promotion_codes","success_url","cancel_url","items","metadata","created_at","updated_at"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1Payment-linksByIdActivate","description":"Activate a payment link","tags":["Payment Links"],"security":[{"bearerAuth":[]}]}},"/v1/payment-links/{id}/deactivate":{"post":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"A payment link is a reusable URL that creates checkout sessions when accessed","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the payment link","type":"string"},"object":{"const":"payment_link","type":"string"},"livemode":{"description":"Whether this is a live mode link (true) or test mode (false)","type":"boolean"},"name":{"description":"Display name for the payment link","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description","type":"string"},{"type":"null"}]},"amount":{"description":"Total amount in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total amount in the smallest currency unit","type":"integer"}]},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"discount_amount":{"description":"Whole-sale POS discount already subtracted from amount","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale POS discount already subtracted from amount","type":"integer"}]},"active":{"description":"Whether the link is currently active","type":"boolean"},"max_uses":{"nullable":true,"anyOf":[{"description":"Maximum number of successful payments this link accepts. null = unlimited","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Maximum number of successful payments this link accepts. null = unlimited","type":"integer"}]},{"type":"null"}]},"success_count":{"description":"Number of successful payments captured through this link","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of successful payments captured through this link","type":"integer"}]},"url":{"description":"Public URL for customers to access the payment link","type":"string"},"expires_at":{"nullable":true,"anyOf":[{"description":"Unix timestamp when this link expires. null = never","type":"number"},{"type":"null"}]},"form_fields":{"description":"Form fields to collect from the customer","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"save_payment_method":{"description":"Whether to save the payment method for future use","type":"boolean"},"allow_promotion_codes":{"description":"Whether promotion codes can be applied","type":"boolean"},"success_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to after successful payment","type":"string"},{"type":"null"}]},"cancel_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to if the customer cancels","type":"string"},{"type":"null"}]},"items":{"description":"Line items in this payment link","type":"array","items":{"description":"A line item in the payment link","type":"object","required":["id","product_id","variant_id","description","quantity","unit_amount","vat_rate","discount_amount"],"properties":{"id":{"description":"Unique identifier for the line item","type":"string"},"product_id":{"nullable":true,"anyOf":[{"description":"ID of the product this item references, if any","type":"string"},{"type":"null"}]},"variant_id":{"nullable":true,"anyOf":[{"description":"ID of the product variant bought, when the product has variants","type":"string"},{"type":"null"}]},"description":{"description":"Human-readable description of the line item. For a variant it names the choice, e.g. \"Hettupeysa, Stærð: M\"","type":"string"},"quantity":{"description":"Number of units","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of units","type":"integer"}]},"unit_amount":{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","type":"integer"}]},"vat_rate":{"description":"VAT rate as an integer percentage: 0, 11, or 24","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate as an integer percentage: 0, 11, or 24","type":"integer"}]},"discount_amount":{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","type":"integer"}]}}}},"metadata":{"description":"Arbitrary key-value metadata","nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"description":"Unix timestamp when this link was created","type":"number"},"updated_at":{"description":"Unix timestamp when this link was last updated","type":"number"}},"required":["id","object","livemode","name","description","amount","currency","discount_amount","active","max_uses","success_count","url","expires_at","form_fields","save_payment_method","allow_promotion_codes","success_url","cancel_url","items","metadata","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the payment link","type":"string"},"object":{"const":"payment_link","type":"string"},"livemode":{"description":"Whether this is a live mode link (true) or test mode (false)","type":"boolean"},"name":{"description":"Display name for the payment link","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description","type":"string"},{"type":"null"}]},"amount":{"description":"Total amount in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total amount in the smallest currency unit","type":"integer"}]},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"discount_amount":{"description":"Whole-sale POS discount already subtracted from amount","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale POS discount already subtracted from amount","type":"integer"}]},"active":{"description":"Whether the link is currently active","type":"boolean"},"max_uses":{"nullable":true,"anyOf":[{"description":"Maximum number of successful payments this link accepts. null = unlimited","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Maximum number of successful payments this link accepts. null = unlimited","type":"integer"}]},{"type":"null"}]},"success_count":{"description":"Number of successful payments captured through this link","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of successful payments captured through this link","type":"integer"}]},"url":{"description":"Public URL for customers to access the payment link","type":"string"},"expires_at":{"nullable":true,"anyOf":[{"description":"Unix timestamp when this link expires. null = never","type":"number"},{"type":"null"}]},"form_fields":{"description":"Form fields to collect from the customer","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"save_payment_method":{"description":"Whether to save the payment method for future use","type":"boolean"},"allow_promotion_codes":{"description":"Whether promotion codes can be applied","type":"boolean"},"success_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to after successful payment","type":"string"},{"type":"null"}]},"cancel_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to if the customer cancels","type":"string"},{"type":"null"}]},"items":{"description":"Line items in this payment link","type":"array","items":{"description":"A line item in the payment link","type":"object","required":["id","product_id","variant_id","description","quantity","unit_amount","vat_rate","discount_amount"],"properties":{"id":{"description":"Unique identifier for the line item","type":"string"},"product_id":{"nullable":true,"anyOf":[{"description":"ID of the product this item references, if any","type":"string"},{"type":"null"}]},"variant_id":{"nullable":true,"anyOf":[{"description":"ID of the product variant bought, when the product has variants","type":"string"},{"type":"null"}]},"description":{"description":"Human-readable description of the line item. For a variant it names the choice, e.g. \"Hettupeysa, Stærð: M\"","type":"string"},"quantity":{"description":"Number of units","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of units","type":"integer"}]},"unit_amount":{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","type":"integer"}]},"vat_rate":{"description":"VAT rate as an integer percentage: 0, 11, or 24","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate as an integer percentage: 0, 11, or 24","type":"integer"}]},"discount_amount":{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","type":"integer"}]}}}},"metadata":{"description":"Arbitrary key-value metadata","nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"description":"Unix timestamp when this link was created","type":"number"},"updated_at":{"description":"Unix timestamp when this link was last updated","type":"number"}},"required":["id","object","livemode","name","description","amount","currency","discount_amount","active","max_uses","success_count","url","expires_at","form_fields","save_payment_method","allow_promotion_codes","success_url","cancel_url","items","metadata","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the payment link","type":"string"},"object":{"const":"payment_link","type":"string"},"livemode":{"description":"Whether this is a live mode link (true) or test mode (false)","type":"boolean"},"name":{"description":"Display name for the payment link","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description","type":"string"},{"type":"null"}]},"amount":{"description":"Total amount in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Total amount in the smallest currency unit","type":"integer"}]},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"discount_amount":{"description":"Whole-sale POS discount already subtracted from amount","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Whole-sale POS discount already subtracted from amount","type":"integer"}]},"active":{"description":"Whether the link is currently active","type":"boolean"},"max_uses":{"nullable":true,"anyOf":[{"description":"Maximum number of successful payments this link accepts. null = unlimited","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Maximum number of successful payments this link accepts. null = unlimited","type":"integer"}]},{"type":"null"}]},"success_count":{"description":"Number of successful payments captured through this link","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of successful payments captured through this link","type":"integer"}]},"url":{"description":"Public URL for customers to access the payment link","type":"string"},"expires_at":{"nullable":true,"anyOf":[{"description":"Unix timestamp when this link expires. null = never","type":"number"},{"type":"null"}]},"form_fields":{"description":"Form fields to collect from the customer","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"save_payment_method":{"description":"Whether to save the payment method for future use","type":"boolean"},"allow_promotion_codes":{"description":"Whether promotion codes can be applied","type":"boolean"},"success_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to after successful payment","type":"string"},{"type":"null"}]},"cancel_url":{"nullable":true,"anyOf":[{"description":"URL to redirect to if the customer cancels","type":"string"},{"type":"null"}]},"items":{"description":"Line items in this payment link","type":"array","items":{"description":"A line item in the payment link","type":"object","required":["id","product_id","variant_id","description","quantity","unit_amount","vat_rate","discount_amount"],"properties":{"id":{"description":"Unique identifier for the line item","type":"string"},"product_id":{"nullable":true,"anyOf":[{"description":"ID of the product this item references, if any","type":"string"},{"type":"null"}]},"variant_id":{"nullable":true,"anyOf":[{"description":"ID of the product variant bought, when the product has variants","type":"string"},{"type":"null"}]},"description":{"description":"Human-readable description of the line item. For a variant it names the choice, e.g. \"Hettupeysa, Stærð: M\"","type":"string"},"quantity":{"description":"Number of units","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Number of units","type":"integer"}]},"unit_amount":{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Price per unit in the smallest currency unit (e.g. ISK integer)","type":"integer"}]},"vat_rate":{"description":"VAT rate as an integer percentage: 0, 11, or 24","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate as an integer percentage: 0, 11, or 24","type":"integer"}]},"discount_amount":{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"POS line discount in minor units, already subtracted from the link's amount. unit_amount stays the list price.","type":"integer"}]}}}},"metadata":{"description":"Arbitrary key-value metadata","nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"description":"Unix timestamp when this link was created","type":"number"},"updated_at":{"description":"Unix timestamp when this link was last updated","type":"number"}},"required":["id","object","livemode","name","description","amount","currency","discount_amount","active","max_uses","success_count","url","expires_at","form_fields","save_payment_method","allow_promotion_codes","success_url","cancel_url","items","metadata","created_at","updated_at"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1Payment-linksByIdDeactivate","description":"Deactivate a payment link","tags":["Payment Links"],"security":[{"bearerAuth":[]}]}},"/v1/open-payment-pages/":{"post":{"parameters":[],"responses":{"200":{"description":"An open payment page collects contributions at an amount the supporter chooses, either once or on a recurring subscription","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the open payment page","type":"string"},"object":{"const":"open_payment_page","type":"string"},"livemode":{"description":"Whether this is a live mode page (true) or test mode (false)","type":"boolean"},"title":{"description":"Page title, also used as the line-item description on the spawned checkout","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description shown on the public page","type":"string"},{"type":"null"}]},"title_en":{"nullable":true,"anyOf":[{"description":"Optional English title, shown on the public page when the visitor picks English. null means English visitors see title","type":"string"},{"type":"null"}]},"description_en":{"nullable":true,"anyOf":[{"description":"Optional English description, shown on the public page when the visitor picks English. null means English visitors see description","type":"string"},{"type":"null"}]},"suggested_amounts":{"description":"Preset amounts in the smallest currency unit, offered as one-tap choices. May be empty on a pure pay-what-you-want page","type":"array","items":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}},"allow_custom_amount":{"description":"Whether a supporter may enter their own amount instead of picking a preset","type":"boolean"},"vat_rate":{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","type":"integer"}]},"form_fields":{"description":"Payer information collected at checkout. null = the default name and email, [] = collect nothing, an array = exactly these fields","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"collect_message":{"description":"Whether the public page shows an optional free-text message field","type":"boolean"},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"goal_amount":{"nullable":true,"anyOf":[{"description":"Optional fundraising goal in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Optional fundraising goal in the smallest currency unit","type":"integer"}]},{"type":"null"}]},"billing_interval":{"description":"Billing cadence on a recurring page. null on a one-off page. Always set together with recurring_product_id","nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","type":"integer"}]},{"type":"null"}]},"recurring_product_id":{"nullable":true,"anyOf":[{"description":"The subscription product a recurring page bills through: the interval and VAT carrier. The product's price is not what the supporter pays, the amount they choose overrides it. null on a one-off page","type":"string"},{"type":"null"}]},"allow_one_time":{"description":"Whether a recurring page also offers a one-time contribution, letting the supporter choose the cadence. false on every one-off page and on a recurring page that only offers the subscription. A one-time contribution on such a page behaves exactly like one on a one-off page: it starts no subscription","type":"boolean"},"status":{"description":"active pages are payable, archived pages are not","anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"description":"Unix timestamp when this page was created","type":"number"},"updated_at":{"description":"Unix timestamp when this page was last updated","type":"number"}},"required":["id","object","livemode","title","description","title_en","description_en","suggested_amounts","allow_custom_amount","vat_rate","form_fields","collect_message","currency","goal_amount","billing_interval","billing_interval_count","recurring_product_id","allow_one_time","status","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the open payment page","type":"string"},"object":{"const":"open_payment_page","type":"string"},"livemode":{"description":"Whether this is a live mode page (true) or test mode (false)","type":"boolean"},"title":{"description":"Page title, also used as the line-item description on the spawned checkout","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description shown on the public page","type":"string"},{"type":"null"}]},"title_en":{"nullable":true,"anyOf":[{"description":"Optional English title, shown on the public page when the visitor picks English. null means English visitors see title","type":"string"},{"type":"null"}]},"description_en":{"nullable":true,"anyOf":[{"description":"Optional English description, shown on the public page when the visitor picks English. null means English visitors see description","type":"string"},{"type":"null"}]},"suggested_amounts":{"description":"Preset amounts in the smallest currency unit, offered as one-tap choices. May be empty on a pure pay-what-you-want page","type":"array","items":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}},"allow_custom_amount":{"description":"Whether a supporter may enter their own amount instead of picking a preset","type":"boolean"},"vat_rate":{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","type":"integer"}]},"form_fields":{"description":"Payer information collected at checkout. null = the default name and email, [] = collect nothing, an array = exactly these fields","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"collect_message":{"description":"Whether the public page shows an optional free-text message field","type":"boolean"},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"goal_amount":{"nullable":true,"anyOf":[{"description":"Optional fundraising goal in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Optional fundraising goal in the smallest currency unit","type":"integer"}]},{"type":"null"}]},"billing_interval":{"description":"Billing cadence on a recurring page. null on a one-off page. Always set together with recurring_product_id","nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","type":"integer"}]},{"type":"null"}]},"recurring_product_id":{"nullable":true,"anyOf":[{"description":"The subscription product a recurring page bills through: the interval and VAT carrier. The product's price is not what the supporter pays, the amount they choose overrides it. null on a one-off page","type":"string"},{"type":"null"}]},"allow_one_time":{"description":"Whether a recurring page also offers a one-time contribution, letting the supporter choose the cadence. false on every one-off page and on a recurring page that only offers the subscription. A one-time contribution on such a page behaves exactly like one on a one-off page: it starts no subscription","type":"boolean"},"status":{"description":"active pages are payable, archived pages are not","anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"description":"Unix timestamp when this page was created","type":"number"},"updated_at":{"description":"Unix timestamp when this page was last updated","type":"number"}},"required":["id","object","livemode","title","description","title_en","description_en","suggested_amounts","allow_custom_amount","vat_rate","form_fields","collect_message","currency","goal_amount","billing_interval","billing_interval_count","recurring_product_id","allow_one_time","status","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the open payment page","type":"string"},"object":{"const":"open_payment_page","type":"string"},"livemode":{"description":"Whether this is a live mode page (true) or test mode (false)","type":"boolean"},"title":{"description":"Page title, also used as the line-item description on the spawned checkout","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description shown on the public page","type":"string"},{"type":"null"}]},"title_en":{"nullable":true,"anyOf":[{"description":"Optional English title, shown on the public page when the visitor picks English. null means English visitors see title","type":"string"},{"type":"null"}]},"description_en":{"nullable":true,"anyOf":[{"description":"Optional English description, shown on the public page when the visitor picks English. null means English visitors see description","type":"string"},{"type":"null"}]},"suggested_amounts":{"description":"Preset amounts in the smallest currency unit, offered as one-tap choices. May be empty on a pure pay-what-you-want page","type":"array","items":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}},"allow_custom_amount":{"description":"Whether a supporter may enter their own amount instead of picking a preset","type":"boolean"},"vat_rate":{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","type":"integer"}]},"form_fields":{"description":"Payer information collected at checkout. null = the default name and email, [] = collect nothing, an array = exactly these fields","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"collect_message":{"description":"Whether the public page shows an optional free-text message field","type":"boolean"},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"goal_amount":{"nullable":true,"anyOf":[{"description":"Optional fundraising goal in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Optional fundraising goal in the smallest currency unit","type":"integer"}]},{"type":"null"}]},"billing_interval":{"description":"Billing cadence on a recurring page. null on a one-off page. Always set together with recurring_product_id","nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","type":"integer"}]},{"type":"null"}]},"recurring_product_id":{"nullable":true,"anyOf":[{"description":"The subscription product a recurring page bills through: the interval and VAT carrier. The product's price is not what the supporter pays, the amount they choose overrides it. null on a one-off page","type":"string"},{"type":"null"}]},"allow_one_time":{"description":"Whether a recurring page also offers a one-time contribution, letting the supporter choose the cadence. false on every one-off page and on a recurring page that only offers the subscription. A one-time contribution on such a page behaves exactly like one on a one-off page: it starts no subscription","type":"boolean"},"status":{"description":"active pages are payable, archived pages are not","anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"description":"Unix timestamp when this page was created","type":"number"},"updated_at":{"description":"Unix timestamp when this page was last updated","type":"number"}},"required":["id","object","livemode","title","description","title_en","description_en","suggested_amounts","allow_custom_amount","vat_rate","form_fields","collect_message","currency","goal_amount","billing_interval","billing_interval_count","recurring_product_id","allow_one_time","status","created_at","updated_at"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1Open-payment-pages","summary":"Create an open payment page","description":"Create a page that collects contributions at an amount the supporter chooses. Send billing_interval to make the page recurring: each contribution then starts a subscription billing the amount the supporter picked, overriding the product's own price. The subscription product that carries the cadence and VAT is derived for you from billing_interval and vat_rate unless you name one with recurring_product_id. Add allow_one_time to let the supporter choose between a one-time contribution and the subscription on the same page.","tags":["Open Payment Pages"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"minLength":1,"maxLength":255,"description":"Page title, shown to supporters and used as the checkout line-item description","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description shown on the public page","type":"string"},{"type":"null"}]},"title_en":{"nullable":true,"anyOf":[{"maxLength":255,"description":"Optional English title, shown on the public page when the visitor picks English. Empty or null falls back to title. The checkout line item, receipts and emails always use title","type":"string"},{"type":"null"}]},"description_en":{"nullable":true,"anyOf":[{"description":"Optional English description, shown on the public page when the visitor picks English. Empty or null falls back to description","type":"string"},{"type":"null"}]},"suggested_amounts":{"description":"Preset amounts in the smallest currency unit. Defaults to [1000, 3000, 5000]. May be empty when allow_custom_amount is true","type":"array","items":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]}},"allow_custom_amount":{"default":true,"description":"Whether a supporter may enter their own amount. A page with no presets and no custom amount is rejected: nobody could pay it","type":"boolean"},"vat_rate":{"description":"VAT rate for the spawned line item: 0, 11, or 24. Defaults to 0. On a recurring page this is the rate the derived billing product carries; it is ignored only when recurring_product_id names a product, which brings its own rate","default":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate for the spawned line item: 0, 11, or 24. Defaults to 0. On a recurring page this is the rate the derived billing product carries; it is ignored only when recurring_product_id names a product, which brings its own rate","default":0,"type":"integer"}]},"form_fields":{"description":"Payer information to collect at checkout. Send [] to collect nothing, null for the default name and email, or an array to name the exact fields. Omitting it collects nothing on a one-off page, and defaults to name and email on a recurring page, which must collect payer information because a subscription needs a customer","nullable":true,"anyOf":[{"type":"array","items":{"type":"object","required":["name"],"properties":{"name":{"description":"Field identifier: name, email, phone, or nationalId","type":"string"},"type":{"description":"HTML input type. Ignored: the canonical type for the field is used","type":"string"},"required":{"description":"Ignored: collected payer fields are always required","type":"boolean"}}}},{"type":"null"}]},"collect_message":{"default":false,"description":"Show an optional free-text message field on the public page","type":"boolean"},"goal_amount":{"nullable":true,"anyOf":[{"minimum":1,"description":"Optional fundraising goal in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"description":"Optional fundraising goal in the smallest currency unit","type":"integer"}]},{"type":"null"}]},"currency":{"minLength":3,"maxLength":3,"description":"Three-letter ISO currency code. Defaults to the merchant's default currency","type":"string"},"billing_interval":{"nullable":true,"anyOf":[{"description":"Billing cadence. Makes the page recurring on its own: a billing product carrying this cadence and the page's VAT rate is derived unless recurring_product_id names one","anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"recurring_product_id":{"nullable":true,"anyOf":[{"format":"uuid","description":"An existing active subscription product of this merchant and environment, billing the same interval and currency as the page. Optional: omit it and a billing product is derived from billing_interval, vat_rate and the page currency, and reused by every page of yours with the same combination. Naming one still wins, and is rejected if it cannot bill the page. Only valid alongside billing_interval","type":"string"},{"type":"null"}]},"allow_one_time":{"default":false,"description":"Offer a one-time contribution alongside the subscription, so the supporter picks the cadence on the page. Requires billing_interval: a one-off page already collects one-time payments, so setting this without one is rejected. A supporter who picks one-time is charged once and starts no subscription","type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","required":["title"],"properties":{"title":{"minLength":1,"maxLength":255,"description":"Page title, shown to supporters and used as the checkout line-item description","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description shown on the public page","type":"string"},{"type":"null"}]},"title_en":{"nullable":true,"anyOf":[{"maxLength":255,"description":"Optional English title, shown on the public page when the visitor picks English. Empty or null falls back to title. The checkout line item, receipts and emails always use title","type":"string"},{"type":"null"}]},"description_en":{"nullable":true,"anyOf":[{"description":"Optional English description, shown on the public page when the visitor picks English. Empty or null falls back to description","type":"string"},{"type":"null"}]},"suggested_amounts":{"description":"Preset amounts in the smallest currency unit. Defaults to [1000, 3000, 5000]. May be empty when allow_custom_amount is true","type":"array","items":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]}},"allow_custom_amount":{"default":true,"description":"Whether a supporter may enter their own amount. A page with no presets and no custom amount is rejected: nobody could pay it","type":"boolean"},"vat_rate":{"description":"VAT rate for the spawned line item: 0, 11, or 24. Defaults to 0. On a recurring page this is the rate the derived billing product carries; it is ignored only when recurring_product_id names a product, which brings its own rate","default":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate for the spawned line item: 0, 11, or 24. Defaults to 0. On a recurring page this is the rate the derived billing product carries; it is ignored only when recurring_product_id names a product, which brings its own rate","default":0,"type":"integer"}]},"form_fields":{"description":"Payer information to collect at checkout. Send [] to collect nothing, null for the default name and email, or an array to name the exact fields. Omitting it collects nothing on a one-off page, and defaults to name and email on a recurring page, which must collect payer information because a subscription needs a customer","nullable":true,"anyOf":[{"type":"array","items":{"type":"object","required":["name"],"properties":{"name":{"description":"Field identifier: name, email, phone, or nationalId","type":"string"},"type":{"description":"HTML input type. Ignored: the canonical type for the field is used","type":"string"},"required":{"description":"Ignored: collected payer fields are always required","type":"boolean"}}}},{"type":"null"}]},"collect_message":{"default":false,"description":"Show an optional free-text message field on the public page","type":"boolean"},"goal_amount":{"nullable":true,"anyOf":[{"minimum":1,"description":"Optional fundraising goal in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"description":"Optional fundraising goal in the smallest currency unit","type":"integer"}]},{"type":"null"}]},"currency":{"minLength":3,"maxLength":3,"description":"Three-letter ISO currency code. Defaults to the merchant's default currency","type":"string"},"billing_interval":{"nullable":true,"anyOf":[{"description":"Billing cadence. Makes the page recurring on its own: a billing product carrying this cadence and the page's VAT rate is derived unless recurring_product_id names one","anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"recurring_product_id":{"nullable":true,"anyOf":[{"format":"uuid","description":"An existing active subscription product of this merchant and environment, billing the same interval and currency as the page. Optional: omit it and a billing product is derived from billing_interval, vat_rate and the page currency, and reused by every page of yours with the same combination. Naming one still wins, and is rejected if it cannot bill the page. Only valid alongside billing_interval","type":"string"},{"type":"null"}]},"allow_one_time":{"default":false,"description":"Offer a one-time contribution alongside the subscription, so the supporter picks the cadence on the page. Requires billing_interval: a one-off page already collects one-time payments, so setting this without one is rejected. A supporter who picks one-time is charged once and starts no subscription","type":"boolean"}}}},"text/plain":{"schema":{"type":"object","required":["title"],"properties":{"title":{"minLength":1,"maxLength":255,"description":"Page title, shown to supporters and used as the checkout line-item description","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description shown on the public page","type":"string"},{"type":"null"}]},"title_en":{"nullable":true,"anyOf":[{"maxLength":255,"description":"Optional English title, shown on the public page when the visitor picks English. Empty or null falls back to title. The checkout line item, receipts and emails always use title","type":"string"},{"type":"null"}]},"description_en":{"nullable":true,"anyOf":[{"description":"Optional English description, shown on the public page when the visitor picks English. Empty or null falls back to description","type":"string"},{"type":"null"}]},"suggested_amounts":{"description":"Preset amounts in the smallest currency unit. Defaults to [1000, 3000, 5000]. May be empty when allow_custom_amount is true","type":"array","items":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]}},"allow_custom_amount":{"default":true,"description":"Whether a supporter may enter their own amount. A page with no presets and no custom amount is rejected: nobody could pay it","type":"boolean"},"vat_rate":{"description":"VAT rate for the spawned line item: 0, 11, or 24. Defaults to 0. On a recurring page this is the rate the derived billing product carries; it is ignored only when recurring_product_id names a product, which brings its own rate","default":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate for the spawned line item: 0, 11, or 24. Defaults to 0. On a recurring page this is the rate the derived billing product carries; it is ignored only when recurring_product_id names a product, which brings its own rate","default":0,"type":"integer"}]},"form_fields":{"description":"Payer information to collect at checkout. Send [] to collect nothing, null for the default name and email, or an array to name the exact fields. Omitting it collects nothing on a one-off page, and defaults to name and email on a recurring page, which must collect payer information because a subscription needs a customer","nullable":true,"anyOf":[{"type":"array","items":{"type":"object","required":["name"],"properties":{"name":{"description":"Field identifier: name, email, phone, or nationalId","type":"string"},"type":{"description":"HTML input type. Ignored: the canonical type for the field is used","type":"string"},"required":{"description":"Ignored: collected payer fields are always required","type":"boolean"}}}},{"type":"null"}]},"collect_message":{"default":false,"description":"Show an optional free-text message field on the public page","type":"boolean"},"goal_amount":{"nullable":true,"anyOf":[{"minimum":1,"description":"Optional fundraising goal in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"description":"Optional fundraising goal in the smallest currency unit","type":"integer"}]},{"type":"null"}]},"currency":{"minLength":3,"maxLength":3,"description":"Three-letter ISO currency code. Defaults to the merchant's default currency","type":"string"},"billing_interval":{"nullable":true,"anyOf":[{"description":"Billing cadence. Makes the page recurring on its own: a billing product carrying this cadence and the page's VAT rate is derived unless recurring_product_id names one","anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"recurring_product_id":{"nullable":true,"anyOf":[{"format":"uuid","description":"An existing active subscription product of this merchant and environment, billing the same interval and currency as the page. Optional: omit it and a billing product is derived from billing_interval, vat_rate and the page currency, and reused by every page of yours with the same combination. Naming one still wins, and is rejected if it cannot bill the page. Only valid alongside billing_interval","type":"string"},{"type":"null"}]},"allow_one_time":{"default":false,"description":"Offer a one-time contribution alongside the subscription, so the supporter picks the cadence on the page. Requires billing_interval: a one-off page already collects one-time payments, so setting this without one is rejected. A supporter who picks one-time is charged once and starts no subscription","type":"boolean"}}}}}}},"get":{"parameters":[{"schema":{"minimum":1,"maximum":100,"default":10,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100,"default":10,"type":"integer"}]},"in":"query","name":"limit","required":true},{"description":"Filter by status. Omit to return both","schema":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"in":"query","name":"status","required":false}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"description":"An open payment page collects contributions at an amount the supporter chooses, either once or on a recurring subscription","type":"object","required":["id","object","livemode","title","description","title_en","description_en","suggested_amounts","allow_custom_amount","vat_rate","form_fields","collect_message","currency","goal_amount","billing_interval","billing_interval_count","recurring_product_id","allow_one_time","status","created_at","updated_at"],"properties":{"id":{"description":"Unique identifier for the open payment page","type":"string"},"object":{"const":"open_payment_page","type":"string"},"livemode":{"description":"Whether this is a live mode page (true) or test mode (false)","type":"boolean"},"title":{"description":"Page title, also used as the line-item description on the spawned checkout","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description shown on the public page","type":"string"},{"type":"null"}]},"title_en":{"nullable":true,"anyOf":[{"description":"Optional English title, shown on the public page when the visitor picks English. null means English visitors see title","type":"string"},{"type":"null"}]},"description_en":{"nullable":true,"anyOf":[{"description":"Optional English description, shown on the public page when the visitor picks English. null means English visitors see description","type":"string"},{"type":"null"}]},"suggested_amounts":{"description":"Preset amounts in the smallest currency unit, offered as one-tap choices. May be empty on a pure pay-what-you-want page","type":"array","items":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}},"allow_custom_amount":{"description":"Whether a supporter may enter their own amount instead of picking a preset","type":"boolean"},"vat_rate":{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","type":"integer"}]},"form_fields":{"description":"Payer information collected at checkout. null = the default name and email, [] = collect nothing, an array = exactly these fields","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"collect_message":{"description":"Whether the public page shows an optional free-text message field","type":"boolean"},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"goal_amount":{"nullable":true,"anyOf":[{"description":"Optional fundraising goal in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Optional fundraising goal in the smallest currency unit","type":"integer"}]},{"type":"null"}]},"billing_interval":{"description":"Billing cadence on a recurring page. null on a one-off page. Always set together with recurring_product_id","nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","type":"integer"}]},{"type":"null"}]},"recurring_product_id":{"nullable":true,"anyOf":[{"description":"The subscription product a recurring page bills through: the interval and VAT carrier. The product's price is not what the supporter pays, the amount they choose overrides it. null on a one-off page","type":"string"},{"type":"null"}]},"allow_one_time":{"description":"Whether a recurring page also offers a one-time contribution, letting the supporter choose the cadence. false on every one-off page and on a recurring page that only offers the subscription. A one-time contribution on such a page behaves exactly like one on a one-off page: it starts no subscription","type":"boolean"},"status":{"description":"active pages are payable, archived pages are not","anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"description":"Unix timestamp when this page was created","type":"number"},"updated_at":{"description":"Unix timestamp when this page was last updated","type":"number"}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"description":"An open payment page collects contributions at an amount the supporter chooses, either once or on a recurring subscription","type":"object","required":["id","object","livemode","title","description","title_en","description_en","suggested_amounts","allow_custom_amount","vat_rate","form_fields","collect_message","currency","goal_amount","billing_interval","billing_interval_count","recurring_product_id","allow_one_time","status","created_at","updated_at"],"properties":{"id":{"description":"Unique identifier for the open payment page","type":"string"},"object":{"const":"open_payment_page","type":"string"},"livemode":{"description":"Whether this is a live mode page (true) or test mode (false)","type":"boolean"},"title":{"description":"Page title, also used as the line-item description on the spawned checkout","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description shown on the public page","type":"string"},{"type":"null"}]},"title_en":{"nullable":true,"anyOf":[{"description":"Optional English title, shown on the public page when the visitor picks English. null means English visitors see title","type":"string"},{"type":"null"}]},"description_en":{"nullable":true,"anyOf":[{"description":"Optional English description, shown on the public page when the visitor picks English. null means English visitors see description","type":"string"},{"type":"null"}]},"suggested_amounts":{"description":"Preset amounts in the smallest currency unit, offered as one-tap choices. May be empty on a pure pay-what-you-want page","type":"array","items":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}},"allow_custom_amount":{"description":"Whether a supporter may enter their own amount instead of picking a preset","type":"boolean"},"vat_rate":{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","type":"integer"}]},"form_fields":{"description":"Payer information collected at checkout. null = the default name and email, [] = collect nothing, an array = exactly these fields","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"collect_message":{"description":"Whether the public page shows an optional free-text message field","type":"boolean"},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"goal_amount":{"nullable":true,"anyOf":[{"description":"Optional fundraising goal in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Optional fundraising goal in the smallest currency unit","type":"integer"}]},{"type":"null"}]},"billing_interval":{"description":"Billing cadence on a recurring page. null on a one-off page. Always set together with recurring_product_id","nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","type":"integer"}]},{"type":"null"}]},"recurring_product_id":{"nullable":true,"anyOf":[{"description":"The subscription product a recurring page bills through: the interval and VAT carrier. The product's price is not what the supporter pays, the amount they choose overrides it. null on a one-off page","type":"string"},{"type":"null"}]},"allow_one_time":{"description":"Whether a recurring page also offers a one-time contribution, letting the supporter choose the cadence. false on every one-off page and on a recurring page that only offers the subscription. A one-time contribution on such a page behaves exactly like one on a one-off page: it starts no subscription","type":"boolean"},"status":{"description":"active pages are payable, archived pages are not","anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"description":"Unix timestamp when this page was created","type":"number"},"updated_at":{"description":"Unix timestamp when this page was last updated","type":"number"}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}},"text/plain":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"description":"An open payment page collects contributions at an amount the supporter chooses, either once or on a recurring subscription","type":"object","required":["id","object","livemode","title","description","title_en","description_en","suggested_amounts","allow_custom_amount","vat_rate","form_fields","collect_message","currency","goal_amount","billing_interval","billing_interval_count","recurring_product_id","allow_one_time","status","created_at","updated_at"],"properties":{"id":{"description":"Unique identifier for the open payment page","type":"string"},"object":{"const":"open_payment_page","type":"string"},"livemode":{"description":"Whether this is a live mode page (true) or test mode (false)","type":"boolean"},"title":{"description":"Page title, also used as the line-item description on the spawned checkout","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description shown on the public page","type":"string"},{"type":"null"}]},"title_en":{"nullable":true,"anyOf":[{"description":"Optional English title, shown on the public page when the visitor picks English. null means English visitors see title","type":"string"},{"type":"null"}]},"description_en":{"nullable":true,"anyOf":[{"description":"Optional English description, shown on the public page when the visitor picks English. null means English visitors see description","type":"string"},{"type":"null"}]},"suggested_amounts":{"description":"Preset amounts in the smallest currency unit, offered as one-tap choices. May be empty on a pure pay-what-you-want page","type":"array","items":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}},"allow_custom_amount":{"description":"Whether a supporter may enter their own amount instead of picking a preset","type":"boolean"},"vat_rate":{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","type":"integer"}]},"form_fields":{"description":"Payer information collected at checkout. null = the default name and email, [] = collect nothing, an array = exactly these fields","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"collect_message":{"description":"Whether the public page shows an optional free-text message field","type":"boolean"},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"goal_amount":{"nullable":true,"anyOf":[{"description":"Optional fundraising goal in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Optional fundraising goal in the smallest currency unit","type":"integer"}]},{"type":"null"}]},"billing_interval":{"description":"Billing cadence on a recurring page. null on a one-off page. Always set together with recurring_product_id","nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","type":"integer"}]},{"type":"null"}]},"recurring_product_id":{"nullable":true,"anyOf":[{"description":"The subscription product a recurring page bills through: the interval and VAT carrier. The product's price is not what the supporter pays, the amount they choose overrides it. null on a one-off page","type":"string"},{"type":"null"}]},"allow_one_time":{"description":"Whether a recurring page also offers a one-time contribution, letting the supporter choose the cadence. false on every one-off page and on a recurring page that only offers the subscription. A one-time contribution on such a page behaves exactly like one on a one-off page: it starts no subscription","type":"boolean"},"status":{"description":"active pages are payable, archived pages are not","anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"description":"Unix timestamp when this page was created","type":"number"},"updated_at":{"description":"Unix timestamp when this page was last updated","type":"number"}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}}}}},"operationId":"getV1Open-payment-pages","summary":"List open payment pages","description":"List this merchant's open payment pages, newest first.","tags":["Open Payment Pages"],"security":[{"bearerAuth":[]}]}},"/v1/open-payment-pages/{id}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"An open payment page collects contributions at an amount the supporter chooses, either once or on a recurring subscription","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the open payment page","type":"string"},"object":{"const":"open_payment_page","type":"string"},"livemode":{"description":"Whether this is a live mode page (true) or test mode (false)","type":"boolean"},"title":{"description":"Page title, also used as the line-item description on the spawned checkout","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description shown on the public page","type":"string"},{"type":"null"}]},"title_en":{"nullable":true,"anyOf":[{"description":"Optional English title, shown on the public page when the visitor picks English. null means English visitors see title","type":"string"},{"type":"null"}]},"description_en":{"nullable":true,"anyOf":[{"description":"Optional English description, shown on the public page when the visitor picks English. null means English visitors see description","type":"string"},{"type":"null"}]},"suggested_amounts":{"description":"Preset amounts in the smallest currency unit, offered as one-tap choices. May be empty on a pure pay-what-you-want page","type":"array","items":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}},"allow_custom_amount":{"description":"Whether a supporter may enter their own amount instead of picking a preset","type":"boolean"},"vat_rate":{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","type":"integer"}]},"form_fields":{"description":"Payer information collected at checkout. null = the default name and email, [] = collect nothing, an array = exactly these fields","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"collect_message":{"description":"Whether the public page shows an optional free-text message field","type":"boolean"},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"goal_amount":{"nullable":true,"anyOf":[{"description":"Optional fundraising goal in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Optional fundraising goal in the smallest currency unit","type":"integer"}]},{"type":"null"}]},"billing_interval":{"description":"Billing cadence on a recurring page. null on a one-off page. Always set together with recurring_product_id","nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","type":"integer"}]},{"type":"null"}]},"recurring_product_id":{"nullable":true,"anyOf":[{"description":"The subscription product a recurring page bills through: the interval and VAT carrier. The product's price is not what the supporter pays, the amount they choose overrides it. null on a one-off page","type":"string"},{"type":"null"}]},"allow_one_time":{"description":"Whether a recurring page also offers a one-time contribution, letting the supporter choose the cadence. false on every one-off page and on a recurring page that only offers the subscription. A one-time contribution on such a page behaves exactly like one on a one-off page: it starts no subscription","type":"boolean"},"status":{"description":"active pages are payable, archived pages are not","anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"description":"Unix timestamp when this page was created","type":"number"},"updated_at":{"description":"Unix timestamp when this page was last updated","type":"number"}},"required":["id","object","livemode","title","description","title_en","description_en","suggested_amounts","allow_custom_amount","vat_rate","form_fields","collect_message","currency","goal_amount","billing_interval","billing_interval_count","recurring_product_id","allow_one_time","status","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the open payment page","type":"string"},"object":{"const":"open_payment_page","type":"string"},"livemode":{"description":"Whether this is a live mode page (true) or test mode (false)","type":"boolean"},"title":{"description":"Page title, also used as the line-item description on the spawned checkout","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description shown on the public page","type":"string"},{"type":"null"}]},"title_en":{"nullable":true,"anyOf":[{"description":"Optional English title, shown on the public page when the visitor picks English. null means English visitors see title","type":"string"},{"type":"null"}]},"description_en":{"nullable":true,"anyOf":[{"description":"Optional English description, shown on the public page when the visitor picks English. null means English visitors see description","type":"string"},{"type":"null"}]},"suggested_amounts":{"description":"Preset amounts in the smallest currency unit, offered as one-tap choices. May be empty on a pure pay-what-you-want page","type":"array","items":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}},"allow_custom_amount":{"description":"Whether a supporter may enter their own amount instead of picking a preset","type":"boolean"},"vat_rate":{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","type":"integer"}]},"form_fields":{"description":"Payer information collected at checkout. null = the default name and email, [] = collect nothing, an array = exactly these fields","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"collect_message":{"description":"Whether the public page shows an optional free-text message field","type":"boolean"},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"goal_amount":{"nullable":true,"anyOf":[{"description":"Optional fundraising goal in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Optional fundraising goal in the smallest currency unit","type":"integer"}]},{"type":"null"}]},"billing_interval":{"description":"Billing cadence on a recurring page. null on a one-off page. Always set together with recurring_product_id","nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","type":"integer"}]},{"type":"null"}]},"recurring_product_id":{"nullable":true,"anyOf":[{"description":"The subscription product a recurring page bills through: the interval and VAT carrier. The product's price is not what the supporter pays, the amount they choose overrides it. null on a one-off page","type":"string"},{"type":"null"}]},"allow_one_time":{"description":"Whether a recurring page also offers a one-time contribution, letting the supporter choose the cadence. false on every one-off page and on a recurring page that only offers the subscription. A one-time contribution on such a page behaves exactly like one on a one-off page: it starts no subscription","type":"boolean"},"status":{"description":"active pages are payable, archived pages are not","anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"description":"Unix timestamp when this page was created","type":"number"},"updated_at":{"description":"Unix timestamp when this page was last updated","type":"number"}},"required":["id","object","livemode","title","description","title_en","description_en","suggested_amounts","allow_custom_amount","vat_rate","form_fields","collect_message","currency","goal_amount","billing_interval","billing_interval_count","recurring_product_id","allow_one_time","status","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the open payment page","type":"string"},"object":{"const":"open_payment_page","type":"string"},"livemode":{"description":"Whether this is a live mode page (true) or test mode (false)","type":"boolean"},"title":{"description":"Page title, also used as the line-item description on the spawned checkout","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description shown on the public page","type":"string"},{"type":"null"}]},"title_en":{"nullable":true,"anyOf":[{"description":"Optional English title, shown on the public page when the visitor picks English. null means English visitors see title","type":"string"},{"type":"null"}]},"description_en":{"nullable":true,"anyOf":[{"description":"Optional English description, shown on the public page when the visitor picks English. null means English visitors see description","type":"string"},{"type":"null"}]},"suggested_amounts":{"description":"Preset amounts in the smallest currency unit, offered as one-tap choices. May be empty on a pure pay-what-you-want page","type":"array","items":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}},"allow_custom_amount":{"description":"Whether a supporter may enter their own amount instead of picking a preset","type":"boolean"},"vat_rate":{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","type":"integer"}]},"form_fields":{"description":"Payer information collected at checkout. null = the default name and email, [] = collect nothing, an array = exactly these fields","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"collect_message":{"description":"Whether the public page shows an optional free-text message field","type":"boolean"},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"goal_amount":{"nullable":true,"anyOf":[{"description":"Optional fundraising goal in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Optional fundraising goal in the smallest currency unit","type":"integer"}]},{"type":"null"}]},"billing_interval":{"description":"Billing cadence on a recurring page. null on a one-off page. Always set together with recurring_product_id","nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","type":"integer"}]},{"type":"null"}]},"recurring_product_id":{"nullable":true,"anyOf":[{"description":"The subscription product a recurring page bills through: the interval and VAT carrier. The product's price is not what the supporter pays, the amount they choose overrides it. null on a one-off page","type":"string"},{"type":"null"}]},"allow_one_time":{"description":"Whether a recurring page also offers a one-time contribution, letting the supporter choose the cadence. false on every one-off page and on a recurring page that only offers the subscription. A one-time contribution on such a page behaves exactly like one on a one-off page: it starts no subscription","type":"boolean"},"status":{"description":"active pages are payable, archived pages are not","anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"description":"Unix timestamp when this page was created","type":"number"},"updated_at":{"description":"Unix timestamp when this page was last updated","type":"number"}},"required":["id","object","livemode","title","description","title_en","description_en","suggested_amounts","allow_custom_amount","vat_rate","form_fields","collect_message","currency","goal_amount","billing_interval","billing_interval_count","recurring_product_id","allow_one_time","status","created_at","updated_at"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"getV1Open-payment-pagesById","summary":"Retrieve an open payment page","description":"Retrieve a single open payment page by ID.","tags":["Open Payment Pages"],"security":[{"bearerAuth":[]}]},"patch":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"An open payment page collects contributions at an amount the supporter chooses, either once or on a recurring subscription","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the open payment page","type":"string"},"object":{"const":"open_payment_page","type":"string"},"livemode":{"description":"Whether this is a live mode page (true) or test mode (false)","type":"boolean"},"title":{"description":"Page title, also used as the line-item description on the spawned checkout","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description shown on the public page","type":"string"},{"type":"null"}]},"title_en":{"nullable":true,"anyOf":[{"description":"Optional English title, shown on the public page when the visitor picks English. null means English visitors see title","type":"string"},{"type":"null"}]},"description_en":{"nullable":true,"anyOf":[{"description":"Optional English description, shown on the public page when the visitor picks English. null means English visitors see description","type":"string"},{"type":"null"}]},"suggested_amounts":{"description":"Preset amounts in the smallest currency unit, offered as one-tap choices. May be empty on a pure pay-what-you-want page","type":"array","items":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}},"allow_custom_amount":{"description":"Whether a supporter may enter their own amount instead of picking a preset","type":"boolean"},"vat_rate":{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","type":"integer"}]},"form_fields":{"description":"Payer information collected at checkout. null = the default name and email, [] = collect nothing, an array = exactly these fields","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"collect_message":{"description":"Whether the public page shows an optional free-text message field","type":"boolean"},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"goal_amount":{"nullable":true,"anyOf":[{"description":"Optional fundraising goal in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Optional fundraising goal in the smallest currency unit","type":"integer"}]},{"type":"null"}]},"billing_interval":{"description":"Billing cadence on a recurring page. null on a one-off page. Always set together with recurring_product_id","nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","type":"integer"}]},{"type":"null"}]},"recurring_product_id":{"nullable":true,"anyOf":[{"description":"The subscription product a recurring page bills through: the interval and VAT carrier. The product's price is not what the supporter pays, the amount they choose overrides it. null on a one-off page","type":"string"},{"type":"null"}]},"allow_one_time":{"description":"Whether a recurring page also offers a one-time contribution, letting the supporter choose the cadence. false on every one-off page and on a recurring page that only offers the subscription. A one-time contribution on such a page behaves exactly like one on a one-off page: it starts no subscription","type":"boolean"},"status":{"description":"active pages are payable, archived pages are not","anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"description":"Unix timestamp when this page was created","type":"number"},"updated_at":{"description":"Unix timestamp when this page was last updated","type":"number"}},"required":["id","object","livemode","title","description","title_en","description_en","suggested_amounts","allow_custom_amount","vat_rate","form_fields","collect_message","currency","goal_amount","billing_interval","billing_interval_count","recurring_product_id","allow_one_time","status","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the open payment page","type":"string"},"object":{"const":"open_payment_page","type":"string"},"livemode":{"description":"Whether this is a live mode page (true) or test mode (false)","type":"boolean"},"title":{"description":"Page title, also used as the line-item description on the spawned checkout","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description shown on the public page","type":"string"},{"type":"null"}]},"title_en":{"nullable":true,"anyOf":[{"description":"Optional English title, shown on the public page when the visitor picks English. null means English visitors see title","type":"string"},{"type":"null"}]},"description_en":{"nullable":true,"anyOf":[{"description":"Optional English description, shown on the public page when the visitor picks English. null means English visitors see description","type":"string"},{"type":"null"}]},"suggested_amounts":{"description":"Preset amounts in the smallest currency unit, offered as one-tap choices. May be empty on a pure pay-what-you-want page","type":"array","items":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}},"allow_custom_amount":{"description":"Whether a supporter may enter their own amount instead of picking a preset","type":"boolean"},"vat_rate":{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","type":"integer"}]},"form_fields":{"description":"Payer information collected at checkout. null = the default name and email, [] = collect nothing, an array = exactly these fields","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"collect_message":{"description":"Whether the public page shows an optional free-text message field","type":"boolean"},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"goal_amount":{"nullable":true,"anyOf":[{"description":"Optional fundraising goal in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Optional fundraising goal in the smallest currency unit","type":"integer"}]},{"type":"null"}]},"billing_interval":{"description":"Billing cadence on a recurring page. null on a one-off page. Always set together with recurring_product_id","nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","type":"integer"}]},{"type":"null"}]},"recurring_product_id":{"nullable":true,"anyOf":[{"description":"The subscription product a recurring page bills through: the interval and VAT carrier. The product's price is not what the supporter pays, the amount they choose overrides it. null on a one-off page","type":"string"},{"type":"null"}]},"allow_one_time":{"description":"Whether a recurring page also offers a one-time contribution, letting the supporter choose the cadence. false on every one-off page and on a recurring page that only offers the subscription. A one-time contribution on such a page behaves exactly like one on a one-off page: it starts no subscription","type":"boolean"},"status":{"description":"active pages are payable, archived pages are not","anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"description":"Unix timestamp when this page was created","type":"number"},"updated_at":{"description":"Unix timestamp when this page was last updated","type":"number"}},"required":["id","object","livemode","title","description","title_en","description_en","suggested_amounts","allow_custom_amount","vat_rate","form_fields","collect_message","currency","goal_amount","billing_interval","billing_interval_count","recurring_product_id","allow_one_time","status","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the open payment page","type":"string"},"object":{"const":"open_payment_page","type":"string"},"livemode":{"description":"Whether this is a live mode page (true) or test mode (false)","type":"boolean"},"title":{"description":"Page title, also used as the line-item description on the spawned checkout","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description shown on the public page","type":"string"},{"type":"null"}]},"title_en":{"nullable":true,"anyOf":[{"description":"Optional English title, shown on the public page when the visitor picks English. null means English visitors see title","type":"string"},{"type":"null"}]},"description_en":{"nullable":true,"anyOf":[{"description":"Optional English description, shown on the public page when the visitor picks English. null means English visitors see description","type":"string"},{"type":"null"}]},"suggested_amounts":{"description":"Preset amounts in the smallest currency unit, offered as one-tap choices. May be empty on a pure pay-what-you-want page","type":"array","items":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}},"allow_custom_amount":{"description":"Whether a supporter may enter their own amount instead of picking a preset","type":"boolean"},"vat_rate":{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","type":"integer"}]},"form_fields":{"description":"Payer information collected at checkout. null = the default name and email, [] = collect nothing, an array = exactly these fields","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"collect_message":{"description":"Whether the public page shows an optional free-text message field","type":"boolean"},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"goal_amount":{"nullable":true,"anyOf":[{"description":"Optional fundraising goal in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Optional fundraising goal in the smallest currency unit","type":"integer"}]},{"type":"null"}]},"billing_interval":{"description":"Billing cadence on a recurring page. null on a one-off page. Always set together with recurring_product_id","nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","type":"integer"}]},{"type":"null"}]},"recurring_product_id":{"nullable":true,"anyOf":[{"description":"The subscription product a recurring page bills through: the interval and VAT carrier. The product's price is not what the supporter pays, the amount they choose overrides it. null on a one-off page","type":"string"},{"type":"null"}]},"allow_one_time":{"description":"Whether a recurring page also offers a one-time contribution, letting the supporter choose the cadence. false on every one-off page and on a recurring page that only offers the subscription. A one-time contribution on such a page behaves exactly like one on a one-off page: it starts no subscription","type":"boolean"},"status":{"description":"active pages are payable, archived pages are not","anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"description":"Unix timestamp when this page was created","type":"number"},"updated_at":{"description":"Unix timestamp when this page was last updated","type":"number"}},"required":["id","object","livemode","title","description","title_en","description_en","suggested_amounts","allow_custom_amount","vat_rate","form_fields","collect_message","currency","goal_amount","billing_interval","billing_interval_count","recurring_product_id","allow_one_time","status","created_at","updated_at"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"patchV1Open-payment-pagesById","summary":"Update an open payment page","description":"Update an open payment page. Every field is optional and an omitted field keeps its stored value. Send billing_interval to make a page recurring, and null to make it one-off again, which clears its billing product alongside. recurring_product_id is optional on a recurring page: omit it to keep whichever product the page already bills through, or send a product id to bill through that one instead. A recurring_product_id with no billing_interval on either side is rejected, since a product with no cadence renders nothing to the supporter. allow_one_time is checked the same way: it cannot survive a page being made one-off, so clear it in the same request that clears the interval.","tags":["Open Payment Pages"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"minLength":1,"maxLength":255,"type":"string"},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"title_en":{"nullable":true,"anyOf":[{"maxLength":255,"description":"Optional English title for the public page. Send null or an empty string to clear it, after which English visitors see title","type":"string"},{"type":"null"}]},"description_en":{"nullable":true,"anyOf":[{"description":"Optional English description for the public page. Send null or an empty string to clear it, after which English visitors see description","type":"string"},{"type":"null"}]},"suggested_amounts":{"type":"array","items":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]}},"allow_custom_amount":{"type":"boolean"},"vat_rate":{"description":"VAT rate for the spawned line item: 0, 11, or 24. On a page billing through a derived product, changing this moves the page to the product for the new rate rather than re-rating supporters already subscribed","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate for the spawned line item: 0, 11, or 24. On a page billing through a derived product, changing this moves the page to the product for the new rate rather than re-rating supporters already subscribed","type":"integer"}]},"form_fields":{"nullable":true,"anyOf":[{"type":"array","items":{"type":"object","required":["name"],"properties":{"name":{"description":"Field identifier: name, email, phone, or nationalId","type":"string"},"type":{"description":"HTML input type. Ignored: the canonical type for the field is used","type":"string"},"required":{"description":"Ignored: collected payer fields are always required","type":"boolean"}}}},{"type":"null"}]},"collect_message":{"type":"boolean"},"goal_amount":{"nullable":true,"anyOf":[{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},{"type":"null"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"billing_interval":{"nullable":true,"anyOf":[{"description":"Billing cadence. Makes the page recurring on its own: a billing product carrying this cadence and the page's VAT rate is derived unless recurring_product_id names one","anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"recurring_product_id":{"nullable":true,"anyOf":[{"format":"uuid","description":"Change which product bills the page. Send null on a page that keeps its billing_interval to hand the choice back to Kling: a product is derived from the interval and VAT rate instead. Naming a product that cannot bill the page is rejected rather than silently replaced","type":"string"},{"type":"null"}]},"allow_one_time":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"title":{"minLength":1,"maxLength":255,"type":"string"},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"title_en":{"nullable":true,"anyOf":[{"maxLength":255,"description":"Optional English title for the public page. Send null or an empty string to clear it, after which English visitors see title","type":"string"},{"type":"null"}]},"description_en":{"nullable":true,"anyOf":[{"description":"Optional English description for the public page. Send null or an empty string to clear it, after which English visitors see description","type":"string"},{"type":"null"}]},"suggested_amounts":{"type":"array","items":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]}},"allow_custom_amount":{"type":"boolean"},"vat_rate":{"description":"VAT rate for the spawned line item: 0, 11, or 24. On a page billing through a derived product, changing this moves the page to the product for the new rate rather than re-rating supporters already subscribed","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate for the spawned line item: 0, 11, or 24. On a page billing through a derived product, changing this moves the page to the product for the new rate rather than re-rating supporters already subscribed","type":"integer"}]},"form_fields":{"nullable":true,"anyOf":[{"type":"array","items":{"type":"object","required":["name"],"properties":{"name":{"description":"Field identifier: name, email, phone, or nationalId","type":"string"},"type":{"description":"HTML input type. Ignored: the canonical type for the field is used","type":"string"},"required":{"description":"Ignored: collected payer fields are always required","type":"boolean"}}}},{"type":"null"}]},"collect_message":{"type":"boolean"},"goal_amount":{"nullable":true,"anyOf":[{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},{"type":"null"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"billing_interval":{"nullable":true,"anyOf":[{"description":"Billing cadence. Makes the page recurring on its own: a billing product carrying this cadence and the page's VAT rate is derived unless recurring_product_id names one","anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"recurring_product_id":{"nullable":true,"anyOf":[{"format":"uuid","description":"Change which product bills the page. Send null on a page that keeps its billing_interval to hand the choice back to Kling: a product is derived from the interval and VAT rate instead. Naming a product that cannot bill the page is rejected rather than silently replaced","type":"string"},{"type":"null"}]},"allow_one_time":{"type":"boolean"}}}},"text/plain":{"schema":{"type":"object","properties":{"title":{"minLength":1,"maxLength":255,"type":"string"},"description":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"title_en":{"nullable":true,"anyOf":[{"maxLength":255,"description":"Optional English title for the public page. Send null or an empty string to clear it, after which English visitors see title","type":"string"},{"type":"null"}]},"description_en":{"nullable":true,"anyOf":[{"description":"Optional English description for the public page. Send null or an empty string to clear it, after which English visitors see description","type":"string"},{"type":"null"}]},"suggested_amounts":{"type":"array","items":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]}},"allow_custom_amount":{"type":"boolean"},"vat_rate":{"description":"VAT rate for the spawned line item: 0, 11, or 24. On a page billing through a derived product, changing this moves the page to the product for the new rate rather than re-rating supporters already subscribed","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate for the spawned line item: 0, 11, or 24. On a page billing through a derived product, changing this moves the page to the product for the new rate rather than re-rating supporters already subscribed","type":"integer"}]},"form_fields":{"nullable":true,"anyOf":[{"type":"array","items":{"type":"object","required":["name"],"properties":{"name":{"description":"Field identifier: name, email, phone, or nationalId","type":"string"},"type":{"description":"HTML input type. Ignored: the canonical type for the field is used","type":"string"},"required":{"description":"Ignored: collected payer fields are always required","type":"boolean"}}}},{"type":"null"}]},"collect_message":{"type":"boolean"},"goal_amount":{"nullable":true,"anyOf":[{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},{"type":"null"}]},"status":{"anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"billing_interval":{"nullable":true,"anyOf":[{"description":"Billing cadence. Makes the page recurring on its own: a billing product carrying this cadence and the page's VAT rate is derived unless recurring_product_id names one","anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"recurring_product_id":{"nullable":true,"anyOf":[{"format":"uuid","description":"Change which product bills the page. Send null on a page that keeps its billing_interval to hand the choice back to Kling: a product is derived from the interval and VAT rate instead. Naming a product that cannot bill the page is rejected rather than silently replaced","type":"string"},{"type":"null"}]},"allow_one_time":{"type":"boolean"}}}}}}},"delete":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"open_payment_page","type":"string"},"deleted":{"const":true,"type":"boolean"}},"required":["id","object","deleted"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"open_payment_page","type":"string"},"deleted":{"const":true,"type":"boolean"}},"required":["id","object","deleted"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"open_payment_page","type":"string"},"deleted":{"const":true,"type":"boolean"}},"required":["id","object","deleted"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"deleteV1Open-payment-pagesById","summary":"Delete an open payment page","description":"Archive an open payment page, which stops it accepting contributions. The page is kept rather than erased, because the contributions already recorded against it reference it. Equivalent to the deactivate endpoint.","tags":["Open Payment Pages"],"security":[{"bearerAuth":[]}]}},"/v1/open-payment-pages/{id}/activate":{"post":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"An open payment page collects contributions at an amount the supporter chooses, either once or on a recurring subscription","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the open payment page","type":"string"},"object":{"const":"open_payment_page","type":"string"},"livemode":{"description":"Whether this is a live mode page (true) or test mode (false)","type":"boolean"},"title":{"description":"Page title, also used as the line-item description on the spawned checkout","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description shown on the public page","type":"string"},{"type":"null"}]},"title_en":{"nullable":true,"anyOf":[{"description":"Optional English title, shown on the public page when the visitor picks English. null means English visitors see title","type":"string"},{"type":"null"}]},"description_en":{"nullable":true,"anyOf":[{"description":"Optional English description, shown on the public page when the visitor picks English. null means English visitors see description","type":"string"},{"type":"null"}]},"suggested_amounts":{"description":"Preset amounts in the smallest currency unit, offered as one-tap choices. May be empty on a pure pay-what-you-want page","type":"array","items":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}},"allow_custom_amount":{"description":"Whether a supporter may enter their own amount instead of picking a preset","type":"boolean"},"vat_rate":{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","type":"integer"}]},"form_fields":{"description":"Payer information collected at checkout. null = the default name and email, [] = collect nothing, an array = exactly these fields","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"collect_message":{"description":"Whether the public page shows an optional free-text message field","type":"boolean"},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"goal_amount":{"nullable":true,"anyOf":[{"description":"Optional fundraising goal in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Optional fundraising goal in the smallest currency unit","type":"integer"}]},{"type":"null"}]},"billing_interval":{"description":"Billing cadence on a recurring page. null on a one-off page. Always set together with recurring_product_id","nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","type":"integer"}]},{"type":"null"}]},"recurring_product_id":{"nullable":true,"anyOf":[{"description":"The subscription product a recurring page bills through: the interval and VAT carrier. The product's price is not what the supporter pays, the amount they choose overrides it. null on a one-off page","type":"string"},{"type":"null"}]},"allow_one_time":{"description":"Whether a recurring page also offers a one-time contribution, letting the supporter choose the cadence. false on every one-off page and on a recurring page that only offers the subscription. A one-time contribution on such a page behaves exactly like one on a one-off page: it starts no subscription","type":"boolean"},"status":{"description":"active pages are payable, archived pages are not","anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"description":"Unix timestamp when this page was created","type":"number"},"updated_at":{"description":"Unix timestamp when this page was last updated","type":"number"}},"required":["id","object","livemode","title","description","title_en","description_en","suggested_amounts","allow_custom_amount","vat_rate","form_fields","collect_message","currency","goal_amount","billing_interval","billing_interval_count","recurring_product_id","allow_one_time","status","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the open payment page","type":"string"},"object":{"const":"open_payment_page","type":"string"},"livemode":{"description":"Whether this is a live mode page (true) or test mode (false)","type":"boolean"},"title":{"description":"Page title, also used as the line-item description on the spawned checkout","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description shown on the public page","type":"string"},{"type":"null"}]},"title_en":{"nullable":true,"anyOf":[{"description":"Optional English title, shown on the public page when the visitor picks English. null means English visitors see title","type":"string"},{"type":"null"}]},"description_en":{"nullable":true,"anyOf":[{"description":"Optional English description, shown on the public page when the visitor picks English. null means English visitors see description","type":"string"},{"type":"null"}]},"suggested_amounts":{"description":"Preset amounts in the smallest currency unit, offered as one-tap choices. May be empty on a pure pay-what-you-want page","type":"array","items":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}},"allow_custom_amount":{"description":"Whether a supporter may enter their own amount instead of picking a preset","type":"boolean"},"vat_rate":{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","type":"integer"}]},"form_fields":{"description":"Payer information collected at checkout. null = the default name and email, [] = collect nothing, an array = exactly these fields","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"collect_message":{"description":"Whether the public page shows an optional free-text message field","type":"boolean"},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"goal_amount":{"nullable":true,"anyOf":[{"description":"Optional fundraising goal in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Optional fundraising goal in the smallest currency unit","type":"integer"}]},{"type":"null"}]},"billing_interval":{"description":"Billing cadence on a recurring page. null on a one-off page. Always set together with recurring_product_id","nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","type":"integer"}]},{"type":"null"}]},"recurring_product_id":{"nullable":true,"anyOf":[{"description":"The subscription product a recurring page bills through: the interval and VAT carrier. The product's price is not what the supporter pays, the amount they choose overrides it. null on a one-off page","type":"string"},{"type":"null"}]},"allow_one_time":{"description":"Whether a recurring page also offers a one-time contribution, letting the supporter choose the cadence. false on every one-off page and on a recurring page that only offers the subscription. A one-time contribution on such a page behaves exactly like one on a one-off page: it starts no subscription","type":"boolean"},"status":{"description":"active pages are payable, archived pages are not","anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"description":"Unix timestamp when this page was created","type":"number"},"updated_at":{"description":"Unix timestamp when this page was last updated","type":"number"}},"required":["id","object","livemode","title","description","title_en","description_en","suggested_amounts","allow_custom_amount","vat_rate","form_fields","collect_message","currency","goal_amount","billing_interval","billing_interval_count","recurring_product_id","allow_one_time","status","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the open payment page","type":"string"},"object":{"const":"open_payment_page","type":"string"},"livemode":{"description":"Whether this is a live mode page (true) or test mode (false)","type":"boolean"},"title":{"description":"Page title, also used as the line-item description on the spawned checkout","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description shown on the public page","type":"string"},{"type":"null"}]},"title_en":{"nullable":true,"anyOf":[{"description":"Optional English title, shown on the public page when the visitor picks English. null means English visitors see title","type":"string"},{"type":"null"}]},"description_en":{"nullable":true,"anyOf":[{"description":"Optional English description, shown on the public page when the visitor picks English. null means English visitors see description","type":"string"},{"type":"null"}]},"suggested_amounts":{"description":"Preset amounts in the smallest currency unit, offered as one-tap choices. May be empty on a pure pay-what-you-want page","type":"array","items":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}},"allow_custom_amount":{"description":"Whether a supporter may enter their own amount instead of picking a preset","type":"boolean"},"vat_rate":{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","type":"integer"}]},"form_fields":{"description":"Payer information collected at checkout. null = the default name and email, [] = collect nothing, an array = exactly these fields","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"collect_message":{"description":"Whether the public page shows an optional free-text message field","type":"boolean"},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"goal_amount":{"nullable":true,"anyOf":[{"description":"Optional fundraising goal in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Optional fundraising goal in the smallest currency unit","type":"integer"}]},{"type":"null"}]},"billing_interval":{"description":"Billing cadence on a recurring page. null on a one-off page. Always set together with recurring_product_id","nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","type":"integer"}]},{"type":"null"}]},"recurring_product_id":{"nullable":true,"anyOf":[{"description":"The subscription product a recurring page bills through: the interval and VAT carrier. The product's price is not what the supporter pays, the amount they choose overrides it. null on a one-off page","type":"string"},{"type":"null"}]},"allow_one_time":{"description":"Whether a recurring page also offers a one-time contribution, letting the supporter choose the cadence. false on every one-off page and on a recurring page that only offers the subscription. A one-time contribution on such a page behaves exactly like one on a one-off page: it starts no subscription","type":"boolean"},"status":{"description":"active pages are payable, archived pages are not","anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"description":"Unix timestamp when this page was created","type":"number"},"updated_at":{"description":"Unix timestamp when this page was last updated","type":"number"}},"required":["id","object","livemode","title","description","title_en","description_en","suggested_amounts","allow_custom_amount","vat_rate","form_fields","collect_message","currency","goal_amount","billing_interval","billing_interval_count","recurring_product_id","allow_one_time","status","created_at","updated_at"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1Open-payment-pagesByIdActivate","summary":"Activate an open payment page","description":"Set the page's status to active, so it accepts contributions again.","tags":["Open Payment Pages"],"security":[{"bearerAuth":[]}]}},"/v1/open-payment-pages/{id}/deactivate":{"post":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"An open payment page collects contributions at an amount the supporter chooses, either once or on a recurring subscription","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the open payment page","type":"string"},"object":{"const":"open_payment_page","type":"string"},"livemode":{"description":"Whether this is a live mode page (true) or test mode (false)","type":"boolean"},"title":{"description":"Page title, also used as the line-item description on the spawned checkout","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description shown on the public page","type":"string"},{"type":"null"}]},"title_en":{"nullable":true,"anyOf":[{"description":"Optional English title, shown on the public page when the visitor picks English. null means English visitors see title","type":"string"},{"type":"null"}]},"description_en":{"nullable":true,"anyOf":[{"description":"Optional English description, shown on the public page when the visitor picks English. null means English visitors see description","type":"string"},{"type":"null"}]},"suggested_amounts":{"description":"Preset amounts in the smallest currency unit, offered as one-tap choices. May be empty on a pure pay-what-you-want page","type":"array","items":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}},"allow_custom_amount":{"description":"Whether a supporter may enter their own amount instead of picking a preset","type":"boolean"},"vat_rate":{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","type":"integer"}]},"form_fields":{"description":"Payer information collected at checkout. null = the default name and email, [] = collect nothing, an array = exactly these fields","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"collect_message":{"description":"Whether the public page shows an optional free-text message field","type":"boolean"},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"goal_amount":{"nullable":true,"anyOf":[{"description":"Optional fundraising goal in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Optional fundraising goal in the smallest currency unit","type":"integer"}]},{"type":"null"}]},"billing_interval":{"description":"Billing cadence on a recurring page. null on a one-off page. Always set together with recurring_product_id","nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","type":"integer"}]},{"type":"null"}]},"recurring_product_id":{"nullable":true,"anyOf":[{"description":"The subscription product a recurring page bills through: the interval and VAT carrier. The product's price is not what the supporter pays, the amount they choose overrides it. null on a one-off page","type":"string"},{"type":"null"}]},"allow_one_time":{"description":"Whether a recurring page also offers a one-time contribution, letting the supporter choose the cadence. false on every one-off page and on a recurring page that only offers the subscription. A one-time contribution on such a page behaves exactly like one on a one-off page: it starts no subscription","type":"boolean"},"status":{"description":"active pages are payable, archived pages are not","anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"description":"Unix timestamp when this page was created","type":"number"},"updated_at":{"description":"Unix timestamp when this page was last updated","type":"number"}},"required":["id","object","livemode","title","description","title_en","description_en","suggested_amounts","allow_custom_amount","vat_rate","form_fields","collect_message","currency","goal_amount","billing_interval","billing_interval_count","recurring_product_id","allow_one_time","status","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the open payment page","type":"string"},"object":{"const":"open_payment_page","type":"string"},"livemode":{"description":"Whether this is a live mode page (true) or test mode (false)","type":"boolean"},"title":{"description":"Page title, also used as the line-item description on the spawned checkout","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description shown on the public page","type":"string"},{"type":"null"}]},"title_en":{"nullable":true,"anyOf":[{"description":"Optional English title, shown on the public page when the visitor picks English. null means English visitors see title","type":"string"},{"type":"null"}]},"description_en":{"nullable":true,"anyOf":[{"description":"Optional English description, shown on the public page when the visitor picks English. null means English visitors see description","type":"string"},{"type":"null"}]},"suggested_amounts":{"description":"Preset amounts in the smallest currency unit, offered as one-tap choices. May be empty on a pure pay-what-you-want page","type":"array","items":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}},"allow_custom_amount":{"description":"Whether a supporter may enter their own amount instead of picking a preset","type":"boolean"},"vat_rate":{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","type":"integer"}]},"form_fields":{"description":"Payer information collected at checkout. null = the default name and email, [] = collect nothing, an array = exactly these fields","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"collect_message":{"description":"Whether the public page shows an optional free-text message field","type":"boolean"},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"goal_amount":{"nullable":true,"anyOf":[{"description":"Optional fundraising goal in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Optional fundraising goal in the smallest currency unit","type":"integer"}]},{"type":"null"}]},"billing_interval":{"description":"Billing cadence on a recurring page. null on a one-off page. Always set together with recurring_product_id","nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","type":"integer"}]},{"type":"null"}]},"recurring_product_id":{"nullable":true,"anyOf":[{"description":"The subscription product a recurring page bills through: the interval and VAT carrier. The product's price is not what the supporter pays, the amount they choose overrides it. null on a one-off page","type":"string"},{"type":"null"}]},"allow_one_time":{"description":"Whether a recurring page also offers a one-time contribution, letting the supporter choose the cadence. false on every one-off page and on a recurring page that only offers the subscription. A one-time contribution on such a page behaves exactly like one on a one-off page: it starts no subscription","type":"boolean"},"status":{"description":"active pages are payable, archived pages are not","anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"description":"Unix timestamp when this page was created","type":"number"},"updated_at":{"description":"Unix timestamp when this page was last updated","type":"number"}},"required":["id","object","livemode","title","description","title_en","description_en","suggested_amounts","allow_custom_amount","vat_rate","form_fields","collect_message","currency","goal_amount","billing_interval","billing_interval_count","recurring_product_id","allow_one_time","status","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"description":"Unique identifier for the open payment page","type":"string"},"object":{"const":"open_payment_page","type":"string"},"livemode":{"description":"Whether this is a live mode page (true) or test mode (false)","type":"boolean"},"title":{"description":"Page title, also used as the line-item description on the spawned checkout","type":"string"},"description":{"nullable":true,"anyOf":[{"description":"Optional description shown on the public page","type":"string"},{"type":"null"}]},"title_en":{"nullable":true,"anyOf":[{"description":"Optional English title, shown on the public page when the visitor picks English. null means English visitors see title","type":"string"},{"type":"null"}]},"description_en":{"nullable":true,"anyOf":[{"description":"Optional English description, shown on the public page when the visitor picks English. null means English visitors see description","type":"string"},{"type":"null"}]},"suggested_amounts":{"description":"Preset amounts in the smallest currency unit, offered as one-tap choices. May be empty on a pure pay-what-you-want page","type":"array","items":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]}},"allow_custom_amount":{"description":"Whether a supporter may enter their own amount instead of picking a preset","type":"boolean"},"vat_rate":{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"VAT rate applied to the spawned line item: 0, 11, or 24. On a recurring page the rate comes from the billing product instead","type":"integer"}]},"form_fields":{"description":"Payer information collected at checkout. null = the default name and email, [] = collect nothing, an array = exactly these fields","nullable":true,"anyOf":[{"type":"array","items":{"description":"A form field to collect from the customer during checkout","type":"object","required":["name","type","required"],"properties":{"name":{"description":"Field identifier. Known fields: name, email, phone, nationalId. Others are stored as custom fields.","type":"string"},"type":{"description":"HTML input type: text, email, tel, etc.","type":"string"},"required":{"description":"Whether the field must be filled before continuing","type":"boolean"}}}},{"type":"null"}]},"collect_message":{"description":"Whether the public page shows an optional free-text message field","type":"boolean"},"currency":{"description":"Three-letter ISO currency code (e.g. ISK)","type":"string"},"goal_amount":{"nullable":true,"anyOf":[{"description":"Optional fundraising goal in the smallest currency unit","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"Optional fundraising goal in the smallest currency unit","type":"integer"}]},{"type":"null"}]},"billing_interval":{"description":"Billing cadence on a recurring page. null on a one-off page. Always set together with recurring_product_id","nullable":true,"anyOf":[{"anyOf":[{"const":"week","type":"string"},{"const":"month","type":"string"},{"const":"year","type":"string"}]},{"type":"null"}]},"billing_interval_count":{"nullable":true,"anyOf":[{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","anyOf":[{"format":"integer","default":0,"type":"string"},{"description":"How many intervals between charges, read from the billing product: 3 with a month interval is every three months. null on a one-off page, and null when the product leaves it unset, which means every one interval","type":"integer"}]},{"type":"null"}]},"recurring_product_id":{"nullable":true,"anyOf":[{"description":"The subscription product a recurring page bills through: the interval and VAT carrier. The product's price is not what the supporter pays, the amount they choose overrides it. null on a one-off page","type":"string"},{"type":"null"}]},"allow_one_time":{"description":"Whether a recurring page also offers a one-time contribution, letting the supporter choose the cadence. false on every one-off page and on a recurring page that only offers the subscription. A one-time contribution on such a page behaves exactly like one on a one-off page: it starts no subscription","type":"boolean"},"status":{"description":"active pages are payable, archived pages are not","anyOf":[{"const":"active","type":"string"},{"const":"archived","type":"string"}]},"created_at":{"description":"Unix timestamp when this page was created","type":"number"},"updated_at":{"description":"Unix timestamp when this page was last updated","type":"number"}},"required":["id","object","livemode","title","description","title_en","description_en","suggested_amounts","allow_custom_amount","vat_rate","form_fields","collect_message","currency","goal_amount","billing_interval","billing_interval_count","recurring_product_id","allow_one_time","status","created_at","updated_at"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1Open-payment-pagesByIdDeactivate","summary":"Deactivate an open payment page","description":"Set the page's status to archived, so it stops accepting contributions. The page and its recorded contributions are kept.","tags":["Open Payment Pages"],"security":[{"bearerAuth":[]}]}},"/v1/claims/":{"get":{"parameters":[{"schema":{"anyOf":[{"const":"test","type":"string"},{"const":"live","type":"string"}]},"in":"query","name":"environment","required":false},{"schema":{"anyOf":[{"const":"pending","type":"string"},{"const":"unpaid","type":"string"},{"const":"paid","type":"string"},{"const":"cancelled","type":"string"},{"const":"partially_paid","type":"string"},{"const":"secondary_collection","type":"string"}]},"in":"query","name":"status","required":false},{"schema":{"minimum":1,"maximum":100,"default":20,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100,"default":20,"type":"integer"}]},"in":"query","name":"limit","required":true},{"schema":{"minimum":0,"default":0,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"default":0,"type":"integer"}]},"in":"query","name":"offset","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","livemode","customer","payment_intent","provider","status","claimant_id","payor_kennitala","amount","other_cost","due_date","final_due_date","bank_claim_id","metadata","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"claim","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"payment_intent":{"type":"string"},"provider":{"type":"string"},"status":{"type":"string"},"claimant_id":{"type":"string"},"payor_kennitala":{"type":"string"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"other_cost":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"due_date":{"type":"number"},"final_due_date":{"type":"number"},"bank_claim_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","livemode","customer","payment_intent","provider","status","claimant_id","payor_kennitala","amount","other_cost","due_date","final_due_date","bank_claim_id","metadata","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"claim","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"payment_intent":{"type":"string"},"provider":{"type":"string"},"status":{"type":"string"},"claimant_id":{"type":"string"},"payor_kennitala":{"type":"string"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"other_cost":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"due_date":{"type":"number"},"final_due_date":{"type":"number"},"bank_claim_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}},"text/plain":{"schema":{"type":"object","properties":{"object":{"const":"list","type":"string"},"data":{"type":"array","items":{"type":"object","required":["id","object","livemode","customer","payment_intent","provider","status","claimant_id","payor_kennitala","amount","other_cost","due_date","final_due_date","bank_claim_id","metadata","created_at","updated_at"],"properties":{"id":{"type":"string"},"object":{"const":"claim","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"payment_intent":{"type":"string"},"provider":{"type":"string"},"status":{"type":"string"},"claimant_id":{"type":"string"},"payor_kennitala":{"type":"string"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"other_cost":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"due_date":{"type":"number"},"final_due_date":{"type":"number"},"bank_claim_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}}}}},"operationId":"getV1Claims","description":"List claims for merchant","tags":["Claims"],"security":[{"bearerAuth":[]}]},"post":{"parameters":[],"responses":{"201":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"claim","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"payment_intent":{"type":"string"},"provider":{"type":"string"},"status":{"type":"string"},"claimant_id":{"type":"string"},"payor_kennitala":{"type":"string"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"other_cost":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"due_date":{"type":"number"},"final_due_date":{"type":"number"},"bank_claim_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","customer","payment_intent","provider","status","claimant_id","payor_kennitala","amount","other_cost","due_date","final_due_date","bank_claim_id","metadata","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"claim","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"payment_intent":{"type":"string"},"provider":{"type":"string"},"status":{"type":"string"},"claimant_id":{"type":"string"},"payor_kennitala":{"type":"string"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"other_cost":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"due_date":{"type":"number"},"final_due_date":{"type":"number"},"bank_claim_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","customer","payment_intent","provider","status","claimant_id","payor_kennitala","amount","other_cost","due_date","final_due_date","bank_claim_id","metadata","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"claim","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"payment_intent":{"type":"string"},"provider":{"type":"string"},"status":{"type":"string"},"claimant_id":{"type":"string"},"payor_kennitala":{"type":"string"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"other_cost":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"due_date":{"type":"number"},"final_due_date":{"type":"number"},"bank_claim_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","customer","payment_intent","provider","status","claimant_id","payor_kennitala","amount","other_cost","due_date","final_due_date","bank_claim_id","metadata","created_at","updated_at"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"409":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"422":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1Claims","description":"Create a new claim. Kling allocates a unique per-merchant claim number for every claim, so multiple claims with the same due date for the same claimant are supported. In rare cases (e.g. an out-of-band claim created in the bank's own portal that collides on the natural key) the bank still rejects the create with 409 `claim_duplicate_due_date`. Retry after the conflicting claim has cleared.","tags":["Claims"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["payor_kennitala","amount","due_date","final_due_date"],"properties":{"payor_kennitala":{"minLength":10,"maxLength":10,"type":"string"},"amount":{"minimum":1,"maximum":2147483647,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"type":"integer"}]},"due_date":{"description":"Unix timestamp","type":"number"},"final_due_date":{"description":"Unix timestamp","type":"number"},"customer":{"format":"uuid","type":"string"},"items":{"minItems":1,"maxItems":200,"description":"Line items for the reikningur's Sundurliðun block. When present their total, net of discounts, must equal amount.","type":"array","items":{"type":"object","required":["description","quantity","unit_amount","vat_rate"],"properties":{"description":{"minLength":1,"maxLength":500,"type":"string"},"quantity":{"minimum":1,"maximum":100000,"default":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100000,"default":1,"type":"integer"}]},"unit_amount":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"vat_rate":{"description":"VAT percentage: 0, 11, or 24","anyOf":[{"const":0,"type":"number"},{"const":11,"type":"number"},{"const":24,"type":"number"}]},"product_id":{"format":"uuid","type":"string"},"discount_amount":{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the line is charged at unit_amount * quantity - discount_amount.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the line is charged at unit_amount * quantity - discount_amount.","type":"integer"}]}}}},"discount_amount":{"minimum":0,"description":"Whole-sale discount in minor units. With items, amount must equal the sum of (unit_amount * quantity - line discount) less this.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"Whole-sale discount in minor units. With items, amount must equal the sum of (unit_amount * quantity - line discount) less this.","type":"integer"}]},"staff_id":{"format":"uuid","description":"Who rang the sale up, from GET /v1/pos/staff. Stamped on the backing intent as pos_staff_id / pos_staff_name. 400 invalid_staff when unknown or inactive.","type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["payor_kennitala","amount","due_date","final_due_date"],"properties":{"payor_kennitala":{"minLength":10,"maxLength":10,"type":"string"},"amount":{"minimum":1,"maximum":2147483647,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"type":"integer"}]},"due_date":{"description":"Unix timestamp","type":"number"},"final_due_date":{"description":"Unix timestamp","type":"number"},"customer":{"format":"uuid","type":"string"},"items":{"minItems":1,"maxItems":200,"description":"Line items for the reikningur's Sundurliðun block. When present their total, net of discounts, must equal amount.","type":"array","items":{"type":"object","required":["description","quantity","unit_amount","vat_rate"],"properties":{"description":{"minLength":1,"maxLength":500,"type":"string"},"quantity":{"minimum":1,"maximum":100000,"default":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100000,"default":1,"type":"integer"}]},"unit_amount":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"vat_rate":{"description":"VAT percentage: 0, 11, or 24","anyOf":[{"const":0,"type":"number"},{"const":11,"type":"number"},{"const":24,"type":"number"}]},"product_id":{"format":"uuid","type":"string"},"discount_amount":{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the line is charged at unit_amount * quantity - discount_amount.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the line is charged at unit_amount * quantity - discount_amount.","type":"integer"}]}}}},"discount_amount":{"minimum":0,"description":"Whole-sale discount in minor units. With items, amount must equal the sum of (unit_amount * quantity - line discount) less this.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"Whole-sale discount in minor units. With items, amount must equal the sum of (unit_amount * quantity - line discount) less this.","type":"integer"}]},"staff_id":{"format":"uuid","description":"Who rang the sale up, from GET /v1/pos/staff. Stamped on the backing intent as pos_staff_id / pos_staff_name. 400 invalid_staff when unknown or inactive.","type":"string"}}}},"text/plain":{"schema":{"type":"object","required":["payor_kennitala","amount","due_date","final_due_date"],"properties":{"payor_kennitala":{"minLength":10,"maxLength":10,"type":"string"},"amount":{"minimum":1,"maximum":2147483647,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":2147483647,"type":"integer"}]},"due_date":{"description":"Unix timestamp","type":"number"},"final_due_date":{"description":"Unix timestamp","type":"number"},"customer":{"format":"uuid","type":"string"},"items":{"minItems":1,"maxItems":200,"description":"Line items for the reikningur's Sundurliðun block. When present their total, net of discounts, must equal amount.","type":"array","items":{"type":"object","required":["description","quantity","unit_amount","vat_rate"],"properties":{"description":{"minLength":1,"maxLength":500,"type":"string"},"quantity":{"minimum":1,"maximum":100000,"default":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"maximum":100000,"default":1,"type":"integer"}]},"unit_amount":{"minimum":1,"anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":1,"type":"integer"}]},"vat_rate":{"description":"VAT percentage: 0, 11, or 24","anyOf":[{"const":0,"type":"number"},{"const":11,"type":"number"},{"const":24,"type":"number"}]},"product_id":{"format":"uuid","type":"string"},"discount_amount":{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the line is charged at unit_amount * quantity - discount_amount.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"POS line discount in minor units. unit_amount stays the list price; the line is charged at unit_amount * quantity - discount_amount.","type":"integer"}]}}}},"discount_amount":{"minimum":0,"description":"Whole-sale discount in minor units. With items, amount must equal the sum of (unit_amount * quantity - line discount) less this.","anyOf":[{"format":"integer","default":0,"type":"string"},{"minimum":0,"description":"Whole-sale discount in minor units. With items, amount must equal the sum of (unit_amount * quantity - line discount) less this.","type":"integer"}]},"staff_id":{"format":"uuid","description":"Who rang the sale up, from GET /v1/pos/staff. Stamped on the backing intent as pos_staff_id / pos_staff_name. 400 invalid_staff when unknown or inactive.","type":"string"}}}}}}}},"/v1/claims/{id}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"claim","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"payment_intent":{"type":"string"},"provider":{"type":"string"},"status":{"type":"string"},"claimant_id":{"type":"string"},"payor_kennitala":{"type":"string"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"other_cost":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"due_date":{"type":"number"},"final_due_date":{"type":"number"},"bank_claim_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"},"payments":{"type":"array","items":{"type":"object","required":["id","amount","principal","interest","charges","payment_type","paid_at","bank_reference","created_at"],"properties":{"id":{"type":"string"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"principal":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"interest":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"charges":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"payment_type":{"type":"string"},"paid_at":{"type":"number"},"bank_reference":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"number"}}}}},"required":["id","object","livemode","customer","payment_intent","provider","status","claimant_id","payor_kennitala","amount","other_cost","due_date","final_due_date","bank_claim_id","metadata","created_at","updated_at","payments"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"claim","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"payment_intent":{"type":"string"},"provider":{"type":"string"},"status":{"type":"string"},"claimant_id":{"type":"string"},"payor_kennitala":{"type":"string"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"other_cost":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"due_date":{"type":"number"},"final_due_date":{"type":"number"},"bank_claim_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"},"payments":{"type":"array","items":{"type":"object","required":["id","amount","principal","interest","charges","payment_type","paid_at","bank_reference","created_at"],"properties":{"id":{"type":"string"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"principal":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"interest":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"charges":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"payment_type":{"type":"string"},"paid_at":{"type":"number"},"bank_reference":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"number"}}}}},"required":["id","object","livemode","customer","payment_intent","provider","status","claimant_id","payor_kennitala","amount","other_cost","due_date","final_due_date","bank_claim_id","metadata","created_at","updated_at","payments"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"claim","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"payment_intent":{"type":"string"},"provider":{"type":"string"},"status":{"type":"string"},"claimant_id":{"type":"string"},"payor_kennitala":{"type":"string"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"other_cost":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"due_date":{"type":"number"},"final_due_date":{"type":"number"},"bank_claim_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"},"payments":{"type":"array","items":{"type":"object","required":["id","amount","principal","interest","charges","payment_type","paid_at","bank_reference","created_at"],"properties":{"id":{"type":"string"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"principal":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"interest":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"charges":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"payment_type":{"type":"string"},"paid_at":{"type":"number"},"bank_reference":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"number"}}}}},"required":["id","object","livemode","customer","payment_intent","provider","status","claimant_id","payor_kennitala","amount","other_cost","due_date","final_due_date","bank_claim_id","metadata","created_at","updated_at","payments"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"getV1ClaimsById","description":"Retrieve a claim by ID","tags":["Claims"],"security":[{"bearerAuth":[]}]}},"/v1/claims/{id}/cancel":{"post":{"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"claim","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"payment_intent":{"type":"string"},"provider":{"type":"string"},"status":{"type":"string"},"claimant_id":{"type":"string"},"payor_kennitala":{"type":"string"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"other_cost":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"due_date":{"type":"number"},"final_due_date":{"type":"number"},"bank_claim_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","customer","payment_intent","provider","status","claimant_id","payor_kennitala","amount","other_cost","due_date","final_due_date","bank_claim_id","metadata","created_at","updated_at"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"claim","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"payment_intent":{"type":"string"},"provider":{"type":"string"},"status":{"type":"string"},"claimant_id":{"type":"string"},"payor_kennitala":{"type":"string"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"other_cost":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"due_date":{"type":"number"},"final_due_date":{"type":"number"},"bank_claim_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","customer","payment_intent","provider","status","claimant_id","payor_kennitala","amount","other_cost","due_date","final_due_date","bank_claim_id","metadata","created_at","updated_at"]}},"text/plain":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"claim","type":"string"},"livemode":{"type":"boolean"},"customer":{"type":"string"},"payment_intent":{"type":"string"},"provider":{"type":"string"},"status":{"type":"string"},"claimant_id":{"type":"string"},"payor_kennitala":{"type":"string"},"amount":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"other_cost":{"anyOf":[{"format":"integer","default":0,"type":"string"},{"type":"integer"}]},"due_date":{"type":"number"},"final_due_date":{"type":"number"},"bank_claim_id":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"nullable":true,"anyOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"null"}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","object","livemode","customer","payment_intent","provider","status","claimant_id","payor_kennitala","amount","other_cost","due_date","final_due_date","bank_claim_id","metadata","created_at","updated_at"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}},"422":{"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}},"text/plain":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}}},"required":["error"]}}}}},"operationId":"postV1ClaimsByIdCancel","description":"Cancel a claim","tags":["Claims"],"security":[{"bearerAuth":[]}]}}}}