Skip to main content

Membership & Direct Debit

When a trial lead reaches Trial Complete status, the instructor can send them a membership offer SMS. The parent follows a secure link, fills in a short form, and is directed to GoCardless to set up a Direct Debit mandate — all without leaving the browser.


How it works

  1. Lead reaches Trial Complete in the pipeline
  2. Instructor sends the Trial Conversion Offer SMS from the lead's detail sheet
  3. Parent receives a personalised link: https://yourclub.r4ptor.app/membership?t=TOKEN
  4. Parent fills in their address and accepts three consents (photo, cancellation policy, membership confirmation)
  5. Parent is redirected to GoCardless to set up their Direct Debit mandate
  6. On return, a Tasks notification is created for the instructor: "Set up GoCardless subscriptions for [name]"
  7. When the mandate is confirmed by the bank (mandates.active webhook), the lead is automatically converted to Converted

The membership form

The form is token-secured — it cannot be accessed without the unique link sent via SMS. It pre-fills all known information from the trial record so parents don't re-enter data.

What the form collects

FieldNotes
Home addressRequired for GoCardless
Photo consentOptional opt-in
Cancellation policy acknowledgementRequired
Membership confirmationRequired

Fee display

The form shows the applicable monthly fee based on the student's class:

Class typeFee setting
Snakes & CranesMEMBERSHIP_FEE_SNAKES_CRANES
JuniorsMEMBERSHIP_FEE_JUNIORS
TeensMEMBERSHIP_FEE_TEENS
Unknown / otherAll tiers shown as fallback

The annual affiliation / insurance fee (AFFILIATION_FEE_JUNIOR) is also shown.


GoCardless integration

Each r4ptor instance connects directly to the club's own GoCardless account — there is no shared payments infrastructure.

Setup

  1. Create a GoCardless account at gocardless.com
  2. In the GoCardless dashboard, go to Developers → API Keys and copy your access token
  3. In r4ptor: Admin → Settings → set GC_ACCESS_TOKEN and GC_ENVIRONMENT (sandbox or live)
  4. In GoCardless: go to Developers → Webhooks → create a new endpoint:
    • URL: https://yourclub.r4ptor.app/api/membership/webhook
    • Events: mandates
    • Copy the webhook secret
  5. In r4ptor: Admin → Settings → set GC_WEBHOOK_SECRET

What r4ptor manages

ActionWhen
Creates GoCardless redirect flowWhen parent submits membership form
Stores mandate ID and customer IDWhen parent completes GoCardless flow
Creates instructor taskImmediately — mandate is ready for subscriptions
Converts lead to memberWhen mandates.active webhook fires (bank confirmed)

What the instructor manages in GoCardless

Once the task appears, log in to GoCardless and manually create:

  • Monthly training subscription against the new mandate
  • Annual Membership/Insurance subscription against the same mandate

This is intentional — it gives the instructor flexibility for custom arrangements (family discounts, payment plans, etc.) and keeps a human in the loop for financial setup.


Tasks

When a mandate is successfully created, a High priority task is automatically added to the instructor's Tasks list:

Set up GoCardless subscriptions for [First Last] Mandate MD0… is ready. Log in to GoCardless and create:

  • Monthly training subscription
  • Annual Membership/Insurance subscription

See Tasks for how to manage these.


Webhook configuration

The webhook endpoint is per-instance — each club handles their own GoCardless events. Signature verification is enforced when GC_WEBHOOK_SECRET is set (strongly recommended for live environments).

SettingDescription
GC_ENABLEDtrue / false — enables the GoCardless flow
GC_ENVIRONMENTsandbox or live
GC_ACCESS_TOKENYour GoCardless API key
GC_WEBHOOK_SECRETWebhook signing secret from GoCardless dashboard

AppSettings reference

KeyDescription
GC_ENABLEDEnable the GoCardless mandate flow
GC_ENVIRONMENTsandbox for testing, live for real mandates
GC_ACCESS_TOKENGoCardless API access token
GC_WEBHOOK_SECRETWebhook HMAC secret for signature verification
MEMBERSHIP_FEE_SNAKES_CRANESMonthly fee for Snakes & Cranes class (£)
MEMBERSHIP_FEE_JUNIORSMonthly fee for Juniors class (£)
MEMBERSHIP_FEE_TEENSMonthly fee for Teens class (£)
AFFILIATION_FEE_JUNIORAnnual membership/insurance fee (£)
UNIFORM_STORE_URLOptional link to kit/uniform shop shown on confirmation page