Onboard customer and create subscription
API Refs
Request body
Name | Type | Description | Required |
---|---|---|---|
string | Customer email address | yes | |
firstName | string | Customer first name | no |
lastName | string | Customer last name | no |
phone | string | Customer phone number | no |
address | object | Customer address | no |
planId | number | The ID of the subscription plan/price | yes |
successUrl | string | URL to redirect after successful subscription | no |
cancelUrl | string | URL to redirect if subscription is cancelled | no |
Response
Returns a 201 Created
status with:
- customer: The created/found customer object
- stripeCustomerId: The Stripe StripeCustomerID for the external customer
- subscriptionLink: The subscription checkout link (null if policyholderId/carrierId not provided)
- message: Success message
Description
This endpoint combines customer onboarding and subscription creation into a single operation. It creates a new customer account and generates a subscription checkout link for the specified plan. The endpoint returns the created customer and a checkout link where the customer can complete their subscription setup.
Updated 3 days ago