Payment And Subscription
This API is in beta testing and not fully tested/released. Follow the Welkin release note for full feature availability.
Attaches a Stripe payment method to a patient, creating a Stripe customer for the patient if one does not already exist, and creates a card SetupIntent for future off-session use. Requires the tenant to have the Stripe integration license enabled. Confirmed against welikan-payment-service (PaymentMethodController.attachPaymentMethod), routed via welikan-api-gateway-service with no field-level transformation.
Bearer token obtained from POST /{tenantName}/admin/api_clients/{clientName}. Valid for 60 minutes.
Your organization (tenant) name, e.g. acme-health
acme-healthYour environment name: live, sandbox, or a custom name
liveUUID of the patient record
Stripe PaymentMethod ID (e.g. pm_...).
pm_1NExampleStripeIdPayment method attached
Invalid request, or the Stripe API call failed (e.g. invalid or expired paymentMethodId).
Unauthorized — the Bearer token is missing, expired, or invalid.
Caller lacks UPDATE permission on payment methods for this patient.
Not found — the requested resource does not exist.
Too many requests — rate limit exceeded. Implement exponential backoff.
Internal server error.
POST /{tenantName}/{instanceName}/payment/patients/{patientId}/payment-methods HTTP/1.1
Host: api.live.welkincloud.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 42
{
"paymentMethodId": "pm_1NExampleStripeId"
}{
"paymentMethodId": "text"
}This endpoint allows you to create a new subscription for payment within a specific tenant and instance.
Request Body
name(string, required): The name of the subscription.billingPeriod(string, required): The billing period for the subscription.careMember(object, required): An object containing the ID of the care member.id(string): The ID of the care member.
patient(object, required): An object containing the ID of the patient.id(string): The ID of the patient.
paymentTypeInfo(object, required): An object containing the type of payment.paymentType(string): The type of payment for the subscription.
price(object, required): An object containing the amount and currency of the subscription.amount(number): The amount of the subscription.currency(string): The currency of the subscription.
startDate(string, required): The start date of the subscription.numberOfCycles(number, required): The number of billing cycles for the subscription.
Response
Upon successful creation of the subscription, the response will contain the details of the newly created subscription.
Bearer token obtained from POST /{tenantName}/admin/api_clients/{clientName}. Valid for 60 minutes.
Your organization (tenant) name, e.g. acme-health
acme-healthYour environment name: live, sandbox, or a custom name
liveTest Cancel Subscription LocalMONTHLY2024-08-22T00:00:00.000Z6Created subscription.
⚠️ Unverified: no create/POST implementation for subscriptions was found in the backend — only a GET-by-id client to an external payment-service exists. The response schema is inferred from that client; the request body shape is unconfirmed.
Commonly one of: NEW, ACTIVE, CANCELED, INCOMPLETE, INCOMPLETE_EXPIRED, PAST_DUE, PAUSED, TRIALING, UNPAID, COMPLETED, NOT_STARTED, RELEASED.
Bad request — the request could not be understood or was missing required parameters.
Unauthorized — the Bearer token is missing, expired, or invalid.
Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin.
Not found — the requested resource does not exist.
Too many requests — rate limit exceeded. Implement exponential backoff.
Internal server error.
POST /{tenantName}/{instanceName}/payment/subscriptions HTTP/1.1
Host: api.live.welkincloud.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 329
{
"name": "Test Cancel Subscription Local",
"billingPeriod": "MONTHLY",
"careMember": {
"id": "087cfe51-f8e5-48e7-8bcc-7ccfa470bfc1"
},
"patient": {
"id": "116c667f-2102-4c11-b28d-d71000ca34f2"
},
"paymentTypeInfo": {
"paymentType": "AUTO_CHARGE"
},
"price": {
"amount": 2500,
"currency": "USD"
},
"startDate": "2024-08-22T00:00:00.000Z",
"numberOfCycles": 6
}{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"status": "text",
"pauseCollection": {
"resumesAt": "2026-01-01T00:00:00.000Z"
}
}Last updated
Was this helpful?