Onboard customer and create subscription

📘

API Refs

Request body

NameTypeDescriptionRequired
emailstringCustomer email addressyes
firstNamestringCustomer first nameno
lastNamestringCustomer last nameno
phonestringCustomer phone numberno
addressobjectCustomer addressno
planIdnumberThe ID of the subscription plan/priceyes
successUrlstringURL to redirect after successful subscriptionno
cancelUrlstringURL to redirect if subscription is cancelledno

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.