Payment API

post /billing/sources

Add payment source

Base URL https://api.vseepreview.com/api_v3

Authentication: User Token — Requires a user access token from login or SSO.

Add a new payment source to user account

Parameters

NameInTypeRequiredEnumDefaultDescription
X-ApiTokenheaderstringyesAPI token (e.g. your_api_token)
X-AccountCodeheaderstringyesAccount code (e.g. vclinic)
room_codequerystringyesRoom code to scope the payment source (e.g. abc)
provider_idquerystringnoProvider ID (optional) to scope the payment source (e.g. 12312)

Request body

Content type: application/json

FieldTypeRequiredEnumDescription
typestringyesPayment type (e.g. 'card')
tokenstringyesToken from Stripe

Example:

{
  "type": "string",
  "token": "string"
}

Responses

200 — Successful creation

Card Added

{
  "data": {
    "id": "card_19DrgXBY2jn2BCqQNpjjzuay",
    "type": "card",
    "brand": "Visa",
    "exp_month": 8,
    "exp_year": 2017,
    "last4": "4242",
    "is_default": true
  }
}

Machine-readable: OpenAPI JSON