fix(join): persist billingCadence on /join signup
All checks were successful
Test / vitest (push) Successful in 11m8s
Test / playwright (push) Successful in 16m14s
Test / Notify on failure (push) Has been skipped

Mirror of the invite-accept fix (c3b1c59) for the self-serve /join path. A joiner who picked annual but abandoned before /api/helcim/subscription ran was left at billingCadence:'monthly' (the model default) with a cadence-unit contributionAmount, rendering $180/mo in admin views.

join.vue now sends cadence to /api/helcim/customer; helcimCustomerSchema accepts cadence (defaults 'monthly'); customer.post.js persists billingCadence in both the new-member create branch and the guest-upgrade $set branch, forced to 'monthly' for $0 signups.
This commit is contained in:
Jennie Robinson Faber 2026-05-24 15:30:31 +01:00
parent c3b1c59779
commit 426f233ccd
4 changed files with 67 additions and 0 deletions

View file

@ -62,6 +62,7 @@ export default defineEventHandler(async (event) => {
name: body.name,
circle: body.circle,
contributionAmount: body.contributionAmount,
billingCadence: body.contributionAmount === 0 ? 'monthly' : body.cadence,
helcimCustomerId: customerData.id,
helcimCustomerCode: customerData.customerCode,
status: 'pending_payment',
@ -76,6 +77,7 @@ export default defineEventHandler(async (event) => {
name: body.name,
circle: body.circle,
contributionAmount: body.contributionAmount,
billingCadence: body.contributionAmount === 0 ? 'monthly' : body.cadence,
helcimCustomerId: customerData.id,
helcimCustomerCode: customerData.customerCode,
status: 'pending_payment',