# Payment API Landing: https://developers.vsee.io/api/payment-api · Spec JSON: https://developers.vsee.io/specs/payment_api_openapi.json Base URL: https://api.vseepreview.com/api_v3 Payment is integrated with Stripe. Use `GET /billing/settings` to retrieve the Stripe publishable key, then use Stripe.js client-side to tokenize card details before sending to VSee. Payment sources are scoped by `room_code` and optionally `provider_id`. ## GET /billing/settings URL: https://developers.vsee.io/api/payment-api/get/billing/settings Auth: User Token — Requires a user access token from login or SSO. Get payment settings Retrieve payment settings for the account Parameters: - X-ApiToken (header, string, required) — API token - X-AccountCode (header, string, required) — Account code Responses: - 200 — Successful response ```json { "data": { "stripe": { "publishable_key": "2342342" } } } ``` ## GET /billing/sources URL: https://developers.vsee.io/api/payment-api/get/billing/sources Auth: User Token — Requires a user access token from login or SSO. List payment sources Retrieve all payment sources from user account Parameters: - X-ApiToken (header, string, required) — API token - X-AccountCode (header, string, required) — Account code - type (query, string, optional) — Payment type (e.g. 'card') - room_code (query, string, required) — Room code to scope the payment source - provider_id (query, string, optional) — Provider ID (optional) to scope the payment source Responses: - 200 — Successful response ```json { "data": [ { "id": "card_19DrgXBY2jn2BCqQNpjjzuay", "type": "card", "brand": "Visa", "last4": "4242", "exp_month": 8, "exp_year": 2017, "is_default": true }, { "id": "card_19DrgXBY2jn2BCqQNpjjzub", "type": "card", "brand": "Visa", "last4": "4242", "exp_month": 8, "exp_year": 2017, "is_default": false } ] } ``` ## POST /billing/sources URL: https://developers.vsee.io/api/payment-api/post/billing/sources Auth: User Token — Requires a user access token from login or SSO. Add payment source Add a new payment source to user account Parameters: - X-ApiToken (header, string, required) — API token - X-AccountCode (header, string, required) — Account code - room_code (query, string, required) — Room code to scope the payment source - provider_id (query, string, optional) — Provider ID (optional) to scope the payment source Request body (application/json): - type (string, required) — Payment type (e.g. 'card') - token (string, required) — Token from Stripe Example request: ```json { "type": "string", "token": "string" } ``` Responses: - 200 — Successful creation ```json { "data": { "id": "card_19DrgXBY2jn2BCqQNpjjzuay", "type": "card", "brand": "Visa", "exp_month": 8, "exp_year": 2017, "last4": "4242", "is_default": true } } ``` ## GET /billing/sources/{id} URL: https://developers.vsee.io/api/payment-api/get/billing/sources/%7Bid%7D Auth: User Token — Requires a user access token from login or SSO. Get payment source Retrieve a specific payment source Parameters: - X-ApiToken (header, string, required) — API token - X-AccountCode (header, string, required) — Account code - id (path, string, required) — Payment source ID - room_code (query, string, optional) — Room code to scope the payment source - provider_id (query, string, optional) — Provider ID (optional) to scope the payment source Responses: - 200 — Successful response ```json { "data": { "id": "card_19DrgXBY2jn2BCqQNpjjzuay", "type": "card", "brand": "Visa", "exp_month": 8, "exp_year": 2017, "last4": "4242", "is_default": true } } ``` ## PUT /billing/sources/{id} URL: https://developers.vsee.io/api/payment-api/put/billing/sources/%7Bid%7D Auth: User Token — Requires a user access token from login or SSO. Set default payment source Set a payment source as default Parameters: - X-ApiToken (header, string, required) — API token - X-AccountCode (header, string, required) — Account code - id (path, string, required) — Payment source ID Request body (application/json): - is_default (boolean, optional) - room_code (string, optional) - provider_id (string, optional) Example request: ```json { "is_default": true, "room_code": "string", "provider_id": "string" } ``` Responses: - 200 — Successful update ```json { "data": { "id": "card_19DrgXBY2jn2BCqQNpjjzuay", "type": "card", "brand": "Visa", "exp_month": 8, "exp_year": 2017, "last4": "4242", "is_default": true } } ``` ## DELETE /billing/sources/{id} URL: https://developers.vsee.io/api/payment-api/delete/billing/sources/%7Bid%7D Auth: User Token — Requires a user access token from login or SSO. Delete payment source Delete a payment source from user account Parameters: - X-ApiToken (header, string, required) — API token - X-AccountCode (header, string, required) — Account code - id (path, string, required) — Payment source ID Responses: - 200 — Successful deletion ```json { "data": [] } ``` ## POST /billing/invoices/process URL: https://developers.vsee.io/api/payment-api/post/billing/invoices/process Auth: User Token — Requires a user access token from login or SSO. Process invoice Process an invoice with optional coupon code Process an invoice, optionally applying a promo/coupon code. **Parameters:** - `promo_code` — Coupon code - `intake_id` — Required — intake ID to apply the coupon to - `create_invoice` — Set to `1` to create the invoice Parameters: - X-ApiToken (header, string, required) — API token - X-AccountCode (header, string, required) — Account code Request body (application/json): - promo_code (string, optional) - intake_id (string, required) - create_invoice (integer, optional) Example request: ```json { "promo_code": "string", "intake_id": "string", "create_invoice": 0 } ``` Responses: - 200 — Successful processing ```json { "data": { "currency": "USD", "consultation": { "description": "30 mins", "amount": 30, "duration": 30, "id": "58244a53-0f28-4ff9-bdbc-7468ac1f0144" }, "coupon": { "id": "10_percents_1479363579", "percent_off": 10, "valid": true }, "amount_due": 27 } } ```